Skip to content

Commit 96ff048

Browse files
author
sid
authored
fix(provider): use correct file type for Discord profile img (#1365)
1 parent e80f6e9 commit 96ff048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/discord.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default (options) => {
1414
const defaultAvatarNumber = parseInt(profile.discriminator) % 5
1515
profile.image_url = `https://cdn.discordapp.com/embed/avatars/${defaultAvatarNumber}.png`
1616
} else {
17-
const format = profile.premium_type === 1 || profile.premium_type === 2 ? 'gif' : 'png'
17+
const format = profile.avatar.startsWith('a_') ? 'gif' : 'png'
1818
profile.image_url = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`
1919
}
2020
return {

0 commit comments

Comments
 (0)