功能
- Minecraft <-> Discord 桥梁:用于服务器生命周期、玩家加入/离开、死亡、成就以及每日里程碑公告的通知
- 通过配置频道中的
/mc斜杠命令,实现 Discord -> Minecraft 聊天中继(包含提及净化) /mc命令将消息中继到 Minecraft,并将纯文本回声回 Discord(格式为**name:** message)- 当 Discord 用户已绑定时,
/mc使用关联的 Minecraft 昵称 - 丰富的 Discord 嵌入卡片:支持按事件自定义颜色、时间戳、可选的玩家头像缩略图,以及纯文本降级显示
- 机器人状态轮换:可配置状态列表、间隔时间和类型(
PLAYING、WATCHING、LISTENING、COMPETING) - 管理员日志频道:支持命令脱敏和结构化管理员嵌入卡片
- Discord 配置斜杠命令供管理员使用:通过
/config更新聊天/管理频道并白名单化服务器 - Discord/Minecraft 账号绑定:通过
/link(一次性临时代码)和游戏内/bridge link <code>完成 /leaderboard斜杠命令:支持分类、分页和可见性设置(默认private,可选public)- 排行榜包含在线和离线玩家,并保存其统计数据
- 已绑定的玩家在排行榜和嵌入卡片中显示为 Discord 提及格式(
<@discordUserId>) - 机器人状态轮换内置了当前在线/最大玩家数量的状态条目
- 健壮的启动/运行时行为:Discord 故障会被记录,启动消息会排队等待 JDA 就绪后再发送
Discord 机器人权限
机器人所需权限:
- 读取消息 / 查看频道
- 发送消息
- 读取消息历史
配置
首次运行时会创建 config/mcdiscordbridge-common.toml。
# Discord 机器人令牌或环境变量:DISCORD_BOT_TOKEN
discordApiKey = "env:DISCORD_BOT_TOKEN"
# 仅接受来自此服务器的消息
whitelistGuildId = "123456789012345678"
# 用于聊天桥接的 Discord 频道 ID
chatChannelId = "123456789012345678"
# 用于管理员日志的 Discord 频道 ID
adminLogChannelId = "123456789012345678"
# 文本消息中继模式的遗留开关(斜杠命令 `/mc` 不需要此项)
enableMessageContentIntent = false
# 发送 Discord 嵌入卡片以提供更丰富的事件日志
enableEmbeds = true
# 嵌入卡片的十六进制颜色,例如 #57A5FF
embedColorHex = "#57A5FF"
# 当有 UUID 可用时,在嵌入卡片中包含玩家头像缩略图
includePlayerHeadInEmbeds = true
# 带有 %uuid% 占位符的 URL 模板
playerHeadUrlTemplate = "https://crafatar.com/avatars/%uuid%?size=128&overlay"
# 从 botActivities 中轮换机器人状态文本
enableBotActivityRotation = true
botActivities = ["Watching the server", "Bridging chat", "Tracking events"]
botActivityRotateSeconds = 20
# PLAYING, WATCHING, LISTENING, COMPETING
botActivityType = "WATCHING"
# 每 N 个 Minecraft 天发送一次每日里程碑消息(设为 0 则禁用)
dayMilestoneGap = 10
# 启用 Discord 账号与 Minecraft 玩家的绑定
enableAccountLinking = true
# 绑定代码的有效时长
linkCodeExpirySeconds = 600
# 一次性账号绑定代码的长度
linkCodeLength = 6
通过环境变量设置令牌
设置:
export DISCORD_BOT_TOKEN="your_token"
然后在配置文件中设置:
discordApiKey = "env:DISCORD_BOT_TOKEN"
安装设置
在你的白名单 Discord 服务器中,运行 /config 命令并提供以下一个或多个参数:
chat_channel_idadmin_channel_idwhitelist_guild_id
只有 Discord 管理员才能运行 /config。
账号绑定
- 在 Discord 中运行斜杠命令:
/link - 机器人将以临时方式回复一条一次性代码
- 在 Minecraft 中运行:
/bridge link <code> linkCodeExpirySeconds控制代码的有效时长
Discord 到 Minecraft 的中继
- 在配置好的 Discord 聊天频道中,运行:
/mc <message> - 该消息会以
[Discord] <name> message的格式中继到 Minecraft 聊天 - 相同的消息也会作为纯文本回声在 Discord 中显示:
**name:** message - 如果 Discord 账号已绑定,
name将使用关联的 Minecraft 昵称
排行榜
- 在 Discord 中运行:
/leaderboard <category> - 可选页码:
/leaderboard <category> <page> - 可选可见性:
/leaderboard <category> <page> <visibility>,其中visibility为private(默认)或public - 已绑定的玩家会显示 Discord 提及标签(
<@discordUserId>) - 分类包括:
playtime、deaths、player_kills、mob_kills、mined_blocks、distance_walked - 默认情况下,排行榜响应是临时的(ephemeral)
注意事项
- 本插件仅限服务器端使用。请勿安装在客户端。
- Discord 故障会被记录,且不会故意导致服务器启动崩溃。
- 避免在命令用法中记录敏感信息;默认已启用脱敏处理。
Features
- Minecraft -> Discord bridge for server lifecycle, player join/leave, deaths, advancements, and day milestone announcements
- Discord -> Minecraft chat relay via
/mcslash command in the configured channel (with mention sanitization) /mcrelays to Minecraft and echoes plain text back to Discord (**name:** message)/mcuses linked Minecraft nickname when the Discord user is linked- Rich Discord embeds with per-event colors, timestamps, optional player head thumbnails, and plain-text fallback
- Bot activity rotation with configurable activity list, interval, and type (
PLAYING,WATCHING,LISTENING,COMPETING) - Admin logging channel with command redaction and structured admin embeds
- Discord config slash command for admins:
/configto update chat/admin channels and whitelist guild - Discord/Minecraft account linking via
/link(ephemeral one-time code) and in-game/bridge link <code> /leaderboardslash command with categories, pagination, and visibility (privatedefault, optionalpublic)- Leaderboards include online and offline players with saved stats
- Linked players are shown as Discord mentions (
<@discordUserId>) in leaderboard and embeds - Bot activity rotation includes a built-in online/max players status entry
- Resilient startup/runtime behavior: Discord failures are logged, startup messages are queued until JDA is ready
Discord Bot Permissions
Bot permissions:
- Read Messages / View Channels
- Send Messages
- Read Message History
Configuration
First run creates config/mcdiscordbridge-common.toml.
# Discord bot token or env:DISCORD_BOT_TOKEN
discordApiKey = "env:DISCORD_BOT_TOKEN"
# Only messages from this guild are accepted
whitelistGuildId = "123456789012345678"
# Discord channel for chat bridge
chatChannelId = "123456789012345678"
# Discord channel for admin logs
adminLogChannelId = "123456789012345678"
# Legacy toggle for text-message relay mode (slash command `/mc` does not require this)
enableMessageContentIntent = false
# Send Discord embeds for richer event logs
enableEmbeds = true
# Hex color for embeds, for example #57A5FF
embedColorHex = "#57A5FF"
# Include player head thumbnail in embeds when UUID is available
includePlayerHeadInEmbeds = true
# URL template with %uuid% placeholder
playerHeadUrlTemplate = "https://crafatar.com/avatars/%uuid%?size=128&overlay"
# Rotate bot activity text from botActivities
enableBotActivityRotation = true
botActivities = ["Watching the server", "Bridging chat", "Tracking events"]
botActivityRotateSeconds = 20
# PLAYING, WATCHING, LISTENING, COMPETING
botActivityType = "WATCHING"
# Send day milestone message every N minecraft days (0 disables)
dayMilestoneGap = 10
# Enable Discord account linking to Minecraft players
enableAccountLinking = true
# How long link codes remain valid
linkCodeExpirySeconds = 600
# Length of one-time account link code
linkCodeLength = 6
Token via environment variable
Set:
export DISCORD_BOT_TOKEN="your_token"
Then set in config:
discordApiKey = "env:DISCORD_BOT_TOKEN"
Setup
In your whitelisted Discord server, run /config with one or more of:
chat_channel_idadmin_channel_idwhitelist_guild_id
Only Discord admins can run /config.
Account Linking
- On Discord, run slash command:
/link - The bot replies ephemerally with a one-time code
- In Minecraft, run:
/bridge link <code> linkCodeExpirySecondscontrols how long the code remains valid
Discord to Minecraft Relay
- On Discord in the configured chat channel, run:
/mc <message> - The message is relayed to Minecraft chat as
[Discord] <name> message - The same message is echoed in Discord as plain text:
**name:** message - If the Discord account is linked,
nameuses the linked Minecraft nickname
Leaderboard
- On Discord, run:
/leaderboard <category> - Optional page:
/leaderboard <category> <page> - Optional visibility:
/leaderboard <category> <page> <visibility>wherevisibilityisprivate(default) orpublic - Linked players are shown with Discord mention tags (
<@discordUserId>) - Categories:
playtime,deaths,player_kills,mob_kills,mined_blocks,distance_walked - Leaderboard responses are ephemeral by default
Notes
- This is server-only. Do not install on clients.
- Discord failures are logged and do not intentionally crash server startup.
- Avoid logging secrets in command usage; redaction is enabled by default.
版本游戏版本平台发布时间本站下载
正式版
0.1.5+mc1.21.9
MC Discord Bridge 0.1.5 for MC 1.21.9
1.21.9 NeoForge 6 个月前 ·
0
1.21.9
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.8
MC Discord Bridge 0.1.5 for MC 1.21.8
1.21.8 NeoForge 6 个月前 ·
0
1.21.8
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.7
MC Discord Bridge 0.1.5 for MC 1.21.7
1.21.7 NeoForge 6 个月前 ·
0
1.21.7
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.6
MC Discord Bridge 0.1.5 for MC 1.21.6
1.21.6 NeoForge 6 个月前 ·
0
1.21.6
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.5
MC Discord Bridge 0.1.5 for MC 1.21.5
1.21.5 NeoForge 6 个月前 ·
0
1.21.5
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.4
MC Discord Bridge 0.1.5 for MC 1.21.4
1.21.4 NeoForge 6 个月前 ·
0
1.21.4
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.3
MC Discord Bridge 0.1.5 for MC 1.21.3
1.21.3 NeoForge 6 个月前 ·
0
1.21.3
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.2
MC Discord Bridge 0.1.5 for MC 1.21.2
1.21.2 NeoForge 6 个月前 ·
0
1.21.2
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.11
MC Discord Bridge 0.1.5 for MC 1.21.11
1.21.11 NeoForge 6 个月前 ·
0
1.21.11
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
正式版
0.1.5+mc1.21.10
MC Discord Bridge 0.1.5 for MC 1.21.10
1.21.10 NeoForge 6 个月前 ·
0
1.21.10
NeoForge
6 个月前
0
下载 Faga's Discord Bridge
0.1.5+mc1.21.9
正式版
2026-05-18
v0.1.5 的自动发布
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
另一个配置库 (YACL)
isxander
一个基于构建器的 Minecraft 配置库!
前置管理
155
模组
Save and Load Inventories
Serilum
? 使用命令保存和加载玩家或他人的背包/套装。
管理实用
97
模组
Emojiful
buuz135
Minecraft 中的表情符号
社交
79
模组
反X射线透视AntiXray
DrexHD
一款轻量级模组,允许服务器管理员对抗透视作弊者。
管理科技
52
模组
Cycle Title Screen Splash
Serilum
? 主菜单上的闪屏文本将在可配置的延迟后持续变化。
装饰社交
49
模组
No Chat Restrictions
Aizistral
恢复所有账户的游戏聊天访问权限
社交实用
47
评论 0
登录后参与评分
还没有评论,来抢沙发吧