diff --git a/src/modules/autorole.ts b/src/modules/autorole.ts index dcbc4dc..724b376 100644 --- a/src/modules/autorole.ts +++ b/src/modules/autorole.ts @@ -11,7 +11,7 @@ export async function autoroleModule({ client }: Bot) { } for (const ar of autorole) { - const msg = await channel.messages.fetch(ar.msgID); + const msg = await channel.messages.fetch(ar.msgID).catch(() => null); if (!msg) { console.error(`Role message does not exist for ${ar.msgID}`); }