blob: 428e87af235a7ae0fc9ebdc43f36aab5cf582dbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package thulani
import "github.com/mammothbane/thulani-go/downloader"
var cmdMap = map[string]func(*messageCtx){
"help": printHelp,
"skip": skip,
"pause": pause,
"resume": resume,
"sudoku": stop,
"die": stop,
"list": list,
"queue": list,
}
func printHelp(c *messageCtx) {
c.sendMessage(help, c.Tts)
}
func skip(_ *messageCtx) {
manager.PlayState <- downloader.Play
}
func resume(_ *messageCtx) {
manager.PlayState <- downloader.Play
}
func pause(_ *messageCtx) {
manager.PlayState <- downloader.Pause
}
func stop(_ *messageCtx) {
manager.PlayState <- downloader.Clear
}
func list(_ *messageCtx) {
log.Error("list not implemented")
}
|