Added YT shorts support

This commit is contained in:
Logan G 2022-07-17 21:09:23 -06:00
parent 0358e17a5a
commit 24622e7b38
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -210,7 +210,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
}
respond = true
} else if output, _ := regexp.MatchString("(http.*youtube.com/watch.*?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/.*", url); shortned {