Add GuildEmoji function

This commit is contained in:
Robbie Trencheny 2020-06-26 15:35:57 -07:00
parent f067059526
commit f193d81d83
No known key found for this signature in database
GPG key ID: 1E236BB235BF0021

View file

@ -1309,6 +1309,19 @@ func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, li
return return
} }
// GuildEmoji returns all emoji
// guildID : The ID of a Guild.
func (s *Session) GuildEmoji(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.