Compare commits
	
		
			5 Commits
		
	
	
		
			tongo
			...
			4afbc2564b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4afbc2564b | |||
| a3e12f3c45 | |||
| 82f49079ab | |||
| 09d7496c93 | |||
| 833a23ba77 | 
@ -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:
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user