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