Jelajahi Sumber

Document displayname_template variables and remove the suffix by default

Tulir Asokan 3 tahun lalu
induk
melakukan
cef84493ff
1 mengubah file dengan 7 tambahan dan 2 penghapusan
  1. 7 2
      example-config.yaml

+ 7 - 2
example-config.yaml

@@ -69,8 +69,13 @@ bridge:
     # {{.}} is replaced with the internal ID of the Discord user.
     username_template: discord_{{.}}
     # Displayname template for Discord users.
-    # TODO: document variables
-    displayname_template: '{{.Username}}#{{.Discriminator}} (D){{if .Bot}} (bot){{end}}'
+    # Available fields:
+    #   .ID - Internal user ID
+    #   .Username - User's displayname on Discord
+    #   .Discriminator - The 4 numbers after the name on Discord
+    #   .Bot - Whether the user is a bot
+    #   .System - Whether the user is an official system user
+    displayname_template: '{{.Username}}#{{.Discriminator}} {{if .Bot}} (bot){{end}}'
     channelname_template: '{{if .Guild}}{{.Guild}} - {{end}}{{if .Folder}}{{.Folder}} - {{end}}{{.Name}} (D)'
 
     portal_message_buffer: 128