mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 01:57:46 +00:00
covid fix a bug
This commit is contained in:
parent
d17e7c8662
commit
624c16b0db
6
covid.py
6
covid.py
@ -126,8 +126,14 @@ async def covid_info(context):
|
||||
city = await obtain_message(context)
|
||||
except ValueError:
|
||||
return await context.edit("[covid] 无法获取城市名!")
|
||||
zc = False
|
||||
if city.find("政策") != -1:
|
||||
zc = True
|
||||
city = city.replace("政策", "")
|
||||
city = NewsBot.data.get(city)
|
||||
if city:
|
||||
policy = "Tips: 查询出行政策可加上 `政策`"
|
||||
if zc:
|
||||
policy = await city.policy
|
||||
await context.edit(f"{city.main_info}\n\n{policy}")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user