forked from dymik739/modular-bot-framework-for-telegram
		
	generic-command-processor: add easter eggs and make the module case-insensitive
This commit is contained in:
		
							parent
							
								
									376ffd4957
								
							
						
					
					
						commit
						7d0d816ca8
					
				@ -1,3 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "s": "Головна сторінка сервера: http://10.1.1.1:12010/"
 | 
					    "s": "Головна сторінка сервера: http://10.1.1.1:12010/",
 | 
				
			||||||
 | 
					    "пари_для_артема": "🧐",
 | 
				
			||||||
 | 
					    "пари_для_артема_хоч_і_не_на_завтра": "🤨"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -2,5 +2,5 @@ command_storage = json.loads(open(self.path + "data.json").read())
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
received_command = self.MESSAGE.text[1:]
 | 
					received_command = self.MESSAGE.text[1:]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if received_command in command_storage:
 | 
					if received_command.lower() in command_storage:
 | 
				
			||||||
    self.RESPONSE = command_storage[received_command]
 | 
					    self.RESPONSE = command_storage[received_command.lower()]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user