summaryrefslogtreecommitdiff
path: root/AyaBot/plugins/translate.py
diff options
context:
space:
mode:
Diffstat (limited to 'AyaBot/plugins/translate.py')
-rw-r--r--AyaBot/plugins/translate.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/AyaBot/plugins/translate.py b/AyaBot/plugins/translate.py
index 916c723..3cb396b 100644
--- a/AyaBot/plugins/translate.py
+++ b/AyaBot/plugins/translate.py
@@ -1,13 +1,17 @@
# -*- coding:utf-8 -*-
import re
+<<<<<<< HEAD
+=======
import sys
-sys.path.append('D:\\code\\Aya\\AyaBot\\plugins\\Module')
+sys.path.append(r'请改成你机器人的对应目录\Aya\AyaBot\plugins\Module')
+>>>>>>> af9b3ef683d28a2e4dd3bbc23cc1b2c455fc4fe2
import demjson
import requests
+from os import path
from pprint import pformat, pprint
from urllib.parse import urlencode
from nonebot import on_command, CommandSession
-import google_translate
+from AyaBot.plugins.module import google_translate
#FROM Joenothing-lst
@@ -42,4 +46,4 @@ async def _(session: CommandSession):
msg=session.ctx['raw_message'][5:]
re_msg = google_translate.translate(msg[:4999], to='en', source='zh-CN')
if re_msg[0]!='':
- await session.send(re_msg[0]) \ No newline at end of file
+ await session.send(re_msg[0])