Builder for sticker payloads.
This module provides a fluent API for sending stickers from Telegram file IDs, URLs, or local file paths.
Examples
# Send sticker by file ID
ctx
|> Sticker.id("CAACAgIAAxkBA...")
|> Sticker.send(chat_id)
# Send sticker from URL
ctx
|> Sticker.url("https://example.com/sticker.webp")
|> Sticker.send(chat_id)
# Send sticker from local file
ctx
|> Sticker.path("/tmp/sticker.webp")
|> Sticker.send(chat_id)
Summary
Functions
Sets the sticker by Telegram file ID.
Sets the sticker from a local file path.
Sends the sticker to the specified chat.
Sends the sticker without notification sound.
Sets the sticker from a URL.
Functions
Sets the sticker by Telegram file ID.
Parameters
ctx- Context mapid- Telegram file ID of the sticker
Returns
Updated context map with sticker ID set.
Sets the sticker from a local file path.
Parameters
ctx- Context mappath- Path to the sticker file
Returns
Updated context map with sticker file content set.
Sends the sticker to the specified chat.
Parameters
ctx- Context map with accumulated sticker dataid- Chat ID to send the sticker to
Returns
:ok- Sticker sent successfully{:error, reason}- Failed to send sticker
Sends the sticker without notification sound.
Parameters
ctx- Context map
Returns
Updated context map with silent flag set.
Sets the sticker from a URL.
Parameters
ctx- Context mapurl- URL of the sticker
Returns
Updated context map with sticker URL set.