mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix: only add viewable channels to bot context (#7678)
Signed-off-by: The-Best-Codes <106822363+The-Best-Codes@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,7 @@ export async function buildServerContext(guild: Guild): Promise<string> {
|
||||
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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user