2 Commits

Author SHA1 Message Date
a07c071dc2 removing printlns on successful shutdown 2026-03-01 00:17:58 -05:00
b9ec31da95 readme and comments 2026-02-25 15:44:44 -05:00
2 changed files with 1 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ auto-moderation from the bot without manual intervention. The example message ha
*/
func main() {
b, err := bolt.New(bolt.WithLogLevel(bolt.LogLevelAll))
b, err := bolt.New()
if err != nil {
panic(err)

View File

@@ -112,8 +112,6 @@ func (b *bolt) Start() error {
return fmt.Errorf("failed to open websocket connection with Discord: %e", err)
}
log.Println("bot started")
sigChannel := make(chan os.Signal, 1)
signal.Notify(sigChannel, os.Interrupt)
<-sigChannel
@@ -131,10 +129,8 @@ func (b *bolt) Start() error {
case <-ctx.Done():
log.Println("shutdown timed out waiting for handlers to finish, some may have been incomplete")
case <-closeChan:
log.Println("handler routines cleaned")
}
log.Println("exiting")
return b.stop()
}
@@ -157,9 +153,6 @@ func (b *bolt) stop() error {
return b.Close()
}
// msgEventHandler is a beefy boy that handles message logging, command parsing, and executing payload functions. It needs cleanup then
// i'll worry about this comment
// msgEventHandler handles the routing of messages to either the command or message handlers. If LogLvl is set, logging is handled here before
// the event is mapped to the Message struct and forwarded to the handlers. Each message is handled in its own goroutine, the max allowed goroutines
// is set as a default and can be altered using options for better performance.