update all command
This commit is contained in:
		
							parent
							
								
									8f30d79c85
								
							
						
					
					
						commit
						fc0eda218f
					
				
							
								
								
									
										12
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								main.go
									
									
									
									
									
								
							@ -83,9 +83,17 @@ func run() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if strings.Contains(strings.ToLower(text), tag) {
 | 
							if strings.Contains(strings.ToLower(text), tag) {
 | 
				
			||||||
			users, _ := db.GetUsers(chatID)
 | 
								users, _ := db.GetUsers(chatID)
 | 
				
			||||||
			s := "@" + users[0]
 | 
								s := ""
 | 
				
			||||||
			for _, user := range users[1:] {
 | 
								i := 0
 | 
				
			||||||
 | 
								for _, user := range users {
 | 
				
			||||||
 | 
									if username == user {
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									if i > 0 {
 | 
				
			||||||
 | 
										s += " "
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				s += "@" + user
 | 
									s += "@" + user
 | 
				
			||||||
 | 
									i++
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, _ = bot.Send(tgbot.NewMessage(chatID, s))
 | 
								_, _ = bot.Send(tgbot.NewMessage(chatID, s))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user