forked from pothtonswer/discordmuffin
If there's an err, return it :)
This commit is contained in:
parent
2c2b0166af
commit
b58212ae33
1 changed files with 4 additions and 0 deletions
|
@ -959,6 +959,7 @@ func (s *Session) GuildRoleEdit(guildID, roleID, name string, color int, hoist b
|
||||||
// Prevent sending a color int that is too big.
|
// Prevent sending a color int that is too big.
|
||||||
if color > 0xFFFFFF {
|
if color > 0xFFFFFF {
|
||||||
err = fmt.Errorf("color value cannot be larger than 0xFFFFFF")
|
err = fmt.Errorf("color value cannot be larger than 0xFFFFFF")
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
data := struct {
|
data := struct {
|
||||||
|
@ -1022,6 +1023,9 @@ func (s *Session) GuildPruneCount(guildID string, days uint32) (count uint32, er
|
||||||
|
|
||||||
uri := EndpointGuildPrune(guildID) + fmt.Sprintf("?days=%d", days)
|
uri := EndpointGuildPrune(guildID) + fmt.Sprintf("?days=%d", days)
|
||||||
body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildPrune(guildID))
|
body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildPrune(guildID))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = unmarshal(body, &p)
|
err = unmarshal(body, &p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue