diff --git a/pagermaid/modules/plugin.py b/pagermaid/modules/plugin.py index 05fe8f7..a41f18e 100644 --- a/pagermaid/modules/plugin.py +++ b/pagermaid/modules/plugin.py @@ -255,7 +255,8 @@ async def plugin(context): await context.edit(lang('apt_uploading')) await upload_attachment(file_name, context.chat_id, reply_id, - caption=f"PagerMaid-Modify {context.parameter[1]} plugin.") + caption=f"PagerMaid-Modify {context.parameter[1]} plugin.", + thumb="pagermaid/static/images/logo.jpg") remove(file_name) await context.delete() else: diff --git a/pagermaid/static/images/logo.jpg b/pagermaid/static/images/logo.jpg new file mode 100644 index 0000000..7dd24c2 Binary files /dev/null and b/pagermaid/static/images/logo.jpg differ diff --git a/pagermaid/utils.py b/pagermaid/utils.py index f78d81e..273ae78 100644 --- a/pagermaid/utils.py +++ b/pagermaid/utils.py @@ -38,7 +38,7 @@ def alias_command(command: str) -> str: return command -async def upload_attachment(file_path, chat_id, reply_id, caption=None, preview=None, document=None): +async def upload_attachment(file_path, chat_id, reply_id, caption=None, preview=None, document=None, thumb=None): """ Uploads a local attachment file. """ if not exists(file_path): return False @@ -49,7 +49,8 @@ async def upload_attachment(file_path, chat_id, reply_id, caption=None, preview= reply_to=reply_id, caption=caption, link_preview=preview, - force_document=document + force_document=document, + thumb=thumb, ) except BaseException as exception: raise exception