Check to see if it's actually a Twitter post

This commit is contained in:
Logan G 2022-07-01 02:16:08 -06:00
parent 068ef6a00e
commit 539a948b5f
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -150,8 +150,8 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
respond := false
for _, url := range urls {
if output, _ := regexp.MatchString("http.*twitter", url); output {
log.Println("Cringe twitter detected.")
if output, _ := regexp.MatchString("http.*twitter.com/.*/status", url); output {
log.Println("Cringe twitter post detected.")
goutubedl.Path = "yt-dlp"
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})