2020-04-16 14:37:04 +02:00
|
|
|
const { stripIndents } = require('common-tags');
|
|
|
|
|
2020-05-08 08:50:54 +02:00
|
|
|
const { Command } = require('../../../../interfaces/');
|
2020-04-16 14:37:04 +02:00
|
|
|
|
|
|
|
class PingCommand extends Command {
|
|
|
|
|
|
|
|
constructor(client) {
|
|
|
|
|
|
|
|
super(client, {
|
|
|
|
name: 'arguments',
|
|
|
|
module: 'utility',
|
2020-04-17 17:23:13 +02:00
|
|
|
aliases: ['args', 'arg', 'argument'],
|
2020-04-16 14:37:04 +02:00
|
|
|
arguments: [
|
2020-05-08 08:50:54 +02:00
|
|
|
{
|
2020-04-16 14:37:04 +02:00
|
|
|
name: 'apple',
|
|
|
|
type: 'BOOLEAN',
|
|
|
|
types: ['VERBAL', 'FLAG'],
|
|
|
|
default: true
|
2020-05-08 08:50:54 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-16 14:37:04 +02:00
|
|
|
name: 'banana',
|
|
|
|
aliases: ['bans', 'bananas'],
|
|
|
|
type: 'INTEGER',
|
|
|
|
types: ['FLAG', 'VERBAL'],
|
2020-05-25 13:13:34 +02:00
|
|
|
min: 0,
|
|
|
|
max: 10,
|
|
|
|
required: true
|
2020-05-08 08:50:54 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-16 14:37:04 +02:00
|
|
|
name: 'carrot',
|
|
|
|
aliases: ['cars', 'carrots'],
|
2020-05-25 13:13:34 +02:00
|
|
|
type: 'VOICECHANNEL',
|
2020-05-08 08:50:54 +02:00
|
|
|
types: ['FLAG', 'VERBAL'],
|
2020-05-25 13:13:34 +02:00
|
|
|
infinite: true,
|
|
|
|
default: 'test'
|
2020-05-08 08:50:54 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'format',
|
|
|
|
type: 'STRING',
|
|
|
|
types: ['VERBAL', 'FLAG'],
|
|
|
|
options: [ 'webp', 'png', 'jpeg', 'jpg', 'gif' ],
|
2020-05-25 13:13:34 +02:00
|
|
|
required: true
|
2020-05-08 08:50:54 +02:00
|
|
|
}
|
2020-05-07 01:26:16 +02:00
|
|
|
],
|
|
|
|
restricted: true,
|
|
|
|
archivable: false
|
2020-04-16 14:37:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
this.client = client;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async execute(message, { args, params }) {
|
2020-05-25 13:13:34 +02:00
|
|
|
console.log(args);
|
2020-05-21 12:47:58 +02:00
|
|
|
await message.respond(stripIndents`**arguments:** ${Object.values(args).map((a) => `${a.name}: ${a.value}`)
|
|
|
|
.join(' | ')}
|
2020-04-16 14:37:04 +02:00
|
|
|
**words:** ${params.join(', ')}`, { emoji: 'success' });
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = PingCommand;
|