mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Waifu Command
This commit is contained in:
@@ -45,7 +45,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 (343)
|
||||
## Commands (344)
|
||||
### Utility:
|
||||
|
||||
* **eval:** Executes JavaScript code.
|
||||
@@ -119,6 +119,7 @@ Xiao is a Discord bot coded in JavaScript with
|
||||
* **suggest-command:** Suggests a random command for you to try.
|
||||
* **superpower:** Responds with a random superpower.
|
||||
* **this-for-that:** So, basically, it's like a bot command for this dumb meme.
|
||||
* **waifu:** Responds with a randomly generated waifu and backstory.
|
||||
* **would-you-rather:** Responds with a random "Would you rather ...?" question.
|
||||
* **xiao:** Responds with a random image of Xiao Pai.
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const request = require('node-superfetch');
|
||||
const { shorten } = require('../../util/Util');
|
||||
|
||||
module.exports = class WaifuCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'waifu',
|
||||
aliases: ['this-waifu-does-not-exist'],
|
||||
group: 'random',
|
||||
memberName: 'waifu',
|
||||
description: 'Responds with a randomly generated waifu and backstory.',
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
credit: [
|
||||
{
|
||||
name: 'This Waifu Does Not Exist',
|
||||
url: 'https://www.thiswaifudoesnotexist.net/'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
const num = Math.floor(Math.random() * 100000);
|
||||
const { text } = await request.get(`https://www.thiswaifudoesnotexist.net/snippet-${num}.txt`);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescription(shorten(text))
|
||||
.setThumbnail(`https://www.thiswaifudoesnotexist.net/example-${num}.jpg`);
|
||||
return msg.embed(embed);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "102.5.0",
|
||||
"version": "102.6.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user