Deleting old captcha messages

This commit is contained in:
Nefrace 2023-09-10 20:33:40 +03:00
parent 09d7496c93
commit a3e12f3c45
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ func TaskKickOldUsers(b *echotron.API) {
continue continue
} }
log.Printf("User %s was banned", user.FirstName) 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) store.DeleteByID(ctx, user.Id)
} }
} }