fix(VoiceState) channel return null (DM/Group)

This commit is contained in:
March 7th 2022-07-15 18:20:34 +07:00
parent d09b7a7bf5
commit cbfe38f714

View File

@ -142,7 +142,7 @@ class VoiceState extends Base {
* @readonly * @readonly
*/ */
get channel() { 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; return this.guild.channels.cache.get(this.channelId) ?? null;
} }