Skip to content

Commit

Permalink
fix: ignore perm issues from setting guild ccs
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 3, 2021
1 parent e656ca7 commit 9d6e041
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/eventHandlers/InteractionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ module.exports = class InteractionHandler extends require('../models/BaseEventHa
try {
// fetch can fail due to missing access. swallow error.
guild = await this.client.guilds.fetch(gid);
if (!guild) continue; // probably should consider checking if the bot is in the server?
const guildCCs = grouped[gid];
guildCCs.length = 50;
await guild?.commands?.set(guildCCs.filter(c => c));
} catch (ignore) { /* Ignored */ }
if (!guild) continue; // probably should consider checking if the bot is in the server?
const guildCCs = grouped[gid];
guildCCs.length = 50;
await guild?.commands?.set(guildCCs.filter(c => c));
}
}
}
Expand Down

0 comments on commit 9d6e041

Please sign in to comment.