Search code examples
javascriptbotsdiscord.jscommando

Discord.js-commando throttling not working


im trying to throttle commands so they have a cooldown and i followed the commando api im not getting any errors but it is not stopping me from going passed 1 usages so i can still spam it like normal any ideas?

module.exports = class gryffindormotto extends commando.Command {
    constructor(client) {
        super(client, {
            name: 'gryffindormotto',
            aliases: ['gryffindorm','grym'],
            group: 'house',
            memberName: 'gryffindormotto',
            description: 'Sends a message with house motto of *House* you are in. **It is house restricted.**',
            throttling: {
                usages: 1,
                duration: 10,
            },
        });
    }

    //...
}

Solution

  • You can spam because owner(s) declared in CommandoClientOptions are bypassing limitations such as user permissions and command throttling.

    Any non-owner user should be limited with throttling as intended.