This commit is contained in:
Emily 2020-04-12 19:24:17 +10:00
commit 0c98c5b803
2 changed files with 12 additions and 2 deletions

View file

@ -4,7 +4,8 @@ exports.conf = {
aliases: [],
permLevel: 'User',
requiredPerms: [],
cooldown: 2000
cooldown: 2000,
joinArguments: 1
}
exports.help = {

View file

@ -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)
}