mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 18:46:25 +00:00
epic 发送图片失败降级为发送文字
This commit is contained in:
parent
a03b4ea41a
commit
a8dee08961
@ -96,7 +96,10 @@ async def epic(message: Message):
|
|||||||
r = await client.get(game_thumbnail, timeout=10.0)
|
r = await client.get(game_thumbnail, timeout=10.0)
|
||||||
with open("epic.jpg", "wb") as code:
|
with open("epic.jpg", "wb") as code:
|
||||||
code.write(r.content)
|
code.write(r.content)
|
||||||
|
try:
|
||||||
await message.reply_photo("epic.jpg", caption=msg, quote=False)
|
await message.reply_photo("epic.jpg", caption=msg, quote=False)
|
||||||
|
except Exception:
|
||||||
|
await message.reply(msg, quote=False)
|
||||||
safe_remove("epic.jpg")
|
safe_remove("epic.jpg")
|
||||||
else:
|
else:
|
||||||
await message.reply(msg, quote=False)
|
await message.reply(msg, quote=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user