log level to debug and log ready and resumed connections
This commit is contained in:
parent
05a11b87ea
commit
a20bc22ab1
2 changed files with 13 additions and 4 deletions
|
@ -5,7 +5,9 @@ import (
|
|||
"github.com/disgoorg/disgo"
|
||||
"github.com/disgoorg/disgo/bot"
|
||||
"github.com/disgoorg/disgo/cache"
|
||||
"github.com/disgoorg/disgo/events"
|
||||
"github.com/disgoorg/disgo/gateway"
|
||||
disgolog "github.com/disgoorg/log"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"grow.rievo.dev/discordBots/cmd/vcbot/config"
|
||||
"grow.rievo.dev/discordBots/cmd/vcbot/event"
|
||||
|
@ -21,6 +23,7 @@ var release string
|
|||
|
||||
func main() {
|
||||
|
||||
disgolog.SetLevel(disgolog.LevelDebug)
|
||||
err := sentry.Init(sentry.ClientOptions{
|
||||
// Either set your DSN here or set the SENTRY_DSN environment variable.
|
||||
//Dsn: "",
|
||||
|
@ -62,6 +65,12 @@ func main() {
|
|||
bot.WithEventListenerFunc(event.JoinEvent),
|
||||
bot.WithEventListenerFunc(event.MoveEvent),
|
||||
bot.WithEventListenerFunc(event.LeaveEvent),
|
||||
bot.WithEventListenerFunc(func(event *events.Ready) {
|
||||
log.Println("DEBUG: Connection Ready")
|
||||
}),
|
||||
bot.WithEventListenerFunc(func(event *events.Resumed) {
|
||||
log.Println("DEBUG: Connection Resumed")
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
log.Fatal("error while building vcbot instance: ", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue