mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 02:02:00 -08:00
Allow sending discriminator with Discord username (#726)
This commit is contained in:
parent
95e78ffa05
commit
a7dd033c3b
@ -136,6 +136,7 @@ type Protocol struct {
|
||||
UseAPI bool // mattermost, slack
|
||||
UseSASL bool // IRC
|
||||
UseTLS bool // IRC
|
||||
UseDiscriminator bool // discord
|
||||
UseFirstName bool // telegram
|
||||
UseUserName bool // discord
|
||||
UseInsecureURL bool // telegram
|
||||
|
@ -71,6 +71,9 @@ func (b *Bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
|
||||
rmsg.Username = b.getNick(m.Author)
|
||||
} else {
|
||||
rmsg.Username = m.Author.Username
|
||||
if b.GetBool("UseDiscriminator") {
|
||||
rmsg.Username += "#" + m.Author.Discriminator
|
||||
}
|
||||
}
|
||||
|
||||
// if we have embedded content add it to text
|
||||
|
@ -710,10 +710,14 @@ Server="yourservername"
|
||||
#OPTIONAL (default false)
|
||||
ShowEmbeds=false
|
||||
|
||||
#Shows the username (minus the discriminator) instead of the server nickname
|
||||
#Shows the username instead of the server nickname
|
||||
#OPTIONAL (default false)
|
||||
UseUserName=false
|
||||
|
||||
#Show #xxxx discriminator with UseUserName
|
||||
#OPTIONAL (default false)
|
||||
UseDiscriminator=false
|
||||
|
||||
#Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages.
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user