Added new weird youtube.com URL
This commit is contained in:
parent
58ff7e8edf
commit
a526c21484
1 changed files with 2 additions and 2 deletions
|
@ -89,10 +89,10 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
||||||
}
|
}
|
||||||
|
|
||||||
respond = true
|
respond = true
|
||||||
} else if output, _ := regexp.MatchString("(http.*youtube.com/watch.*?v=.*)|(http.*youtube.com/shorts/.*)|(http.*youtu.be/.*)", url); output {
|
} else if output, _ := regexp.MatchString("(http.*youtube.com/watch.*?v=.*)|(http.*youtube.com/shorts/.*)|(http.*youtube.com/v/.*)|(http.*youtu.be/.*)", url); output {
|
||||||
log.Println("YouTube detected.")
|
log.Println("YouTube detected.")
|
||||||
|
|
||||||
if shortned, _ := regexp.MatchString("http.*youtu\\.be/.*", url); shortned {
|
if shortned, _ := regexp.MatchString("(http.*youtu\\.be/.*)|(http.*youtube.com/v/.*)", url); shortned {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
log.Println("Short URL detected. Getting long version.")
|
log.Println("Short URL detected. Getting long version.")
|
||||||
|
|
Loading…
Reference in a new issue