Module telegram-bot-lua.methods.gifts

gifts API methods.

Functions

api.get_available_gifts() get the list of gifts that can be sent by the bot.
api.get_user_gifts(user_id) get the list of gifts received by a user.
api.send_gift(user_id, gift_id, opts) send a gift to a user.


Functions

api.get_available_gifts()
get the list of gifts that can be sent by the bot.

Returns:

  1. table|false the available gifts object, or false on failure
  2. string|table the HTTP status or error details
api.get_user_gifts(user_id)
get the list of gifts received by a user.

Parameters:

  • user_id number unique identifier of the target user

Returns:

  1. table|false the user gifts object, or false on failure
  2. string|table the HTTP status or error details
api.send_gift(user_id, gift_id, opts)
send a gift to a user.

Parameters:

  • user_id number unique identifier of the target user
  • gift_id string identifier of the gift to send
  • opts table optional parameters (text, textparsemode, payforupgrade)

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