forked from embee/woomy
		
	add joinArguments conf
This commit is contained in:
		
							parent
							
								
									798c308856
								
							
						
					
					
						commit
						fe5a9ccdc2
					
				
					 2 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -106,6 +106,15 @@ module.exports = async (client, message) => {
 | 
			
		|||
    message.flags.push(args.shift().slice(1))
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  let argsPossiblyJoined = args;
 | 
			
		||||
 | 
			
		||||
  if(cmd.conf.joinArguments) {
 | 
			
		||||
    if(args.length > cmd.conf.joinArguments && args.length > 1)
 | 
			
		||||
    {
 | 
			
		||||
        argsPossiblyJoined[argsLength - 1] = args.slice(argsLength - 1).join(' ');
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  client.logger.log(`Command ran: ${cmd.help.name}`)
 | 
			
		||||
  cmd.run(client, message, args, level, data)
 | 
			
		||||
  cmd.run(client, message, argsPossiblyJoined, level, data)
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue