【发布时间】: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 中收到的错误消息,我不确定缺少访问权限是什么意思。 提前致谢!
【问题讨论】:
-
您是否在开发者门户中启用了
application.commands
标签: javascript github heroku discord.js