onUpdate method

void onUpdate(
  1. Future callback(
    1. Bot,
    2. Update
    )
)

Adds a new update handler which is executed on each update
If an handler throws an error, errorHandler is called and the next handler/update is elaborated

Implementation

void onUpdate(Future Function(Bot, Update) callback) {
  _updateCallbacks.add(callback);
}