added send message function.

This commit is contained in:
5elenay
2021-08-21 00:22:45 +03:00
parent a77f3d097d
commit d025726680
5 changed files with 74 additions and 32 deletions

View File

@@ -3,6 +3,7 @@ package revoltgo
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/sacOO7/gowebsocket"
@@ -16,6 +17,7 @@ type GatewayType struct {
func (c *Client) Start() {
// Create new socket
c.Socket = gowebsocket.New(WS_URL)
c.HTTP = &http.Client{}
// Send auth when connected
c.Socket.OnConnected = func(_ gowebsocket.Socket) {