mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 18:32:50 +08:00
26 lines
425 B
Go
26 lines
425 B
Go
package controller
|
|
|
|
import (
|
|
"AynaLivePlayer/liveclient"
|
|
"strings"
|
|
)
|
|
|
|
var CommandDiange = &Diange{}
|
|
|
|
type Diange struct {
|
|
}
|
|
|
|
func (d Diange) Match(command string) bool {
|
|
for _, c := range []string{"点歌"} {
|
|
if command == c {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (d Diange) Execute(command string, args []string, danmu *liveclient.DanmuMessage) {
|
|
keyword := strings.Join(args, " ")
|
|
Add(keyword, &danmu.User)
|
|
}
|