core: log responses to stdout first, then send as a Telegram message
This commit is contained in:
		
							parent
							
								
									a7bbb1c1cc
								
							
						
					
					
						commit
						2b8105d2a8
					
				
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.py
									
									
									
									
									
								
							@ -304,17 +304,17 @@ def queue_processor():
 | 
			
		||||
 | 
			
		||||
                            if response:
 | 
			
		||||
                                if not formatting:
 | 
			
		||||
                                    print(f"Responding using module {mod.path} ({mod.alias}) with text: {response}")
 | 
			
		||||
                                    updater.bot.send_message(chat_id=msg.chat.id, text=response,
 | 
			
		||||
                                                             disable_web_page_preview=True)
 | 
			
		||||
                                    print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
 | 
			
		||||
                                    time.sleep(DELAY_AFTER_RESPONSE)
 | 
			
		||||
                                    break
 | 
			
		||||
 | 
			
		||||
                                elif formatting in ["Markdown", "MarkdownV2", "HTML"]:
 | 
			
		||||
                                    print(f"Responding using module {mod.path} ({mod.alias}) with text (using {formatting}): {response}")
 | 
			
		||||
                                    updater.bot.send_message(chat_id=msg.chat.id, text=response,
 | 
			
		||||
                                            disable_web_page_preview=True,
 | 
			
		||||
                                            parse_mode=formatting)
 | 
			
		||||
                                    print(f"Responded using module {mod.path} ({mod.alias}) with text (using {formatting}): {response}")
 | 
			
		||||
                                    time.sleep(DELAY_AFTER_RESPONSE)
 | 
			
		||||
                                    break
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user