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
|
|
|
|
2020-06-04 19:59:09 +02:00
|
|
|
class ArgumentsCommand extends Command {
|
2020-04-16 14:37:04 +02:00
|
|
|
|
|
|
|
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-07-04 12:23:10 +02:00
|
|
|
name: 'users',
|
|
|
|
aliases: ['user'],
|
|
|
|
type: 'MEMBER',
|
|
|
|
types: ['FLAG'],
|
|
|
|
required: true,
|
|
|
|
infinite: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'text',
|
|
|
|
aliases: ['content'],
|
|
|
|
type: 'STRING',
|
|
|
|
types: ['FLAG'],
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'bots',
|
|
|
|
aliases: ['bot'],
|
2020-04-16 14:37:04 +02:00
|
|
|
type: 'BOOLEAN',
|
2020-06-04 19:59:09 +02:00
|
|
|
types: ['FLAG'],
|
2020-06-02 12:09:28 +02:00
|
|
|
default: true
|
|
|
|
},
|
|
|
|
{
|
2020-07-04 12:23:10 +02:00
|
|
|
name: 'attachments',
|
|
|
|
aliases: ['images'],
|
|
|
|
type: 'BOOLEAN',
|
2020-06-02 12:09:28 +02:00
|
|
|
types: ['FLAG'],
|
2020-07-04 12:23:10 +02:00
|
|
|
default: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'silent',
|
|
|
|
type: 'BOOLEAN',
|
|
|
|
types: ['FLAG'],
|
|
|
|
default: 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-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' });
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-04 19:59:09 +02:00
|
|
|
module.exports = ArgumentsCommand;
|