Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
fix(commands): implemented new changes to the Embed System
Browse files Browse the repository at this point in the history
.setAuthor() and .setFooter() now uses an option object instead of strings
  • Loading branch information
Pukimaa committed Mar 7, 2022
1 parent 7a63337 commit bfa3320
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/echo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
const embed = new MessageEmbed()
.setColor(defaultColor)
.setThumbnail('attachment://echo.png')
.setAuthor(interaction.user.tag, interaction.user.avatarURL({ dynamic: true }))
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL({ dynamic: true }) })
.setTitle('Echo')
.setDescription(msg)
.setTimestamp();
Expand Down
2 changes: 1 addition & 1 deletion src/commands/meme.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
const embed = new MessageEmbed()
.setColor(defaultColor)
.setThumbnail('attachment://funny.png')
.setAuthor(data.author, 'https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png', 'https://reddit.com/u/' + data.author)
.setAuthor({ name: data.author, iconURL: 'https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png', url: 'https://reddit.com/u/' + data.author })
.setTitle(data.title)
.setURL(data.postLink)
.setImage(data.url)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/reddit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ module.exports = {
const embed = new MessageEmbed()
.setColor('#FF4300')
.setThumbnail('attachment://reddit.png')
.setAuthor(data.author, 'https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png', 'https://reddit.com/u/' + data.author)
.setAuthor({ name: data.author, iconURL: 'https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png', url: 'https://reddit.com/u/' + data.author })
.setTitle(data.title)
.setURL(data.postLink)
.setImage(data.url)
.setFooter(`r/${data.subreddit}${data.ups} 👍`)
.setFooter({ text: `r/${data.subreddit}${data.ups} 👍` })
.setTimestamp();

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

0 comments on commit bfa3320

Please sign in to comment.