handleListCommand updated

This commit is contained in:
2020-03-31 16:57:00 +00:00
parent 150e0b63ab
commit 1806f87e40
2 changed files with 4 additions and 2 deletions

View File

@ -126,7 +126,9 @@ func (b *bot) handleSetCommand(m chat1.MsgSummary) {
}
}
func (b *bot) listKValue(convid chat1.ConvIDStr, msgID chat1.MessageID, args []string) {
func (b *bot) handleListCommand(m chat1.MsgSummary) {
// first normalize the text and extract the arguments
args := strings.Fields(strings.ToLower(m.Content.Text.Body))
if args[0] != "list" {
return
}

View File

@ -53,7 +53,7 @@ func (b *bot) chatHandler(m chat1.MsgSummary) {
case "set":
b.handleSetCommand(m)
case "list":
b.listKValue(m.ConvID, m.Id, args)
b.handleListCommand(m)
}
}
case "jitsi":