forked from dymik739/modular-bot-framework-for-telegram
		
	main.py: disable MarkdownV2 to avoid errors
This commit is contained in:
		
							parent
							
								
									8cc68080e8
								
							
						
					
					
						commit
						ebdae6256e
					
				
							
								
								
									
										5
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.py
									
									
									
									
									
								
							@ -191,14 +191,15 @@ def queue_processor():
 | 
			
		||||
                            response = mod.process(msg)
 | 
			
		||||
 | 
			
		||||
                            if response:
 | 
			
		||||
                                '''
 | 
			
		||||
                                # protecting output
 | 
			
		||||
                                symbols_to_escape = ['[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']
 | 
			
		||||
                                for symbol in symbols_to_escape:
 | 
			
		||||
                                    response = response.replace(symbol, f"\\{symbol}")
 | 
			
		||||
                                '''
 | 
			
		||||
 | 
			
		||||
                                updater.bot.send_message(chat_id=msg.chat.id, text=response,
 | 
			
		||||
                                                         disable_web_page_preview=True,
 | 
			
		||||
                                                         parse_mode="MarkdownV2")
 | 
			
		||||
                                                         disable_web_page_preview=True)
 | 
			
		||||
                                print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
 | 
			
		||||
                                break
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user