Light Novel Title Command

This commit is contained in:
Dragon Fire
2019-07-25 18:11:47 -04:00
parent bd9ef97a99
commit cbcd665cd5
3 changed files with 32 additions and 2 deletions
+2 -1
View File
@@ -53,7 +53,7 @@ Xiao is a Discord bot coded in JavaScript with
6. Run `npm i -g pm2` to install PM2.
7. Run `pm2 start Xiao.js --name xiao` to run the bot.
## Commands (344)
## Commands (345)
### Utility:
* **eval:** Executes JavaScript code.
@@ -106,6 +106,7 @@ Xiao is a Discord bot coded in JavaScript with
* **joke:** Responds with a random joke.
* **karen:** Responds with a random image of Karen.
* **kiss-marry-kill:** Determines who to kiss, who to marry, and who to kill.
* **light-novel-title:** Responds with a randomly generated Light Novel title.
* **magic-conch:** Asks your question to the Magic Conch.
* **meme:** Responds with a random meme.
* **name:** Responds with a random name, with the gender of your choice.
+29
View File
@@ -0,0 +1,29 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class LightNovelTitleCommand extends Command {
constructor(client) {
super(client, {
name: 'light-novel-title',
aliases: ['ln-title'],
group: 'random',
memberName: 'light-novel-title',
description: 'Responds with a randomly generated Light Novel title.',
credit: [
{
name: 'LN title generator',
url: 'https://salty-salty-studios.com/shiz/ln.php'
}
]
});
}
async run(msg) {
try {
const { text } = await request.get('https://salty-salty-studios.com/shiz/ln.php');
return msg.say(text.match(/<h1>(.+)<\/h1>/i)[1]);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "107.3.1",
"version": "107.4.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {