Discord Chat Integration
将你的 Minecraft 聊天室接入 Discord,并附带额外的自动化功能。无需使用机器人即可从 Discord 发送消息/命令,并监听 Minecraft 中的聊天内容。
功能介绍
该模组通过本地 WebSocket 连接桥接 Discord 和 Minecraft,允许你直接从 Discord 向 Minecraft 发送消息和执行命令,全程无需任何机器人。它还包含聊天延迟队列和自动化等高级功能。
- 无机器人 Discord 集成 - 无需设置 Discord 机器人;使用 Vencord 或 BetterDiscord 插件
- 双向聊天 - 从 Discord 向 Minecraft 发送消息/命令,并在 Discord 中接收聊天反馈
- 多客户端支持 - 从单个 Discord 界面控制多个 Minecraft 客户端
- 同步组 - 在多个 Minecraft 客户端之间实现刻级精确同步
- 聊天延迟 - 排队并批量发送消息
- 自动化 - 创建基于触发器的规则,当 Minecraft 聊天事件发生时执行操作
安装 Discord 插件
[IMPORTANT]
必须同时安装 Discord 插件和模组。
使用方法
快速入门指南
- 启动已安装模组的 Minecraft
- 加入世界或服务器
- 打开已启用 Discord 插件的 Discord
- 插件将自动连接(如果启用了“自动连接”且端口号匹配)
- 在配置的 Discord 频道中发送消息/命令,它们将出现在 Minecraft 聊天中或执行相应操作
- 在 Discord 中接收消息或命令反馈(如果启用了“转发到 Discord”)
设置与配置
快速设置访问
当插件启用时,聊天输入框旁边会出现一个齿轮图标。点击它可快速访问 Minecraft 聊天设置,而无需导航至 Discord 的设置菜单。当至少有一个客户端连接时,图标变为绿色。
添加 Minecraft 客户端
-
在快速访问菜单中点击**“添加客户端”**
-
配置每个客户端:
- 名称:此客户端的友好名称
- 端口:WebSocket 端口
- 频道 ID:与此客户端桥接的 Discord 频道 ID
- 启用:切换以启用/禁用此客户端连接
- 转发到 Discord:切换以启用/禁用将 Minecraft 聊天转发到 Discord
- 同步组:将客户端分配到同步组以实现刻级精确同步
-
获取频道 ID:
- 在 Discord 中启用开发者模式(用户设置 → 高级 → 开发者模式)
- 右键单击你要使用的频道
- 点击“复制频道 ID”
- 粘贴到插件设置中
多客户端设置
[IMPORTANT]
不同的 Minecraft 客户端不能共享同一个端口,你可以使用命令更改端口。
你可以运行多个 Minecraft 客户端,每个客户端连接到不同或共享的 Discord 频道:
不同频道:
- 客户端 1:端口
25580 → Discord 频道 123456789
- 客户端 2:端口
25581 → Discord 频道 987654321
- 客户端 3:端口
25582 → Discord 频道 555555555
共享频道:
多个客户端可以分配到同一个 Discord 频道。在这种情况下:
- 来自 Discord 的消息会发送给分配给该频道的所有 Minecraft 客户端
- 转发到 Discord 的消息会包含
[客户端名称] 标签以标识来源
- 如果多个客户端位于同一个同步组,消息/命令将在相同的服务器游戏刻发送
更多配置可在 用户设置 → Vencord/BetterDiscord → 插件 → MinecraftChat 中找到
| 设置项 |
描述 |
默认值 |
| 自动连接 |
Discord 启动时自动连接所有已启用的客户端 |
true |
| 高级功能 |
启用高级功能(聊天延迟、同步组、自动化) |
false |
| 连接日志频道 |
发布连接/断开连接事件的 Discord 频道 ID(留空以禁用) |
空 |
| 启用控制台日志 |
将插件调试消息记录到浏览器控制台(DevTools F12) |
true |
Minecraft 模组配置
模组默认使用端口 25580。你可以使用游戏内命令更改此设置:
/discordchat port <port_number>
端口必须在 1024 到 65535 之间,并且必须与 Discord 中配置的客户端设置相匹配。
高级功能
在插件设置中启用高级功能以解锁强大的自动化和同步能力。通过聊天栏齿轮图标访问这些功能。
聊天延迟
对来自 Discord 的消息进行排队,并在同一游戏刻一次性发送到 Minecraft。
使用方法:
- 在插件设置中启用“高级功能”
- 点击聊天栏齿轮图标打开设置
- 开启“聊天延迟”开始排队消息
- 点击“发送队列”一次性释放所有排队的消息
同步组
将多个 Minecraft 客户端分配到同步组(A-F)以实现刻级精确的消息执行。当处于同一同步组的客户端接收到消息时,如果它们被分配到同一个 Discord 频道或配合聊天延迟使用,它们将在完全相同的服务器游戏刻执行这些消息。
配置方法:
- 在插件设置中启用“高级功能”
- 在客户端配置中,为每个客户端设置“同步组”(A-F 或 None)
- “None”将禁用该客户端的同步
自动化
创建基于触发的自动化规则,当 Minecraft 聊天中出现特定消息时执行操作。
配置方法:
- 在插件设置中启用“高级功能”
- 点击聊天栏的齿轮图标 → “自动化”部分
- 点击“+ 添加自动化”以创建新规则
- 配置:
- 名称:标识你的自动化规则
- 启用:切换以激活/停用
- 监听对象:选择哪些 Minecraft 客户端会触发此自动化
- 触发条件:在 Minecraft 聊天中匹配的文本来
- 完全匹配:如果勾选,消息必须与触发文本完全一致(区分大小写)
- 冷却时间:触发之间的最小毫秒数
- 操作:触发时执行的操作
可用操作:
- 发送到 Minecraft:向选定的客户端发送消息/命令
- 发送到 Discord:发布消息到配置的日志频道
- 启用聊天延迟:开启消息队列
- 禁用聊天延迟:关闭队列并发送所有排队消息
- 等待:在执行下一个操作之前延迟的毫秒数
命令
模组提供了 /discordchat 命令,包含以下子命令:
/discordchat 或 /discordchat status
显示当前连接状态:
- 服务器状态(运行中/已停止)
- 当前端口
- 已连接的客户端数量
/discordchat port <number>
更改 WebSocket 服务器端口。必须在 1024 到 65535 之间。
/discordchat reconnect
重启 WebSocket 服务器。
/discordchat disconnect
停止 WebSocket 服务器并断开所有 Discord 客户端的连接。使用 /discordchat reconnect 重新连接。
/discordchat ticktest
显示 tick 同步诊断信息。对于调试同步组和验证精确到 tick 的执行非常有用。
显示内容:
- 玩家名称
- 当前服务器 tick
- 客户端时间(毫秒)
- 网络延迟
- 当前同步组分配
- 上次同步执行详情(目标 tick、执行 tick、时间)
在使用 同步组 时,此命令特别有用,可用于验证来自多个客户端的消息是否在正确的游戏 tick 执行。
Discord Chat Integration
Brings your Minecraft chat into Discord with additional automation features. Send messages/commands and listens to Minecraft from Discord without bots.
What It Does
This mod bridges Discord and Minecraft through a local WebSocket connection, allowing you to send messages and execute commands in Minecraft directly from Discord without any bots. It also includes other advanced features like chat delay and automations.
- Botless Discord Integration - No Discord bot setup required; uses Vencord or BetterDiscord plugins
- Bidirectional Chat - Send messages/commands from Discord to Minecraft and receive chat feedback in Discord
- Multi-Client Support - Control multiple Minecraft clients from a single Discord interface
- Sync Groups - Achieve tick-perfect synchronization across multiple Minecraft clients
- Chat Delay - Queue and batch-send messages
- Automations - Create trigger-based rules that execute actions when Minecraft chat events occur
Installing the Discord Plugin
[IMPORTANT]
Both the Discord plugin and the mod are required to be installed.
Usage
Quick Start Guide
- Start Minecraft with the mod installed
- Join a world or server
- Open Discord with the Discord plugin enabled
- The plugin will automatically connect (if "Auto Connect" is enabled and the port number matches)
- Send messages/commands in the configured Discord channel, they'll appear/execute in Minecraft chat
- Recieve messages or command feedback in Discord (If "Forward to Discord" is enabled)
Setup and Configurations
Quick Settings Access
A gear icon appears next to the chat input box when the plugin is enabled. Click it to quickly access the Minecraft Chat settings without navigating through Discord's settings menu. The icon turns green when at least one client is connected.
Adding Minecraft Clients
-
Click "Add Client" in quick access menu
-
Configure each client:
- Name: A friendly name for this client
- Port: WebSocket port
- Channel ID: The Discord channel ID to bridge with this client
- Enabled: Toggle to enable/disable this client connection
- Forward to Discord: Toggle to enable/disable forwarding Minecraft chat to Discord
- Sync Group: Assign client to a sync group for tick-perfect synchronization
-
Getting a Channel ID:
- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click on the channel you want to use
- Click "Copy Channel ID"
- Paste into the plugin settings
Multi-Client Setup
[IMPORTANT]
Different Minecraft clients cannot share the same port, you can change the port with a command.
You can run multiple Minecraft clients, each connected to different or shared Discord channels:
Different Channels:
- Client 1: Port
25580 → Discord Channel 123456789
- Client 2: Port
25581 → Discord Channel 987654321
- Client 3: Port
25582 → Discord Channel 555555555
Shared Channel:
Multiple clients can be assigned to the same Discord channel. When this happens:
- Messages from Discord are sent to all Minecraft clients assigned to that channel
- Messages forwarded to Discord include a
[Client Name] tag to identify the source
- If multiple clients are on the same sync group, the message/command will be sent on the same server tick
Addional configuration can be found in User Settings → Vencord/BetterDiscord → Plugins → MinecraftChat
| Setting |
Description |
Default |
| Auto Connect |
Automatically connect to all enabled clients when Discord starts |
true |
| Advanced Features |
Enable advanced features (Chat Delay, Sync Groups, Automations) |
false |
| Connection Logging Channel |
Discord channel ID where connection/disconnection events are posted (Leave blank to disable) |
Empty |
| Enable Console Logging |
Log plugin debug messages to browser console (DevTools F12) |
true |
Minecraft Mod Configuration
The mod uses a default port of 25580. You can change this using the in-game command:
/discordchat port <port_number>
The port must be between 1024 and 65535 and match the configured client settings in Discord.
Advanced Features
Enable advanced features in the plugin settings to unlock powerful automation and synchronization capabilities. Access these features via the chat bar gear icon.
Chat Delay
Queue messages from Discord and send them at once to Minecraft at the same game tick.
How to use:
- Enable "Advanced Features" in plugin settings
- Click the chat bar gear icon to open settings
- Toggle "Chat Delay" on to start queuing messages
- Click "Send Queue" to release all queued messages at once
Sync Groups
Assign multiple Minecraft clients to sync groups (A-F) for tick-perfect message execution. When clients in the same sync group receive messages, they execute them on the exact same server game tick when assigned to the same Discord channel or with Chat Delay.
How to configure:
- Enable "Advanced Features" in plugin settings
- In client configuration, set each client's "Sync Group" (A-F or None)
- "None" disables synchronization for that client
Automations
Create trigger-based automation rules that execute actions when specific messages appear in Minecraft chat.
How to configure:
- Enable "Advanced Features" in plugin settings
- Click the chat bar gear icon → "Automations" section
- Click "+ Add Automation" to create a new rule
- Configure:
- Name: Identify your automation
- Enabled: Toggle to activate/deactivate
- Listen to: Select which Minecraft clients trigger this automation
- Trigger: Text to match in Minecraft chat
- Absolute Match: If checked, message must exactly match trigger (case-sensitive)
- Cooldown: Minimum milliseconds between triggers
- Actions: What to do when triggered
Available Actions:
- Send to Minecraft: Send message/command to selected clients
- Send to Discord: Post message to configured logging channel
- Enable Chat Delay: Turn on message queuing
- Disable Chat Delay: Turn off queuing and send all queued messages
- Wait: Delay in milliseconds before next action
Commands
The mod provides a /discordchat command with the following subcommands:
/discordchat or /discordchat status
Shows the current connection status:
- Server status (Running/Stopped)
- Current port
- Number of connected clients
/discordchat port <number>
Changes the WebSocket server port. Must be between 1024 and 65535.
/discordchat reconnect
Restarts the WebSocket server.
/discordchat disconnect
Stops the WebSocket server and disconnects all Discord clients. Use /discordchat reconnect to reconnect.
/discordchat ticktest
Displays tick synchronization diagnostic information. Useful for debugging sync groups and verifying tick-perfect execution.
Shows:
- Player name
- Current server tick
- Client time (milliseconds)
- Network ping
- Current sync group assignment
- Last sync execution details (target tick, execution tick, timing)
This command is particularly useful when using Sync Groups to verify that messages from multiple clients are executing at the correct game ticks.
评论 0
登录后参与评分
还没有评论,来抢沙发吧