Discord Logging
Discord Logging
Every annotation written, removed or cleared can be posted to Discord as an embed. It is intended for medical roleplay oversight: who documented what, on whom, for how long, and who took it off again. 每条添加、移除或清除的批注都可以作为 embed 发送到 Discord。它旨在用于医疗角色扮演监管:谁记录了什么、记录在谁身上、持续多长时间,以及又是谁将其移除的。
Enable it
启用它
Create the webhook in Discord under Server Settings → Integrations → Webhooks → New Webhook → Copy Webhook URL, then paste it in. 在 Discord 的 服务器设置 → 整合 → Webhook → 新建 Webhook → 复制 Webhook URL 下创建 webhook,然后将其粘贴进来。
Config.Webhook = {
Enabled = false,
Url = '',
Username = 'BUPA Status',
Avatar = '',
Log = {
Add = true, -- an annotation was written
Remove = true, -- a single annotation was deleted
Clear = true, -- a character's annotations were wiped
},
class="hljs-literal">true,
Colors = {
Add = 5990640, -- blue
Remove = 15680580, -- red
Clear = 15680580, -- red
},
Footer = 'BUPA Sync Status',
}Nothing is sent while Enabled is false or Url is empty.
当 Enabled 为 false 或 Url 为空时,不会发送任何内容。
| Field | Purpose |
|---|---|
Username / Avatar |
Name and picture the messages are posted under. Leave Avatar empty to use the webhook's own. |
Log |
Turn individual actions off if you do not care about them. |
OnlyOnOthers |
true logs only actions performed on another player — medic work. false also logs every note players write on themselves, which is chatty. |
Colors |
Embed colour per action, as a decimal number. Pick one at spycolor.com and use the decimal value. |
Footer |
Text under every embed. Empty hides the footer. |
| 字段 | 用途 |
| --- | --- |
Username / Avatar |
消息发布时显示的名字和头像。将 Avatar 留空则使用 webhook 自身的头像。 |
Log |
如果你不关心某些操作,可以关闭对应的单独操作记录。 |
OnlyOnOthers |
true 仅记录对其他玩家执行的操作 —— 即医疗工作。false 同时也会记录玩家在自己身上写的每条备注,这会产生较多消息。 |
Colors |
每个操作对应的 embed 颜色,以十进制数字表示。在 spycolor.com 上挑选一个颜色并使用其十进制值。 |
Footer |
每个 embed 下方的文本。留空则隐藏页脚。 |
What each embed contains
每个 embed 包含的内容
Annotation added 添加批注
| Field | Example |
|---|---|
| Written by | The medic — name, server id and citizen id |
| On | The patient, same format |
| Region | The body part label |
| Note | The annotation text, in a code block |
| Type | Injury / Bandage / Note |
| Severity | Minor / Moderate / Severe |
| Duration | Time remaining, or Permanent |
| Locked | Yes / No |
| 字段 | 示例 |
| --- | --- |
| 编写者 (Written by) | 医护人员 —— 姓名、服务器 ID 和市民 ID |
| 作用于 (On) | 患者,相同格式 |
| 身体部位 (Region) | 身体部位标签 |
| 备注 (Note) | 批注文本,位于代码块中 |
| 类型 (Type) | 伤情 (Injury) / 绷带 (Bandage) / 备注 (Note) |
| 严重程度 (Severity) | 轻微 (Minor) / 中度 (Moderate) / 严重 (Severe) |
| 持续时间 (Duration) | 剩余时间,或永久 (Permanent) |
| 已锁定 (Locked) | 是 (Yes) / 否 (No) |
Annotation removed logs who removed it, whose body it came off, the region, the text and whether it had been locked. 移除批注 会记录是谁移除了它、从谁的身体上移除的、身体部位、文本内容以及它是否已被锁定。
Annotations cleared logs who cleared it, from whom, how many entries actually went, and whether locked notes were kept. 清除批注 会记录是谁清除了它、从谁身上清除的、实际清除了多少条记录,以及是否保留了已锁定的备注。
Keep the webhook URL private. Anyone holding it can post in that channel.
请妥善保管 webhook URL 的隐私。任何持有它的人都可以在该频讲中发消息。