【问题标题】:Slash command echo DiscordAPIError: Missing Access in heroku斜线命令 echo DiscordAPIError:heroku 中缺少访问权限
【发布时间】:2021-12-04 12:01:17
【问题描述】:
//slash command to echo 
bot.on("ready", async () => {
    bot.user.setPresence({ activities: [{ name: "Tedi", type: "WATCHING"}] });
    console.log("bye");
    const data = {
        name: "echo",
        description: "Echo your text",
        options: [{
            name: "text",
            type: "STRING",
            description: "The user input",
            required: true,
        }],
    };
const command = await bot.guilds.cache.get('server id number')?.commands.create(data);
})

这是我在 heroku 中收到的错误消息,我不确定缺少访问权限是什么意思。 提前致谢!

【问题讨论】:

标签: javascript github heroku discord.js


【解决方案1】:

这是一个很常见的问题 你可以去开发部

https://discord.com/developers/applications 遵循以下模式

Step 1

Step 2

然后复制下面的网址粘贴到网页上,然后选择你要创建斜杠命令的位置,就这样了!

【讨论】:

    猜你喜欢
    • 2021-09-09
    • 2021-08-28
    • 2022-01-05
    • 2021-04-08
    • 2022-01-25
    • 2021-11-29
    • 2021-01-20
    • 2021-12-18
    • 1970-01-01
    相关资源
    最近更新 更多