example-config.yaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # Homeserver details.
  2. homeserver:
  3. # The address that this appservice can use to connect to the homeserver.
  4. address: http://localhost:8008
  5. # The domain of the homeserver (for MXIDs, etc).
  6. domain: example.com
  7. # Is the homeserver actually mautrix-asmux?
  8. asmux: false
  9. # The URL to push real-time bridge status to.
  10. # If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
  11. # The bridge will use the appservice as_token to authorize requests.
  12. status_endpoint: null
  13. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  14. async_media: false
  15. # Application service host/registration related details.
  16. # Changing these values requires regeneration of the registration.
  17. appservice:
  18. # The address that the homeserver can use to connect to this appservice.
  19. address: http://localhost:29334
  20. # The hostname and port where this appservice should listen.
  21. hostname: 0.0.0.0
  22. port: 29334
  23. # Database config.
  24. database:
  25. # The database type. "sqlite3" and "postgres" are supported.
  26. type: sqlite3
  27. # The database URI.
  28. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  29. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  30. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  31. uri: mautrix-discord.db
  32. # Maximum number of connections. Mostly relevant for Postgres.
  33. max_open_conns: 20
  34. max_idle_conns: 2
  35. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  36. # Parsed with https://pkg.go.dev/time#ParseDuration
  37. max_conn_idle_time: null
  38. max_conn_lifetime: null
  39. # Settings for provisioning API
  40. provisioning:
  41. # Prefix for the provisioning API paths.
  42. prefix: /_matrix/provision
  43. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  44. # or if set to "disable", the provisioning API will be disabled.
  45. shared_secret: generate
  46. id: discord
  47. bot:
  48. username: discordbot
  49. displayname: Discord bridge bot
  50. avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
  51. # Whether or not to receive ephemeral events via appservice transactions.
  52. # Requires MSC2409 support (i.e. Synapse 1.22+).
  53. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  54. ephemeral_events: false
  55. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  56. as_token: "This value is generated when generating the registration"
  57. hs_token: "This value is generated when generating the registration"
  58. # Bridge config
  59. bridge:
  60. # Localpart template of MXIDs for Discord users.
  61. # {{.}} is replaced with the internal ID of the Discord user.
  62. username_template: discord_{{.}}
  63. # Displayname template for Discord users.
  64. # TODO: document variables
  65. displayname_template: '{{.Username}}#{{.Discriminator}} (D){{if .Bot}} (bot){{end}}'
  66. portal_message_buffer: 128
  67. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  68. sync_with_custom_puppets: true
  69. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  70. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  71. # and is therefore prone to race conditions.
  72. sync_direct_chat_list: false
  73. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  74. # presence and read receipts are bridged. These settings set the default values.
  75. # Existing users won't be affected when these are changed.
  76. default_bridge_receipts: true
  77. default_bridge_presence: true
  78. # Servers to always allow double puppeting from
  79. double_puppet_server_map:
  80. example.com: https://example.com
  81. # Allow using double puppeting from any server with a valid client .well-known file.
  82. double_puppet_allow_discovery: false
  83. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  84. #
  85. # If set, double puppeting will be enabled automatically for local users
  86. # instead of users having to find an access token and run `login-matrix`
  87. # manually.
  88. login_shared_secret_map:
  89. example.com: foobar
  90. # The prefix for commands. Only required in non-management rooms.
  91. command_prefix: '!dis'
  92. # Messages sent upon joining a management room.
  93. # Markdown is supported. The defaults are listed below.
  94. management_room_text:
  95. # Sent when joining a room.
  96. welcome: "Hello, I'm a WhatsApp bridge bot."
  97. # Sent when joining a management room and the user is already logged in.
  98. welcome_connected: "Use `help` for help."
  99. # Sent when joining a management room and the user is not logged in.
  100. welcome_unconnected: "Use `help` for help or `login` to log in."
  101. # Optional extra text sent when joining a management room.
  102. additional_help: ""
  103. # End-to-bridge encryption support options.
  104. #
  105. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  106. encryption:
  107. # Allow encryption, work in group chat rooms with e2ee enabled
  108. allow: false
  109. # Default to encryption, force-enable encryption in all portals the bridge creates
  110. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  111. # It is recommended to also set private_chat_portal_meta to true when using this.
  112. default: false
  113. # Options for automatic key sharing.
  114. key_sharing:
  115. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  116. # You must use a client that supports requesting keys from other users to use this feature.
  117. allow: false
  118. # Require the requesting device to have a valid cross-signing signature?
  119. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  120. # Not yet implemented.
  121. require_cross_signing: false
  122. # Require devices to be verified by the bridge?
  123. # Verification by the bridge is not yet implemented.
  124. require_verification: true
  125. logging:
  126. directory: ./logs
  127. file_name_format: '{{.Date}}-{{.Index}}.log'
  128. file_date_format: "2006-01-02"
  129. file_mode: 384
  130. timestamp_format: Jan _2, 2006 15:04:05
  131. print_level: debug
  132. print_json: false
  133. file_json: false