Fixed parsing for a few commands
This commit is contained in:
		| @@ -69,7 +69,7 @@ class Status(BotFunc): | |||||||
|         tot_e = np.array(self.persistence["bot"]["execute_activity"]["count"]).sum() |         tot_e = np.array(self.persistence["bot"]["execute_activity"]["count"]).sum() | ||||||
|         message += "Commands executed `" + str(tot_e) + "`\n" |         message += "Commands executed `" + str(tot_e) + "`\n" | ||||||
|  |  | ||||||
|         update.message.reply_text(message, reply_markup=reply_markup) |         update.message.reply_text(message, reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN) | ||||||
|         return FIRST |         return FIRST | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -75,7 +75,8 @@ class Weather(BotFunc): | |||||||
|         forecast_time = query.data.replace("time-","") |         forecast_time = query.data.replace("time-","") | ||||||
|         weather = self.get_weather(self.city, forecast_time) |         weather = self.get_weather(self.city, forecast_time) | ||||||
|         query.edit_message_text( |         query.edit_message_text( | ||||||
|             text = "Weather: \n" + weather |             text = "Weather: \n\n" + weather, | ||||||
|  |             parse_mode = ParseMode.HTML | ||||||
|         ) |         ) | ||||||
|         return ConversationHandler.END |         return ConversationHandler.END | ||||||
|  |  | ||||||
| @@ -100,8 +101,10 @@ class Weather(BotFunc): | |||||||
|             message += "🌡 ❄ " + str(tod["temps"][0]) + "° , 🌡 🔥 " + str(tod["temps"][1]) + "°\n\n" |             message += "🌡 ❄ " + str(tod["temps"][0]) + "° , 🌡 🔥 " + str(tod["temps"][1]) + "°\n\n" | ||||||
|  |  | ||||||
|         if forecast_time == "tomorrow" or forecast_time == "7": |         if forecast_time == "tomorrow" or forecast_time == "7": | ||||||
|             tom = weather.pop(0) |             if forecast_time == "tomorrow": # previous statement was not executed: tomorrow is at weather[2] | ||||||
|             print(tom) |                 tom = weather.pop(2) | ||||||
|  |             else: | ||||||
|  |                 tom = weather.pop(0) | ||||||
|             message += "<b>" + "Tomorrow" + ":</b> " + categories[tom["short"]] + "\n" |             message += "<b>" + "Tomorrow" + ":</b> " + categories[tom["short"]] + "\n" | ||||||
|             message += "🌡 ❄ " + str(tom["temps"][0]) + "° , 🌡 🔥 " + str(tom["temps"][1]) + "°\n\n" |             message += "🌡 ❄ " + str(tom["temps"][0]) + "° , 🌡 🔥 " + str(tom["temps"][1]) + "°\n\n" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Remy Moll
					Remy Moll