This commit is contained in:
parent
7e39589e09
commit
d3388aadc7
@ -18,7 +18,7 @@ func OnMessage(s *discordgo.Session, message *discordgo.MessageCreate) {
|
||||
return
|
||||
}
|
||||
content := message.Content
|
||||
amazonRegexString := `(http|https):\/\/((?:[\w-_\.]+)amazon(?:\.[\w\-_]+)+)([\w\/\-\.,@?^=%&~\+#]*[\w\-\@?^=%&/~\+#])?`
|
||||
amazonRegexString := `(http|https):\/\/((?:[\w-_\.]*)amazon(?:\.[\w\-_]+)+)([\w\/\-\.,@?^=%&~\+#]*[\w\-\@?^=%&/~\+#])?`
|
||||
amazonRegex := regexp.MustCompile(amazonRegexString)
|
||||
urls := amazonRegex.FindAllString(message.Content, -1)
|
||||
if len(urls) == 0 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user