Typos and cosmetics.
This commit is contained in:
		
							parent
							
								
									8debb0b3d5
								
							
						
					
					
						commit
						d1f7019f89
					
				| @ -9,4 +9,5 @@ if "%" in self.MESSAGE["text"]: | |||||||
|             tagged_users |= self.tag_sets[i] |             tagged_users |= self.tag_sets[i] | ||||||
| 
 | 
 | ||||||
|     if tagging_issued: |     if tagging_issued: | ||||||
|         self.RESPONSE = "Користувач використав масовий тег з повідомленням: {}\n\n{}".format(self.MESSAGE["text"], " ".join(tagged_users)) |         self.RESPONSE = f"Користувач використав масовий тег з повідомленням: {self.MESSAGE['text']}\n\n" \ | ||||||
|  |                         f"{' '.join(tagged_users)}" | ||||||
|  | |||||||
| @ -1,24 +1,24 @@ | |||||||
| msg = self.MESSAGE["text"].lower() | msg = self.MESSAGE["text"].lower() | ||||||
| 
 | 
 | ||||||
| responce_given = False | response_given = False | ||||||
| 
 | 
 | ||||||
| for file in os.listdir(self.path + "db/"): | for file in os.listdir(self.path + "db/"): | ||||||
|     if responce_given: |     if response_given: | ||||||
|         break |         break | ||||||
| 
 | 
 | ||||||
|     try: |     try: | ||||||
|         criteria = json.loads(readfile(self.path + "db/" + file)) |         criteria = json.loads(readfile(self.path + "db/" + file)) | ||||||
| 
 | 
 | ||||||
|         for wordset in criteria["trigger_lists"]: |         for word_set in criteria["trigger_lists"]: | ||||||
|             all_words_in = True |             all_words_in = True | ||||||
|             for word in wordset: |             for word in word_set: | ||||||
|                 if word not in msg: |                 if word not in msg: | ||||||
|                     all_words_in = False |                     all_words_in = False | ||||||
|                     break |                     break | ||||||
| 
 | 
 | ||||||
|             if all_words_in: |             if all_words_in: | ||||||
|                 self.RESPONSE = criteria["responce_text"] |                 self.RESPONSE = criteria["response_text"] | ||||||
|                 responce_given = True |                 response_given = True | ||||||
|                 break |                 break | ||||||
| 
 | 
 | ||||||
|     except Exception as e: |     except Exception as e: | ||||||
|  | |||||||
| @ -17,7 +17,8 @@ if (command[0] in self.aliases) and (1 <= command_length <= 3): | |||||||
|      |      | ||||||
|         decoded_text = text_to_decode |         decoded_text = text_to_decode | ||||||
|         if chosen_model not in models: |         if chosen_model not in models: | ||||||
|             self.RESPONSE = f"Такого варіанту транслітерації не існує. Доступні варіанти: {', '.join(list(models.keys()))}" |             self.RESPONSE = f"Такого варіанту транслітерації не існує. Доступні варіанти: " \ | ||||||
|  |                             f"{', '.join(list(models.keys()))}" | ||||||
|         else: |         else: | ||||||
|             for i in models[chosen_model]: |             for i in models[chosen_model]: | ||||||
|                 decoded_text = decoded_text.replace(i[0], i[1]) |                 decoded_text = decoded_text.replace(i[0], i[1]) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user