Skip to content

Commit

Permalink
fix(provider): use correct file type for Discord profile img (#1365)
Browse files Browse the repository at this point in the history
  • Loading branch information
sid committed Feb 23, 2021
1 parent e80f6e9 commit 96ff048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default (options) => {
const defaultAvatarNumber = parseInt(profile.discriminator) % 5
profile.image_url = `https://cdn.discordapp.com/embed/avatars/${defaultAvatarNumber}.png`
} else {
const format = profile.premium_type === 1 || profile.premium_type === 2 ? 'gif' : 'png'
const format = profile.avatar.startsWith('a_') ? 'gif' : 'png'
profile.image_url = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`
}
return {
Expand Down

1 comment on commit 96ff048

@vercel
Copy link

@vercel vercel bot commented on 96ff048 Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.