mirror of
https://github.com/Xevion/r2park.git
synced 2025-12-11 06:08:20 -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
|
// Count servers
|
||||||
guilds := s.State.Guilds
|
guilds := s.State.Guilds
|
||||||
log.Debugf("Connected to %d server%s", len(guilds), Plural(len(guilds)))
|
log.Debugf("Connected to %d server%s", len(guilds), Plural(len(guilds)))
|
||||||
|
|
||||||
|
// Load the session
|
||||||
|
tryReload()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Open the session
|
// Open the session
|
||||||
@@ -82,9 +85,6 @@ func Bot() {
|
|||||||
registeredCommands[definitionIndex] = command
|
registeredCommands[definitionIndex] = command
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the session
|
|
||||||
tryReload()
|
|
||||||
|
|
||||||
// Wait here until CTRL-C or other term signal is received.
|
// Wait here until CTRL-C or other term signal is received.
|
||||||
log.Println("Press Ctrl+C to exit")
|
log.Println("Press Ctrl+C to exit")
|
||||||
<-stop
|
<-stop
|
||||||
|
|||||||
Reference in New Issue
Block a user