+5
-5
@@ -31,7 +31,7 @@ func (bot *Bot[T]) handleUpdate(u *tgapi.Update, ctx *MessageContext) bool {
|
||||
FromID: pluginCtx.FromID,
|
||||
ChatID: pluginCtx.ChatID,
|
||||
})
|
||||
err := handler(pluginCtx, bot.appData)
|
||||
err := callCommandExecutor(handler, pluginCtx, bot.appData)
|
||||
endEvent := HandlerFinishedEvent{
|
||||
UpdateID: u.UpdateID,
|
||||
UpdateType: u.Type,
|
||||
@@ -201,10 +201,10 @@ func (bot *Bot[T]) prepareUpdateCtx(u *tgapi.Update, ctx *MessageContext) {
|
||||
}
|
||||
case tgapi.UpdateTypePollAnswer:
|
||||
if u.PollAnswer != nil {
|
||||
if u.PollAnswer.User.ID != 0 {
|
||||
from = &u.PollAnswer.User
|
||||
} else if u.PollAnswer.VoterChat.ID != 0 {
|
||||
chat = &u.PollAnswer.VoterChat
|
||||
if voter, ok := u.PollAnswer.VoterUser(); ok {
|
||||
from = voter
|
||||
} else if voterChat, ok := u.PollAnswer.VoterChatInfo(); ok {
|
||||
chat = voterChat
|
||||
}
|
||||
}
|
||||
case tgapi.UpdateTypeMessageReaction:
|
||||
|
||||
Reference in New Issue
Block a user