From 0a1bc41b269a8137280f81af3799818a4b672a96 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 6 May 2017 20:56:50 +0000 Subject: [PATCH] Repeat Command --- commands/textedit/repeat.js | 25 +++++++++++++++++++++++++ commands/textedit/say.js | 1 - package.json | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 commands/textedit/repeat.js diff --git a/commands/textedit/repeat.js b/commands/textedit/repeat.js new file mode 100644 index 00000000..3b149c89 --- /dev/null +++ b/commands/textedit/repeat.js @@ -0,0 +1,25 @@ +const { Command } = require('discord.js-commando'); + +module.exports = class RepeatCommand extends Command { + constructor(client) { + super(client, { + name: 'repeat', + group: 'textedit', + memberName: 'repeat', + description: 'Repeat something over and over and over and over (etc).', + args: [ + { + key: 'text', + prompt: 'What text would you like to repeat over and over and over and over?', + type: 'string', + parse: text => text.repeat(2000).substr(0, 1999) + } + ] + }); + } + + run(msg, args) { + const { text } = args; + return msg.say(`\u180E${text}`); + } +}; diff --git a/commands/textedit/say.js b/commands/textedit/say.js index d24ee177..4764f56d 100644 --- a/commands/textedit/say.js +++ b/commands/textedit/say.js @@ -6,7 +6,6 @@ module.exports = class SayCommand extends Command { name: 'say', aliases: [ 'copy', - 'repeat', 'echo' ], group: 'textedit', diff --git a/package.json b/package.json index 77f4dd8b..f22ec8a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "18.3.4", + "version": "18.4.0", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {