Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

discord js how to mention bot

//to mention bot you need the client.user
//like this

client.on('message' , message => {
	if(message.isMemberMentioned(client.user)) return message.channel.send(client.user)
})
//don't worry about the isMemberMentioned i only used it to make the bot detect if it's was mentioned
Comment

discord js mention

// mention user:
msg = "Write to <@USERID>";
// mention role:
msg = "Dont ping <@&ROLEID>";
Comment

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!");
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript store date in localstorage 
Javascript :: javascript is JSON string valid 
Javascript :: strapi login api 
Javascript :: react typewriter 
Javascript :: electron Uncaught ReferenceError: require is not defined at recorder.js:1 
Javascript :: react state add to array 
Javascript :: sum of number using reduce 
Javascript :: sort array by date 
Javascript :: javascript context color 
Javascript :: image onclick function react 
Javascript :: javascript number pyramid 
Javascript :: jquery $(...)..each() is not a function 
Javascript :: difference between shift and unshift in javascript 
Javascript :: subtract two date javascript 
Javascript :: javascript change element id 
Javascript :: navigate-to-an-anchor-on-another-page 
Javascript :: how to reverse an array in javascript 
Javascript :: inline style in nextjs 
Javascript :: jquery on load 
Javascript :: how to remove element from array in javascript 
Javascript :: get only one value from object array javascript 
Javascript :: react native image source local file 
Javascript :: iterate formData 
Javascript :: iterate through array javascript 
Javascript :: javascript how to set cursor for whole page 
Javascript :: Convert a string to an integer in jQuery 
Javascript :: repeat react component n times 
Javascript :: javascript last element of an array 
Javascript :: How to insert divider in react native 
Javascript :: mongoose schema 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =