Skip to content

Commit

Permalink
critical issue fixxed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomato6966 authored Nov 13, 2021
1 parent 92b6a65 commit 8d6a21e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events/guild/voiceStateUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = async (client, oS, nS) => {
/**
* ALWAYS SERVER DEAF THE BOT WHEN JOING
*/
if (nS.channelId != oS.channelId && !nS.guild.me.voice.deaf) {
if (nS.id === client.user.id && nS.channelId != oS.channelId && !nS.guild.me.voice.deaf) {
if (nS.guild.me.permissions.has(Permissions.FLAGS.DEAFEN_MEMBERS) || (nS.channel && nS.channel.permissionsFor(nS.guild.me).has(Permissions.FLAGS.DEAFEN_MEMBERS))) {
nS.setDeaf(true).catch(() => {});
}
Expand Down

0 comments on commit 8d6a21e

Please sign in to comment.