Fixed Twitter URL replace

This commit is contained in:
Logan G 2023-11-15 19:25:37 -07:00
parent a526c21484
commit 5699b40313
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -52,7 +52,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
}
}
response.Content = response.Content + fmt.Sprintf("\n<%s>", regexp.MustCompile("http.*twitter.com").ReplaceAllString(url, "https://nitter.privacydev.net"))
response.Content = response.Content + fmt.Sprintf("\n<%s>", regexp.MustCompile("(http.*twitter.com)|(http.*x.com)").ReplaceAllString(url, "https://nitter.privacydev.net"))
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
if err != nil {