From 63e46e48873af0ff85572a2d448f12c4780785c6 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Thu, 25 Aug 2022 13:13:16 -0500 Subject: [PATCH] fix: unsafe thing --- packages/core/src/structures/channels.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/structures/channels.ts b/packages/core/src/structures/channels.ts index 854ac8f..2ee9567 100644 --- a/packages/core/src/structures/channels.ts +++ b/packages/core/src/structures/channels.ts @@ -929,9 +929,9 @@ export class ChannelFactory { return new VoiceChannel(session, channel, channel.guild_id!); case ChannelTypes.GuildStageVoice: return new StageChannel(session, channel, channel.guild_id!); - default: - throw new Error('Channel was not implemented'); } + + return null as any; } static from(session: Session, channel: DiscordChannel): Channel { @@ -955,7 +955,7 @@ export class ChannelFactory { if (textBasedChannels.includes(channel.type)) { return new TextChannel(session, channel); } - throw new Error('Channel was not implemented'); + return null as any; } }