Documentation
¶
Overview ¶
Zetka provides a minimal, fast, efficient WebSocket client for interacting with the Discord Gateway. It has no interaction with the REST API (beyond obtaining Gateway URLs.)
Example ¶
client, err := zetka.New("foobartoken") if err != nil { log.Fatal(err) } results := make(chan *zetka.GatewayEvent) go func(results chan *zetka.GatewayEvent) { for event := range results { log.Println(event.Type) } }(results) if err := client.Start(context.Background(), results); err != nil { log.Fatal(err) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseURL = "https://discord.com/api/v8"
BaseURL for Version 8
View Source
var (
GetGatewayPath = "/gateway/bot"
)
Functions ¶
This section is empty.
Types ¶
type GatewayEvent ¶
Click to show internal directories.
Click to hide internal directories.