File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ - 中文
2+ - English (Unsupported yet, please use translate tools.)
3+
4+ # MatrixSync-MCDR 文档
5+ 这里是MCDReforged插件MatrixSync的文档。
6+
7+ 插件配置部分仍保留在README。
8+
9+ ## 接口(API)
10+ 这里介绍插件提供的内部接口。
11+
12+ ### 新版接口(v2.3.2)
13+ 2.3版本以后,插件开始重构已有的消息上报器(MC -> Matrix)接口,至2.3.2完善。
14+
15+ 简单用法:
16+ ``` python
17+ import ...
18+ from matrix_sync.reporter import sender
19+
20+ def main ():
21+ sender(message)
22+ ```
23+ 目前仍无法获取发送结果,但如果主插件在加载时没有成功初始化客户端,你可以通过以下方式获取到相关报错:
24+ ``` python
25+ import ...
26+ from matrix_sync.reporter import sender
27+
28+ def main ():
29+ response = sender(message)
30+ if response is not None :
31+ print (response)
32+ ```
33+ > 在MCDR中,常用` server.logger.info ` 或` psi.logger.info ` 代替` print ` ,以进行更标准化的日志格式输出。
34+
35+ ### 旧版接口(v2.3-)
36+ 旧版接口含有较大缺陷,且已不具备实用的应用场景,但仍然可用,后续有空再补充。
Original file line number Diff line number Diff line change 1+ to do.
You can’t perform that action at this time.
0 commit comments