The bot cannot time out certain users which leads to a crash.
We should add some kind of fail-safe to ensure that this does not happen.
/home/discordbot/DiscordBot/node_modules/discord.js/src/rest/RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Missing Permissions
at RequestHandler.execute (/home/discordbot/DiscordBot/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/discordbot/DiscordBot/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async GuildMemberManager.edit (/home/discordbot/DiscordBot/node_modules/discord.js/src/managers/GuildMemberManager.js:279:15) {
method: 'patch',
path: '/guilds/103678524375699456/members/89926310410850304',
code: 50013,
httpStatus: 403,
requestData: {
json: {
communicationDisabledUntil: 1644968087094,
communication_disabled_until: '2022-02-15T23:34:47.094Z'
},
files: []
}
}
The bot cannot time out certain users which leads to a crash.
We should add some kind of fail-safe to ensure that this does not happen.