Fixed the no response thing better
This commit is contained in:
parent
6568813ce3
commit
cb2495cc12
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
|
||||||
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
|
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If it's complaining due to a lack of videos, don't care.
|
// If it's complaining due to a lack of videos, don't care.
|
||||||
if noVideo, _ := regexp.MatchString(".*There's no video in this tweet.*", err.Error()); noVideo {
|
if noVideo, _ := regexp.MatchString(".*No video could be found in this tweet*", err.Error()); noVideo {
|
||||||
respond = true
|
respond = true
|
||||||
} else {
|
} else {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
|
Loading…
Reference in a new issue