When I start the bot and use my "ping" command I get this error:
js:350
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Missing Access
at RequestHandler.execute (C:\Users\LiamS\OneDrive\Documenten\Chill Lounge\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\LiamS\OneDrive\Documenten\Chill Lounge\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async GuildApplicationCommandManager.set (C:\Users\LiamS\OneDrive\Documenten\Chill Lounge\node_modules\discord.js\src\managers\ApplicationCommandManager.js:156:18)
at async Client.<anonymous> (C:\Users\LiamS\OneDrive\Documenten\Chill Lounge\handler\index.js:45:9) {
method: 'put',
path: '/applications/996753512807530637/guilds/996381328255750206/commands',
code: 50001,
httpStatus: 403,
requestData: {
json: [
{
name: 'ping',
name_localizations: undefined,
description: 'returns websocket ping',
description_localizations: undefined,
type: 1,
options: undefined,
default_permission: undefined
}
],
files: []
}
}
Can someone please help me?
It's a guess, because you didn't post any code, but I'm assuming that you are trying to register "ping" slash command on a specific guild (aka "server"), and the error is likely because your bot is lacking application.commands scope on that guild and therefore can't register that command.
So try re-inviting the bot to that guild with application.commands scope included and see if it helps.