123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- # Homeserver details.
- homeserver:
- # The address that this appservice can use to connect to the homeserver.
- address: http://localhost:8008
- # The domain of the homeserver (for MXIDs, etc).
- domain: example.com
- # Is the homeserver actually mautrix-asmux?
- asmux: false
- # The URL to push real-time bridge status to.
- # If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
- # The bridge will use the appservice as_token to authorize requests.
- status_endpoint: null
- # Endpoint for reporting per-message status.
- message_send_checkpoint_endpoint: null
- # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
- async_media: false
- # Application service host/registration related details.
- # Changing these values requires regeneration of the registration.
- appservice:
- # The address that the homeserver can use to connect to this appservice.
- address: http://localhost:29334
- # The hostname and port where this appservice should listen.
- hostname: 0.0.0.0
- port: 29334
- # Database config.
- database:
- # The database type. "sqlite3" and "postgres" are supported.
- type: sqlite3
- # The database URI.
- # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
- # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
- # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
- uri: mautrix-discord.db
- # Maximum number of connections. Mostly relevant for Postgres.
- max_open_conns: 20
- max_idle_conns: 2
- # Maximum connection idle time and lifetime before they're closed. Disabled if null.
- # Parsed with https://pkg.go.dev/time#ParseDuration
- max_conn_idle_time: null
- max_conn_lifetime: null
- # The unique ID of this appservice.
- id: discord
- # Appservice bot details.
- bot:
- # Username of the appservice bot.
- username: discordbot
- # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
- # to leave display name/avatar as-is.
- displayname: Discord bridge bot
- avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
- # Whether or not to receive ephemeral events via appservice transactions.
- # Requires MSC2409 support (i.e. Synapse 1.22+).
- # You should disable bridge -> sync_with_custom_puppets when this is enabled.
- ephemeral_events: false
- # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
- as_token: "This value is generated when generating the registration"
- hs_token: "This value is generated when generating the registration"
- # Bridge config
- bridge:
- # Localpart template of MXIDs for Discord users.
- # {{.}} 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}}'
- channelname_template: '{{if .Guild}}{{.Guild}} - {{end}}{{if .Folder}}{{.Folder}} - {{end}}{{.Name}} (D)'
- portal_message_buffer: 128
- # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
- sync_with_custom_puppets: true
- # Should the bridge update the m.direct account data event when double puppeting is enabled.
- # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
- # and is therefore prone to race conditions.
- sync_direct_chat_list: false
- # When double puppeting is enabled, users can use `!wa toggle` to change whether
- # presence and read receipts are bridged. These settings set the default values.
- # Existing users won't be affected when these are changed.
- default_bridge_receipts: true
- default_bridge_presence: true
- # Servers to always allow double puppeting from
- double_puppet_server_map:
- example.com: https://example.com
- # Allow using double puppeting from any server with a valid client .well-known file.
- double_puppet_allow_discovery: false
- # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
- #
- # If set, double puppeting will be enabled automatically for local users
- # instead of users having to find an access token and run `login-matrix`
- # manually.
- login_shared_secret_map:
- example.com: foobar
- # The prefix for commands. Only required in non-management rooms.
- command_prefix: '!discord'
- # Messages sent upon joining a management room.
- # Markdown is supported. The defaults are listed below.
- management_room_text:
- # Sent when joining a room.
- welcome: "Hello, I'm a Discord bridge bot."
- # Sent when joining a management room and the user is already logged in.
- welcome_connected: "Use `help` for help."
- # Sent when joining a management room and the user is not logged in.
- welcome_unconnected: "Use `help` for help or `login` to log in."
- # Optional extra text sent when joining a management room.
- additional_help: ""
- # End-to-bridge encryption support options.
- #
- # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
- encryption:
- # Allow encryption, work in group chat rooms with e2ee enabled
- allow: false
- # Default to encryption, force-enable encryption in all portals the bridge creates
- # This will cause the bridge bot to be in private chats for the encryption to work properly.
- # It is recommended to also set private_chat_portal_meta to true when using this.
- default: false
- # Options for automatic key sharing.
- key_sharing:
- # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
- # You must use a client that supports requesting keys from other users to use this feature.
- allow: false
- # Require the requesting device to have a valid cross-signing signature?
- # This doesn't require that the bridge has verified the device, only that the user has verified it.
- # Not yet implemented.
- require_cross_signing: false
- # Require devices to be verified by the bridge?
- # Verification by the bridge is not yet implemented.
- require_verification: true
- # Settings for provisioning API
- provisioning:
- # Prefix for the provisioning API paths.
- prefix: /_matrix/provision
- # Shared secret for authentication. If set to "generate", a random secret will be generated,
- # or if set to "disable", the provisioning API will be disabled.
- shared_secret: generate
- # Permissions for using the bridge.
- # Permitted values:
- # relay - Talk through the relaybot (if enabled), no access otherwise
- # user - Access to use the bridge to chat with a Discord account.
- # admin - User level and some additional administration tools
- # Permitted keys:
- # * - All Matrix users
- # domain - All users on that homeserver
- # mxid - Specific user
- permissions:
- "*": relay
- "example.com": user
- "@admin:example.com": admin
- logging:
- directory: ./logs
- file_name_format: '{{.Date}}-{{.Index}}.log'
- file_date_format: "2006-01-02"
- file_mode: 384
- timestamp_format: Jan _2, 2006 15:04:05
- print_level: debug
- print_json: false
- file_json: false
|