Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AlexzanderFlores/04eec32cf73d5c176e3da968e8224971 to your computer and use it in GitHub Desktop.
Save AlexzanderFlores/04eec32cf73d5c176e3da968e8224971 to your computer and use it in GitHub Desktop.
const botId = '723819104045105172'
client.on('message', (message) => {
// If your bot is tagged at all:
for (const user of message.mentions.users) {
if (user.id === botId) {
// TODO: Send help command via message.channel.send
break
}
}
// OR if you want to see if the message is ONLY "@YourBot" and nothing else:
if (message.content === `<@!${botId}>`) {
// TODO: Send your help command via message.channel.send
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment