Tlon(插件)
Tlon 是建立在 Urbit 上的去中心化通讯应用。Moltbot 可连接你的 Urbit ship,并响应私聊和群聊消息。群组回复默认需要 @ 提及,并可通过白名单进一步限制。状态:通过插件支持。支持私聊、群组 @ 提及、主题回复,以及纯文本媒体回退(URL 追加到说明)。不支持表态、投票和原生媒体上传。
需安装插件
Tlon 以插件形式提供,不随核心安装打包。通过 CLI 安装(npm 仓库):
moltbot plugins install @moltbot/tlon本地检出(在 git 仓库中运行时):
moltbot plugins install ./extensions/tlon详见 插件。
设置
- 安装 Tlon 插件。
- 准备 ship URL 和登录码。
- 配置
channels.tlon。 - 重启网关。
- 私聊机器人或在群组频道中 @ 提及它。
最小配置(单账号):
{
channels: {
tlon: {
enabled: true,
ship: "~sampel-palnet",
url: "https://your-ship-host",
code: "lidlut-tabwed-pillex-ridrup"
}
}
}群组频道
默认启用自动发现。也可手动固定频道:
{
channels: {
tlon: {
groupChannels: [
"chat/~host-ship/general",
"chat/~host-ship/support"
]
}
}
}禁用自动发现:
{
channels: {
tlon: {
autoDiscoverChannels: false
}
}
}访问控制
私聊白名单(空 = 允许全部):
{
channels: {
tlon: {
dmAllowlist: ["~zod", "~nec"]
}
}
}群组授权(默认受限):
{
channels: {
tlon: {
defaultAuthorizedShips: ["~zod"],
authorization: {
channelRules: {
"chat/~host-ship/general": {
mode: "restricted",
allowedShips: ["~zod", "~nec"]
},
"chat/~host-ship/announcements": {
mode: "open"
}
}
}
}
}
}投递目标(CLI/定时任务)
配合 moltbot message send 或定时投递使用:
- 私聊:
~sampel-palnet或dm/~sampel-palnet - 群组:
chat/~host-ship/channel或group:~host-ship/channel
说明
- 群组回复需要 @ 提及(如
~your-bot-ship)才会响应。 - 主题回复:若入站消息在主题中,Moltbot 会在主题内回复。
- 媒体:
sendMedia回退为文本 + URL(无原生上传)。
最后更新于: