mirror of
https://github.com/Xevion/r2park.git
synced 2025-12-09 18:08:05 -06:00
Reload session on bot login event
This commit is contained in:
6
main.go
6
main.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user