Compare commits
2 commits
57c0c15c82
...
0356a5c0c7
Author | SHA1 | Date | |
---|---|---|---|
0356a5c0c7 | |||
a6384e362e |
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
||||||
respond := false
|
respond := false
|
||||||
|
|
||||||
for _, url := range urls {
|
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/.*)|(http.*x.com/.*/status)", url); output {
|
||||||
log.Println("Cringe twitter post detected.")
|
log.Println("Cringe twitter post detected.")
|
||||||
|
|
||||||
if shortned, _ := regexp.MatchString("http.*t.co/.*", url); shortned {
|
if shortned, _ := regexp.MatchString("http.*t.co/.*", url); shortned {
|
||||||
|
@ -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)|(http.*x.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.poast.org"))
|
||||||
|
|
||||||
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
|
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue