From 6b382e07dd5868df21ff5da5a39380418368a1e8 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 4 Dec 2022 22:46:32 +0800 Subject: [PATCH] =?UTF-8?q?sticker=20=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sticker/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sticker/main.py b/sticker/main.py index 93298cb..2461530 100644 --- a/sticker/main.py +++ b/sticker/main.py @@ -1,6 +1,7 @@ import contextlib from asyncio import sleep +from typing import Optional from pyrogram.raw.functions.messages import GetStickerSet from pyrogram.raw.functions.stickers import CreateStickerSet @@ -66,8 +67,8 @@ class Sticker: should_forward: Message is_animated: bool is_video: bool - document: InputDocument - document_path: str + document: Optional[InputDocument] + document_path: Optional[str] software: str = "PagerMaid-Pyro" def __init__(self, message: Message, sticker_set: str = "", emoji: str = "😀", @@ -81,6 +82,8 @@ class Sticker: self.should_create = False self.is_animated = False self.is_video = False + self.document = None + self.document_path = None @staticmethod def get_custom_sticker_set():