PolyHopper

PolyHopper

一个高度可定制的Quilt平台Discord聊天链接模组

社交

一个高度可定制的 Quilt 版 Discord 聊天链接模组。

特性

  • 支持 PluralKit
  • 可选的 Webhook 模式,允许不同玩家在 Discord 上显示为独立的“用户”
  • 所有格式均可配置,请参阅下方的配置章节。
  • 支持 Markdown 和 SimpleTextFormat(参见占位符 API)

配置

配置文件位于 config/polyhopper/config.toml。 下方提供了默认配置

默认配置
[bot]
	# 机器人令牌。
	# default:
	token = ""
	# 限制命令使用以及发送消息的频道。
	# default:
	channelId = ""
	# 机器人所使用的服务器。
	# default:
	guildId = ""
	# Discord 消息在游戏内使用的格式
	# default: [PolyHopper] <{username}> {message}
	ingameFormat = "[PolyHopper] <{username}> {message}"
	# 以这些内容开头的消息不会被转发到 Minecraft(<@466378653216014359> 是 PluralKit 的 ping)
	minecraftProxyBlacklist = ["pk;", "pk!", "<@466378653216014359>", "\\\\"]
	# 记录白名单的频道
	# default:
	whitelistChannelId = ""
	# 切换白名单命令
	# default: false
	whitelistCommand = false
	# 切换账户绑定。
	# default: false
	accountLinking = false
	# 如何发送消息,可以是以下之一:
	#   MESSAGE - 简单的 Discord 消息。
	#   WEBHOOK - 通过带有自定义名称和头像的 Webhook 发送消息。
	# options: MESSAGE, WEBHOOK
	# default: WEBHOOK
	messageMode = "WEBHOOK"
	# 播报死亡信息?
	# default: true
	announceDeaths = true
	# 播报进度?
	# default: true
	announceAdvancements = true
	# 播报玩家加入/离开?
	# default: true
	announcePlayerJoinLeave = true

[webhook]
	# Webhook 消息使用的名称,可以替换为 {username} 或 {displayName}
	# default: {displayName} @ PolyHopper
	nameFormat = "{displayName} @ PolyHopper"
	# 玩家 Webhook 头像的 URL,可以替换为 {uuid} 或 {username}。
	# default: https://crafatar.com/renders/head/{uuid}
	playerAvatarUrl = "https://crafatar.com/renders/head/{uuid}"
	# 服务器 Webhook 头像的 URL,可以替换为 {uuid} 或 {username}。
	# default: https://cdn.ecorous.org/blackhole.png
	serverAvatarUrl = "https://cdn.ecorous.org/blackhole.png"

[message]
	# 玩家消息采用的格式,可以替换为 {username}、{displayName} 或 {text}
	# default: <{displayName}> {text}
	messageFormat = "<{displayName}> {text}"

常见问题

问:我怎样才能获得令牌????

答:阅读此指南。

问:当我在 Discord 上发送 Markdown 消息(粗体、斜体、下划线、标题等)时,它看起来很奇怪,带着星号之类的东西!

答:Markdown 支持将在后续版本中推出。

问:账户绑定什么都不做!!!!

答:它尚未实现。请耐心等待。