Documentation ¶
Index ¶
Constants ¶
const ( IntentGuilds = 1 << 0 IntentGuildMembers = 1 << 1 IntentGuildBans = 1 << 2 IntentGuildEmojis = 1 << 3 IntentGuildIntegrations = 1 << 4 IntentGuildWebhooks = 1 << 5 IntentGuildInvites = 1 << 6 IntentGuildVoiceStates = 1 << 7 IntentGuildPresences = 1 << 8 IntentGuildMessages = 1 << 9 IntentGuildMessageReactions = 1 << 10 IntentGuildMessageTyping = 1 << 11 IntentDirectMessages = 1 << 12 IntentDirectMessageReactions = 1 << 13 IntentDirectMessageTyping = 1 << 14 )
const ( // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagInstance = 1 << 0 // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagJoin = 1 << 1 // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagSpectate = 1 << 2 // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagJoinRequest = 1 << 3 // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagSync = 1 << 4 // https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags ActivityFlagPlay = 1 << 5 )
Variables ¶
var AllIntents = utils.Flags{Flags: 0}
var UnprivilegedIntents = utils.Flags{Flags: 0}
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Name string `json:"name"` Type int `json:"type"` URL *string `json:"url,omitempty"` CreatedAt int64 `json:"created_at"` ApplicationID *string `json:"application_id,omitempty"` Details *string `json:"details,omitempty"` State *string `json:"state,omitempty"` Instance *bool `json:"instance,omitempty"` Flags *int `json:"flags,omitempty"` Timestamps *ActivityTimestamps `json:"timestamps,omitempty"` Emoji *ActivityEmoji `json:"emoji,omitempty"` Party *ActivityParty `json:"party,omitempty"` Assets *ActivityAssets `json:"assets,omitempty"` Secrets *ActivitySecrets `json:"secrets,omitempty"` Buttons *[]ActivityButtons `json:"buttons,omitempty"` }
https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
type ActivityAssets ¶
type ActivityAssets struct { LargeImage *string `json:"large_image,omitempty"` LargeText *string `json:"large_text,omitempty"` SmallImage *string `json:"small_image,omitempty"` SmallText *string `json:"small_text,omitempty"` }
https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
type ActivityButtons ¶
https://discord.com/developers/docs/topics/gateway#activity-object-activity-buttons
type ActivityEmoji ¶
type ActivityEmoji struct { Name string `json:"name"` Id *string `json:"id,omitempty"` Animated *bool `json:"animated,omitempty"` }
https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
type ActivityParty ¶
https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
type ActivitySecrets ¶
type ActivitySecrets struct { Join *string `json:"join,omitempty"` Spectate *string `json:"spectate,omitempty"` Match *string `json:"match,omitempty"` }
https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
type ActivityTimestamps ¶
type ActivityTimestamps struct { Start *int `json:"start,omitempty"` End *int `json:"end,omitempty"` }
https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
type Identify ¶
type Identify struct { Token string `json:"token"` Compress *bool `json:"compress,omitempty"` LargeThreshold *int `json:"large_threshold,omitempty"` Shard *[2]int `json:"shard,omitempty"` Presence *UpdatePresence `json:"presence,omitempty"` Intents int `json:"intents"` Properties IdentifyProperties `json:"properties"` }
https://discord.com/developers/docs/topics/gateway#identify-identify-structure
type IdentifyPayload ¶
type IdentifyProperties ¶
type IdentifyProperties struct { OS string `json:"$os"` Browser string `json:"$browser"` Device string `json:"$device"` }
https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
type Payload ¶
type Payload struct { Opcode int `json:"op"` Data interface{} `json:"d,omitempty"` Sequence int `json:"s,omitempty"` Event string `json:"t,omitempty"` }
https://discord.com/developers/docs/topics/gateway#payloads-gateway-payload-structure
type UpdatePresence ¶
type UpdatePresence struct { Since *int64 `json:"since,omitempty"` Status string `json:"status"` AFK bool `json:"afk"` Activities []Activity `json:"activities"` }
https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure
type UpdatePresencePayload ¶
type UpdatePresencePayload struct { Payload Data UpdatePresence `json:"d"` }