Documentation ¶
Index ¶
- Variables
- func CheckForClosure(Result string) bool
- func Login(clientid string) error
- func LoginLoop()
- func Logout()
- func SetActivity(activity *Activity) error
- type Activity
- type Args
- type AuthenticatedStruct
- type Button
- type Frame
- type Handshake
- type Party
- type PayloadActivity
- type PayloadAssets
- type PayloadButton
- type PayloadParty
- type PayloadSecrets
- type PayloadTimestamps
- type ReceivedPayloadStruct
- type Secrets
- type Timestamps
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthenticationUpdate = sync.WaitGroup{}
View Source
var CachedClientId string
View Source
var LogLooping bool
Functions ¶
func CheckForClosure ¶
func SetActivity ¶
Types ¶
type Activity ¶
type Activity struct { // What the player is currently doing Details string // The user's current party status State string // The id for a large asset of the activity, usually a snowflake LargeImage string // Text displayed when hovering over the large image of the activity LargeText string // The id for a small asset of the activity, usually a snowflake SmallImage string // Text displayed when hovering over the small image of the activity SmallText string // Information for the current party of the player Party *Party // Unix timestamps for start and/or end of the game Timestamps *Timestamps // Secrets for Rich Presence joining and spectating Secrets *Secrets // Clickable buttons that open a URL in the browser Buttons []*Button }
Activity holds the data for discord rich presence
type Args ¶
type Args struct { Pid int `json:"pid"` Activity *PayloadActivity `json:"activity"` }
type AuthenticatedStruct ¶
type AuthenticatedStruct struct { Id string `json:"id"` Username string `json:"username"` Discriminator string `json:"discriminator"` Avatar string `json:"avatar"` }
var Authentication *AuthenticatedStruct
type Party ¶
type Party struct { // The ID of the party ID string // Used to show the party's current size Players int // Used to show the party's maximum size MaxPlayers int }
Party holds information for the current party of the player
type PayloadActivity ¶
type PayloadActivity struct { Details string `json:"details,omitempty"` State string `json:"state,omitempty"` Assets PayloadAssets `json:"assets,omitempty"` Party *PayloadParty `json:"party,omitempty"` Timestamps *PayloadTimestamps `json:"timestamps,omitempty"` Secrets *PayloadSecrets `json:"secrets,omitempty"` Buttons []*PayloadButton `json:"buttons,omitempty"` }
type PayloadAssets ¶
type PayloadButton ¶
type PayloadParty ¶
type PayloadSecrets ¶
type PayloadTimestamps ¶
type ReceivedPayloadStruct ¶
type ReceivedPayloadStruct struct { Evt string `json:"evt"` Data struct { User AuthenticatedStruct `json:"user"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.