Explorar o código

refactor(main): use shared session.Session.Context() for future calls

rigormorrtiss %!s(int64=4) %!d(string=hai) anos
pai
achega
3492639a1d
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      discordo.go

+ 1 - 2
discordo.go

@@ -1,7 +1,6 @@
 package main
 
 import (
-	"context"
 	"sort"
 	"strings"
 
@@ -129,7 +128,7 @@ func newSession(email string, password string, token string) (s *session.Session
 
 	s.AddHandler(onSessionReady)
 	s.AddHandler(onSessionMessageCreate)
-	if err = s.Open(context.Background()); err != nil {
+	if err = s.Open(s.Context()); err != nil {
 		panic(err)
 	}