From 117ff23a0ce7c2313f09475f53f52822e75fc0c0 Mon Sep 17 00:00:00 2001 From: Sammy Date: Sun, 11 Jun 2023 15:42:31 +0200 Subject: [PATCH] remove typecast to unknown Somehow I thought it was necessary because the compiler said it at some point --- server/commands/closepoll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)