Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleMentionType AllowedMentionType = "roles" UserMentionType = "users" EveryoneMentionType = "everyone" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedMentionType ¶
type AllowedMentionType string
type AllowedMentions ¶
type AllowedMentions struct { Parse []AllowedMentionType `json:"parse"` Roles []Snowflake `json:"roles"` Users []Snowflake `json:"users"` RepliedUser bool `json:"replied_user"` }
type Attachment ¶
type Attachment struct { ID Snowflake `json:"id"` Filename string `json:"filename"` Description *string `json:"description,omitempty"` ContentType *string `json:"content_type,omitempty"` Size int `json:"size"` URL string `json:"url"` ProxyURL string `json:"proxy_url"` Height *int `json:"height,omitempty"` Width *int `json:"width,omitempty"` Ephemeral *bool `json:"ephemeral,omitempty"` }
type Embed ¶
type Embed struct { Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` Timestamp string `json:"timestamp,omitempty"` Color int `json:"color,omitempty"` Image *EmbedImage `json:"image,omitempty"` Thumbnail *EmbedImage `json:"thumbnail,omitempty"` Video *EmbedVideo `json:"video,omitempty"` Provider *EmbedProvider `json:"provider,omitempty"` Author *EmbedAuthor `json:"author,omitempty"` Fields []EmbedField `json:"fields,omitempty"` }
type EmbedAuthor ¶
type EmbedField ¶
type EmbedFooter ¶
type EmbedFooter struct {}
type EmbedImage ¶
type EmbedProvider ¶
type EmbedVideo ¶
type Emoji ¶
type Emoji struct { Id *Snowflake `json:"id,omitempty"` Name *string `json:"name,omitempty"` Roles []Snowflake `json:"roles,omitempty"` User *User `json:"user,omitempty"` RequireColons *bool `json:"require_colons,omitempty"` Managed *bool `json:"managed,omitempty"` Animated *bool `json:"animated,omitempty"` Available *bool `json:"available,omitempty"` }
type Member ¶
type Member struct { User *User `json:"user,omitempty"` Nick *string `json:"nick,omitempty"` Avatar *string `json:"avatar,omitempty"` Roles []Snowflake `json:"roles"` JoinedAt time.Time `json:"joined_at"` PremiumSince *time.Time `json:"premium_since,omitempty"` Deaf bool `json:"deaf"` Mute bool `json:"mute"` Pending *bool `json:"pending,omitempty"` Permissions *Permissions `json:"permissions,omitempty"` CommunicationDisabledUntil *time.Time `json:"communication_disabled_until,omitempty"` }
type Permissions ¶
type Permissions uint64
func (*Permissions) MarshalJSON ¶
func (i *Permissions) MarshalJSON() ([]byte, error)
func (*Permissions) UnmarshalJSON ¶
func (i *Permissions) UnmarshalJSON(b []byte) error
type ResolvedData ¶
type Role ¶
type Role struct { Id Snowflake `json:"id"` Name string `json:"name"` Color int `json:"color"` Hoist bool `json:"hoist"` Icon *string `json:"icon,omitempty"` UnicodeEmoji *string `json:"unicode_emoji,omitempty"` Position int `json:"position"` Permissions Permissions `json:"permissions"` Managed bool `json:"managed"` Mentionable bool `json:"mentionable"` Tags *RoleTags `json:"tags,omitempty"` }
type RoleTags ¶
type RoleTags struct { BotId *Snowflake `json:"bot_id,omitempty"` IntegrationId *Snowflake `json:"integration_id,omitempty"` SubscriptionListingId *Snowflake `json:"subscription_listing_id,omitempty"` // These fields should be set to "null" in the JSON if they are true, according to the Discord docs... PremiumSubscriber bool `json:"premium_subscriber,omitempty"` AvailableForPurchase bool `json:"available_for_purchase,omitempty"` GuildConnections bool `json:"guild_connections,omitempty"` }
func (*RoleTags) MarshalJSON ¶
func (*RoleTags) UnmarshalJSON ¶
type Snowflake ¶
type Snowflake uint64
func GetSnowflake ¶
func (*Snowflake) MarshalJSON ¶
func (*Snowflake) UnmarshalJSON ¶
type User ¶
type User struct { Id Snowflake `json:"id"` Username string `json:"username"` Discriminator string `json:"discriminator"` Avatar *string `json:"avatar,omitempty"` Bot *bool `json:"bot,omitempty"` System *bool `json:"system,omitempty"` MfaEnabled *bool `json:"mfa_enabled,omitempty"` Banner *string `json:"banner,omitempty"` AccentColor *uint32 `json:"accent_color,omitempty"` Locale *string `json:"locale,omitempty"` Verified *bool `json:"verified,omitempty"` Email *string `json:"email,omitempty"` Flags *uint32 `json:"flags,omitempty"` PremiumType *uint8 `json:"premium_type,omitempty"` PublicFlags *uint32 `json:"public_flags,omitempty"` }
Click to show internal directories.
Click to hide internal directories.