fix group send

This commit is contained in:
tema 2022-10-09 20:15:51 +03:00
parent 3bf4ecca33
commit 1060501c9d
Signed by: tema
GPG Key ID: 21FDB6D162488F6F

View File

@ -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)
))
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: