Describe the bug
If you use any gamecord game, remove the bot's perms, then once the bot tries to edit the message, the bot crashes due to Missing Access.
To Reproduce
Use any gamecord game
Remove its permissions
The bot tries to edit the message (because thats how it works)
The bot can't edit it and crashes
Expected behavior
I expected the bot to simply cancel the game, but it crashes.
Screenshots
Please complete the following information:
Node Version: 18.12.1
Gamecord Version: 4.1.0
Discord.js Version: 14.7.1
Additional context
This may cause issues once the bot joins more servers and one of the servers' admins tries to crash the bot with malicious intent.
I believe a simple way to fix this would be:
if (!message.channel.permissionsFor(client.user).toArray().includes('SendMessages')) return;
Describe the bug If you use any gamecord game, remove the bot's perms, then once the bot tries to edit the message, the bot crashes due to
Missing Access
.To Reproduce
Expected behavior I expected the bot to simply cancel the game, but it crashes.
Screenshots
Please complete the following information:
Additional context This may cause issues once the bot joins more servers and one of the servers' admins tries to crash the bot with malicious intent. I believe a simple way to fix this would be:
if (!message.channel.permissionsFor(client.user).toArray().includes('SendMessages')) return;