Module telegram-bot-lua.methods.updates

updates API methods.

Functions

api.delete_webhook(opts) remove the current webhook integration.
api.get_updates(opts) receive incoming updates using long polling.
api.get_webhook_info() get current webhook status and configuration.
api.set_webhook(url, opts) set a webhook URL to receive incoming updates.


Functions

api.delete_webhook(opts)
remove the current webhook integration.

Parameters:

  • opts table optional parameters (droppendingupdates)

Returns:

  1. table|false true on success, or false on failure
  2. string|table the HTTP status or error details
api.get_updates(opts)
receive incoming updates using long polling.

Parameters:

  • opts table optional parameters (timeout, offset, limit, allowedupdates, usebeta_endpoint)

Returns:

  1. table|false the list of update objects, or false on failure
  2. string|table the HTTP status or error details
api.get_webhook_info()
get current webhook status and configuration.

Returns:

  1. table|false the webhook info object, or false on failure
  2. string|table the HTTP status or error details
api.set_webhook(url, opts)
set a webhook URL to receive incoming updates.

Parameters:

  • url string the HTTPS URL to send updates to
  • opts table optional parameters (certificate, ipaddress, maxconnections, allowedupdates, droppendingupdates, secrettoken)

Returns:

  1. table|false true on success, or false on failure
  2. string|table the HTTP status or error details
generated by LDoc 1.5.0 Last updated 2026-04-07 21:37:15