From c6e5779f22b18b971f82ddd2c5de81015ac9740c Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 26 Jul 2017 21:39:49 -0400 Subject: move messagectx to its own file --- util.go | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'util.go') diff --git a/util.go b/util.go index ae4ca2c..105b5bb 100644 --- a/util.go +++ b/util.go @@ -7,11 +7,19 @@ import ( "github.com/op/go-logging" ) -func handle(err error) { - if err != nil { - log.Fatal(err) - } -} +const help = `wew lad. you should know these commands already. + +Usage: ` + "`!thulani [command]`" + ` + +commands: +**help**:\t\t\t\tprint this help message +**[url]**:\t\t\t a url with media that thulani can play. queued up to play after everything that's already waiting. +**list, queue**:\tlist items in the queue, as well as the currently-playing item. +**pause**:\t\t\tpause sound. +**resume**:\t\t resume sound. +**die**:\t\t\t\t empty the queue and stop playing. +**skip**:\t\t\t skip the current item. +` var log = logging.MustGetLogger("thulani") @@ -25,6 +33,12 @@ type Config struct { Token string `json:"token"` } +func handle(err error) { + if err != nil { + log.Fatal(err) + } +} + func LoadConfig(filename string) (*Config, error) { file, err := os.Open("config.json") if err != nil { -- cgit v1.3.1