summaryrefslogtreecommitdiff
path: root/AyaBot/plugins/weather.py
diff options
context:
space:
mode:
Diffstat (limited to 'AyaBot/plugins/weather.py')
-rw-r--r--AyaBot/plugins/weather.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/AyaBot/plugins/weather.py b/AyaBot/plugins/weather.py
index b068279..69daa71 100644
--- a/AyaBot/plugins/weather.py
+++ b/AyaBot/plugins/weather.py
@@ -1,12 +1,11 @@
# -*- coding:utf-8 -*-
import os
import re
-import sys
-sys.path.append(r'请改成你机器人的对应目录\Aya\AyaBot\plugins\Module')
import json
import requests
+from os import path
from nonebot import on_command, CommandSession
-import google_translate
+from AyaBot.plugins.module import google_translate
API_URL = 'https://api.weatherbit.io/v2.0/current?city='
API_URL_2 = '&key=1df2eb2951f3470a94cb323bb4647c18'
@@ -216,4 +215,4 @@ async def _(session: CommandSession):
if not stripped_arg:
session.pause('要查询的城市不能为空,请重新输入')
- session.state[session.current_key] = stripped_arg
+ session.state[session.current_key] = stripped_arg \ No newline at end of file