mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
More uniform group names
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class RepeatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'repeat',
|
||||
group: 'edit-text',
|
||||
memberName: 'repeat',
|
||||
description: 'Repeat text over and over and over and over (etc).',
|
||||
args: [
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How many times do you want to repeat your text?',
|
||||
type: 'integer',
|
||||
min: 1,
|
||||
max: 2000
|
||||
},
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like to repeat over and over and over and over?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if (!text.includes('@everyone') && !text.includes('@here')) return true;
|
||||
return 'Invalid text, please do not repeat everyone or here mentions.';
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { amount, text }) {
|
||||
return msg.say(text.repeat(amount).substr(0, 2000));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user