fix(userbot): encode absent pyrogram raw payloads as empty json
This commit is contained in:
1 parent
6a6e63ff75
commit
676680319b
15 files changed
+63
-25
No files matched your search
@@ -0,0 +1,8 @@
|
||||
from pyrogram.raw.core import TLObject
|
||||
from pyrogram.types import Object
|
||||
|
||||
EMPTY_JSON = "{}"
|
||||
|
||||
|
||||
def raw_json(obj: Object | TLObject | None) -> str:
|
||||
return EMPTY_JSON if obj is None else str(obj)
|
||||
Reference in new issue
Block a user