Compare commits

..

5 Commits

3 changed files with 13 additions and 9 deletions

View File

@ -10,7 +10,7 @@ services:
env_file:
- bot.env
mongo:
image: mongo
image: mongo:4
restart: always
env_file:
- mongo.env
@ -20,13 +20,13 @@ services:
- mongodata:/data/db
- mongoconfig:/data/configdb
mongo-express:
image: mongo-express
restart: always
ports:
- ${HOST}:8090:8081
env_file:
- mongo.env
# mongo-express:
# image: mongo-express
# restart: always
# ports:
# - ${HOST}:8090:8081
# env_file:
# - mongo.env
volumes:
mongodata:

View File

@ -152,7 +152,7 @@ func checkCaptcha(b *bot, update *echotron.Update) error {
if err != nil {
log.Printf("Can't send welcome message: %s", err)
}
go waitAndDelete(&b.API, res.Result, timeout*time.Second)
go waitAndDelete(&b.API, res.Result, timeout)
// time.Sleep(time.Second * 10)
// _, err = b.DeleteMessage(message.Chat.ID, res.Result.ID)
if err != nil {

View File

@ -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)
}
}