Skip to main content

chats.send

chats.send allows a user to send a message to a specified channel.

Security level

FULLSEC

Syntax

CLI

chats.send { channel: "example_channel", msg: "this is a message" }

Script

#fs.chats.send({ channel: "example_channel", msg: "this is a message" })

Parameters

channel (required)

The 'channel' argument specifies the channel in which to send a message.

message (required)

The 'message' argument specifies the message to be sent, up to 1000 characters and 10 lines.

Return

Returns an object.

CLI

>>chats.send { channel: "example_channel", msg: "this is a message" }
Msg Sent

1621 example_channel <user> :::this is a message:::

Script

Same as CLI.

Example

function(context, args)
{
return #fs.chats.send({ channel: "example_channel", msg: "this is a message" })
}