diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /server/src/commands/anime/Waifu.ts | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'server/src/commands/anime/Waifu.ts')
| -rw-r--r-- | server/src/commands/anime/Waifu.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/server/src/commands/anime/Waifu.ts b/server/src/commands/anime/Waifu.ts new file mode 100644 index 0000000..043b8ac --- /dev/null +++ b/server/src/commands/anime/Waifu.ts @@ -0,0 +1,32 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; +import { colour } from '../../Config'; +import request from 'node-superfetch'; +import Util from '../../utils/Utils'; + +export default class WaifuAnime extends Command { + public constructor() { + super('waifu', { + aliases: ['waifu', 'thiswaifudoesnotexist'], + category: 'anime', + description: { + content: 'Sends a randomly generated waifu with a backstory. WARNING: don\'t get too attatched.', + usage: '', + examples: [ + '' + ] + }, + ratelimit: 3 + }); + } + + public async exec(msg: Message): Promise<Message> { + const num = Math.floor(Math.random() * 100000); + const { text } = await request.get(`https://www.thiswaifudoesnotexist.net/snippet-${num}.txt`); + const embed = this.client.util.embed() + .setDescription(Util.shorten(text, 1000)) + .setColor(colour) + .setThumbnail(`https://www.thiswaifudoesnotexist.net/example-${num}.jpg`); + return msg.channel.send(embed); + } +}
\ No newline at end of file |