diff --git a/mods/remind.go b/mods/remind.go index f333ea1..99c120f 100644 --- a/mods/remind.go +++ b/mods/remind.go @@ -108,6 +108,11 @@ func remind(broker *tg.Broker, update tg.APIMessage) { } func runreminder(id string) { + // In case this is called in the init, wait until the broker is available + for broker == nil { + // Wait + } + // Get reminder r := reminders[id] remaining := r.When - time.Now().Unix()