📜  discord.js 提及 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:50.706000             🧑  作者: Mango

代码示例1
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)
    }
});