aboutsummaryrefslogtreecommitdiff
path: root/thulani.go
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2017-07-28 19:40:56 -0400
committerNathan Perry <avaglir@gmail.com>2017-07-28 19:40:56 -0400
commit89e5b420e23eb76393c275be43c082e5410e7f4c (patch)
treebe020488c4df1847ca6b87f44fc83ddb71169edd /thulani.go
parent381ee40964b21f8a8c4cb9c3f84bd2ddc3290e5c (diff)
basic playback working
Diffstat (limited to 'thulani.go')
-rw-r--r--thulani.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/thulani.go b/thulani.go
index 1efc67f..8ac167c 100644
--- a/thulani.go
+++ b/thulani.go
@@ -12,6 +12,7 @@ import (
"github.com/bwmarrin/discordgo"
"github.com/mammothbane/thulani-go/downloader"
+ "math/rand"
)
var config *Config
@@ -110,7 +111,7 @@ func onMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
break
}
- ch, err := downloader.Download("https://www.youtube.com/watch?v=_K13GJkGvDw", 10*time.Second, 10*time.Second)
+ 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")
break