Fix bug related to www
This commit is contained in:
parent
4088af1ba7
commit
c64d3ca748
@ -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