清除无效代码,调整token需求

This commit is contained in:
liuwei
2025-05-12 16:55:07 +08:00
parent bdd5f01c6a
commit cdb68df72d
2 changed files with 7 additions and 1 deletions

View File

@@ -219,6 +219,13 @@ class JDTokenPlugin(MessagePluginInterface):
# 提取token和备注
token = match.group(1)
remark = match.group(2)
# 简单预检查token格式
if not token.startswith("pt_key=") or "pt_pin=" not in token:
await bot.send_text_message((roomid if roomid else sender),
f"❌ Token格式错误正确格式应为pt_key=xxx; pt_pin=xxx;",
sender)
return False, "Token格式错误"
try:
# 设置京东Token

View File

@@ -218,7 +218,6 @@ class WeatherPlugin(MessagePluginInterface):
now_uvindex = weather_forecast_api_json['daily'][0]['uvIndex']
message = (
f"-----fgwx-----\n"
f"{country}{adm1}{adm2} 实时天气☁️\n"
f"⏰更新时间:{update_time}\n\n"
f"🌡️当前温度:{now_temperature}\n"