add day rating feature
This commit is contained in:
@@ -69,21 +69,22 @@ class MemoryHandler(BaseHandler):
|
||||
matching_models = context.chat_data["kept_matches"]
|
||||
chosen_match = matching_models[ind]
|
||||
|
||||
rating_string = f" ({models.RATING_MAPPING[chosen_match.rating]})" if chosen_match.rating else ""
|
||||
|
||||
message_text = f"On {chosen_match.date_pretty}{rating_string}, " \
|
||||
f"{chosen_match.author} wrote: \n" \
|
||||
f"{chosen_match.spoiler_text}"
|
||||
|
||||
if chosen_match.media_path:
|
||||
# context.bot.sendPhoto()
|
||||
await update.effective_message.reply_photo(
|
||||
photo = chosen_match.media_path,
|
||||
caption=
|
||||
f"On {chosen_match.date_pretty}, "
|
||||
f"{chosen_match.author} wrote: \n"
|
||||
f"{chosen_match.spoiler_text}",
|
||||
caption = message_text,
|
||||
parse_mode=ParseMode.HTML
|
||||
)
|
||||
else:
|
||||
await query.edit_message_text(
|
||||
f"On {chosen_match.date_pretty}, "
|
||||
f"{chosen_match.author} wrote: \n"
|
||||
f"{chosen_match.spoiler_text}",
|
||||
message_text,
|
||||
parse_mode=ParseMode.HTML
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user