diff options
| author | Nathan Perry <avaglir@gmail.com> | 2017-07-26 21:39:49 -0400 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2017-07-26 21:39:49 -0400 |
| commit | c6e5779f22b18b971f82ddd2c5de81015ac9740c (patch) | |
| tree | a12c969a04d0515a70c50ec44343fac98b8404c5 /util.go | |
| parent | f3224ee0eb4d5def781f5e77121a405df054bfba (diff) | |
move messagectx to its own file
Diffstat (limited to 'util.go')
| -rw-r--r-- | util.go | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -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 { |
