Skip to content

Commit

Permalink
Remove unnecessary guild check from host
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEssem committed Oct 25, 2022
1 parent 5d8ecbf commit 089b750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/music/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ 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;
players.set(this.guildID, object);
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}**.`;
}
Expand Down

0 comments on commit 089b750

Please sign in to comment.