update versions and change to std logger
This commit is contained in:
parent
aa20d59a0f
commit
df441014ed
17 changed files with 212 additions and 147 deletions
|
@ -6,9 +6,9 @@ import (
|
|||
"github.com/disgoorg/disgo/bot"
|
||||
"github.com/disgoorg/disgo/cache"
|
||||
"github.com/disgoorg/disgo/gateway"
|
||||
"github.com/disgoorg/log"
|
||||
"grow.rievo.dev/discordBots/cmd/funbot/command"
|
||||
"grow.rievo.dev/discordBots/cmd/funbot/config"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strings"
|
||||
|
@ -16,9 +16,8 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
log.SetLevel(log.LevelInfo)
|
||||
log.Info("starting funbot...")
|
||||
log.Info("disgo version: ", disgo.Version)
|
||||
log.Printf("INFO: starting funbot...")
|
||||
log.Printf("INFO: disgo version: %v", disgo.Version)
|
||||
|
||||
// permissions:
|
||||
// intent:
|
||||
|
@ -51,7 +50,7 @@ func main() {
|
|||
}
|
||||
if config.RegisterGuildID != 0 {
|
||||
if _, err = client.Rest().SetGuildCommands(client.ApplicationID(), config.RegisterGuildID, config.NoCommands); err != nil {
|
||||
log.Info("error deleting guild commands", err)
|
||||
log.Printf("INFO: error deleting guild commands %v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -59,7 +58,7 @@ func main() {
|
|||
log.Fatal("error while registering commands: ", err)
|
||||
}
|
||||
if _, err = client.Rest().SetGlobalCommands(client.ApplicationID(), config.NoCommands); err != nil {
|
||||
log.Info("error deleting global commands", err)
|
||||
log.Printf("INFO: error deleting global commands %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +66,7 @@ func main() {
|
|||
log.Fatal("error while connecting to gateway: ", err)
|
||||
}
|
||||
|
||||
log.Infof("funbot is now running. Press CTRL-C to exit.")
|
||||
log.Printf("INFO: funbot is now running. Press CTRL-C to exit.")
|
||||
s := make(chan os.Signal, 1)
|
||||
signal.Notify(s, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
|
||||
<-s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue