π¬Managing messages
How to create a message?
Using REST methods
client.rest.channels.createMessage(channelID, options);
client.createMessage(channelID, options);
// e.g:
client.rest.channels.createMessage("abcd-12345", { content: "hi!" });
client.createMessage("abcd-12345", { content: "hi!" });Using the Message itself
createMessage β Reply to the trigger message.
Message.createMessage(options); // acknowledges and reply to the MessagecreateFollowup
How do I detect when a message is created, edited or deleted?
Detect when a message is created
Detect when a message is edited
Detect when a message is deleted
Create a message when someone says 'hi'
Another way to do that without storing the message 'member'
Common mistakes
Replying to a message
Logging things to a specific channel
Deleting messages containing swear words
Editing messages
1. Storing new messages.
2. Using editLast
2. Using editOriginal
2. Using editFollowup
Last updated