mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Light Novel Title Command
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "107.3.1",
|
||||
"version": "107.4.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user