Slash command echo DiscordAPIError: Missing Access in heroku
Slash command echo DiscordAPIError: Missing Access in heroku
//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 中收到的错误消息,我不确定缺少访问权限是什么意思。
提前致谢!
这是一个很常见的问题
你可以去开发部
https://discord.com/developers/applications
按照下面的模式
Step 1
Step 2
然后把下面的URL复制粘贴到网页上,然后选择你要创建斜杠命令的地方,就可以了!
//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 中收到的错误消息,我不确定缺少访问权限是什么意思。 提前致谢!
这是一个很常见的问题 你可以去开发部
https://discord.com/developers/applications 按照下面的模式
Step 1
Step 2
然后把下面的URL复制粘贴到网页上,然后选择你要创建斜杠命令的地方,就可以了!