Home > Enterprise >  Slash command echo DiscordAPIError: Missing Access in heroku
Slash command echo DiscordAPIError: Missing Access in heroku

Time:10-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);
})

error

This is the error message I'm getting in heroku and I'm not sure what missing access means. Thanks in advance!

CodePudding user response:

This is a very common problem You can go to the developer department

https://discord.com/developers/applications Follow the pattern below

Step 1

Step 2

Then copy the following URL and paste it on the web page, then choose where you want to create the slash command, and that's it!

  • Related