diff --git a/server/commands/closepoll.ts b/server/commands/closepoll.ts index fa3be24..fb8e74c 100644 --- a/server/commands/closepoll.ts +++ b/server/commands/closepoll.ts @@ -29,7 +29,7 @@ export default new Command({ export async function closePoll(guild: Guild, requestId: string) { const guildId = guild.id logger.info("stopping poll", { guildId: guildId, requestId }) - const channels: TextChannel[] = (await guild.channels.fetch()) + const channels: TextChannel[] = (await guild.channels.fetch()) ?.filter(channel => channel!.id === config.bot.announcement_channel_id) .map((value, _) => value)