Skip to content

Commit

Permalink
Add string tag to Role Permissions (#21)
Browse files Browse the repository at this point in the history
The JSON package is having difficulties unmarshalling permissions due to
them being presented by the API as a string without a string tag being
present to note to the package that changes need to be made while
marshalling/unmarshalling. Hence, the string tag is added under the Role
object
  • Loading branch information
BasiliskHill authored Sep 7, 2023
1 parent 35cad72 commit ddfae07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ type Role struct {
Icon *string `json:"icon,omitempty"` // role icon hash
UnicodeEmoji *string `json:"unicode_emoji,omitempty"` // role unicode emoji
Position int `json:"position"` // position of this role
Permissions Permission `json:"permissions"` // permission bit set
Permissions Permission `json:"permissions,string"` // permission bit set
Managed bool `json:"managed"` // whether this role is managed by an integration
Mentionable bool `json:"mentionable"` // whether this role is mentionable
Tags RoleTags `json:"tags,omitempty"` // the tags this role has
Expand Down

0 comments on commit ddfae07

Please sign in to comment.