mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +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.
|
6. Run `npm i -g pm2` to install PM2.
|
||||||
7. Run `pm2 start Xiao.js --name xiao` to run the bot.
|
7. Run `pm2 start Xiao.js --name xiao` to run the bot.
|
||||||
|
|
||||||
## Commands (344)
|
## Commands (345)
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
* **eval:** Executes JavaScript code.
|
* **eval:** Executes JavaScript code.
|
||||||
@@ -106,6 +106,7 @@ Xiao is a Discord bot coded in JavaScript with
|
|||||||
* **joke:** Responds with a random joke.
|
* **joke:** Responds with a random joke.
|
||||||
* **karen:** Responds with a random image of Karen.
|
* **karen:** Responds with a random image of Karen.
|
||||||
* **kiss-marry-kill:** Determines who to kiss, who to marry, and who to kill.
|
* **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.
|
* **magic-conch:** Asks your question to the Magic Conch.
|
||||||
* **meme:** Responds with a random meme.
|
* **meme:** Responds with a random meme.
|
||||||
* **name:** Responds with a random name, with the gender of your choice.
|
* **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",
|
"name": "xiao",
|
||||||
"version": "107.3.1",
|
"version": "107.4.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user