“Discord JS Mention” Réponses codées

Discord JS Comment mentionner le 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
Open Oystercatcher

Discord JS Mention

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

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

Réponses similaires à “Discord JS Mention”

Questions similaires à “Discord JS Mention”

Plus de réponses similaires à “Discord JS Mention” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code