handleListCommand updated
This commit is contained in:
@ -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" {
|
if args[0] != "list" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ func (b *bot) chatHandler(m chat1.MsgSummary) {
|
|||||||
case "set":
|
case "set":
|
||||||
b.handleSetCommand(m)
|
b.handleSetCommand(m)
|
||||||
case "list":
|
case "list":
|
||||||
b.listKValue(m.ConvID, m.Id, args)
|
b.handleListCommand(m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "jitsi":
|
case "jitsi":
|
||||||
|
|||||||
Reference in New Issue
Block a user