【问题标题】:How to add channels and categories with bot Discord如何使用 bot Discord 添加频道和类别
【发布时间】:2020-10-14 01:08:25
【问题描述】:

只是想知道,添加频道和类别的功能是什么?我到处搜索,“.createChannel”只是不起作用。它在控制台中告诉我该功能不存在。我使用的文档是https://discord.js.org/,但似乎没有解决方案。如果有人知道这个问题的答案,将不胜感激。这就是我想要使用的:

    message.guild.createChannel('channel-name', 'text', [{
        id: message.guild.id
    };

【问题讨论】:

  • 你有什么代码可以提供吗?

标签: javascript discord.js


【解决方案1】:

使用 discord.js v.12,您需要使用 guild.channels.create()。有了它,您可以传递许多参数,包括通道类型textvoicecategory

使用 discord.js v.11,您需要使用 guild.createChannel()

【讨论】:

    猜你喜欢
    • 2020-11-04
    • 2021-07-20
    • 2020-03-12
    • 1970-01-01
    • 2020-07-14
    • 2020-11-03
    • 1970-01-01
    • 2019-05-05
    • 2021-08-28
    相关资源
    最近更新 更多