我正在处理我的加入消息,并且很好奇如何让机器人不以嵌入方式发送提及,如下所示:photo
我有这样的:photo
我当前的代码是:
client.on('guildMemberAdd', async(member) => { // this event gets triggered when a new member joins the server!
const Channel = member.guild.channels.cache.get('761871578178387989')
const embed = new Discord.MessageEmbed()
.setTitle(`:wave: Hello ${member.user.tag} and welcome to **${member.guild.name}**.`)
.setThumbnail(member.user.displayAvatarURL({dynamic: true, size: 512}))
.addField('Consider checking it!', '**Server IP:** play.aftnetwork.net\n**Store:** https://store.aftnetwork.net\n\n**Make sure to check <#761874528702824469>.**', true)
.setFooter(`AftNetwork`)
.setColor('#468DFF')
// sends a message to the channel
Channel.send(embed)
})
我应该在代码中添加什么来获得想要的结果?请帮助<3
答案 0 :(得分:0)
您可以使用 TextChannel.send() 方法来实现,该方法接受一个可选的 options
参数 (MessageOptions) 作为第二个参数,您可以在其中指定嵌入。
这是一个例子:
Channel.send(member, {
embed: embed,
});
// member is the GuildMember that joined your server and embed is your MessageEmbed.