forked from embee/woomy
Merge branch 'next' of https://github.com/mudkipscience/woomy into next
This commit is contained in:
commit
0c98c5b803
2 changed files with 12 additions and 2 deletions
|
@ -4,7 +4,8 @@ exports.conf = {
|
|||
aliases: [],
|
||||
permLevel: 'User',
|
||||
requiredPerms: [],
|
||||
cooldown: 2000
|
||||
cooldown: 2000,
|
||||
joinArguments: 1
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
|
|
|
@ -106,6 +106,15 @@ module.exports = async (client, message) => {
|
|||
message.flags.push(args.shift().slice(1))
|
||||
}
|
||||
|
||||
client.logger.log(`Command ran: ${cmd.help.name}`)
|
||||
cmd.run(client, message, args, level, data)
|
||||
let argsPossiblyJoined = args;
|
||||
|
||||
if(cmd.conf.joinArguments) {
|
||||
if(args.length > cmd.conf.joinArguments && args.length > 1)
|
||||
{
|
||||
argsPossiblyJoined[cmd.conf.joinArguments - 1] = args.slice(cmd.conf.joinArguments - 1).join(' ');
|
||||
}
|
||||
};
|
||||
|
||||
client.logger.log(`Command ran: ${cmd.help.name}`)
|
||||
cmd.run(client, message, argsPossiblyJoined, level, data)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue