mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-16 10:18:48 +00:00
fadian 修复无法获取最新数据
This commit is contained in:
parent
d2dc22dad0
commit
254354b753
@ -88,7 +88,16 @@ async def fa_dian_refresher_data():
|
||||
description="快速对着指定人物发电",
|
||||
parameters="<query>")
|
||||
async def fa_dian_process(message: Message):
|
||||
if fa_dian.data.get("date") == 0:
|
||||
await fa_dian.fetch()
|
||||
if not (query := message.arguments):
|
||||
if user := message.from_user:
|
||||
query = "死号" if user.is_deleted else user.first_name
|
||||
elif channel := message.sender_chat:
|
||||
query = channel.title
|
||||
else:
|
||||
return await message.edit("请指定发电对象")
|
||||
if not query:
|
||||
return await message.edit("请指定发电对象")
|
||||
if data := fa_dian.data.get("data"):
|
||||
return await message.edit(choice(data).format(name=query))
|
||||
|
Loading…
Reference in New Issue
Block a user