SendMessage

SendMessage API

Sends a message to the given Revolt channel

To use the sendMessagefunction, 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:

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) => {
    console.log("[REVOLT]: SENT!");
})

Last updated