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'],
|
|
|
|
default: 0
|
2020-05-08 08:50:54 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-16 14:37:04 +02:00
|
|
|
name: 'carrot',
|
|
|
|
aliases: ['cars', 'carrots'],
|
2020-05-08 08:50:54 +02:00
|
|
|
type: 'CHANNEL',
|
2020-04-16 14:37:04 +02:00
|
|
|
required: true,
|
2020-05-08 08:50:54 +02:00
|
|
|
types: ['FLAG', 'VERBAL'],
|
|
|
|
infinite: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'format',
|
|
|
|
type: 'STRING',
|
|
|
|
types: ['VERBAL', 'FLAG'],
|
|
|
|
options: [ 'webp', 'png', 'jpeg', 'jpg', 'gif' ],
|
|
|
|
default: 'webp'
|
|
|
|
}
|
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-04-17 17:23:13 +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;
|