mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 12:55:38 +00:00
resou weather 修复错误 (#12)
This commit is contained in:
parent
ae2bd7149b
commit
acd3e7a1ef
@ -132,7 +132,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "weather",
|
"name": "weather",
|
||||||
"version": "1.111",
|
"version": "1.112",
|
||||||
"section": "daily",
|
"section": "daily",
|
||||||
"maintainer": "xtaodada",
|
"maintainer": "xtaodada",
|
||||||
"size": "3.1 kb",
|
"size": "3.1 kb",
|
||||||
@ -142,7 +142,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "resou",
|
"name": "resou",
|
||||||
"version": "1.221",
|
"version": "1.222",
|
||||||
"section": "daily",
|
"section": "daily",
|
||||||
"maintainer": "KorenKrita、xtaodada、monsterxcn",
|
"maintainer": "KorenKrita、xtaodada、monsterxcn",
|
||||||
"size": "2.5 kb",
|
"size": "2.5 kb",
|
||||||
|
@ -7,7 +7,7 @@ from pagermaid.utils import Message, client
|
|||||||
@listener(command="zhrs",
|
@listener(command="zhrs",
|
||||||
description="知乎热搜。")
|
description="知乎热搜。")
|
||||||
async def zhrs(_: Client, message: Message):
|
async def zhrs(_: Client, message: Message):
|
||||||
req = await client.get("https://tenapi.cn/zhihuresou")
|
req = await client.get("https://tenapi.cn/zhihuresou/")
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
try:
|
try:
|
||||||
data = req.json()
|
data = req.json()
|
||||||
@ -25,7 +25,7 @@ async def zhrs(_: Client, message: Message):
|
|||||||
@listener(command="wbrs",
|
@listener(command="wbrs",
|
||||||
description="微博热搜。")
|
description="微博热搜。")
|
||||||
async def wbrs(_: Client, message: Message):
|
async def wbrs(_: Client, message: Message):
|
||||||
req = await client.get("https://tenapi.cn/resou")
|
req = await client.get("https://tenapi.cn/resou/")
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
try:
|
try:
|
||||||
data = req.json()
|
data = req.json()
|
||||||
@ -44,7 +44,7 @@ async def wbrs(_: Client, message: Message):
|
|||||||
@listener(command="dyrs",
|
@listener(command="dyrs",
|
||||||
description="抖音热搜。")
|
description="抖音热搜。")
|
||||||
async def dyrs(_: Client, message: Message):
|
async def dyrs(_: Client, message: Message):
|
||||||
req = await client.get("https://tenapi.cn/douyinresou")
|
req = await client.get("https://tenapi.cn/douyinresou/")
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
try:
|
try:
|
||||||
data = req.json()
|
data = req.json()
|
||||||
|
@ -40,7 +40,7 @@ def calcWindDirection(windDirection):
|
|||||||
description="查询天气",
|
description="查询天气",
|
||||||
parameters="<城市>")
|
parameters="<城市>")
|
||||||
async def weather(_: Client, message: Message):
|
async def weather(_: Client, message: Message):
|
||||||
of not message.arguments:
|
if not message.arguments:
|
||||||
return await message.edit("出错了呜呜呜 ~ 无效的参数。")
|
return await message.edit("出错了呜呜呜 ~ 无效的参数。")
|
||||||
try:
|
try:
|
||||||
req = await client.get(
|
req = await client.get(
|
||||||
|
Loading…
Reference in New Issue
Block a user