Fix reboot timer
This commit is contained in:
@ -65,6 +65,13 @@ func status(s *discordgo.Session) {
|
||||
go runPurge(s)
|
||||
return
|
||||
}
|
||||
|
||||
func rebootBump() {
|
||||
time.Sleep(time.Until(config.BumpTime.Add(2 * time.Hour)))
|
||||
dg.ChannelMessageSend(config.AdminChannel, "!d bump is ready")
|
||||
|
||||
}
|
||||
|
||||
func storeVerification(v Verification) {
|
||||
defer log.PanicSafe()
|
||||
fileURL, _ := url.Parse(v.Photo)
|
||||
|
||||
4
main.go
4
main.go
@ -81,9 +81,7 @@ func main() {
|
||||
|
||||
log.LogInfo("Thanos is now running. Press CTRL-C to exit.")
|
||||
go purgeTimer(dg)
|
||||
if time.Since(config.BumpTime) > 2*time.Hour {
|
||||
dg.ChannelMessageSend(config.AdminChannel, "!d bump is ready")
|
||||
}
|
||||
go rebootBump()
|
||||
sc := make(chan os.Signal, 1)
|
||||
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
|
||||
<-sc
|
||||
|
||||
Reference in New Issue
Block a user