Compare commits
	
		
			5 Commits
		
	
	
		
			tongo
			...
			4afbc2564b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4afbc2564b | |||
| a3e12f3c45 | |||
| 82f49079ab | |||
| 09d7496c93 | |||
| 833a23ba77 | 
@ -10,7 +10,7 @@ services:
 | 
				
			|||||||
    env_file:
 | 
					    env_file:
 | 
				
			||||||
      - bot.env
 | 
					      - bot.env
 | 
				
			||||||
  mongo:
 | 
					  mongo:
 | 
				
			||||||
    image: mongo
 | 
					    image: mongo:4
 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    env_file:
 | 
					    env_file:
 | 
				
			||||||
      - mongo.env
 | 
					      - mongo.env
 | 
				
			||||||
@ -20,13 +20,13 @@ services:
 | 
				
			|||||||
      - mongodata:/data/db
 | 
					      - mongodata:/data/db
 | 
				
			||||||
      - mongoconfig:/data/configdb
 | 
					      - mongoconfig:/data/configdb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mongo-express:
 | 
					        #  mongo-express:
 | 
				
			||||||
    image: mongo-express
 | 
					        #    image: mongo-express
 | 
				
			||||||
    restart: always
 | 
					        #    restart: always
 | 
				
			||||||
    ports:
 | 
					        #    ports:
 | 
				
			||||||
      - ${HOST}:8090:8081
 | 
					        #      - ${HOST}:8090:8081
 | 
				
			||||||
    env_file:
 | 
					        #    env_file:
 | 
				
			||||||
      - mongo.env
 | 
					        #      - mongo.env
 | 
				
			||||||
 | 
					
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
  mongodata:
 | 
					  mongodata:
 | 
				
			||||||
 | 
				
			|||||||
@ -152,7 +152,7 @@ func checkCaptcha(b *bot, update *echotron.Update) error {
 | 
				
			|||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
					log.Printf("Can't send welcome message: %s", err)
 | 
										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)
 | 
									// time.Sleep(time.Second * 10)
 | 
				
			||||||
				// _, err = b.DeleteMessage(message.Chat.ID, res.Result.ID)
 | 
									// _, err = b.DeleteMessage(message.Chat.ID, res.Result.ID)
 | 
				
			||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
 | 
				
			|||||||
@ -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)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user