Use JSON for logos

This commit is contained in:
Dragon Fire
2024-03-30 13:13:01 -04:00
parent a135cac031
commit ec38daefa3
18 changed files with 48 additions and 21 deletions
+2 -5
View File
@@ -2,6 +2,7 @@ const Command = require('../../framework/Command');
const request = require('node-superfetch');
const { MessageEmbed } = require('discord.js');
const { shorten } = require('../../util/Util');
const logos = require('../../assets/json/logos');
const { GOV_KEY } = process.env;
module.exports = class ApodCommand extends Command {
@@ -32,11 +33,7 @@ module.exports = class ApodCommand extends Command {
.setTitle(body.title)
.setDescription(shorten(body.explanation))
.setColor(0x2E528E)
.setAuthor(
'Astronomy Picture of the Day',
'https://i.imgur.com/Wh8jY9c.png',
'https://apod.nasa.gov/apod/astropix.html'
)
.setAuthor('Astronomy Picture of the Day', logos.nasa, 'https://apod.nasa.gov/apod/astropix.html')
.setImage(body.media_type === 'image' ? body.url : null)
.setURL(body.url)
.setFooter(`Image Credits: ${body.copyright ? body.copyright.replaceAll('\n', '/') : 'Public Domain'}`)