Merge pull request #786 from robbiet480/patch-1

Emoji improvements
This commit is contained in:
Carson Hoffman 2020-06-28 19:51:24 -04:00 committed by GitHub
commit 928baab30a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -1309,6 +1309,19 @@ func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, li
return return
} }
// GuildEmojis returns all emoji
// guildID : The ID of a Guild.
func (s *Session) GuildEmojis(guildID string) (emoji []*Emoji, err error) {
body, err := s.RequestWithBucketID("GET", EndpointGuildEmojis(guildID), nil, EndpointGuildEmojis(guildID))
if err != nil {
return
}
err = unmarshal(body, &emoji)
return
}
// GuildEmojiCreate creates a new emoji // GuildEmojiCreate creates a new emoji
// guildID : The ID of a Guild. // guildID : The ID of a Guild.
// name : The Name of the Emoji. // name : The Name of the Emoji.

View file

@ -330,8 +330,8 @@ type Emoji struct {
Name string `json:"name"` Name string `json:"name"`
Roles []string `json:"roles"` Roles []string `json:"roles"`
User *User `json:"user"` User *User `json:"user"`
Managed bool `json:"managed"`
RequireColons bool `json:"require_colons"` RequireColons bool `json:"require_colons"`
Managed bool `json:"managed"`
Animated bool `json:"animated"` Animated bool `json:"animated"`
Available bool `json:"available"` Available bool `json:"available"`
} }