Browse Source

Fix reboot timer

BotCommandStruct
Gregory Rudolph 3 years ago
parent
commit
fbd1f1f8ca
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 7
      config.go
  2. 4
      main.go

7
config.go

@ -65,6 +65,13 @@ func status(s *discordgo.Session) { @@ -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

@ -81,9 +81,7 @@ func main() { @@ -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

Loading…
Cancel
Save