DIE, PRINTF. DIE!
This commit is contained in:
parent
853853d59f
commit
27db9ad6df
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue