From 5b038977b80360c3af5547a156aea96774a83e73 Mon Sep 17 00:00:00 2001 From: BestCodes <106822363+The-Best-Codes@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:57:21 -0600 Subject: [PATCH] fix: only add viewable channels to bot context (#7678) Signed-off-by: The-Best-Codes <106822363+The-Best-Codes@users.noreply.github.com> --- services/ask-ai-bot/utils/discord/server-context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));