Add image to yu-gi-oh

This commit is contained in:
Daniel Odendahl Jr
2017-09-13 19:04:00 +00:00
parent 8452fd458e
commit 50d3d34666
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ client.on('ready', () => {
const activities = [
`${COMMAND_PREFIX}help for commands`,
`Shard ${client.shard.id}`,
'with dragonfire535#8081',
'with dragonfire535',
client.options.invite,
`with ${client.registry.commands.size} commands`,
'Rune Factory 4'
+6 -3
View File
@@ -27,11 +27,14 @@ module.exports = class YuGiOhCommand extends Command {
const { body } = await snekfetch
.get(`http://yugiohprices.com/api/card_data/${query}`);
if (body.status === 'fail') return msg.say('Could not find any results.');
const image = await snekfetch
.get(`http://yugiohprices.com/api/card_image/${query}`);
const embed = new MessageEmbed()
.setColor(0xBE5F1F)
.setTitle(body.data.name)
.setDescription(body.data.text)
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png')
.setThumbnail(image.headers.location)
.addField(' Card Type',
body.data.card_type, true);
if (body.data.card_type === 'monster') {
@@ -40,12 +43,12 @@ module.exports = class YuGiOhCommand extends Command {
body.data.type, true)
.addField(' Attribute',
body.data.family, true)
.addField(' Level',
body.data.level, true)
.addField(' ATK',
body.data.atk, true)
.addField(' DEF',
body.data.def, true)
.addField(' Level',
body.data.level, true);
body.data.def, true);
}
return msg.embed(embed);
} catch (err) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "38.7.1",
"version": "38.7.2",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {