gateway

package
v0.0.0-...-c3bab1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
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
)

Variables

View Source
var AllIntents = utils.Flags{Flags: 0}
View Source
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

type ActivityButtons struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

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

type ActivityParty struct {
	Id   *string `json:"id,omitempty"`
	Size *[2]int `json:"size,omitempty"`
}

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 HeartbeatPayload

type HeartbeatPayload struct {
	Payload
	Data int `json:"d"`
}

https://discord.com/developers/docs/topics/gateway#heartbeat

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 IdentifyPayload struct {
	Payload
	Data Identify `json:"d"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL