From cbfe38f7147552890e5aedb13e9e60872db84a79 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 15 Jul 2022 18:20:34 +0700 Subject: [PATCH] fix(VoiceState) channel return null (DM/Group) --- src/structures/VoiceState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/VoiceState.js b/src/structures/VoiceState.js index 7916aaa..de49b81 100644 --- a/src/structures/VoiceState.js +++ b/src/structures/VoiceState.js @@ -142,7 +142,7 @@ class VoiceState extends Base { * @readonly */ get channel() { - if (!this.guild?.id) return null; + if (!this.guild?.id) return this.guild.client.channels.cache.get(this.channelId) ?? null; return this.guild.channels.cache.get(this.channelId) ?? null; }