Compare commits

...

1 Commits

Author SHA1 Message Date
Nicholas DiGirolamo
6474ad4ee2 Update userMentionRE to play nice with punctuation.
Some checks failed
Development / golangci-lint (pull_request) Has been cancelled
Development / test-build-upload (1.22.x, ubuntu-latest) (pull_request) Has been cancelled
2025-02-27 16:23:29 -05:00

View File

@ -160,7 +160,7 @@ func (b *Bdiscord) getCategoryChannelName(name, parentID string) string {
var (
// See https://discordapp.com/developers/docs/reference#message-formatting.
channelMentionRE = regexp.MustCompile("<#[0-9]+>")
userMentionRE = regexp.MustCompile("@[^@\n]{1,32}")
userMentionRE = regexp.MustCompile("\(*@[^@\n]{1,32}(\,|\:|;\))*")
emoteRE = regexp.MustCompile(`<a?(:\w+:)\d+>`)
)