diff --git a/README.md b/README.md index af4a912f..935b2d3d 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 (337) +## Commands (338) ### Utility: * **eval:** Executes JavaScript code. @@ -386,6 +386,7 @@ Xiao is a Discord bot coded in JavaScript with * **tebahpla:** Reverses the alphabet of text. * **temmie:** Converts text to Temmie speak. * **translate:** Translates text to a specific language. +* **unspoiler:** Removes all spoilers from text. * **uppercase:** Converts text to uppercase. * **upside-down:** Flips text upside-down. * **url-encode:** Encodes text to URL-friendly characters. diff --git a/commands/text-edit/unspoiler.js b/commands/text-edit/unspoiler.js new file mode 100644 index 00000000..b4cc111f --- /dev/null +++ b/commands/text-edit/unspoiler.js @@ -0,0 +1,23 @@ +const Command = require('../../structures/Command'); + +module.exports = class UnspoilerCommand extends Command { + constructor(client) { + super(client, { + name: 'unspoiler', + group: 'text-edit', + memberName: 'unspoiler', + description: 'Removes all spoilers from text.', + args: [ + { + key: 'text', + prompt: 'What text would you like to unspoiler?', + type: 'string' + } + ] + }); + } + + run(msg, { text }) { + return msg.say(text.replace(/\|\|.+\|\|/g, '')); + } +}; diff --git a/package.json b/package.json index a14380df..f08e11e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "101.6.0", + "version": "101.7.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {