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

This commit is contained in:
Nicholas DiGirolamo 2025-02-27 16:23:29 -05:00
parent bab3681ac2
commit 6474ad4ee2

View File

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