mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 10:40:02 +08:00
gold_readbag and russian
This commit is contained in:
@@ -8,7 +8,7 @@ from util.utils import get_message_text, get_message_imgs
|
||||
from models.friend_user import FriendUser
|
||||
from models.group_member_info import GroupInfoUser
|
||||
|
||||
__plugin_name__ = 'AI'
|
||||
__plugin_name__ = 'AI [Hidden]'
|
||||
|
||||
|
||||
ai = on_message(rule=to_me(), priority=8)
|
||||
@@ -21,7 +21,7 @@ async def _(bot: Bot, event: PrivateMessageEvent, state: T_State):
|
||||
if str(event.get_message()).find('CQ:xml') != -1:
|
||||
return
|
||||
# 打招呼
|
||||
if not msg and not imgs:
|
||||
if (not msg and not imgs) or msg in ['你好啊', '你好', '在吗', '在不在', '您好', '您好啊', '你好', '在']:
|
||||
await ai.finish(hello())
|
||||
img = imgs[0] if imgs else ''
|
||||
nickname = await FriendUser.get_friend_nickname(event.user_id)
|
||||
|
||||
@@ -82,7 +82,7 @@ async def get_qqbot_chat_result(text: str, img_url: str, user_id: int, user_name
|
||||
return ''
|
||||
resp_payload = json.loads(await response.text())
|
||||
if resp_payload['intent']:
|
||||
if resp_payload['intent']['code'] != 0:
|
||||
if int(resp_payload['intent']['code']) in [4003]:
|
||||
index += 1
|
||||
# 该AI很屑!!!!!!!!!!!!
|
||||
async with sess.get(f'http://api.qingyunke.com/api.php?key=free&appid=0&msg={text}') as res:
|
||||
|
||||
Reference in New Issue
Block a user