Fix bug related to www
Some checks are pending
CI / build (push) Waiting to run

This commit is contained in:
Dustin Pianalto 2020-11-14 01:24:28 -09:00
parent 7e39589e09
commit d3388aadc7

View File

@ -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 {