This commit is contained in:
user 2024-04-05 14:28:26 +03:00
parent 6127fc588e
commit eff4d99dbe
1 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
async def tg_process_template(
chat_wrap: 'Wrapped_CBot',
text, keyboard=None, message_id=None, content_id=None,
message_type='common', message_meta={},
photo=None, audio=None, video=None, document=None, **kwargs
):
if (photo or video or audio or document) and message_id:
@ -25,6 +26,8 @@ async def tg_process_template(
caption=text,
reply_markup=keyboard,
content_id=content_id,
message_type=message_type,
message_meta=message_meta,
**kwargs
)
elif audio:
@ -33,6 +36,8 @@ async def tg_process_template(
caption=text,
reply_markup=keyboard,
content_id=content_id,
message_type=message_type,
message_meta=message_meta,
**kwargs
)
elif video:
@ -41,6 +46,8 @@ async def tg_process_template(
caption=text,
reply_markup=keyboard,
content_id=content_id,
message_type=message_type,
message_meta=message_meta,
**kwargs
)
elif document:
@ -49,12 +56,16 @@ async def tg_process_template(
caption=text,
reply_markup=keyboard,
content_id=content_id,
message_type=message_type,
message_meta=message_meta,
**kwargs
)
else:
return await chat_wrap.send_message(
text,
reply_markup=keyboard,
message_type=message_type,
message_meta=message_meta,
**kwargs
)