mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Minor change
This commit is contained in:
@@ -27,14 +27,15 @@ module.exports = class YuGiOhCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const { body } = await snekfetch.get(`https://yugiohprices.com/api/card_data/${query}`);
|
const { body } = await snekfetch.get(`https://yugiohprices.com/api/card_data/${query}`);
|
||||||
if (body.status === 'fail') return msg.say('Could not find any results.');
|
if (body.status === 'fail') return msg.say('Could not find any results.');
|
||||||
const image = await snekfetch.get(`https://yugiohprices.com/api/card_image/${query}`, { followRedirects: false });
|
const image = await snekfetch.get(`https://yugiohprices.com/api/card_image/${query}`);
|
||||||
const { data } = body;
|
const { data } = body;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
|
.attachFiles([{ attachment: image, name: 'thumbnail.jpg' }])
|
||||||
.setColor(0xBE5F1F)
|
.setColor(0xBE5F1F)
|
||||||
.setTitle(data.name)
|
.setTitle(data.name)
|
||||||
.setDescription(shorten(data.text))
|
.setDescription(shorten(data.text))
|
||||||
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/AJNBflD.png')
|
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/AJNBflD.png')
|
||||||
.setThumbnail(image.headers.location)
|
.setThumbnail('attachment://thumbnail.jpg')
|
||||||
.addField('❯ Card Type',
|
.addField('❯ Card Type',
|
||||||
data.card_type, true);
|
data.card_type, true);
|
||||||
if (data.card_type === 'monster') {
|
if (data.card_type === 'monster') {
|
||||||
|
|||||||
Reference in New Issue
Block a user