Update userMentionRE to play nice with punctuation.
This commit is contained in:
parent
bab3681ac2
commit
6474ad4ee2
@ -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+>`)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user