The question is, will it run on a pi?
This commit is contained in:
		
							
								
								
									
										10
									
								
								bot/main.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								bot/main.py
									
									
									
									
									
								
							| @@ -11,7 +11,7 @@ import emoji | ||||
|  | ||||
| class ChatBot(): | ||||
|     """""" | ||||
|     def __init__(self, name, version): | ||||
|     def __init__(self, name, version, hw_commands): | ||||
|         """Inits the Bot with a few conf. vars | ||||
|         Args:   -> name:str - Name of the bot | ||||
|                 -> api_key:str - t.me api-key | ||||
| @@ -86,7 +86,9 @@ class ChatBot(): | ||||
|             "9" : ":keycap_digit_nine:", | ||||
|         } | ||||
|  | ||||
|         self.telegram = telegram.TelegramIO(self.persistence, self.commands) | ||||
|         self.all_commands = {**self.commands, **hw_commands} | ||||
|  | ||||
|         self.telegram = telegram.TelegramIO(self.persistence, self.all_commands) | ||||
|  | ||||
|  | ||||
|     def react_command(self, command, params): | ||||
| @@ -209,10 +211,10 @@ class ChatBot(): | ||||
|         """Shows a list of all commands and their description""" | ||||
|         send_text = "BeebBop, this is " + self.name + " (V." + self.version + ")\n" | ||||
|         send_text += "Here is what I can do up to now: \n" | ||||
|         entries = sorted(list(self.commands.keys())) | ||||
|         entries = sorted(list(self.all_commands.keys())) | ||||
|         for entry in entries: | ||||
|             send_text += "<b>" + entry + "</b> - " | ||||
|             send_text += "<code>" + self.commands[entry].__doc__ + "</code>\n\n" | ||||
|             send_text += "<code>" + self.all_commands[entry].__doc__ + "</code>\n\n" | ||||
|         return send_text | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Remy Moll
					Remy Moll