File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/discord.js/src/structures Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -470,9 +470,11 @@ class GuildChannel extends BaseChannel {
470470 if ( permissions . has ( PermissionFlagsBits . Administrator , false ) ) return true ;
471471 if ( this . guild . members . me . communicationDisabledUntilTimestamp > Date . now ( ) ) return false ;
472472
473+ const baseBitfield = PermissionFlagsBits . ViewChannel | PermissionFlagsBits . ManageChannels ;
473474 const bitfield = VoiceBasedChannelTypes . includes ( this . type )
474- ? PermissionFlagsBits . ManageChannels | PermissionFlagsBits . Connect
475- : PermissionFlagsBits . ViewChannel | PermissionFlagsBits . ManageChannels ;
475+ ? baseBitfield | PermissionFlagsBits . Connect
476+ : baseBitfield ;
477+
476478 return permissions . has ( bitfield , false ) ;
477479 }
478480
You can’t perform that action at this time.
0 commit comments