diff --git a/assets/json/fortune.json b/assets/json/fortune.json index b881ba2e..51bacf95 100644 --- a/assets/json/fortune.json +++ b/assets/json/fortune.json @@ -119,5 +119,7 @@ "The respect of influential people will soon be yours.", "The project you have in mind will soon gain momentum.", "You will enjoy doing something fun this coming weekend.", - "You will make change for the better." + "You will make change for the better.", + "Time is precious, but truth is more precious than time.", + "You will always get what you want through your charm and personality." ] diff --git a/commands/events/apod.js b/commands/events/apod.js index b8cea5f4..0c24cf26 100644 --- a/commands/events/apod.js +++ b/commands/events/apod.js @@ -1,8 +1,6 @@ const Command = require('../../framework/Command'); const request = require('node-superfetch'); -const { EmbedBuilder, PermissionFlagsBits } = require('discord.js'); -const { shorten } = require('../../util/Util'); -const logos = require('../../assets/json/logos'); +const { stripIndents } = require('common-tags'); const { GOV_KEY } = process.env; module.exports = class ApodCommand extends Command { @@ -12,7 +10,6 @@ module.exports = class ApodCommand extends Command { aliases: ['astronomy-picture-of-the-day'], group: 'events', description: 'Responds with today\'s Astronomy Picture of the Day.', - clientPermissions: [PermissionFlagsBits.EmbedLinks], credit: [ { name: 'NASA', @@ -28,19 +25,12 @@ module.exports = class ApodCommand extends Command { const { body } = await request .get('https://api.nasa.gov/planetary/apod') .query({ api_key: GOV_KEY }); - const embed = new EmbedBuilder() - .setTitle(body.title) - .setDescription(shorten(body.explanation)) - .setColor(0x2E528E) - .setAuthor({ - name: 'Astronomy Picture of the Day', - iconURL: logos.nasa, - url: 'https://apod.nasa.gov/apod/astropix.html' - }) - .setImage(body.media_type === 'image' ? body.url : null) - .setURL(body.url) - .setFooter({ text: `Image Credits: ${body.copyright ? body.copyright.replaceAll('\n', '/') : 'Public Domain'}` }) - .setTimestamp(); - return msg.embed(embed); + const credit = body.copyright ? body.copyright.replaceAll('\n', '/') : 'Public Domain'; + return msg.say(stripIndents` + **${body.title}** + ${body.explanation} + + _Image Credits: (${credit})[https://apod.nasa.gov/apod/astropix.html]_ + `, { files: body.media_type === 'image' ? [body.url] : [] }); } }; diff --git a/package.json b/package.json index 5875f8d6..5ad41d87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "152.5.2", + "version": "152.5.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {