mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-08 07:11:49 +02:00
Add image to yu-gi-oh
This commit is contained in:
+1
-1
@@ -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'
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "38.7.1",
|
||||
"version": "38.7.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user