galactic-bot/structure/client/components/commands/utility/Arguments.js
2020-06-04 12:59:09 -05:00

49 lines
1.3 KiB
JavaScript

const { stripIndents } = require('common-tags');
const { Command } = require('../../../../interfaces/');
class ArgumentsCommand extends Command {
constructor(client) {
super(client, {
name: 'arguments',
module: 'utility',
aliases: ['args', 'arg', 'argument'],
arguments: [
{
name: 'silent',
type: 'BOOLEAN',
types: ['FLAG'],
default: true
},
{
name: 'expiration',
aliases: ['expire', 'expires', 'expirations'],
type: 'TIME',
types: ['FLAG'],
usage: '<time>',
default: (guild) => {
return guild._settings.moderationPoints.expirations.KICK;
},
required: true
}
],
restricted: true,
archivable: false
});
this.client = client;
}
async execute(message, { args, params }) {
await message.respond(stripIndents`**arguments:** ${Object.values(args).map((a) => `${a.name}: ${a.value}`)
.join(' | ')}
**words:** ${params.join(', ')}`, { emoji: 'success' });
}
}
module.exports = ArgumentsCommand;