Remove unnecessary guild check from host

This commit is contained in:
Essem 2022-10-25 11:57:15 -05:00
parent 5d8ecbf90a
commit 089b750838
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
1 changed files with 2 additions and 2 deletions

View File

@ -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}**.`;
}