From a3e12f3c45415bba34b2a3969fb9ae59f3701791 Mon Sep 17 00:00:00 2001 From: Nefrace Date: Sun, 10 Sep 2023 20:33:40 +0300 Subject: [PATCH] Deleting old captcha messages --- kicker/tasks.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kicker/tasks.go b/kicker/tasks.go index 18619e1..1790934 100644 --- a/kicker/tasks.go +++ b/kicker/tasks.go @@ -33,6 +33,10 @@ func TaskKickOldUsers(b *echotron.API) { continue } log.Printf("User %s was banned", user.FirstName) + _, err = b.DeleteMessage(user.ChatId, user.CaptchaMessage) + if err != nil { + log.Println("ERR: Captcha message not deleted: ", err) + } store.DeleteByID(ctx, user.Id) } }