From ebfd85eb62bf6eb733e7139cdf8bbc7a3c3426ec Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 7 Sep 2017 16:51:48 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=85=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/text-edit/b.js | 29 +++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 commands/text-edit/b.js diff --git a/commands/text-edit/b.js b/commands/text-edit/b.js new file mode 100644 index 00000000..65128c1d --- /dev/null +++ b/commands/text-edit/b.js @@ -0,0 +1,29 @@ +const Command = require('../../structures/Command'); + +module.exports = class BCommand extends Command { + constructor(client) { + super(client, { + name: 'b', + aliases: [':b:'], + group: 'text-edit', + memberName: 'b', + description: ':b:.', + args: [ + { + key: 'text', + prompt: 'What text would you like to :b:?', + type: 'string', + validate: text => { + if (text.replace(/(b|d|e|f|g|p|q)/gi, ':b:').length < 2000) return true; + return 'Your text is too long'; + } + } + ] + }); + } + + run(msg, args) { + const { text } = args; + return msg.say(text.replace(/(b|d|e|f|g|p|q)/gi, ':b:')); + } +}; diff --git a/package.json b/package.json index d7bcdca5..959a17d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "37.3.0", + "version": "37.4.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {