Fill event values with matched command stuff

This commit is contained in:
Tulir Asokan 2018-06-20 23:28:01 +03:00
parent 4536fcfe62
commit ad5e2ef72f
3 changed files with 75 additions and 9 deletions

View file

@ -104,6 +104,7 @@ func (client *Client) TriggerCommand(command *ParsedCommand, evt *maubot.Event)
log.Warnf("Command %s triggered by %s doesn't have any handlers.", command.Name, evt.Sender)
return maubot.Continue
}
log.Debugf("Command %s on client %s triggered by %s\n", command.Name, client.UserID, evt.Sender)
for _, handler := range handlers {
result := handler(evt)