Fixed false regex matches for Twitter
This commit is contained in:
parent
57c0c15c82
commit
a6384e362e
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
||||||
respond := false
|
respond := false
|
||||||
|
|
||||||
for _, url := range urls {
|
for _, url := range urls {
|
||||||
if output, _ := regexp.MatchString("(http.*twitter.com/.*/status)|(http.*t.co/.*)|(http.*x.com/.*)", url); output {
|
if output, _ := regexp.MatchString("(http.*twitter.com/.*/status)|(http.*t.co/.*)|(http.*x.com/.*/status)", url); output {
|
||||||
log.Println("Cringe twitter post detected.")
|
log.Println("Cringe twitter post detected.")
|
||||||
|
|
||||||
if shortned, _ := regexp.MatchString("http.*t.co/.*", url); shortned {
|
if shortned, _ := regexp.MatchString("http.*t.co/.*", url); shortned {
|
||||||
|
|
Loading…
Reference in a new issue