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 :: react native override style 
Javascript :: javascript sort numbers descending 
Javascript :: scroll top js 
Javascript :: jquery append table row 
Javascript :: js get substring before character 
Javascript :: how to add data to file json in python 
Javascript :: regex is not empty string 
Javascript :: npm chalk 
Javascript :: check if key does not exists in dictionary javascript 
Javascript :: settimeout in javascript 
Javascript :: how to delete element in array in javascript 
Javascript :: react native cross out letter 
Javascript :: what is the correct json content type 
Javascript :: sleeping in js 
Javascript :: chart.js label word wrap 
Javascript :: js  
Javascript :: toast in angular not working 
Javascript :: javascript immediately invoked function expression 
Javascript :: javascript get parent by tag 
Javascript :: expo react native send image to api 
Javascript :: how to make link in discord.js 
Javascript :: react forms 
Javascript :: to lowercase js 
Javascript :: unity javascript 
Javascript :: How to get the Class Name of an Object in JavaScript 
Javascript :: redirect http to https express js 
Javascript :: react router dom v6 active link 
Javascript :: change next js default port 
Javascript :: react native backgrunde img 
Javascript :: axios cancel request 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =