Oh forgot this thing

This commit is contained in:
Hamcha 2018-11-02 15:20:10 +01:00
parent a565a604e8
commit a4b11d0b75
Signed by: hamcha
GPG key ID: A40413D21021EAEE

View file

@ -99,14 +99,20 @@ func initmods() {
}
func dispatch(broker *tg.Broker, update tg.APIUpdate) {
if update.Inline != nil {
for _, mod := range mods {
if mod.OnInline != nil {
go mod.OnInline(broker, *update.Inline)
}
}
}
if update.Message != nil {
for _, mod := range mods {
if mod.OnMessage != nil {
go mod.OnMessage(broker, *update.Message)
}
}
}
}
func isCommand(update tg.APIMessage, cmdname string) bool {