1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-02 18:26:41 +00:00

Moved internal/handler outside

This commit is contained in:
diamondburned (Forefront) 2020-01-16 21:23:56 -08:00
parent cfa764b150
commit deafe15967
4 changed files with 6 additions and 3 deletions

View file

@ -8,10 +8,12 @@ import (
"github.com/diamondburned/arikawa/api"
"github.com/diamondburned/arikawa/gateway"
"github.com/diamondburned/arikawa/internal/handler"
"github.com/diamondburned/arikawa/handler"
"github.com/pkg/errors"
)
// Session manages both the API and Gateway. As such, Session inherits all of
// API's methods, as well has the Handler used for Gateway.
type Session struct {
*api.Client
gateway *gateway.Gateway
@ -19,8 +21,9 @@ type Session struct {
// ErrorLog logs errors, including Gateway errors.
ErrorLog func(err error) // default to log.Println
// handlers stuff
// Command handler with inherited methods.
*handler.Handler
hstop chan struct{}
}

View file

@ -5,7 +5,7 @@ import (
"github.com/diamondburned/arikawa/discord"
"github.com/diamondburned/arikawa/gateway"
"github.com/diamondburned/arikawa/internal/handler"
"github.com/diamondburned/arikawa/handler"
"github.com/diamondburned/arikawa/session"
)