diff options
Diffstat (limited to 'AyaBot/plugins/translate.py')
-rw-r--r-- | AyaBot/plugins/translate.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/AyaBot/plugins/translate.py b/AyaBot/plugins/translate.py index d103430..6bbb707 100644 --- a/AyaBot/plugins/translate.py +++ b/AyaBot/plugins/translate.py @@ -1,13 +1,12 @@ # -*- coding:utf-8 -*- import re -import sys -sys.path.append(r'请改成你机器人的对应目录\Aya\AyaBot\plugins\Module') 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 +41,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]) + await session.send(re_msg[0])
\ No newline at end of file |