mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-20 11:37:56 +00:00
Moved internal/handler outside
This commit is contained in:
parent
cfa764b150
commit
deafe15967
|
@ -8,10 +8,12 @@ import (
|
||||||
|
|
||||||
"github.com/diamondburned/arikawa/api"
|
"github.com/diamondburned/arikawa/api"
|
||||||
"github.com/diamondburned/arikawa/gateway"
|
"github.com/diamondburned/arikawa/gateway"
|
||||||
"github.com/diamondburned/arikawa/internal/handler"
|
"github.com/diamondburned/arikawa/handler"
|
||||||
"github.com/pkg/errors"
|
"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 {
|
type Session struct {
|
||||||
*api.Client
|
*api.Client
|
||||||
gateway *gateway.Gateway
|
gateway *gateway.Gateway
|
||||||
|
@ -19,8 +21,9 @@ type Session struct {
|
||||||
// ErrorLog logs errors, including Gateway errors.
|
// ErrorLog logs errors, including Gateway errors.
|
||||||
ErrorLog func(err error) // default to log.Println
|
ErrorLog func(err error) // default to log.Println
|
||||||
|
|
||||||
// handlers stuff
|
// Command handler with inherited methods.
|
||||||
*handler.Handler
|
*handler.Handler
|
||||||
|
|
||||||
hstop chan struct{}
|
hstop chan struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/diamondburned/arikawa/discord"
|
"github.com/diamondburned/arikawa/discord"
|
||||||
"github.com/diamondburned/arikawa/gateway"
|
"github.com/diamondburned/arikawa/gateway"
|
||||||
"github.com/diamondburned/arikawa/internal/handler"
|
"github.com/diamondburned/arikawa/handler"
|
||||||
"github.com/diamondburned/arikawa/session"
|
"github.com/diamondburned/arikawa/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue