Skip to content

Discord bot not creating category #505

@lesleyxyz

Description

@lesleyxyz

My discord bot is showing up in my server, it's responding to commands, but it's saying:

api-1       | Error handling button interaction Error: Expected token to be set for this request, but none was present
api-1       |     at _REST.resolveRequest (/app/node_modules/@discordjs/rest/dist/index.js:1346:15)
api-1       |     at _REST.queueRequest (/app/node_modules/@discordjs/rest/dist/index.js:1306:46)
api-1       |     at _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1272:33)
api-1       |     at _REST.post (/app/node_modules/@discordjs/rest/dist/index.js:1246:17)
api-1       |     at RoleManager.create (/app/node_modules/discord.js/src/managers/RoleManager.js:161:41)
api-1       |     at /app/dist/discord/agile/channels.js:169:58
api-1       |     at step (/app/dist/discord/agile/channels.js:33:23)
api-1       |     at Object.next (/app/dist/discord/agile/channels.js:14:53)
api-1       |     at /app/dist/discord/agile/channels.js:8:71
api-1       |     at new Promise (<anonymous>)

This is pointing at these lines:

const allowedRole = await guild.roles.create({
name: ctf.title,
mentionable: true,
});

Perhaps instead of const guild = interaction guild you have to

await interaction.client.guilds.fetch(interaction.guildId);

Or am I doing something wrong?
The DISCORD_SERVER_ID is most certainly correct

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions