Client.prefixCommand() - shysolocup/noscord.js GitHub Wiki

creates a new Prefix Command

works the same as CommandService.createPrefix()

Function Sync

Arguments:

  • name String
    name of the command

  • ?aliases Array
    array of alternate names for the command

  • ?cooldown String or Number
    cooldown on the command either using time parsing or just a number
    can be formatted like "1m" or just 60

  • callback Function
    what the command does when ran

  • ?data Object
    all of the data for the command in an object instead of just in arguments



JS
client.prefixCommand("example", ["ex", "exp"], async (ctx) => {      
    console.log(ctx);
});


⚠️ **GitHub.com Fallback** ⚠️