module Tourmaline::Client::StickerMethods

Included Modules

Direct including types

Defined in:

Constant Summary

Log = ::Log.for("tourmaline.client.sticker_methods")

Instance Method Summary

Instance Method Detail

def add_sticker_to_set(user_id, name, emojis, png_sticker = nil, tgs_sticker = nil, mask_position = nil) #

Use this method to add a new sticker to a set created by the bot. Returns true on success.


def create_new_sticker_set(user_id, name, title, emojis, png_sticker = nil, tgs_sticker = nil, contains_masks = nil, mask_position = nil) #

Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. You must use exactly one of the fields png_sticker or tgs_sticker. Returns true on success.


def delete_chat_sticker_set(chat_id) #

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in #get_chat requests to check if the bot can use this method. Returns true on success.


def delete_sticker_from_set(sticker) #

Use this method to delete a sticker from a set created by the bot. Returns true on success.


def get_sticker_set(name : String) #

Use this method to get a sticker set. On success, a StickerSet object is returned.


def send_sticker(chat_id : Int32 | String, sticker : InputFile | String, disable_notification : Bool? = nil, reply_to_message_id : Int32? = nil, reply_markup = nil) #

Use this method to send .webp stickers. On success, the sent Message is returned.

See: https://core.telegram.org/bots/api#stickers for more info.


def set_chat_sticker_set(chat_id, sticker_set_name) #

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in #get_chat requests to check if the bot can use this method. Returns true on success.


def set_sticker_position_in_set(sticker, position) #

Use this method to move a sticker in a set created by the bot to a specific position. Returns true on success.


def set_sticker_set_thumb(name, user, thumb = nil) #

Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns true on success.


def upload_sticker_file(user_id, png_sticker) #

Use this method to upload a .png file with a sticker for later use in #create_new_sticker_set and #add_sticker_to_set methods (can be used multiple times). Returns the uploaded TFile on success.