diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-09-28 23:00:29 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-09-28 23:00:29 +0900 |
| commit | af2feee95e7f6ebaef5466402789917ae65c0796 (patch) | |
| tree | 1a4bcd9c9ea3a32ddfb861ce541ca0877ef3aa88 /website/src | |
| parent | e725de11e80abd9d96784c7f08a09893c852fef0 (diff) | |
| download | LunaticChat-af2feee95e7f6ebaef5466402789917ae65c0796.tar.gz LunaticChat-af2feee95e7f6ebaef5466402789917ae65c0796.tar.bz2 LunaticChat-af2feee95e7f6ebaef5466402789917ae65c0796.zip | |
feat(paper): add world, display_name, channel_id and role chat placeholders
Operators asked for more of the sender's context in chat formats than the
name alone. {world} covers direct messages and channel chat; the channel
details and the sender's display name and role only exist for channel
chat, so only that format accepts them.
A direct message from another server renders {world} empty: the relay does
not carry the sender's world, and adding it would need a protocol bump and
a coordinated Velocity release for one placeholder. The renderer now
accepts underscores so the snake_case names match as written.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'website/src')
| -rw-r--r-- | website/src/docs/configuration.md | 4 | ||||
| -rw-r--r-- | website/src/docs/reference/message-format.md | 4 | ||||
| -rw-r--r-- | website/src/ja/docs/configuration.md | 4 | ||||
| -rw-r--r-- | website/src/ja/docs/reference/message-format.md | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/website/src/docs/configuration.md b/website/src/docs/configuration.md index 4b46b55..35e7599 100644 --- a/website/src/docs/configuration.md +++ b/website/src/docs/configuration.md @@ -172,8 +172,8 @@ proxy logs for everyone else. | Key | Default | Available Placeholders | |-----|---------|----------------------| -| `directMessageFormat` | `§7[§e{sender} §7>> §e{recipient}§7] §f{message}` | `{sender}`, `{recipient}`, `{message}` | -| `channelMessageFormat` | `§7[§b#{channel}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{channel}` | +| `directMessageFormat` | `§7[§e{sender} §7>> §e{recipient}§7] §f{message}` | `{sender}`, `{recipient}`, `{message}`, `{world}` | +| `channelMessageFormat` | `§7[§b#{channel}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{channel}`, `{channel_id}`, `{display_name}`, `{world}`, `{role}` | | `crossServerGlobalChatFormat` | `§7[§6{server}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{server}` | ## Data Files diff --git a/website/src/docs/reference/message-format.md b/website/src/docs/reference/message-format.md index 68fee84..b0976fa 100644 --- a/website/src/docs/reference/message-format.md +++ b/website/src/docs/reference/message-format.md @@ -17,6 +17,10 @@ These are the only settings `/lc reload` <Badge type="tip" text="v1.4.0~" /> app | `{message}` | Message content | All | | `{channel}` | Channel name | `channelMessageFormat` | | `{server}` | Server name | `crossServerGlobalChatFormat` | +| `{world}` <Badge type="tip" text="v1.5.0~" /> | World the sender is in. Empty for a direct message from another server | `directMessageFormat`, `channelMessageFormat` | +| `{display_name}` <Badge type="tip" text="v1.5.0~" /> | Display name of the sender, including colors set by other plugins | `channelMessageFormat` | +| `{channel_id}` <Badge type="tip" text="v1.5.0~" /> | Channel ID | `channelMessageFormat` | +| `{role}` <Badge type="tip" text="v1.5.0~" /> | Sender's role in the channel (Owner / Moderator / Member) | `channelMessageFormat` | ## Format List diff --git a/website/src/ja/docs/configuration.md b/website/src/ja/docs/configuration.md index 59d0c73..a5c211a 100644 --- a/website/src/ja/docs/configuration.md +++ b/website/src/ja/docs/configuration.md @@ -167,8 +167,8 @@ LUNATICCHAT_DEBUG=velocity,protocol | キー | デフォルト | 利用可能なプレースホルダー | |------|------------|--------------------------| -| `directMessageFormat` | `§7[§e{sender} §7>> §e{recipient}§7] §f{message}` | `{sender}`, `{recipient}`, `{message}` | -| `channelMessageFormat` | `§7[§b#{channel}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{channel}` | +| `directMessageFormat` | `§7[§e{sender} §7>> §e{recipient}§7] §f{message}` | `{sender}`, `{recipient}`, `{message}`, `{world}` | +| `channelMessageFormat` | `§7[§b#{channel}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{channel}`, `{channel_id}`, `{display_name}`, `{world}`, `{role}` | | `crossServerGlobalChatFormat` | `§7[§6{server}§7] §e{sender}: §f{message}` | `{sender}`, `{message}`, `{server}` | ## データファイル diff --git a/website/src/ja/docs/reference/message-format.md b/website/src/ja/docs/reference/message-format.md index 3eddd1a..79c6745 100644 --- a/website/src/ja/docs/reference/message-format.md +++ b/website/src/ja/docs/reference/message-format.md @@ -17,6 +17,10 @@ layout: doc | `{message}` | メッセージの内容 | すべて | | `{channel}` | チャンネル名 | `channelMessageFormat` | | `{server}` | サーバー名 | `crossServerGlobalChatFormat` | +| `{world}` <Badge type="tip" text="v1.5.0~" /> | 送信者がいるワールド名.別サーバーから届いたダイレクトメッセージでは空になります | `directMessageFormat`, `channelMessageFormat` | +| `{display_name}` <Badge type="tip" text="v1.5.0~" /> | 送信者の表示名.他のプラグインが設定した色も含みます | `channelMessageFormat` | +| `{channel_id}` <Badge type="tip" text="v1.5.0~" /> | チャンネル ID | `channelMessageFormat` | +| `{role}` <Badge type="tip" text="v1.5.0~" /> | チャンネル内での送信者の役割 (オーナー / モデレーター / メンバー) | `channelMessageFormat` | ## フォーマット一覧 |
