Reload session on bot login event

This commit is contained in:
2023-12-17 04:54:46 -06:00
parent 3e8be4bddd
commit 4f384618bc

View File

@@ -46,6 +46,9 @@ func Bot() {
// Count servers
guilds := s.State.Guilds
log.Debugf("Connected to %d server%s", len(guilds), Plural(len(guilds)))
// Load the session
tryReload()
})
// Open the session
@@ -82,9 +85,6 @@ func Bot() {
registeredCommands[definitionIndex] = command
}
// Load the session
tryReload()
// Wait here until CTRL-C or other term signal is received.
log.Println("Press Ctrl+C to exit")
<-stop