Attach waifu as image rather than thumbnail

This commit is contained in:
Dragon Fire
2020-06-09 10:05:04 -04:00
parent fd5247fd72
commit 2e1a30f62d
4 changed files with 5 additions and 14 deletions
+1 -8
View File
@@ -8,14 +8,7 @@ module.exports = class ShowerThoughtCommand extends SubredditCommand {
group: 'random-res',
memberName: 'shower-thought',
description: 'Responds with a random shower thought, directly from r/Showerthoughts.',
subreddit: 'Showerthoughts',
credit: [
{
name: 'r/Showerthoughts',
url: 'https://www.reddit.com/r/showerthoughts',
reason: 'Shower Thought Data'
}
]
subreddit: 'Showerthoughts'
});
}
-33
View File
@@ -1,33 +0,0 @@
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-res',
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/',
reason: 'API'
}
]
});
}
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, 1000))
.setThumbnail(`https://www.thiswaifudoesnotexist.net/example-${num}.jpg`);
return msg.embed(embed);
}
};