initial commit
This commit is contained in:
commit
313bd35b23
8 changed files with 591 additions and 0 deletions
30
emoji.go
Normal file
30
emoji.go
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package discord
|
||||
|
||||
type PartialEmoji struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (u *PartialEmoji) BucketID() string {
|
||||
return u.ID
|
||||
}
|
||||
|
||||
type Emoji struct {
|
||||
PartialEmoji
|
||||
Roles []string `json:"roles"`
|
||||
User any `json:"user,omitempty"` // TODO: User object
|
||||
RequireColons bool `json:"requires_colons"`
|
||||
Managed bool `json:"managed"`
|
||||
Animated bool `json:"animated"`
|
||||
Available bool `json:"available"`
|
||||
}
|
||||
|
||||
func (u *Emoji) BucketID() string {
|
||||
return u.ID
|
||||
}
|
||||
|
||||
func StandardEmoji(emoji string) *PartialEmoji {
|
||||
return &PartialEmoji{
|
||||
Name: emoji,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue