mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 07:00:27 +00:00
Add UseUserName option (discord) (#234)
This commit is contained in:
parent
f2483af561
commit
67905089ba
@ -77,6 +77,7 @@ type Protocol struct {
|
||||
UseSASL bool // IRC
|
||||
UseTLS bool // IRC
|
||||
UseFirstName bool // telegram
|
||||
UseUserName bool // discord
|
||||
UseInsecureURL bool // telegram
|
||||
WebhookBindAddress string // mattermost, slack
|
||||
WebhookURL string // mattermost, slack
|
||||
|
@ -181,7 +181,12 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
|
||||
if b.UseChannelID {
|
||||
rmsg.Channel = "ID:" + m.ChannelID
|
||||
}
|
||||
rmsg.Username = b.getNick(m.Author)
|
||||
|
||||
if !b.Config.UseUserName {
|
||||
rmsg.Username = b.getNick(m.Author)
|
||||
} else {
|
||||
rmsg.Username = m.Author.Username
|
||||
}
|
||||
|
||||
if b.Config.ShowEmbeds && m.Message.Embeds != nil {
|
||||
for _, embed := range m.Message.Embeds {
|
||||
|
@ -443,6 +443,10 @@ Server="yourservername"
|
||||
#OPTIONAL (default false)
|
||||
ShowEmbeds=false
|
||||
|
||||
#Shows the username (minus the discriminator) instead of the server nickname
|
||||
#OPTIONAL (default false)
|
||||
UseUserName=false
|
||||
|
||||
#Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages.
|
||||
#OPTIONAL (default empty)
|
||||
WebhookURL="Yourwebhooktokenhere"
|
||||
|
Loading…
Reference in New Issue
Block a user