From 382f4da29e92c524ed3bdde30ded6bdf92960e84 Mon Sep 17 00:00:00 2001 From: Essem Date: Mon, 30 Aug 2021 16:17:20 -0500 Subject: [PATCH] Fixed sound player permission check --- utils/soundplayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/soundplayer.js b/utils/soundplayer.js index 4a1a76f..c0d89b3 100644 --- a/utils/soundplayer.js +++ b/utils/soundplayer.js @@ -54,7 +54,7 @@ export async function play(client, sound, message, music = false) { if (!manager) return "The sound commands are still starting up!"; if (!message.channel.guild) return "This command only works in servers!"; if (!message.member.voiceState.channelID) return "You need to be in a voice channel first!"; - if (!message.channel.permissionsOf(client.user.id).has("voiceConnect")) return "I can't join this voice channel!"; + if (!message.channel.guild.permissionsOf(client.user.id).has("voiceConnect")) return "I can't join this voice channel!"; const voiceChannel = message.channel.guild.channels.get(message.member.voiceState.channelID); if (!voiceChannel.permissionsOf(client.user.id).has("voiceConnect")) return "I don't have permission to join this voice channel!"; const player = players.get(message.channel.guild.id);