From 089b75083801d7b2d6b6cab889efd356569c51b9 Mon Sep 17 00:00:00 2001 From: Essem Date: Tue, 25 Oct 2022 11:57:15 -0500 Subject: [PATCH] Remove unnecessary guild check from host --- commands/music/host.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/music/host.js b/commands/music/host.js index 0f8af67..93d9f5a 100644 --- a/commands/music/host.js +++ b/commands/music/host.js @@ -34,7 +34,7 @@ class HostCommand extends MusicCommand { } if (!user) return "I can't find that user!"; if (user.bot) return "This is illegal, you know."; - const member = this.guild ? this.guild.members.get(user.id) : undefined; + const member = this.guild.members.get(user.id); if (!member) return "That user isn't in this server!"; const object = this.connection; object.host = member.id; @@ -42,7 +42,7 @@ class HostCommand extends MusicCommand { this.success = true; return `🔊 ${member.mention} is the new voice channel host.`; } else { - const member = this.guild ? this.guild.members.get(players.get(this.guild.id).host) : undefined; + const member = this.guild.members.get(players.get(this.guild.id).host); this.success = true; return `🔊 The current voice channel host is **${member?.username}#${member?.discriminator}**.`; }