It's version 0.4
This commit is contained in:
@@ -22,7 +22,7 @@ def register_handlers(dp: Dispatcher, state: BotState):
|
||||
schedule_service = ScheduleService()
|
||||
text, url, day, month = await schedule_service.get_schedule(group, day_offset)
|
||||
# Отправляем текст расписания
|
||||
msg = await message.answer(text, parse_mode="Markdown")
|
||||
msg = await message.answer(text, parse_mode="Markdownv2")
|
||||
|
||||
save_message(message.chat.id, msg.message_id)
|
||||
|
||||
@@ -38,17 +38,19 @@ def register_handlers(dp: Dispatcher, state: BotState):
|
||||
day_offset = int(args[2]) if len(args) > 2 and args[2].isdigit() else 0
|
||||
|
||||
schedule_service = ScheduleService()
|
||||
clip_png, url, day, mouth = await schedule_service.get_pschedule(group, day_offset)
|
||||
clip_png, url, day, mouth = await schedule_service.get_pschedule(
|
||||
group, day_offset
|
||||
)
|
||||
|
||||
if clip_png:
|
||||
save_message(message.chat.id, message.message_id)
|
||||
|
||||
msg = await message.answer_photo(
|
||||
types.BufferedInputFile(clip_png, filename=f"{group}.png"),
|
||||
caption=f"Расписание для {group} на {day}.{mouth:02d}"
|
||||
caption=f"Расписание для {group} на {day}.{mouth:02d}",
|
||||
)
|
||||
save_message(message.chat.id, msg.message_id)
|
||||
|
||||
state.file_id_cache[group.lower()] = msg.photo[-1].file_id
|
||||
else:
|
||||
await message.answer(f"Не удалось найти расписание для {group}")
|
||||
await message.answer(f"Не удалось найти расписание для {group}")
|
||||
|
||||
Reference in New Issue
Block a user