diff --git a/handlers/groups/main.py b/handlers/groups/main.py index a8a1dce..16e6d5e 100644 --- a/handlers/groups/main.py +++ b/handlers/groups/main.py @@ -39,8 +39,23 @@ async def get_replace_on_chat(message: types.Message): user_id=str(message.from_user.id), username=str(message.from_user.username) )) - - data = get_about_replacements() + try: + data = get_about_replacements() + if 'image' in data: + await bot.send_photo( + message.chat.id, + io.BytesIO( + base64.b64decode( + data["data"]['all'] + ) + ), + parse_mode="Markdown", + ) + return + except Exception as e: + logging.error(e) + await bot.send_message(message.chat.id, "Error") + return group = get_group(message.chat.id) if group is not None: