Skip to content

module Tourmaline::Client::StickerMethods #

Direct including types

Tourmaline::Client

Methods#

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

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

View source

#create_new_sticker_set(user_id, name, title, emojis, png_sticker = nil, tgs_sticker = nil, webm_sticker = nil, sticker_type = 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.

View source

#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.

View source

#delete_sticker_from_set(sticker) #

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

View source

#get_custom_emoji_stickers(custom_emoji_ids : Array(String)) #

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

View source

#get_sticker_set(name : String) #

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

View source

#send_sticker(chat, sticker, message_thread_id = nil, disable_notification = nil, reply_to_message = 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.

View source

#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.

View source

#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.

View source

#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.

View source

#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.

View source