Skip to content

TypeScript code snippet – How to delete a message by its id?

// ASSUMPTIONS:
// channel: the channel you want the message to be sent in
// lastmsg: the id of the last poll message

channel.fetchMessage(lastmsg).then(msg => msg.delete());
See also  PHP code snippet - How to pass value from one page to another using session?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.