example-config.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. # Application service host/registration related details.
  14. # Changing these values requires regeneration of the registration.
  15. appservice:
  16. # The address that the homeserver can use to connect to this appservice.
  17. address: http://localhost:29334
  18. # The hostname and port where this appservice should listen.
  19. hostname: 0.0.0.0
  20. port: 29334
  21. # Database config.
  22. database:
  23. # The database type. "sqlite3" and "postgres" are supported.
  24. type: sqlite3
  25. # The database URI.
  26. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  27. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  28. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  29. uri: mautrix-discord.db
  30. # Maximum number of connections. Mostly relevant for Postgres.
  31. max_open_conns: 20
  32. max_idle_conns: 2
  33. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  34. # Parsed with https://pkg.go.dev/time#ParseDuration
  35. max_conn_idle_time: null
  36. max_conn_lifetime: null
  37. # Settings for provisioning API
  38. provisioning:
  39. # Prefix for the provisioning API paths.
  40. prefix: /_matrix/provision
  41. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  42. # or if set to "disable", the provisioning API will be disabled.
  43. shared_secret: generate
  44. id: discord
  45. bot:
  46. username: discordbot
  47. displayname: Discord bridge bot
  48. avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
  49. # Whether or not to receive ephemeral events via appservice transactions.
  50. # Requires MSC2409 support (i.e. Synapse 1.22+).
  51. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  52. ephemeral_events: false
  53. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  54. as_token: "This value is generated when generating the registration"
  55. hs_token: "This value is generated when generating the registration"
  56. # Bridge config
  57. bridge:
  58. # Localpart template of MXIDs for Discord users.
  59. # {{.}} is replaced with the internal ID of the Discord user.
  60. username_template: discord_{{.}}
  61. # Displayname template for Discord users.
  62. # TODO: document variables
  63. displayname_template: '{{.Username}}#{{.Discriminator}} (D){{if .Bot}} (bot){{end}}'
  64. portal_message_buffer: 128
  65. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  66. sync_with_custom_puppets: true
  67. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  68. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  69. # and is therefore prone to race conditions.
  70. sync_direct_chat_list: false
  71. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  72. # presence and read receipts are bridged. These settings set the default values.
  73. # Existing users won't be affected when these are changed.
  74. default_bridge_receipts: true
  75. default_bridge_presence: true
  76. # Servers to always allow double puppeting from
  77. double_puppet_server_map:
  78. example.com: https://example.com
  79. # Allow using double puppeting from any server with a valid client .well-known file.
  80. double_puppet_allow_discovery: false
  81. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  82. #
  83. # If set, double puppeting will be enabled automatically for local users
  84. # instead of users having to find an access token and run `login-matrix`
  85. # manually.
  86. login_shared_secret_map:
  87. example.com: foobar
  88. # The prefix for commands. Only required in non-management rooms.
  89. command_prefix: '!dis'
  90. # Messages sent upon joining a management room.
  91. # Markdown is supported. The defaults are listed below.
  92. management_room_text:
  93. # Sent when joining a room.
  94. welcome: "Hello, I'm a WhatsApp bridge bot."
  95. # Sent when joining a management room and the user is already logged in.
  96. welcome_connected: "Use `help` for help."
  97. # Sent when joining a management room and the user is not logged in.
  98. welcome_unconnected: "Use `help` for help or `login` to log in."
  99. # Optional extra text sent when joining a management room.
  100. additional_help: ""
  101. logging:
  102. directory: ./logs
  103. file_name_format: '{{.Date}}-{{.Index}}.log'
  104. file_date_format: "2006-01-02"
  105. file_mode: 384
  106. timestamp_format: Jan _2, 2006 15:04:05
  107. print_level: debug
  108. print_json: false
  109. file_json: false