# SendMessage

Sends a message to the given Revolt channel&#x20;

To use the `sendMessage`function, you need to require the Osiris API.

You need to call the function with the first argument being the XSessionToken, the second argument being the Channel and the third argument being the message.

Here's an example of it in a command:

<pre class="language-javascript"><code class="lang-javascript">const { osiris } = require("../../api/osiris");
// Inside the command
// The XSessionToken is an argument for the "execute" function, 
// so you automatically have it whenever creating a command
const Channel = data.ChannelId;
osiris.sendMessage(XSessionToken, Channel, "Message").then((message) => {
<strong>    console.log("[REVOLT]: SENT!");
</strong>})
</code></pre>
