Comments (6)
首先恭喜你接收到了数据的上报,MCDR的调试模式可以关闭了
按照预想,我发送的是 /mc rua 命令,应当通过 MCDR 向服务器内发送 rua 消息。
但是机器人向管理员回报的消息是:
请使用/bound 绑定游戏ID
这是因为QQChat不知道你是游戏中的谁,需要在群里(group_id)使用 /bound <ID>
用于QQChat在服务器内发送消息的时候显示你是谁,如 [QQ] <Fallen_Breath> rua
from mcdreforgedplugins.
写了这么多信息辛苦了!
可以打开MCDR的debug模式查看是否MCDR接收到了转发的信息
你的配置文件可能存在问题,这是我使用的配置文件
'qq号':
http:
enable: true
host: 127.0.0.1
port: 5700
postUrl: "http://127.0.0.1:5701/post"
postMessageFormat: array
提供一份我使用的cqhttp-mirai插件:
cqhttp-mirai-0.2.1-all.zip
from mcdreforgedplugins.
感谢你的及时回复!
我使用 cqhttp-mirai-0.2.3-embedded-all.jar 加上你 comment 中的配置文件,成功运行了机器人。
我打开了 MCDR 调试模式,在 MCDR 控制台收到以下信息:
[MCDR] [23:23:40] [CoolQAPI server/DEBUG]: 接收上报数据
{
"ClassType": "PrivateMessage",
"self_id": <机器人QQ号>,
"sub_type": "friend",
"message_id": 10946,
"user_id": <管理员QQ号>,
"message": [
{
"ClassType": "text",
"data": {
"text": "/mc rua"
},
"type": "text"
}
],
"raw_message": "/mc rua",
"font": 0,
"sender": {
"user_id": <管理员QQ号>,
"nickname": "<管理员昵称>",
"sex": "unknown",
"age": 0
},
"time": 1600701820,
"post_type": "message",
"message_type": "private"
}
按照预想,我发送的是 /mc rua
命令,应当通过 MCDR 向服务器内发送 rua
消息。
但是机器人向管理员回报的消息是:
请使用/bound <ID>绑定游戏ID
出现了没有预想到的新问题,希望能取得你的帮助。
非常感谢!
from mcdreforgedplugins.
这是因为QQChat不知道你是游戏中的谁,需要在群里(group_id)使用
/bound <ID>
用于QQChat在服务器内发送消息的时候显示你是谁,如[QQ] <Fallen_Breath> rua
感谢你的帮助,通过在群里使用 /bound QQ号 游戏ID
命令,确实成功解决了这个问题。
但是在通过 /command
命令,向 MCDR 发送命令时遇到了这样的问题:
[MCDR] [17:37:11] [CoolQAPI server/DEBUG]: 接收上报数据
{
"ClassType": "PrivateMessage",
"self_id": <机器人QQ>,
"sub_type": "friend",
"message_id": 1197,
"user_id": <管理员QQ>,
"message": [
{
"ClassType": "text",
"data": {
"text": "/command !!MCDR status"
},
"type": "text"
}
],
"raw_message": "/command !!MCDR status",
"font": 0,
"sender": {
"user_id": <管理员QQ>,
"nickname": "<管理员QQ昵称>",
"sex": "unknown",
"age": 0
},
"time": 1600767431,
"post_type": "message",
"message_type": "private"
}
[MCDR] [17:37:11] [on_qq_command@QQChat/DEBUG]: Plugin called is_rcon_running(), args amount: 0
[MCDR] [17:37:11] [on_qq_command@QQChat/DEBUG]: Plugin called execute(), args amount: 1
[MCDR] [17:37:11] [on_qq_command@QQChat/DEBUG]: - type: str, content: !!MCDR status
[Server] [17:37:11] [Server thread/INFO]: Unknown or incomplete command, see below for error
[MCDR] [17:37:11] [MainThread/DEBUG]: Parsed text from server stdin:
[MCDR] [17:37:11] [MainThread/DEBUG]: Time: 17:37:11; ID: 811
[MCDR] [17:37:11] [MainThread/DEBUG]: Player: None; Source: 0; Logging level: INFO
[MCDR] [17:37:11] [MainThread/DEBUG]: Content: Unknown or incomplete command, see below for error
[MCDR] [17:37:11] [MainThread/DEBUG]: Raw content: [17:37:11] [Server thread/INFO]: Unknown or incomplete command, see below for error
[Server] [17:37:11] [Server thread/INFO]: !!MCDR status<--[HERE]
[MCDR] [17:37:11] [MainThread/DEBUG]: Parsed text from server stdin:
[MCDR] [17:37:11] [MainThread/DEBUG]: Time: 17:37:11; ID: 812
[MCDR] [17:37:11] [MainThread/DEBUG]: Player: None; Source: 0; Logging level: INFO
[MCDR] [17:37:11] [MainThread/DEBUG]: Content: !!MCDR status<--[HERE]
[MCDR] [17:37:11] [MainThread/DEBUG]: Raw content: [17:37:11] [Server thread/INFO]: !!MCDR status<--[HERE]
发送 /command
命令的 QQ 号就是我上一步绑定过的 QQ 号,
现在 MCDR 已经能够接收到我使用这个 QQ 发送的 /mc
文字消息,并转发到游戏内了。
但是使用 /command !!MCDR status
命令时,仍然产生上述报错。
我通过 MCDR 控制台直接发送 !!MCDR status
命令,能够正常显示如下执行结果:
[MCDR] [17:43:30] [InfoReactor/INFO]: MCDReforged 版本: 0.9.6
[MCDR] [17:43:30] [InfoReactor/INFO]: 服务端状态: 运行中
[MCDR] [17:43:30] [InfoReactor/INFO]: 服务端已启动: True
[MCDR] [17:43:30] [InfoReactor/INFO]: 自然退出: True
[MCDR] [17:43:30] [InfoReactor/INFO]: rcon: 离线
[MCDR] [17:43:30] [InfoReactor/INFO]: 插件数量: 8
[MCDR] [17:43:30] [InfoReactor/INFO]: 服务端 PID: 2756
[MCDR] [17:43:30] [InfoReactor/INFO]: 消息队列大小: 0/10000
[MCDR] [17:43:30] [InfoReactor/INFO]: 线程数: 9
[MCDR] [17:43:30] [InfoReactor/INFO]: - MainThread
[MCDR] [17:43:30] [InfoReactor/INFO]: - PT0-idle
[MCDR] [17:43:30] [InfoReactor/INFO]: - PT1-idle
[MCDR] [17:43:30] [InfoReactor/INFO]: - PT2-idle
[MCDR] [17:43:30] [InfoReactor/INFO]: - PT3-idle
[MCDR] [17:43:30] [InfoReactor/INFO]: - UpdateHelper
[MCDR] [17:43:30] [InfoReactor/INFO]: - Console
[MCDR] [17:43:30] [InfoReactor/INFO]: - InfoReactor
[MCDR] [17:43:30] [InfoReactor/INFO]: - CoolQAPI server
可见 !!MCDR status
并非上文报错中所说,是一个“Unknown or incomplete command”。
请问这是因为 QQChat 不支持发送 !!MCDR
开头的命令,还是因为我没有启用 rcon(报错中显示插件调用了is_rcon_running()
方法),还是由于我仍然有什么地方没有配置到位?
实在是抱歉问了这么多的问题!非常感谢你的耐心回复!
from mcdreforgedplugins.
/command
只是运行服务端指令,无法运行MCDR指令和插件指令,也就是服务端后台支持的所有指令
from mcdreforgedplugins.
/command
只是运行服务端指令,无法运行MCDR指令和插件指令,也就是服务端后台支持的所有指令
问题已经解决了,非常感谢!
from mcdreforgedplugins.
Related Issues (20)
- [QQAPI&QQchat]: 插件报错 HOT 2
- 对接到gocq后goce一直警告上报数据失败
- [Gamemode]: 玩家加入服务器时加载失败 HOT 1
- QQchat机器人 由于未启用 RCON,没有返回结果 HOT 2
- [bot]: Feature: tag功能 HOT 4
- [QQAPI | Feature Request]: Websocket mode support HOT 2
- [QQChat]: Is QQChat no longer supported? HOT 5
- [ColoredChat]: 加载失败,没有 mcdreforged.info 这个模块。 HOT 5
- [Gamemode]: Adding structure support for MCDR 2.x HOT 8
- [MinedRanking]: 插件加载失败 HOT 4
- [QQChat]: 无法加载插件 HOT 2
- No module named 'ConfigAPI' HOT 1
- [advanced_calculator]: Security problem HOT 1
- [Bot] 其它假人插件数据迁移脚本 HOT 1
- [Advanced Calculator]: Security
- [Advanced Calculator]: Some Bugs HOT 6
- [bot] 保存假人报错 HOT 1
- [bot]: index 的页码列表在哪,没找到,假人动作用不了 HOT 6
- [Gamemode]: 重载/重启服务器后会使玩家保存的状态失效 HOT 2
- 使用 OneBot Python SDK aiocqhttp 实现 qq_api 插件 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcdreforgedplugins.