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:
- table|false true on success, or false on failure
- 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:
- table|false the list of update objects, or false on failure
- string|table the HTTP status or error details
- api.get_webhook_info()
-
get current webhook status and configuration.
Returns:
- table|false the webhook info object, or false on failure
- 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:
- table|false true on success, or false on failure
- string|table the HTTP status or error details