Refactor matterbridge.toml.sample discord section

This commit is contained in:
Qais Patankar 2020-03-06 18:59:04 +00:00 committed by Wim
parent 3f06a40bd5
commit 20783c0978

View File

@ -703,120 +703,125 @@ ShowUserTyping=false
################################################################### ###################################################################
[discord] [discord]
#You can configure multiple servers "[discord.name]" or "[discord.name2]" # You can configure multiple servers "[discord.name]" or "[discord.name2]"
#In this example we use [discord.game] # In this example we use [discord.game]
#REQUIRED #REQUIRED
[discord.game] [discord.game]
#Token to connect with Discord API # Token (REQUIRED) is the token to connect with Discord API
#You can get your token by following the instructions on # You can get your token by following the instructions on
#https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token # https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
#If you want roles/groups mentions to be shown with names instead of ID, you'll need to give your bot the "Manage Roles" permission. # If you want roles/groups mentions to be shown with names instead of ID, you'll need to give your bot the "Manage Roles" permission.
#REQUIRED
Token="Yourtokenhere" Token="Yourtokenhere"
#REQUIRED # Server (REQUIRED) is the ID or name of the guild to connect to, selected from the guilds the bot has been invited to
Server="yourservername" Server="yourservername"
## RELOADABLE SETTINGS ## RELOADABLE SETTINGS
## Settings below can be reloaded by editing the file ## All settings below can be reloaded by editing the file.
## They are also all optional.
#Shows title, description and URL of embedded messages (sent by other bots) # ShowEmbeds shows the title, description and URL of embedded messages (sent by other bots)
#OPTIONAL (default false)
ShowEmbeds=false ShowEmbeds=false
#Show Discord avatars of remote users with matching names # UseLocalAvatar specifies source bridges for which an avatar should be 'guessed' when an incoming message has no avatar.
#This only works for webhooks & if the source message has no avatar # This works by comparing the username of the message to an existing Discord user, and using the avatar of the Discord user.
# #
#OPTIONAL (default empty) # This only works if WebhookURL is set (AND the message has no avatar).
UseLocalAvatar=["irc"] # Example: ["irc"]
UseLocalAvatar=[]
#Shows the username instead of the server nickname # UseUserName shows the username instead of the server nickname
#OPTIONAL (default false)
UseUserName=false UseUserName=false
#Show #xxxx discriminator with UseUserName # UseDiscriminator appends the `#xxxx` discriminator when used with UseUserName
#OPTIONAL (default false)
UseDiscriminator=false UseDiscriminator=false
#Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages. # WebhookURL, if specified, will send messages in the style of puppets.
#This only works if you have one discord channel, if you have multiple discord channels you'll have to specify it in the gateway config # This only works if you have one discord channel, if you have multiple discord channels you'll have to specify it in the gateway config
#OPTIONAL (default empty) # Example: "https://discordapp.com/api/webhooks/1234/abcd_xyzw"
WebhookURL="Yourwebhooktokenhere" WebhookURL=""
#Disable sending of edits to other bridges # EditDisable allows you to disable sending of edits to other bridges
#OPTIONAL (default false)
EditDisable=false EditDisable=false
#Message to be appended to every edited message # EditSuffix specifies the message to be appended to every edited message
#OPTIONAL (default empty) # Example: " (edited)"
EditSuffix=" (edited)" EditSuffix=""
#Nicks you want to ignore. # IgnoreNicks allows you to mute outgoing messages from certain users.
#Regular expressions supported # Messages from these users will not be transmitted to other bridges.
#Messages from those users will not be sent to other bridges. # Regular expressions are also supported.
#OPTIONAL # Example: "ircspammer1 ircspammer2"
IgnoreNicks="ircspammer1 ircspammer2" IgnoreNicks=""
#Messages you want to ignore. # IgnoreMessages allows you to mute outgoing messages of a certain format.
#Messages matching these regexp will be ignored and not sent to other bridges # Messages matching this regular expression will not be transmitted sent to other bridges
#See https://regex-golang.appspot.com/assets/html/index.html for more regex info # See https://regex-golang.appspot.com/assets/html/index.html for more regex info
#OPTIONAL (example below ignores messages starting with ~~ or messages containing badword #
IgnoreMessages="^~~ badword" # Example that ignores messages starting with ~~ or messages containing badword:
# IgnoreMessages="^~~ badword"
IgnoreMessages=""
#messages you want to replace. # ReplaceMessages replaces substrings of messages in outgoing messages.
#it replaces outgoing messages from the bridge. # Regular expressions are supported.
#so you need to place it by the sending bridge definition. #
#regular expressions supported # Example that replaces 'cat' => 'dog' and 'sleep' => 'awake':
#some examples: # ReplaceMessages=[ ["cat","dog"], ["sleep","awake"] ]
#this replaces cat => dog and sleep => awake # Example that replaces all digits with the letter 'X', so 'hello123' becomes 'helloXXX':
#replacemessages=[ ["cat","dog"], ["sleep","awake"] ] # ReplaceMessages=[ ["[0-9]","X"] ]
#this replaces every number with number. 123 => numbernumbernumber ReplaceMessages=[]
#replacemessages=[ ["[0-9]","number"] ]
#optional (default empty)
ReplaceMessages=[ ["cat","dog"] ]
#nicks you want to replace. # ReplaceNicks replaces substrings of usernames in outgoing messages.
#see replacemessages for syntaxa # See the ReplaceMessages setting for examples.
#optional (default empty) # Example: [ ["user--","user"] ]
ReplaceNicks=[ ["user--","user"] ] ReplaceNicks=[]
#Extractnicks is used to for example rewrite messages from other relaybots # ExtractNicks allows for interoperability with other bridge software by rewriting messages and extracting usernames.
#See https://github.com/42wim/matterbridge/issues/713 and https://github.com/42wim/matterbridge/issues/466 #
#some examples: # Recommended reading:
#this replaces a message like "Relaybot: <relayeduser> something interesting" to "relayeduser: something interesting" # - https://github.com/42wim/matterbridge/issues/466
#ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ] ] # - https://github.com/42wim/matterbridge/issues/713
#you can use multiple entries for multiplebots #
#this also replaces a message like "otherbot: (relayeduser) something else" to "relayeduser: something else" # This example translates the following message
#ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ],[ "otherbot","\\((.*?)\\)\\s+" ] # "Relaybot: <relayeduser> something interesting"
#OPTIONAL (default empty) # into this message
ExtractNicks=[ ["otherbot","<(.*?)>\\s+" ] ] # "relayeduser: something interesting"
# like so:
# ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ] ]
#
# This example translates the following message
# "otherbot: (relayeduser) something else"
# into this message
# "relayeduser: something else"
# like so:
# ExtractNicks=[ [ "otherbot","\\((.*?)\\)\\s+" ] ]
#
# This example combines both of the above examples into one:
# ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ],[ "otherbot","\\((.*?)\\)\\s+" ]
#
ExtractNicks=[]
#extra label that can be used in the RemoteNickFormat # Label can be used as an extra identifier for use in the RemoteNickFormat setting.
#optional (default empty)
Label="" Label=""
#RemoteNickFormat defines how remote users appear on this bridge # RemoteNickFormat specifies how remote users appear on this bridge.
#See [general] config section for default options # See the [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> " RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges # ShowJoinPart will emit messages that show joins/parts from other bridges
#Currently works for messages from the following bridges: irc, mattermost, slack, discord # Supported from the following bridges: irc, mattermost, slack, discord
#OPTIONAL (default false)
ShowJoinPart=false ShowJoinPart=false
#StripNick only allows alphanumerical nicks. See https://github.com/42wim/matterbridge/issues/285 # StripNick will strip non-alphanumeric characters from nicknames.
#It will strip other characters from the nick # Recommended reading: https://github.com/42wim/matterbridge/issues/285
#OPTIONAL (default false)
StripNick=false StripNick=false
#Enable to show topic/purpose changes from other bridges # ShowTopicChange will emit messages that show topic/purpose updates from other bridges
#Only works hiding/show topic changes from slack bridge for now # Supported from the following bridges: slack
#OPTIONAL (default false)
ShowTopicChange=false ShowTopicChange=false
#Enable to sync topic/purpose changes from other bridges # SyncTopic will sync topic/purpose updates from other bridges
#Only works syncing topic changes from slack bridge for now # Supported from the following bridges: slack
#OPTIONAL (default false)
SyncTopic=false SyncTopic=false
################################################################### ###################################################################