Skip to content

Commit

Permalink
docs: 📝 update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Dec 22, 2023
1 parent b9785f4 commit fbb1278
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 14 deletions.
68 changes: 61 additions & 7 deletions readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

### servername

配置各服务器名称,应当与 Velocity 的名称对应,请注意 `kook``qq` 为特殊名称,并非 MC 服务器。
配置各服务器名称,应当与 Velocity 的名称对应,请注意 `discord``kook``qq` 为特殊名称,并非 MC 服务器。

### minecraft

Expand Down Expand Up @@ -113,6 +113,64 @@ MC 消息的格式化文本,占位符含义请参考下表:

使用 `list` 指令且玩家列表为空时显示的消息。

### discord

该功能为双向转发,即 MC 内消息会发送到 Discord 对应频道,频道内消息将被转发到 MC 内。使用 `/list` 指令即可查看在线玩家列表。

#### enable

默认值:`false`

是否启用 [Discord](https://discord.com/) 转发。

#### token

Discord 机器人 token。

#### channelId

目标服务器频道 ID。

### discord.message

Discord 消息的格式化文本。占位符与上文同理,所有的服务器名称会自动转为 plain 格式,您无需使用 plain 格式的占位符。

#### chat

默认值:`[{server}] <{name}>: {message}`

聊天消息。

#### join

默认值:`[+] [{server}] {name}`

玩家加入服务器消息。

#### leave

默认值:`[-] {name}`

玩家离开服务器消息。

#### switch

默认值:`<{name}>: [{serverFrom}] ➟ [{serverTo}]`

玩家切换服务器消息。

#### list

默认值:`- [{server}] 当前共有{count}名玩家在线: {playerList}`

`/list` 指令显示的消息。

#### listEmpty

默认值:`当前没有玩家在线`

使用 `/list` 指令且玩家列表为空时显示的消息。

### kook

该功能为双向转发,即 MC 内消息会发送到 Kook 对应频道,频道内消息将被转发到 MC 内。在频道内发送 `/list` 即可查看在线玩家列表。
Expand All @@ -131,7 +189,7 @@ Kook 机器人 token。

目标服务器频道 ID。

### Kook.daemon
### kook.daemon

Kook 机器人的守护进程配置,通过定时访问Kook的接口以确保机器人在线。

Expand Down Expand Up @@ -193,13 +251,9 @@ Kook 消息的格式化文本。占位符与上文同理,所有的服务器名

使用 `/list` 指令且玩家列表为空时显示的消息。

### discord

> 若有此需求,请开启一个 Issue。
### qq

> 我认为,2023 年了,不会还有人愿意往 QQ 转发消息炸群吧。如有需求请发起 issue,以统计需求情况并酌情考虑功能实现。欢迎 PR。
> 如需要此功能,欢迎 PR。
#### enable

Expand Down
68 changes: 61 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Reload Kook connection, only can execute in console.

### servername

Servers' name, key should corresponding to Velocity's server names. Note that `kook` and `qq` are special names, not MC server.
Servers' name, key should corresponding to Velocity's server names. Note that `discord`, `kook`, and `qq` are special names, not MC server.

### minecraft

Expand Down Expand Up @@ -114,6 +114,64 @@ Default: `当前没有玩家在线`

Message for `list` command when player list is empty.

### discord

This function is double way forwarding, which is Minecraft chat will send to Discord channel, and channel message will send to Minecraft. Use `/list` command can show online player list.

#### enable

Default: `false`

Enable [Discord](https://discord.com/) forwarding.

#### token

Discord bot token.

#### channelId

Channel ID.

### discord.message

Discord message format sages. Placeholders are defined same as Miencraft, all server name will auto translate to plain format, you do not have to use plain placeholders.

#### chat

Default: `[{server}] <{name}>: {message}`

Chat.

#### join

Default: `[+] [{server}] {name}`

Message when player joined the server.

#### leave

Default: `[-] {name}`

Message when player left the server.

#### switch

Default: `<{name}>: [{serverFrom}] ➟ [{serverTo}]`

Message when player switched server.

#### list

Default: `- [{server}] 当前共有{count}名玩家在线: {playerList}`

Message for `/list` command.

#### listEmpty

Default: `当前没有玩家在线`

Message for `/list` command when player list is empty.

### kook

This function is double way forwarding, which is Minecraft chat will send to Kook channel, and channel message will send to Minecraft. Use `/list` in Kook channel can show online player list.
Expand All @@ -132,7 +190,7 @@ Kook bot token.

Channel ID.

### Kook.daemon
### kook.daemon

Daemon thread configuration for kook bot, to make sure bot is online by requeseting Kook API intervally.

Expand Down Expand Up @@ -194,13 +252,9 @@ Default: `当前没有玩家在线`

Message for `/list` command when player list is empty.

### discord

> If you have this need, please open an issue.
### qq

> If you have this need, please open an issue.
> In case if you need this feature, PR is welcomed.
#### enable

Expand Down

0 comments on commit fbb1278

Please sign in to comment.