@@ -1157,7 +1157,7 @@ func (s *Session) GuildRoleCreateComplex(guildID int64, roleCreate RoleCreate) (
1157
1157
// hoist : Whether to display the role's users separately.
1158
1158
// perm : The permissions for the role.
1159
1159
// mention : Whether this role is mentionable
1160
- func (s * Session ) GuildRoleEdit (guildID , roleID int64 , name string , color int , hoist bool , perm int , mention bool ) (st * Role , err error ) {
1160
+ func (s * Session ) GuildRoleEdit (guildID , roleID int64 , name string , color int , hoist bool , perm int64 , mention bool ) (st * Role , err error ) {
1161
1161
1162
1162
// Prevent sending a color int that is too big.
1163
1163
if color > 0xFFFFFF {
@@ -1166,11 +1166,11 @@ func (s *Session) GuildRoleEdit(guildID, roleID int64, name string, color int, h
1166
1166
}
1167
1167
1168
1168
data := struct {
1169
- Name string `json:"name"` // The role's name (overwrites existing)
1170
- Color int `json:"color"` // The color the role should have (as a decimal, not hex)
1171
- Hoist bool `json:"hoist"` // Whether to display the role's users separately
1172
- Permissions int `json:"permissions"` // The overall permissions number of the role (overwrites existing)
1173
- Mentionable bool `json:"mentionable"` // Whether this role is mentionable
1169
+ Name string `json:"name"` // The role's name (overwrites existing)
1170
+ Color int `json:"color"` // The color the role should have (as a decimal, not hex)
1171
+ Hoist bool `json:"hoist"` // Whether to display the role's users separately
1172
+ Permissions int64 `json:"permissions,string "` // The overall permissions number of the role (overwrites existing)
1173
+ Mentionable bool `json:"mentionable"` // Whether this role is mentionable
1174
1174
}{name , color , hoist , perm , mention }
1175
1175
1176
1176
body , err := s .RequestWithBucketID ("PATCH" , EndpointGuildRole (guildID , roleID ), data , EndpointGuildRole (guildID , 0 ))
@@ -1893,13 +1893,13 @@ func (s *Session) ChannelInviteCreate(channelID int64, i Invite) (st *Invite, er
1893
1893
// ChannelPermissionSet creates a Permission Override for the given channel.
1894
1894
// NOTE: This func name may changed. Using Set instead of Create because
1895
1895
// you can both create a new override or update an override with this function.
1896
- func (s * Session ) ChannelPermissionSet (channelID , targetID int64 , targetType string , allow , deny int ) (err error ) {
1896
+ func (s * Session ) ChannelPermissionSet (channelID , targetID int64 , targetType PermissionOverwriteType , allow , deny int64 ) (err error ) {
1897
1897
1898
1898
data := struct {
1899
- ID int64 `json:"id,string"`
1900
- Type string `json:"type"`
1901
- Allow int `json:"allow"`
1902
- Deny int `json:"deny"`
1899
+ ID int64 `json:"id,string"`
1900
+ Type PermissionOverwriteType `json:"type,string "`
1901
+ Allow int64 `json:"allow"`
1902
+ Deny int64 `json:"deny"`
1903
1903
}{targetID , targetType , allow , deny }
1904
1904
1905
1905
_ , err = s .RequestWithBucketID ("PUT" , EndpointChannelPermission (channelID , targetID ), data , EndpointChannelPermission (channelID , 0 ))
0 commit comments