forked from pothtonswer/discordmuffin
feat(rest): add GuildEmoji (#1153)
This commit is contained in:
parent
cff170546c
commit
7e04178d26
1 changed files with 14 additions and 0 deletions
14
restapi.go
14
restapi.go
|
@ -1321,6 +1321,20 @@ func (s *Session) GuildEmojis(guildID string) (emoji []*Emoji, err error) {
|
||||||
return
|
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
|
// 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.
|
||||||
|
|
Loading…
Reference in a new issue