revoltgo/client.go
2021-08-20 21:53:16 +03:00

25 lines
421 B
Go

package revoltgo
import (
"github.com/sacOO7/gowebsocket"
)
const (
WS_URL = "wss://ws.revolt.chat"
API_URL = "https://api.revolt.chat"
)
// Client struct
type Client struct {
Token string
Socket gowebsocket.Socket
// Functions
OnReadyFunction func()
}
// On Ready event will run when websocket connection is started and bot is ready to work.
func (c *Client) OnReady(fn func()) {
c.OnReadyFunction = fn
}