diff --git a/services/ask-ai-bot/utils/discord/server-context.ts b/services/ask-ai-bot/utils/discord/server-context.ts index 2f4da1240c..6fc727114b 100644 --- a/services/ask-ai-bot/utils/discord/server-context.ts +++ b/services/ask-ai-bot/utils/discord/server-context.ts @@ -8,7 +8,7 @@ export async function buildServerContext(guild: Guild): Promise { const textChannels = Array.from(channels.values()) .filter( (ch): ch is TextChannel => - ch?.type === ChannelType.GuildText && ch !== null, + ch?.type === ChannelType.GuildText && ch !== null && ch.viewable, ) .sort((a, b) => (a.position ?? 0) - (b.position ?? 0));