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,15 +99,21 @@ func initmods() {
} }
func dispatch(broker *tg.Broker, update tg.APIUpdate) { func dispatch(broker *tg.Broker, update tg.APIUpdate) {
if update.Inline != nil {
for _, mod := range mods { for _, mod := range mods {
if mod.OnInline != nil { if mod.OnInline != nil {
go mod.OnInline(broker, *update.Inline) go mod.OnInline(broker, *update.Inline)
} }
}
}
if update.Message != nil {
for _, mod := range mods {
if mod.OnMessage != nil { if mod.OnMessage != nil {
go mod.OnMessage(broker, *update.Message) go mod.OnMessage(broker, *update.Message)
} }
} }
} }
}
func isCommand(update tg.APIMessage, cmdname string) bool { func isCommand(update tg.APIMessage, cmdname string) bool {
if update.Text == nil { if update.Text == nil {