Skip to content

Commit

Permalink
feat(rest): add GuildEmoji (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Apr 10, 2022
1 parent cff1705 commit 7e04178
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions restapi.go
Expand Up @@ -1321,6 +1321,20 @@ func (s *Session) GuildEmojis(guildID string) (emoji []*Emoji, err error) {
return
}

// GuildEmoji returns specified emoji.
// guildID : The ID of a Guild
// emojiID : The ID of an Emoji to retrieve
func (s *Session) GuildEmoji(guildID, emojiID string) (emoji *Emoji, err error) {
var body []byte
body, err = s.RequestWithBucketID("GET", EndpointGuildEmoji(guildID, emojiID), nil, EndpointGuildEmoji(guildID, emojiID))
if err != nil {
return
}

err = unmarshal(body, &emoji)
return
}

// GuildEmojiCreate creates a new emoji
// guildID : The ID of a Guild.
// name : The Name of the Emoji.
Expand Down

0 comments on commit 7e04178

Please sign in to comment.