Skip to content

Commit

Permalink
add AvatarDecorationURL to Member
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnrDev committed Mar 11, 2024
1 parent 4f647e9 commit 89fbe85
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions discord/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ func (m Member) AvatarURL(opts ...CDNOpt) *string {
return &url
}

// AvatarDecorationURL returns the avatar decoration URL if set or nil
func (m Member) AvatarDecorationURL(opts ...CDNOpt) *string {
if m.AvatarDecorationData == nil {
return nil
}
url := formatAssetURL(AvatarDecoration, opts, m.AvatarDecorationData.Asset)
return &url
}

func (m Member) CreatedAt() time.Time {
return m.User.CreatedAt()
}
Expand Down

0 comments on commit 89fbe85

Please sign in to comment.