diff --git a/src/eventHandlers/InteractionHandler.js b/src/eventHandlers/InteractionHandler.js index d79ca85dd..0d3ac6f21 100644 --- a/src/eventHandlers/InteractionHandler.js +++ b/src/eventHandlers/InteractionHandler.js @@ -252,6 +252,7 @@ module.exports = class InteractionHandler extends require('../models/BaseEventHa // fetch can fail due to missing access. swallow error. guild = await this.client.guilds.fetch(gid); } 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));