From de9be8114cbe9103a6737540a32436a6da66bda1 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 20 Feb 2019 17:24:46 +0000 Subject: [PATCH] Spoiler Letter Command --- README.md | 3 ++- commands/text-edit/spoiler-letter.js | 28 ++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 commands/text-edit/spoiler-letter.js diff --git a/README.md b/README.md index 8e8600a6..d9a167de 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Xiao is a Discord bot coded in JavaScript with 7. Run `npm i -g pm2` to install PM2. 8. Run `pm2 start Xiao.js --name xiao` to run the bot. -## Commands (335) +## Commands (336) ### Utility: * **eval:** Executes JavaScript code. @@ -380,6 +380,7 @@ Xiao is a Discord bot coded in JavaScript with * **shorten-url:** Creates a goo.gl short URL from another URL. * **shuffle:** Shuffles text. * **snake-speak:** Convertsssss text to sssssnake ssssspeak. +* **spoiler-letter:** Sends text with each and every character as an individual spoiler. * **superscript:** Converts text to tiny text. * **tebahpla:** Reverses the alphabet of text. * **temmie:** Converts text to Temmie speak. diff --git a/commands/text-edit/spoiler-letter.js b/commands/text-edit/spoiler-letter.js new file mode 100644 index 00000000..3fc49819 --- /dev/null +++ b/commands/text-edit/spoiler-letter.js @@ -0,0 +1,28 @@ +const Command = require('../../structures/Command'); + +module.exports = class SpoilerLetterCommand extends Command { + constructor(client) { + super(client, { + name: 'spoiler-letter', + aliases: ['spoiler'], + group: 'text-edit', + memberName: 'spoiler-letter', + description: 'Sends text with each and every character as an individual spoiler.', + args: [ + { + key: 'text', + prompt: 'What text would you like to convert?', + type: 'string', + validate: text => { + if (`||${text.split('').join('||||')}||`.length < 2000) return true; + return 'Invalid text, your text is too long.'; + } + } + ] + }); + } + + run(msg, { text }) { + return msg.say(`||${text.split('').join('||||')}||`); + } +}; diff --git a/package.json b/package.json index bad946f0..a71e09c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "101.4.0", + "version": "101.5.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {