清除无效代码,调整token需求
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user