From 67905089ba1609e52984b5bb9c7e0bf27c2cbbb9 Mon Sep 17 00:00:00 2001 From: anon724 <30612019+anon724@users.noreply.github.com> Date: Tue, 1 Aug 2017 09:18:55 -0700 Subject: Add UseUserName option (discord) (#234) --- bridge/discord/discord.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bridge/discord') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 926aa807..4b325653 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -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 { -- cgit v1.2.3