Unspoiler command

This commit is contained in:
Daniel Odendahl Jr
2019-02-20 17:41:03 +00:00
parent 6bdb4399de
commit 98155a86f1
3 changed files with 26 additions and 2 deletions
+2 -1
View File
@@ -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.
+23
View File
@@ -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, ''));
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "101.6.0",
"version": "101.7.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {