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: [], aliases: [],
permLevel: 'User', permLevel: 'User',
requiredPerms: [], requiredPerms: [],
cooldown: 2000 cooldown: 2000,
joinArguments: 1
} }
exports.help = { exports.help = {

View file

@ -106,6 +106,15 @@ module.exports = async (client, message) => {
message.flags.push(args.shift().slice(1)) message.flags.push(args.shift().slice(1))
} }
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}`) client.logger.log(`Command ran: ${cmd.help.name}`)
cmd.run(client, message, args, level, data) cmd.run(client, message, argsPossiblyJoined, level, data)
} }