跨平台实时消息收发模块 for ErisPulse Dashboard
Project description
ErisPulse-DashChat
跨平台实时消息收发模块,提供一个类即时通讯的聊天界面
通过 DashChat,你可以在 Dashboard 中统一查看和管理所有平台(OneBot、云湖、Telegram、QQ、Ideaura 等)的消息、通知、请求和元事件,并直接回复。
功能
- 实时消息收发 — 通过 WebSocket 推送 + 轮询兜底,消息即时到达
- 全事件类型支持 — 消息(message)、通知(notice)、请求(request)、元事件(meta)全部展示
- OneBot 12 富消息渲染 — 图片、音频、视频、文件、@提及、回复、表情、位置、转发等
- SQLite 持久化 — 通过
sdk.storage存储会话和消息记录,重启不丢失 - 多 Bot 账号 — 按
平台 / Bot ID分组展示会话,支持指定 Bot 发送消息 - i18n — 跟随 Dashboard 语言设置,支持中文、英文、繁体中文、日语、俄语
安装
epsdk install DashChat
前置依赖:ErisPulse >= 2.4.3,以及 ErisPulse-Dashboard 模块。
配置
无需额外配置。DashChat 作为 Dashboard 的视图自动注册,安装后刷新 Dashboard 页面即可在侧边栏看到 "DashChat" 入口。
使用
查看消息
打开 Dashboard → 点击侧边栏 "DashChat",左侧按平台和 Bot 分组展示所有会话,点击会话查看消息记录。
发送消息
在会话输入框中输入文字,按 Enter 或点击发送按钮即可通过 SendDSL 发送消息。
处理请求
加好友、加群等请求事件会显示 "同意" / "拒绝" 按钮,点击即可处理。
查看原始事件
每条消息可展开 "原始事件" 查看完整的 JSON 数据。
支持的消息段类型
| OneBot 12 类型 | 渲染方式 |
|---|---|
text |
纯文本 |
image |
内嵌图片,点击放大 |
audio |
音频链接 |
video |
内嵌视频播放器 |
file |
文件下载链接 |
mention / at |
高亮 @用户名 |
mention_all / at_all |
高亮 @所有人 |
reply |
回复标签 |
face |
表情标签 |
sticker |
内嵌贴图 |
location |
位置标签 |
forward |
转发消息标签 |
| 其他类型 | [类型名] 占位标签 |
昵称解析
DashChat 会按优先级从多个来源提取用户昵称/群名片:
event.sender.nickname(OB12 标准格式)event.user_nickname(SDK base_event 格式){platform}_raw.sender.card(QQ 群名片){platform}_raw.sender.nickname(原始平台昵称){platform}_raw.sender.senderNickname(云湖格式){platform}_raw.sender.name(Telegram / 云湖 User)
头像 URL 同样从 sender.avatar 或 sender.senderAvatar 中提取。
API
DashChat 注册以下 HTTP API 端点(需要 Dashboard Token 认证):
| 端点 | 方法 | 说明 |
|---|---|---|
/DashChat/api/sessions |
GET | 获取所有会话列表 |
/DashChat/api/sessions/:key/messages |
GET | 获取指定会话的消息 |
/DashChat/api/sessions/:key/send |
POST | 向指定会话发送消息 |
/DashChat/api/sessions/:key/read |
POST | 标记会话已读 |
/DashChat/api/sessions/:key |
DELETE | 清除会话消息记录 |
/DashChat/api/notices |
GET | 获取平台级通知列表 |
/DashChat/api/action |
POST | 处理请求事件(同意/拒绝) |
/DashChat/api/bots |
GET | 获取在线 Bot 列表 |
数据存储
使用三张 SQLite 表:
dashchat_sessions— 会话列表(平台、类型、目标、未读数、最后消息)dashchat_messages— 消息记录(事件类型、方向、发送者、内容、原始数据)dashchat_platform_notices— 平台级通知(notice/request/meta 事件)
每个会话最多保留 100 条消息,自动清理旧记录。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file erispulse_dashchat-1.0.0.tar.gz.
File metadata
- Download URL: erispulse_dashchat-1.0.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
984ed45c1961942465f9298827eb01430f9d56afae11df7eb1cb18ac030714ca
|
|
| MD5 |
1ca359bfabd6562295aabaa16379dcbf
|
|
| BLAKE2b-256 |
935dd28faafaa4359b5337dc28485dd9213dfc6c9ecd2484b3c43f2f0f24a365
|
Provenance
The following attestation bundles were made for erispulse_dashchat-1.0.0.tar.gz:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-DashChat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_dashchat-1.0.0.tar.gz -
Subject digest:
984ed45c1961942465f9298827eb01430f9d56afae11df7eb1cb18ac030714ca - Sigstore transparency entry: 1629424238
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-DashChat@137e6ab1eb2c23c55890e445e1b4c1f78dccb27f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@137e6ab1eb2c23c55890e445e1b4c1f78dccb27f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file erispulse_dashchat-1.0.0-py3-none-any.whl.
File metadata
- Download URL: erispulse_dashchat-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ace37308bb7943a9c961ed86065de8d40f164f2eefd3b094192edfad96547df6
|
|
| MD5 |
d080020be6b863c1d9e24c381c7273d9
|
|
| BLAKE2b-256 |
07809b095d0dd5cab0d5c8e96bb8ba7bba262a5edc50fb76f627c56e5818f3c5
|
Provenance
The following attestation bundles were made for erispulse_dashchat-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-DashChat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_dashchat-1.0.0-py3-none-any.whl -
Subject digest:
ace37308bb7943a9c961ed86065de8d40f164f2eefd3b094192edfad96547df6 - Sigstore transparency entry: 1629424243
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-DashChat@137e6ab1eb2c23c55890e445e1b4c1f78dccb27f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@137e6ab1eb2c23c55890e445e1b4c1f78dccb27f -
Trigger Event:
workflow_dispatch
-
Statement type: