Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

插件已加载并收到加载成功提示但不响应命令 #382

Closed
KiDisplayBlueScreen opened this issue Dec 17, 2022 · 9 comments
Closed
Labels
invalid This doesn't seem right

Comments

@KiDisplayBlueScreen
Copy link

ELF_RSS 、 go-cqhttp 、 nonebot 、 Python 版本及操作系统

go-cqhttp 1.0..0-rc3
nonebotv2
Python 3.10.4
Windows Server 2016

列出安装的 Python 包

No response

如何复现

发送消息

期望行为

正常运作

实际行为

不响应命令 日志输出 在群组里@了之后发指令也无响应
12-17 15:27:13 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored

image

@KiDisplayBlueScreen KiDisplayBlueScreen added the bug Something isn't working label Dec 17, 2022
@Quan666
Copy link
Owner

Quan666 commented Dec 17, 2022

启动时是否报错,gocq那边的日志呢

@KiDisplayBlueScreen
Copy link
Author

启动时是否报错,gocq那边的日志呢

12-17 15:26:47 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_apscheduler"
12-17 15:26:47 [SUCCESS] nonebot | Succeeded to import "ELF_RSS2"
12-17 15:26:47 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
12-17 15:26:47 [SUCCESS] nonebot | Succeeded to import "echo"
12-17 15:26:47 [SUCCESS] nonebot | Succeeded to import "YetAnotherPicSearch"
12-17 15:26:47 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_kawaii_robot"
12-17 15:26:49 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_gocqhttp"
12-17 15:26:49 [INFO] uvicorn | Started server process [6404]
12-17 15:26:49 [INFO] uvicorn | Waiting for application startup.
12-17 15:26:49 [INFO] nonebot_plugin_apscheduler | Scheduler Started
12-17 15:26:49 [INFO] nonebot_plugin_gocqhttp | [] 当前版本:v1.0.0-rc3
12-17 15:26:49 [INFO] nonebot_plugin_gocqhttp | [] 将使用 device.json 内的设备信息运行Bot.
12-17 15:26:49 [INFO] nonebot_plugin_gocqhttp | [] 开始尝试登录并同步消息...
12-17 15:26:49 [INFO] nonebot_plugin_gocqhttp | [] 使用协议: Android Phone
12-17 15:26:52 [INFO] nonebot_plugin_gocqhttp | Startup complete, Web UI has served to http://127.0.0.1:8890/go-cqhttp/
12-17 15:26:52 [INFO] uvicorn | Application startup complete.
12-17 15:26:52 [INFO] nonebot_plugin_gocqhttp | [] Protocol -> connect to server: 183.47.102.62:8080
12-17 15:26:52 [WARNING] nonebot_plugin_gocqhttp | [] Protocol -> device lock is disable. http api may fail.
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 登录成功 欢迎使用:
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 开始加载好友列表...
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 共加载 6 个好友.
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 开始加载群列表...
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 共加载 6 个群.
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | go-cqhttp for has successfully started.
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 资源初始化完成, 开始处理信息.
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] アトリは、高性能ですから!
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:8890/onebot/v11/ws
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 正在检查更新.
12-17 15:26:54 [INFO] uvicorn | ('127.0.0.1', 58983) - "WebSocket /onebot/v11/ws" [accepted]
12-17 15:26:54 [INFO] nonebot | OneBot V11 | Bot connected
12-17 15:26:54 [INFO] websockets | connection open
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:8890/onebot/v11/ws
12-17 15:26:54 [INFO] nonebot | Event will be handled by <Matcher from src.plugins.ELF_RSS2, type=meta_event, priority=1, temp=True>
12-17 15:26:54 [DEBUG] nonebot | Running matcher <Matcher from src.plugins.ELF_RSS2, type=meta_event, priority=1, temp=True>
12-17 15:26:54 [DEBUG] nonebot | Running handler <Dependent call=<function start at 0x000002336FA13D00>, params=[ModelField(name='bot', type=Bot, required=True)], parameterless=[]>
12-17 15:26:54 [DEBUG] nonebot | OneBot V11 | Calling API send_private_msg
12-17 15:26:54 [INFO] nonebot | Event will be handled by <Matcher from YetAnotherPicSearch, type=meta_event, priority=1, temp=True>
12-17 15:26:54 [DEBUG] nonebot | Running matcher <Matcher from YetAnotherPicSearch, type=meta_event, priority=1, temp=True>
12-17 15:26:54 [DEBUG] nonebot | Running handler <Dependent call=<function _ at 0x00000233744CF520>, params=[ModelField(name='bot', type=Bot, required=True)], parameterless=[]>
12-17 15:26:54 [INFO] nonebot | Matcher <Matcher from YetAnotherPicSearch, type=meta_event, priority=1, temp=True> running complete
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 发送好友 的消息: 第一次启动,你还没有 ... (-1796390836)
12-17 15:26:54 [INFO] src | 第一次启动,你还没有订阅,记得添加哟!
12-17 15:26:54 [DEBUG] nonebot | OneBot V11 | Calling API send_private_msg
12-17 15:26:54 [INFO] nonebot_plugin_gocqhttp | [] 发送好友 的消息: ELF_RSS 订阅 ... (-471174950)
12-17 15:26:54 [INFO] src | ELF_RSS 订阅器启动成功!

@Quan666
Copy link
Owner

Quan666 commented Dec 17, 2022

发送指令时的完整日志呢,别只发一条

@KiDisplayBlueScreen
Copy link
Author

发送指令时的完整日志呢,别只发一条

就这一条 剩下的都是这条的重复几次

12-17 15:39:46 [INFO] nonebot_plugin_gocqhttp | [] 收到好友 的消息: show (1955338490)
12-17 15:39:46 [SUCCESS] nonebot | ONEBOT V11 | [message.private.friend]: Message 1955338490 from "show"
12-17 15:39:46 [DEBUG] nonebot | Checking for matchers in priority 1...
12-17 15:39:46 [DEBUG] nonebot | Checking for matchers in priority 5...
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GuildMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignored
12-17 15:39:46 [DEBUG] nonebot | Event type <class 'nonebot.adapters.onebot.v11.event.PrivateMessageEvent'> not match annotation GroupMessageEvent, ignore

@NekoAria
Copy link
Collaborator

你是不是 .env 配置文件里没配置这个:

COMMAND_START=["","/"]  # 配置命令起始字符

还是说配置了但是没有 "" 这一项。

@KiDisplayBlueScreen
Copy link
Author

你是不是 .env 配置文件里没配置这个:

COMMAND_START=["","/"]  # 配置命令起始字符

还是说配置了但是没有 "" 这一项。

好吧 加上""这个就可以响应/add了 但我看你们的演示图里命令不需要加/啊?

@NekoAria
Copy link
Collaborator

NekoAria commented Dec 17, 2022

你是不是 .env 配置文件里没配置这个:

COMMAND_START=["","/"]  # 配置命令起始字符

还是说配置了但是没有 "" 这一项。

好吧 加上""这个就可以响应/add了 但我看你们的演示图里命令不需要加/啊?

"" 和 "/" 分别对应指令前不需要前缀和前缀是 "/" ,也就是 "add" 和 "/add" 的区别。

Quan666 added a commit that referenced this issue Dec 17, 2022
@KiDisplayBlueScreen
Copy link
Author

哦好 抓取失败 需要手动在.env.prod里配置代理端口吗

@NekoAria
Copy link
Collaborator

哦好 抓取失败 需要手动在.env.prod里配置代理端口吗

如果抓取的网站确实需要代理访问,就配置,同时 'change 订阅 proxy=1' 。

@Quan666 Quan666 added invalid This doesn't seem right and removed bug Something isn't working labels Dec 17, 2022
@Quan666 Quan666 closed this as completed Dec 17, 2022
NekoAria added a commit that referenced this issue Apr 23, 2023
* Update 部署教程.md

#382

* docs(deploy): 更新部署教程

---------

Co-authored-by: Neko Aria <990879119@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants