const { stripIndents } = require('common-tags'); const { Command, Argument } = require('../../../../interfaces/'); class PingCommand extends Command { constructor(client) { super(client, { name: 'arguments', module: 'utility', description: "Tests the argument parsing of the command handler.", arguments: [ new Argument(client, { name: 'apple', type: 'BOOLEAN', types: ['VERBAL', 'FLAG'], default: true }), new Argument(client, { name: 'banana', aliases: ['bans', 'bananas'], type: 'INTEGER', types: ['FLAG', 'VERBAL'], default: 0 }), new Argument(client, { name: 'carrot', aliases: ['cars', 'carrots'], type: 'STRING', required: true, types: ['FLAG', 'VERBAL'] }) ] }); this.client = client; } async execute(message, { args, params }) { await message.respond(stripIndents`**arguments:** ${args.map(a=>`${a.name}: ${a.value}`).join(' | ')} **words:** ${params.join(', ')}`, { emoji: 'success' }); } } module.exports = PingCommand;