Skip to content

Commit ddfae07

Browse files
authored
Add string tag to Role Permissions (#21)
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
1 parent 35cad72 commit ddfae07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/permissions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ type Role struct {
715715
Icon *string `json:"icon,omitempty"` // role icon hash
716716
UnicodeEmoji *string `json:"unicode_emoji,omitempty"` // role unicode emoji
717717
Position int `json:"position"` // position of this role
718-
Permissions Permission `json:"permissions"` // permission bit set
718+
Permissions Permission `json:"permissions,string"` // permission bit set
719719
Managed bool `json:"managed"` // whether this role is managed by an integration
720720
Mentionable bool `json:"mentionable"` // whether this role is mentionable
721721
Tags RoleTags `json:"tags,omitempty"` // the tags this role has

0 commit comments

Comments
 (0)