//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 中收到的錯誤訊息,我不確定缺少訪問權限是什么意思。提前致謝!
uj5u.com熱心網友回復:
這是一個很常見的問題你可以去開發部門
https://discord.com/developers/applications 按照下面的模式
第1步
第2步
然后復制下面的網址粘貼到網頁上,然后選擇你要創建斜杠命令的位置,就這樣!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/322639.html
標籤:javascript github 英雄 不和谐.js
