Moved session close func to discord.go
This commit is contained in:
parent
1ae278b8c0
commit
1a5c4b7b0d
1 changed files with 0 additions and 5 deletions
5
wsapi.go
5
wsapi.go
|
@ -136,11 +136,6 @@ func (s *Session) Listen() (err error) {
|
||||||
// Not sure how needed this is and where it would be best to call it.
|
// Not sure how needed this is and where it would be best to call it.
|
||||||
// somewhere.
|
// somewhere.
|
||||||
|
|
||||||
// Close closes the connection to the websocket.
|
|
||||||
func (s *Session) Close() {
|
|
||||||
s.wsConn.Close()
|
|
||||||
}
|
|
||||||
|
|
||||||
func unmarshalEvent(event Event, i interface{}) (err error) {
|
func unmarshalEvent(event Event, i interface{}) (err error) {
|
||||||
if err = json.Unmarshal(event.RawData, i); err != nil {
|
if err = json.Unmarshal(event.RawData, i); err != nil {
|
||||||
fmt.Println(event.Type, err)
|
fmt.Println(event.Type, err)
|
||||||
|
|
Loading…
Reference in a new issue