forced reaction remove error handling

This commit is contained in:
Baipyrus 2024-02-16 18:26:25 +01:00
parent 064abe7e24
commit ab6ca9edeb

View File

@ -33,7 +33,13 @@ export async function execute(reaction, user) {
// Deny if unregistered // Deny if unregistered
if (rep === null) { if (rep === null) {
// Remove reaction and quit // Remove reaction and quit
await reaction.remove(); try {
reaction.remove();
} catch (error) {
// Missing permissions
console.error(error)
await user.send('Unable to remove reaction. Please contact server staff.');
}
return; return;
} }