DIE, PRINTF. DIE!

This commit is contained in:
LEGOlord208 2017-05-04 20:23:17 +02:00
parent 853853d59f
commit 27db9ad6df

View file

@ -10,7 +10,6 @@
package discordgo package discordgo
import ( import (
"fmt"
"io" "io"
"regexp" "regexp"
) )
@ -174,7 +173,7 @@ func (m *Message) ContentWithMentionsReplaced() string {
} }
content := m.Content content := m.Content
for _, user := range m.Mentions { for _, user := range m.Mentions {
content = regexp.MustCompile(fmt.Sprintf("<@!?(%s)>", user.ID)).ReplaceAllString(content, "@"+user.Username) content = regexp.MustCompile("<@!?("+regexp.QuoteMeta(user.ID)+")>").ReplaceAllString(content, "@"+user.Username)
} }
return content return content
} }