mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-21 21:58:09 +00:00
carbon 修复自己发送代码或非代码文件时的意外报错
All checks were successful
Github commit to telegram / build (push) Successful in 13s
All checks were successful
Github commit to telegram / build (push) Successful in 13s
This commit is contained in:
parent
254ca02533
commit
e1fd0ad3b1
@ -20,7 +20,7 @@ async def get_from_file(message: Message) -> str:
|
||||
reply = message.reply_to_message
|
||||
if message.document and message.document.mime_type.startswith("text"):
|
||||
msg = message
|
||||
elif reply.document and reply.document.mime_type.startswith("text"):
|
||||
elif reply and reply.document and reply.document.mime_type.startswith("text"):
|
||||
msg = reply
|
||||
if msg:
|
||||
path = await msg.download()
|
||||
|
Loading…
Reference in New Issue
Block a user