🟦message

The message event is triggered whenever the server sends a message, whether it is a private message or a channel message.

bot.on('message', (data) => {
     // Your code here
});

Parameters

  • data.sender (string) – The sender of the message.

  • data.target (string) – The recipient of the message (channel or user).

  • data.content (string) – The content of the message.

  • data.raw (string) – The raw message data from the server.

Last updated