Reserved command

This commit is contained in:
Loic Bersier 2018-12-20 03:08:43 +01:00
parent 8cc712fd90
commit 9aa116a679
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,40 @@
const { Command } = require('discord.js-commando');
module.exports = class BSEspamCommand extends Command {
constructor(client) {
super(client, {
name: 'bsespam',
group: 'reserved',
memberName: 'bsespam',
description: `FOR Big Snow Energy only\nSpam the text you send`,
throttling: {
usages: 2,
duration: 3600,
},
args: [
{
key: 'number',
prompt: 'How many times do you want to repeat it?',
type: 'integer',
validate: number => number < 11,
default: '1'
},
{
key: 'text',
prompt: 'What do you want me to say',
type: 'string',
}
]
});
}
async run(message, { number, text }) {
if (message.author.id != "428387534842626048")
return message.say('Command only available to **Big Snow Energy**')
for(let i = 0; i < number; i++) {
message.say(text);
}
message.say('Finished :)');
}
};

View file

@ -21,6 +21,7 @@ client.registry
['fun', 'Fun'], ['fun', 'Fun'],
['images', 'Images'], ['images', 'Images'],
['utility', 'Utility'], ['utility', 'Utility'],
['reserved', 'Reserved'],
['admin', 'Admins'], ['admin', 'Admins'],
['owner', 'Owner'], ['owner', 'Owner'],