Skip to content

Commit

Permalink
优化登录和消息接收流程
Browse files Browse the repository at this point in the history
  • Loading branch information
nek0us committed May 6, 2024
1 parent a3fd0ed commit 4239563
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ SUPERUSERS=["qq num"]
当触发验证后,会在启动目录生成带有启动账号名称的文件,键入收到的验证码并保存,即可自动验证。留意日志输出提示

### 更新日志
2024.05.06 0.0.19
1. 优化登录和消息接收流程
2. 优化初始化时多bot账号主体发送消息不对的问题


2024.05.04 0.0.18
1. 跟进openai新搞得幺蛾子验证(加班太累了,更晚了)
2. markdown被人作没了,唉(吐槽)
Expand Down
4 changes: 2 additions & 2 deletions nonebot_plugin_gpt/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ async def init_gpt(event: MessageEvent|QQMessageEvent,chatbot:chatgpt,arg :Messa
else:
msg = Message(MessageSegment.node_custom(user_id=event.self_id,nickname=arg.extract_plain_text(),content=Message(replace_name(data).msg_recv)))
if isinstance(event,GroupMessageEvent):
await tools.send_group_forward_msg_by_bots_once(group_id=event.group_id,node_msg=msg)
await tools.send_group_forward_msg_by_bots_once(group_id=event.group_id,node_msg=msg,bot_id=str(event.self_id))
else:
await tools.send_private_forward_msg_by_bots_once(user_id=event.user_id,node_msg=msg)
await tools.send_private_forward_msg_by_bots_once(user_id=event.user_id,node_msg=msg,bot_id=str(event.self_id))
await matcher.finish()

async def ps_list(event: MessageEvent|QQMessageEvent,chatbot: chatgpt):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "nonebot-plugin-gpt"
version = "0.0.18"
version = "0.0.19"
description = "Nonebot2's plugin of ChatGPT "
authors = [
{name = "nek0us", email = "nekouss@mail.com"},
]
license = {text = "GPL3"}
dependencies = ["ChatGPTWeb>=0.2.20","nonebot_adapter_onebot>=2.3.1","nonebot-plugin-sendmsg-by-bots>=0.1.4","nonebot_adapter_qq>=1.3.5","nonebot2>=2.0.0","more_itertools","nonebot_plugin_htmlrender","nonebot_plugin_localstore"]
dependencies = ["ChatGPTWeb>=0.2.21","nonebot_adapter_onebot>=2.3.1","nonebot-plugin-sendmsg-by-bots>=0.1.5","nonebot_adapter_qq>=1.3.5","nonebot2>=2.0.0","more_itertools","nonebot_plugin_htmlrender","nonebot_plugin_localstore"]
requires-python = ">=3.10"
readme = "README.md"

Expand Down

0 comments on commit 4239563

Please sign in to comment.