Oh forgot this thing
This commit is contained in:
parent
a565a604e8
commit
a4b11d0b75
1 changed files with 11 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue