Module telegram-bot-lua.methods.stickers

stickers API methods.

Functions

api.add_sticker_to_set(user_id, name, sticker) add a new sticker to a set created by the bot.
api.create_new_sticker_set(user_id, name, title, stickers, opts) create a new sticker set owned by a user.
api.delete_sticker_from_set(sticker) delete a sticker from a set created by the bot.
api.delete_sticker_set(name) delete a sticker set that was created by the bot.
api.get_custom_emoji_stickers(custom_emoji_ids) get information about custom emoji stickers by their identifiers.
api.get_sticker_set(name) get a sticker set by name.
api.replace_sticker_in_set(user_id, name, old_sticker, sticker) replace an existing sticker in a sticker set with a new one.
api.send_sticker(chat_id, sticker, opts) send a static, animated, or video sticker.
api.set_custom_emoji_sticker_set_thumbnail(name, opts) set the thumbnail of a custom emoji sticker set.
api.set_sticker_emoji_list(sticker, emoji_list) change the list of emoji assigned to a regular or custom emoji sticker.
api.set_sticker_keywords(sticker, keywords) change search keywords assigned to a regular or custom emoji sticker.
api.set_sticker_mask_position(sticker, mask_position) change the mask position of a mask sticker.
api.set_sticker_position_in_set(sticker, position) move a sticker in a set created by the bot to a specific position.
api.set_sticker_set_thumbnail(name, user_id, opts) set the thumbnail of a regular or mask sticker set.
api.set_sticker_set_title(name, title) set the title of a created sticker set.
api.upload_sticker_file(user_id, sticker, sticker_format) upload a sticker file for later use in sticker sets.


Functions

api.add_sticker_to_set(user_id, name, sticker)
add a new sticker to a set created by the bot.

Parameters:

  • user_id number unique identifier of the sticker set owner
  • name string sticker set name
  • sticker table|string a JSON-serialized object with information about the sticker

Returns:

    table,number the response object and HTTP status
api.create_new_sticker_set(user_id, name, title, stickers, opts)
create a new sticker set owned by a user.

Parameters:

  • user_id number unique identifier of the created sticker set owner
  • name string short name of the sticker set
  • title string sticker set title (1-64 characters)
  • stickers table|string a JSON-serialized list of stickers to be added to the set
  • opts table optional parameters
    • sticker_type string type of stickers in the set
    • needs_repainting boolean pass true if stickers need repainting to match emoji colour

Returns:

    table,number the response object and HTTP status
api.delete_sticker_from_set(sticker)
delete a sticker from a set created by the bot.

Parameters:

  • sticker string file identifier of the sticker

Returns:

    table,number the response object and HTTP status
api.delete_sticker_set(name)
delete a sticker set that was created by the bot.

Parameters:

  • name string sticker set name

Returns:

    table,number the response object and HTTP status
api.get_custom_emoji_stickers(custom_emoji_ids)
get information about custom emoji stickers by their identifiers.

Parameters:

  • custom_emoji_ids table|string a JSON-serialized list of custom emoji identifiers

Returns:

    table,number the response object and HTTP status
api.get_sticker_set(name)
get a sticker set by name.

Parameters:

  • name string name of the sticker set

Returns:

    table,number the response object and HTTP status
api.replace_sticker_in_set(user_id, name, old_sticker, sticker)
replace an existing sticker in a sticker set with a new one.

Parameters:

  • user_id number unique identifier of the sticker set owner
  • name string sticker set name
  • old_sticker string file identifier of the sticker to be replaced
  • sticker table|string a JSON-serialized object with information about the new sticker

Returns:

    table,number the response object and HTTP status
api.send_sticker(chat_id, sticker, opts)
send a static, animated, or video sticker.

Parameters:

  • chat_id number|string unique identifier for the target chat or username of the target channel
  • sticker string sticker to send (file_id, HTTP URL, or file upload)
  • opts table optional parameters
    • message_thread_id number unique identifier for the target message thread
    • emoji string emoji associated with the sticker
    • disable_notification boolean sends the message silently
    • reply_parameters table|string description of the message to reply to
    • reply_markup table|string additional interface options

Returns:

    table,number the response object and HTTP status
api.set_custom_emoji_sticker_set_thumbnail(name, opts)
set the thumbnail of a custom emoji sticker set.

Parameters:

  • name string sticker set name
  • opts table optional parameters
    • custom_emoji_id string custom emoji identifier of a sticker from the set to use as the thumbnail

Returns:

    table,number the response object and HTTP status
api.set_sticker_emoji_list(sticker, emoji_list)
change the list of emoji assigned to a regular or custom emoji sticker.

Parameters:

  • sticker string file identifier of the sticker
  • emoji_list table|string a JSON-serialized list of 1-20 emoji associated with the sticker

Returns:

    table,number the response object and HTTP status
api.set_sticker_keywords(sticker, keywords)
change search keywords assigned to a regular or custom emoji sticker.

Parameters:

  • sticker string file identifier of the sticker
  • keywords table|string a JSON-serialized list of 0-20 search keywords

Returns:

    table,number the response object and HTTP status
api.set_sticker_mask_position(sticker, mask_position)
change the mask position of a mask sticker.

Parameters:

  • sticker string file identifier of the sticker
  • mask_position table|string a JSON-serialized object with the position where the mask should be placed

Returns:

    table,number the response object and HTTP status
api.set_sticker_position_in_set(sticker, position)
move a sticker in a set created by the bot to a specific position.

Parameters:

  • sticker string file identifier of the sticker
  • position number new sticker position in the set (zero-based)

Returns:

    table,number the response object and HTTP status
api.set_sticker_set_thumbnail(name, user_id, opts)
set the thumbnail of a regular or mask sticker set.

Parameters:

  • name string sticker set name
  • user_id number unique identifier of the sticker set owner
  • opts table optional parameters
    • thumbnail string thumbnail file (file upload)
    • format string format of the thumbnail

Returns:

    table,number the response object and HTTP status
api.set_sticker_set_title(name, title)
set the title of a created sticker set. truncated to 64 characters.

Parameters:

  • name string sticker set name
  • title string sticker set title (max 64 characters)

Returns:

    table,number the response object and HTTP status
api.upload_sticker_file(user_id, sticker, sticker_format)
upload a sticker file for later use in sticker sets.

Parameters:

  • user_id number unique identifier of the sticker file owner
  • sticker string the sticker file to upload
  • sticker_format string format of the sticker (static, animated, video)

Returns:

    table,number the response object and HTTP status
generated by LDoc 1.5.0 Last updated 2026-04-07 21:37:15