discordwebapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGatewayWebsocketURI

func GetGatewayWebsocketURI(discordApiGatewayURL string) (url.URL, error)

GetGatewayWebsocketURI returns the current Discord Gateway WSS URL, pass discordApiGatewayURL as "" to use default //todo: make it so test doesn't have to hit server

Types

type GatewayWebsocketInformation

type GatewayWebsocketInformation struct {
	Url               string                                       `json:"url"`
	Shards            int                                          `json:"shards"`
	SessionStartLimit GatewayWebsocketInformationSessionStartLimit `json:"session_start_limit"`
}

func GetGatewayWebsocketInformation

func GetGatewayWebsocketInformation(discordApiGatewayURL string, apiKey string) (GatewayWebsocketInformation, error)

type GatewayWebsocketInformationSessionStartLimit

type GatewayWebsocketInformationSessionStartLimit struct {
	Total          int `json:"total"`
	Remaining      int `json:"remaining"`
	ResetAfter     int `json:"reset_after"`
	MaxConcurrency int `json:"max_concurrency"`
}

type WebAPIError

type WebAPIError struct {
	JsonData []byte
}

func (WebAPIError) Error

func (wae WebAPIError) Error() string

Jump to

Keyboard shortcuts

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