soo
This commit is contained in:
		| @@ -10,7 +10,7 @@ def query(params): | |||||||
|  |  | ||||||
|     try: |     try: | ||||||
|         res = googlesearch.search(param_string.replace("+"," ") ,num=5,start=0,stop=5) |         res = googlesearch.search(param_string.replace("+"," ") ,num=5,start=0,stop=5) | ||||||
|         send_string = "Google search for <b>" + param_string.replace("+"," ") + "</b>:\n" |         send_string = "Results for <b>" + param_string.replace("+"," ") + "</b>:\n\n" | ||||||
|         for url in res: |         for url in res: | ||||||
|             send_string += url + "\n\n" |             send_string += url + "\n\n" | ||||||
|         send_string += "Search url:\n" + search_url |         send_string += "Search url:\n" + search_url | ||||||
|   | |||||||
| @@ -136,6 +136,7 @@ class TelegramIO(): | |||||||
|  |  | ||||||
|         self.persistence.increment("messages_sent") |         self.persistence.increment("messages_sent") | ||||||
|  |  | ||||||
|  |  | ||||||
|     def send_photo(self, url, caption): |     def send_photo(self, url, caption): | ||||||
|         print("SENDING PHOTO: " + url) |         print("SENDING PHOTO: " + url) | ||||||
|         data = { |         data = { | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.py
									
									
									
									
									
								
							| @@ -126,7 +126,10 @@ class ChatBot(): | |||||||
|     def bot_print_status(self, params): |     def bot_print_status(self, params): | ||||||
|         """Prints the bots current status and relevant information""" |         """Prints the bots current status and relevant information""" | ||||||
|         delta = str(datetime.datetime.now() - self.start_time) |         delta = str(datetime.datetime.now() - self.start_time) | ||||||
|         ip = requests.get('https://api.ipify.org').text |         try: | ||||||
|  |             ip = requests.get('https://api.ipify.org').text | ||||||
|  |         except: | ||||||
|  |             ip = "not fetchable" | ||||||
|         message = "<pre>Status: Running :green_circle:\n" |         message = "<pre>Status: Running :green_circle:\n" | ||||||
|         message += "Uptime: " + delta[:delta.rfind(".")] + "\n" |         message += "Uptime: " + delta[:delta.rfind(".")] + "\n" | ||||||
|         message += "Reboots: " + str(self.persistence.read("reboots")) + "\n" |         message += "Reboots: " + str(self.persistence.read("reboots")) + "\n" | ||||||
| @@ -311,4 +314,5 @@ class ChatBot(): | |||||||
|                 self.telegram.send_message("Meme won't yeet") |                 self.telegram.send_message("Meme won't yeet") | ||||||
|  |  | ||||||
| ####################################################################### | ####################################################################### | ||||||
|  |  | ||||||
| bot = ChatBot("ChatterBot", version="1.03") | bot = ChatBot("ChatterBot", version="1.03") | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| {"messages_read": 56, "messages_sent": 34, "commands_executed": 21, "photos_sent": 4, "log": [], "chat_members": {"364520272": "Remy Moll"}, "reboots": 49} | {"messages_read": 66, "messages_sent": 41, "commands_executed": 31, "photos_sent": 6, "log": [], "chat_members": {"364520272": "Remy Moll"}, "reboots": 57} | ||||||
		Reference in New Issue
	
	Block a user
	 Remy Moll
					Remy Moll