The message event is triggered whenever the server sends a message, whether it is a private message or a channel message.
message
bot.on('message', (data) => { // Your code here });
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 1 year ago