pyraxo / sylphy

👑 the better discord bot framework
GNU Affero General Public License v3.0
95 stars 24 forks source link

Issue with permissions #40

Closed TMUniversal closed 4 years ago

TMUniversal commented 4 years ago

I've tried making some moderation commands with your framework, but it doesn't seem to care about the permissions I set. This is how the commands file begins:

const { Command } = require('sylphy');

class Purge extends Command {
    constructor (...args) {
        super (...args, {
            name: 'purge',
            group: 'moderation',
            aliases: ['clear', 'delete', 'prune'],
            cooldown: 2,
            options: { guildOnly: true, requirements: { permissions: { manageMessages: true } } },

Am I doing it wrong or is there actually an issue?

bit0r1n commented 4 years ago

it takes permissions for author from options.permissions[] and for bot options.botPerms[]

TMUniversal commented 4 years ago

Thanks a lot. What does the array need to contain? I've tried 'MANAGE_MESSAGES', unsuccessfully

bit0r1n commented 4 years ago

eris library has other names of permissions. you doing right, but you pushed to array discord.js permission name

TMUniversal commented 4 years ago

Got it to work. Thank you a lot!! You've been a tremendous help <3