tg2dc via mc
一款 Spigot/Paper 插件,实现了 Minecraft、Discord 和 Telegram 之间的三方桥接:Discord <-> Minecraft <-> Telegram。它将 tg-bridge 与 DiscordSRV 连接起来,无需额外的代理服务。即插即用,零配置——只需安装即可运行。
功能说明
- Discord 消息会被转发到
tg-bridge 关联的 Telegram 群组。
- 来自该 Telegram 群组的消息会被转发到 DiscordSRV 的主文本频道。
- 以
/ 开头的 Telegram 机器人命令不会转发到 Discord。
- 该适配器没有独立的配置文件。它从
tg-bridge 读取 Telegram 聊天内容,并从 DiscordSRV 获取 Discord 目标频道。
要求
请在同一个 Minecraft 服务器上安装以下插件:
- Spigot 或 Paper 服务器。
- tg-bridge
1.4.2 或兼容版本。
- DiscordSRV
1.29.0 或兼容版本。
- Java 17。
该适配器将 tg-bridge 和 DiscordSRV 声明为必需的依赖项,缺少它们时将无法加载。
设置
1. 配置 tg-bridge 和 Telegram
首先配置 tg-bridge 并附加目标 Telegram 群组。
目标 Telegram 群组必须是 tg-bridge 链接的群组;适配器会忽略来自其他 Telegram 聊天的消息。
2. 配置 DiscordSRV
使用其官方文档配置 DiscordSRV 并设置其主文本频道。
此适配器会将 Telegram 消息发送到 DiscordSRV 的主文本频道。如果该频道不可用,它会尝试使用 DiscordSRV 配置的 game-channel(游戏频道)目的地。
3. 安装适配器
- 下载或构建
tg-bridge-discord-via-mc。
- 将其 JAR 文件复制到
plugins/ 目录。
- 在配置好
tg-bridge 和 DiscordSRV 后重启服务器。
- 在已链接的 Telegram 群组和 Discord 目标频道中发送普通消息,以验证双向通信。
从本仓库构建:
mvn clean package
JAR 文件将生成在 target/ 目录中。
消息示例
Discord 到 Telegram:
Discord: Alex: Hello from Discord
Telegram 到 Discord:
telegram: Alex: Hello from Telegram
诸如 /list 和 /uptime 之类的 Telegram 命令仍保持为机器人命令,不会镜像到 Discord。
验证安装
在每个连接的频道中发送普通消息,并确认三方流程正常:
- Discord -> Minecraft 和 Telegram
- Minecraft -> Discord 和 Telegram
- Telegram -> Minecraft 和 Discord
如果某个方向缺失,请检查:
tg-bridge 是否为预期的 Telegram 群组配置了 chat_id。
- DiscordSRV 是否已连接并配置了主文本频道或 game-channel 映射。
- 两个必需的插件均已安装,且在配置完成后重启了服务器。
来源
tg2dc via mc
A Spigot/Paper plugin that completes a three-way Minecraft Discord Telegram bridge: Discord <-> Minecraft <-> Telegram. It connects tg-bridge with DiscordSRV without a separate proxy service. Plug-and-play with zero config — just install and go.
What it does
- Discord messages are forwarded to the Telegram group attached to
tg-bridge.
- Messages from that Telegram group are forwarded to the DiscordSRV main text channel.
- Telegram bot commands beginning with
/ are not forwarded to Discord.
- The adapter has no separate config file. It reads the Telegram chat from
tg-bridge and the Discord destination from DiscordSRV.
Requirements
Install these plugins on the same Minecraft server:
- Spigot or Paper server.
- tg-bridge
1.4.2 or a compatible version.
- DiscordSRV
1.29.0 or a compatible version.
- Java 17.
The adapter declares both tg-bridge and DiscordSRV as required dependencies and will not load without them.
Setup
1. Configure tg-bridge and Telegram
Configure tg-bridge and attach the target Telegram group first.
The target Telegram group must be the group linked by tg-bridge; the adapter ignores messages from other Telegram chats.
2. Configure DiscordSRV
Configure DiscordSRV using its official documentation and set its main text channel.
This adapter sends Telegram messages to the DiscordSRV main text channel. If that channel is unavailable, it tries DiscordSRV's configured game-channel destination.
3. Install the adapter
- Download or build
tg-bridge-discord-via-mc.
- Copy its JAR to
plugins/.
- Restart the server after
tg-bridge and DiscordSRV are configured.
- Send a normal message in the linked Telegram group and in the Discord destination channel to verify both directions.
Build from this repository:
mvn clean package
The JAR is created in target/.
Message examples
Discord to Telegram:
Discord: Alex: Hello from Discord
Telegram to Discord:
telegram: Alex: Hello from Telegram
Telegram commands such as /list and /uptime remain bot commands and are not mirrored to Discord.
Verify installation
Send a normal message in each connected channel and confirm the three-way flow:
- Discord -> Minecraft and Telegram
- Minecraft -> Discord and Telegram
- Telegram -> Minecraft and Discord
If one direction is missing, check that:
tg-bridge has a configured chat_id for the intended Telegram group.
- DiscordSRV is connected and has a configured main text channel or game-channel mapping.
- Both required plugins are installed and the server was restarted after configuration.
Source
评论 0
登录后参与评分
还没有评论,来抢沙发吧