Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js bot mention

// We are going to use regex because its the best way to check
// client -> your discord.js Client variable

if (message.content.match(/^<@!?${client.user.id}>( |)$/)) 
  return message.channel.send("Hello! thanks for mentioning me!");
 
PREVIOUS NEXT
Tagged: #bot #mention
ADD COMMENT
Topic
Name
2+3 =