标签: javascript node.js discord discord.js bots
我知道这个问题以前曾被问过,但现在是2020年而不是2018年,那么如何检查消息的作者是否是机器人?
答案 0 :(得分:1)
根据discordjs文档,您可以使用message.author.bot
message.author.bot
https://discord.js.org/#/docs/main/stable/class/User?scrollTo=bot
这是一个布尔值。
答案 1 :(得分:0)
您可以使用:message.author.bot;
有关更多信息:https://shrinke.me/DiscordBot2020Bot
示例:https://shrinke.me/07PNJfW