mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 21:50:28 +00:00
parent
79f764c7a8
commit
9e3bd7398c
@ -90,12 +90,12 @@ func (b *Bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
|
|||||||
// set channel name
|
// set channel name
|
||||||
rmsg.Channel = b.getChannelName(m.ChannelID)
|
rmsg.Channel = b.getChannelName(m.ChannelID)
|
||||||
|
|
||||||
// set username
|
fromWebhook := m.WebhookID != ""
|
||||||
if !b.GetBool("UseUserName") {
|
if !fromWebhook && !b.GetBool("UseUserName") {
|
||||||
rmsg.Username = b.getNick(m.Author, m.GuildID)
|
rmsg.Username = b.getNick(m.Author, m.GuildID)
|
||||||
} else {
|
} else {
|
||||||
rmsg.Username = m.Author.Username
|
rmsg.Username = m.Author.Username
|
||||||
if b.GetBool("UseDiscriminator") {
|
if !fromWebhook && b.GetBool("UseDiscriminator") {
|
||||||
rmsg.Username += "#" + m.Author.Discriminator
|
rmsg.Username += "#" + m.Author.Discriminator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user