src/structures/commands/BaseCommand.js
/**
     * Checks if the bot has the required permissions to properly execute the command it was asked to execute
     * @private
     */
Checks if the bot has the required permissions to properly execute the command it was asked to execute
@private
Checks if the bot has the required permissions to properly execute the command it was asked to execute @private
_hasSelfPermissions() {
        if (!this.msgObj.guild || !this.serverMember) return true;
        if (!this.self_permission) return true;
        if (this.self_permission['channel'] || this.self_permission['text_channel'] || this.self_permission['voice_channel']) {
            if (this.voiceChannel && (this.self_permission['channel'] || this.self_permission['voice_channel']) && !this.voiceChannel.permissionsFor(this._m.user.id).has(this.self_permission['channel'] || this.self_permission['voice_channel'])) {
                const embed = new MessageEmbed()
                    .setTitle("❌ Missing Permissions ❌")
                    .setDescription(`**__I__ don't have the __${this.self_permission['channel'] || this.self_permission['voice_channel']}__ permission**\nfor voice channel you're in.`)
                    .setColor("#ffff00")
                this.textChannel.send(embed);
                return false;
            }
            if ((this.self_permission['channel'] || this.self_permission['voice_channel']) && !this.textChannel.permissionsFor(this._m.user.id).has(this.self_permission['channel'] || this.self_permission['text_channel'])) {
                const embed = new MessageEmbed()
                    .setTitle("❌ Missing Permissions ❌")
                    .setDescription(`**__I__ don't have the __${this.self_permission['channel'] || this.self_permission['text_channel']}__ permission**\nfor this text channel.`)
                    .setColor("#ffff00")
                this.textChannel.send(embed);
                return false;
            }
        }
        return true;
    }
_hasSelfPermissions ( ) { if ( ! this . msgObj . guild || ! this . serverMember ) return true ; if ( ! this . self_permission ) return true ; if ( this . self_permission [ 'channel' ] || this . self_permission [ 'text_channel' ] || this . self_permission [ 'voice_channel' ] ) { if ( this . voiceChannel && ( this . self_permission [ 'channel' ] || this . self_permission [ 'voice_channel' ] ) && ! this . voiceChannel . permissionsFor ( this . _m . user . id ) . has ( this . self_permission [ 'channel' ] || this . self_permission [ 'voice_channel' ] ) ) { const embed = new MessageEmbed ( ) . setTitle ( "❌ Missing Permissions ❌") . setDescription ( ` ${ this . self_permission [ 'channel' ] || this . self_permission [ 'voice_channel' ] } \n ` ) . setColor ( "#ffff00" ) this . textChannel . send ( embed ) ; return false ; } if ( ( this . self_permission [ 'channel' ] || this . self_permission [ 'voice_channel' ] ) && ! this . textChannel . permissionsFor ( this . _m . user . id ) . has ( this . self_permission [ 'channel' ] || this . self_permission [ 'text_channel' ] ) ) { const embed = new MessageEmbed ( ) . setTitle ( "❌ Missing Permissions ❌") . setDescription ( ` ${ this . self_permission [ 'channel' ] || this . self_permission [ 'text_channel' ] } \n ` ) . setColor ( "#ffff00" ) this . textChannel . send ( embed ) ; return false ; } } return true ; }
Checks if the bot has the required permissions to properly execute the command it was asked to execute
 @private
Checks if the bot has the required permissions to properly execute the command it was asked to execute @private