Browse Source

handleListCommand updated

master
David Haukeness 5 years ago
parent
commit
1806f87e40
  1. 4
      commands.go
  2. 2
      handlers.go

4
commands.go

@ -126,7 +126,9 @@ func (b *bot) handleSetCommand(m chat1.MsgSummary) { @@ -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
}

2
handlers.go

@ -53,7 +53,7 @@ func (b *bot) chatHandler(m chat1.MsgSummary) { @@ -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":

Loading…
Cancel
Save