Files
miti99bot/internal/modules
tiennm99 25b952a9b7 feat(modules): recover panics in command and callback dispatch
The bot runs with WithNotAsyncHandlers and a single worker, so handlers
execute inline on the polling goroutine. A panic in any handler therefore
killed the process and took every user's bot down with it.

Wrap the command closure, the callback closure and the detached command
hook in a recover barrier. The callback path also answers the pending
query so the client stops spinning rather than waiting out its timeout.

The barrier is a backstop, not a licence to skip nil checks: handlers
still guard their own inputs.
2026-08-25 15:54:01 +07:00
..