aboutsummaryrefslogtreecommitdiff
path: root/thulani.go
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2017-07-28 20:04:57 -0400
committerNathan Perry <avaglir@gmail.com>2017-07-28 20:04:57 -0400
commitf48248693839d803490ef92fc5ba89e25024ab96 (patch)
tree22832fc596bfabad7f3455af1e67d98e9c49a709 /thulani.go
parent89e5b420e23eb76393c275be43c082e5410e7f4c (diff)
grab json from youtube-dl
Diffstat (limited to 'thulani.go')
-rw-r--r--thulani.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/thulani.go b/thulani.go
index 8ac167c..3e99c74 100644
--- a/thulani.go
+++ b/thulani.go
@@ -10,9 +10,10 @@ import (
"time"
+ "math/rand"
+
"github.com/bwmarrin/discordgo"
"github.com/mammothbane/thulani-go/downloader"
- "math/rand"
)
var config *Config
@@ -113,7 +114,7 @@ func onMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
ch, err := downloader.Download("https://www.youtube.com/watch?v=_K13GJkGvDw", time.Duration(rand.Intn(10*60))*time.Second, 5*time.Second)
if err != nil {
- log.Errorf("unable to download video")
+ log.Errorf("unable to download video: %q", err)
break
}