forked from pothtonswer/discordmuffin
Add GuildEmoji function
This commit is contained in:
parent
f067059526
commit
f193d81d83
1 changed files with 13 additions and 0 deletions
13
restapi.go
13
restapi.go
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue