mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 00:35:36 +00:00
covid fix a bug
This commit is contained in:
parent
d17e7c8662
commit
624c16b0db
8
covid.py
8
covid.py
@ -126,9 +126,15 @@ async def covid_info(context):
|
|||||||
city = await obtain_message(context)
|
city = await obtain_message(context)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return await context.edit("[covid] 无法获取城市名!")
|
return await context.edit("[covid] 无法获取城市名!")
|
||||||
|
zc = False
|
||||||
|
if city.find("政策") != -1:
|
||||||
|
zc = True
|
||||||
|
city = city.replace("政策", "")
|
||||||
city = NewsBot.data.get(city)
|
city = NewsBot.data.get(city)
|
||||||
if city:
|
if city:
|
||||||
policy = await city.policy
|
policy = "Tips: 查询出行政策可加上 `政策`"
|
||||||
|
if zc:
|
||||||
|
policy = await city.policy
|
||||||
await context.edit(f"{city.main_info}\n\n{policy}")
|
await context.edit(f"{city.main_info}\n\n{policy}")
|
||||||
else:
|
else:
|
||||||
await context.edit("[covid] 只限查询国内城市或你地理没学好。")
|
await context.edit("[covid] 只限查询国内城市或你地理没学好。")
|
||||||
|
@ -792,10 +792,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "covid",
|
"name": "covid",
|
||||||
"version": "1.001",
|
"version": "1.01",
|
||||||
"section": "daily",
|
"section": "daily",
|
||||||
"maintainer": "xtaodada",
|
"maintainer": "xtaodada",
|
||||||
"size": "3.50 kb",
|
"size": "3.90 kb",
|
||||||
"supported": true,
|
"supported": true,
|
||||||
"des-short": "获取新冠疫情信息。(国内版)",
|
"des-short": "获取新冠疫情信息。(国内版)",
|
||||||
"des": "获取新冠疫情信息。(国内版)。\n指令:-covid"
|
"des": "获取新冠疫情信息。(国内版)。\n指令:-covid"
|
||||||
|
Loading…
Reference in New Issue
Block a user