Skip to content

Commit

Permalink
Fix timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbotailz committed Oct 30, 2021
1 parent 0062f09 commit 7215754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/commands/get-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const { getImage } = require('../actions');
module.exports = {
data: new SlashCommandBuilder()
.setName(DISCORD_COMMAND)
.setDescription('Replies with MEOW')
.setDescription(`Sends a picture of ${DISCORD_COMMAND}`)
.addStringOption(option => option.setName('id').setDescription('The ID of the image you want, or "latest"').setRequired(false)),
async execute(interaction) {
const id = interaction.options.getString('id');

const image = await getImage(id);

const embed = new MessageEmbed().setImage(image.source_medium).setTimestamp(new Date(image.taken_at)).setFooter(`ID: ${image.id}}`);
const embed = new MessageEmbed().setImage(image.source_medium).setTimestamp(image.taken_at).setFooter(`ID: ${image.id}`);

await interaction.reply({ embeds: [ embed ]});
}
Expand Down

0 comments on commit 7215754

Please sign in to comment.