Using your code i always get DiscordAPIError: Missing Access on launch even tough the bot has every permission. The commands work fine.
DiscordAPIError: Missing Access
at RequestHandler.execute (/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async GuildApplicationCommandManager.set (/node_modules/discord.js/src/managers/ApplicationCommandManager.js:146:18)
at async Client.<anonymous> (/Ticket bot/handler/index.js:74:7) {
method: 'put',
path: '/applications/927216144702668872/guilds/927224001141538816/commands',
code: 50001,
httpStatus: 403,
requestData: { json: [ [Object] ], files: [] }
} Promise {
<rejected> DiscordAPIError: Missing Access
at RequestHandler.execute (/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async GuildApplicationCommandManager.set (/node_modules/discord.js/src/managers/ApplicationCommandManager.js:146:18)
at async Client.<anonymous> (/handler/index.js:74:7) {
method: 'put',
path: '/applications/927216144702668872/guilds/927224001141538816/commands',
code: 50001,
httpStatus: 403,
requestData: { json: [Array], files: [] }
}
}