“discord.js mentionner” Réponses codées

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

discord.js mentionner

client.on('message', message=> {
    if (message.author.bot) return;
    if (message.mentions.has('@here')) return;
    if (message.mentions.has('@everyone')) return;     
    if (message.mentions.has(client.user))
    {
        var embed = new Discord.MessageEmbed()
      .setColor('RANDOM')
      .setTimestamp(0)
      .setTitle(`**بادئتي هى** : \`&\``)
      .setAuthor(client.user.username, client.user.displayAvatarURL())
      .setThumbnail(client.user.displayAvatarURL())
      .setFooter(`بواسطة ${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL())
    message.channel.send(embed)
    }
});
EXATUBE™

Réponses similaires à “discord.js mentionner”

Questions similaires à “discord.js mentionner”

Plus de réponses similaires à “discord.js mentionner” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code