Skip to content

Commit

Permalink
discord: Fix calculation of default avatar URL (#398)
Browse files Browse the repository at this point in the history
* Fix the calculation of a default user avatar index

* run go fmt
  • Loading branch information
PlavorSeol authored Jul 18, 2023
1 parent 4224b93 commit 78e456d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (u User) AvatarURLWithType(t ImageType) string {
}
picNo = strconv.Itoa(disc % 5)
} else {
picNo = strconv.FormatUint(uint64(u.ID>>22)%5, 10)
picNo = strconv.FormatUint(uint64(u.ID>>22)%6, 10)
}

return "https://cdn.discordapp.com/embed/avatars/" + picNo + ".png"
Expand Down

0 comments on commit 78e456d

Please sign in to comment.