【问题标题】:Disabling bot in the specific servers在特定服务器中禁用机器人
【发布时间】:2022-02-01 03:12:47
【问题描述】:

我想在特定服务器中禁用我的机器人,并将其放入我的命令 if 语句中。怎么做?

if (!message.content.startsWith(prefix) /* || Disabling the specific servers here */) return;

【问题讨论】:

  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。

标签: javascript node.js if-statement discord.js


【解决方案1】:

查看公会ID

if (!message.content.startsWith(prefix) || ["guildId1", "guildId2"].includes(message.guildId)) return;

【讨论】:

    猜你喜欢
    • 2021-12-22
    • 1970-01-01
    • 2020-12-09
    • 2018-09-24
    • 1970-01-01
    • 1970-01-01
    • 2022-01-19
    • 1970-01-01
    • 2020-12-16
    相关资源
    最近更新 更多