Compare commits
No commits in common. "a526c214840feb411d8a3facb35fda9f25cdfdbf" and "62df01c89872a9c8ba281d41ed2e248900438224" have entirely different histories.
a526c21484
...
62df01c898
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
|||
respond := false
|
||||
|
||||
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/.*)", url); output {
|
||||
log.Println("Cringe twitter post detected.")
|
||||
|
||||
if shortned, _ := regexp.MatchString("http.*t.co/.*", url); shortned {
|
||||
|
@ -89,10 +89,10 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
|||
}
|
||||
|
||||
respond = true
|
||||
} else if output, _ := regexp.MatchString("(http.*youtube.com/watch.*?v=.*)|(http.*youtube.com/shorts/.*)|(http.*youtube.com/v/.*)|(http.*youtu.be/.*)", url); output {
|
||||
} else if output, _ := regexp.MatchString("(http.*youtube.com/watch.*?v=.*)|(http.*youtube.com/shorts/.*)|(http.*youtu.be/.*)", url); output {
|
||||
log.Println("YouTube detected.")
|
||||
|
||||
if shortned, _ := regexp.MatchString("(http.*youtu\\.be/.*)|(http.*youtube.com/v/.*)", url); shortned {
|
||||
if shortned, _ := regexp.MatchString("http.*youtu\\.be/.*", url); shortned {
|
||||
var err error
|
||||
|
||||
log.Println("Short URL detected. Getting long version.")
|
||||
|
|
Loading…
Reference in a new issue