Nadia (nadia v1.3.0)
View SourceProvides access to Telegram Bot API.
Reference
https://core.telegram.org/bots/api#available-methods
Explicit clients
Public Bot API wrappers accept a %Nadia.Client{} as the first argument when
a call should use a specific bot identity:
client = Nadia.Client.new(token: System.fetch_env!("TELEGRAM_BOT_TOKEN"))
Nadia.send_message(client, 123, "hello")Legacy application config based calls remain supported:
Nadia.send_message(123, "hello")
Summary
Functions
Use this method to add a new sticker to a set created by the bot. Returns True on success.
Callback implementation for Nadia.Behaviour.add_sticker_to_set/6.
Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
Callback implementation for Nadia.Behaviour.answer_callback_query/2.
Callback implementation for Nadia.Behaviour.answer_callback_query/3.
Use this method to process a received chat join request query.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.answer_chat_join_request_query/3.
Use this method to reply to a received guest message. On success, a SentGuestMessage object is returned.
Callback implementation for Nadia.Behaviour.answer_guest_query/3.
Callback implementation for Nadia.Behaviour.answer_guest_query/4.
Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.
Callback implementation for Nadia.Behaviour.answer_inline_query/3.
Callback implementation for Nadia.Behaviour.answer_inline_query/4.
Use this method to respond to pre-checkout queries.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.answer_pre_checkout_query/3.
Callback implementation for Nadia.Behaviour.answer_pre_checkout_query/4.
Use this method to reply to shipping queries.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.answer_shipping_query/3.
Callback implementation for Nadia.Behaviour.answer_shipping_query/4.
Use this method to set the result of an interaction with a Web App. On success, a SentWebAppMessage object is returned.
Callback implementation for Nadia.Behaviour.answer_web_app_query/3.
Use this method to approve a chat join request. Returns True on success.
Callback implementation for Nadia.Behaviour.approve_chat_join_request/3.
Use this method to approve a suggested post in a direct messages chat.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.approve_suggested_post/3.
Callback implementation for Nadia.Behaviour.approve_suggested_post/4.
Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
Callback implementation for Nadia.Behaviour.ban_chat_member/3.
Use this method to ban a channel chat in a supergroup or a channel. Returns True on success.
Callback implementation for Nadia.Behaviour.ban_chat_sender_chat/3.
Use this method to close the bot instance before moving it from one local
server to another.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.close/1.
Use this method to close an open forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.close_forum_topic/3.
Use this method to close an open General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.close_general_forum_topic/2.
Use this method to convert a gift received by a managed business account to Telegram Stars.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.convert_gift_to_stars/3.
Use this method to copy messages of any kind. On success, the MessageId of the sent message is returned.
Callback implementation for Nadia.Behaviour.copy_message/4.
Callback implementation for Nadia.Behaviour.copy_message/5.
Use this method to copy multiple messages of any kind. On success, an array of MessageId objects is returned.
Callback implementation for Nadia.Behaviour.copy_messages/4.
Callback implementation for Nadia.Behaviour.copy_messages/5.
Use this method to create an additional invite link for a chat. Returns the new invite link as a ChatInviteLink object.
Callback implementation for Nadia.Behaviour.create_chat_invite_link/2.
Callback implementation for Nadia.Behaviour.create_chat_invite_link/3.
Use this method to create a subscription invite link for a channel chat. Returns the new invite link as a ChatInviteLink object.
Callback implementation for Nadia.Behaviour.create_chat_subscription_invite_link/4.
Callback implementation for Nadia.Behaviour.create_chat_subscription_invite_link/5.
Use this method to create a topic in a forum supergroup chat or private chat. Returns information about the created topic as a ForumTopic object.
Callback implementation for Nadia.Behaviour.create_forum_topic/3.
Callback implementation for Nadia.Behaviour.create_forum_topic/4.
Use this method to create a link for an invoice. On success, the created invoice link is returned as a string.
Callback implementation for Nadia.Behaviour.create_invoice_link/6.
Callback implementation for Nadia.Behaviour.create_invoice_link/7.
Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns True on success.
Callback implementation for Nadia.Behaviour.create_new_sticker_set/7.
Use this method to decline a chat join request. Returns True on success.
Callback implementation for Nadia.Behaviour.decline_chat_join_request/3.
Use this method to decline a suggested post in a direct messages chat.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.decline_suggested_post/3.
Callback implementation for Nadia.Behaviour.decline_suggested_post/4.
Use this method to remove recent reactions added by a given user or chat. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_all_message_reactions/2.
Callback implementation for Nadia.Behaviour.delete_all_message_reactions/3.
Use this method to delete messages on behalf of a business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.delete_business_messages/3.
Use this method to delete a chat photo. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_chat_photo/2.
Use this method to delete a group sticker set from a supergroup. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_chat_sticker_set/2.
Use this method to delete a forum topic and all its messages. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_forum_topic/3.
Use this method to delete message from a chat. Bot should have admin permission to do that, and remember you can't delete messages that are more than 48 hours old.
Use this method to remove a reaction from a message. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_message_reaction/3.
Callback implementation for Nadia.Behaviour.delete_message_reaction/4.
Use this method to delete multiple messages simultaneously. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_messages/3.
Use this method to delete the list of the bot's commands for the given scope
and user language.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.delete_my_commands/1.
Callback implementation for Nadia.Behaviour.delete_my_commands/2.
Use this method to delete a sticker from a set created by the bot. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_sticker_from_set/2.
Use this method to delete a sticker set created by the bot. Returns True on success.
Callback implementation for Nadia.Behaviour.delete_sticker_set/2.
Use this method to delete a story previously posted by the bot on behalf of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.delete_story/3.
Use this method to remove webhook integration if you decide to switch back to Nadia.get_updates/1.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.delete_webhook/1.
Callback implementation for Nadia.Behaviour.delete_webhook/2.
Use this method to edit a non-primary invite link created by the bot. Returns the edited invite link as a ChatInviteLink object.
Callback implementation for Nadia.Behaviour.edit_chat_invite_link/3.
Callback implementation for Nadia.Behaviour.edit_chat_invite_link/4.
Use this method to edit a subscription invite link created by the bot. Returns the edited invite link as a ChatInviteLink object.
Callback implementation for Nadia.Behaviour.edit_chat_subscription_invite_link/3.
Callback implementation for Nadia.Behaviour.edit_chat_subscription_invite_link/4.
Use this method to edit name and icon of a forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.edit_forum_topic/3.
Callback implementation for Nadia.Behaviour.edit_forum_topic/4.
Use this method to edit the name of the General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.edit_general_forum_topic/3.
Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned.
Callback implementation for Nadia.Behaviour.edit_message_caption/4.
Callback implementation for Nadia.Behaviour.edit_message_caption/5.
Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.
Callback implementation for Nadia.Behaviour.edit_message_checklist/5.
Callback implementation for Nadia.Behaviour.edit_message_checklist/6.
Use this method to edit live location messages. On success, the edited Message
is returned, or :ok is returned when editing an inline message.
Callback implementation for Nadia.Behaviour.edit_message_live_location/4.
Use this method to edit animation, audio, document, live photo, photo, or video
messages, or to add media to text messages. On success, the edited Message is
returned, or :ok is returned when editing an inline message.
Callback implementation for Nadia.Behaviour.edit_message_media/3.
Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned.
Callback implementation for Nadia.Behaviour.edit_message_reply_markup/4.
Callback implementation for Nadia.Behaviour.edit_message_reply_markup/5.
Use this method to edit text messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned
Callback implementation for Nadia.Behaviour.edit_message_text/5.
Callback implementation for Nadia.Behaviour.edit_message_text/6.
Use this method to edit a story previously posted by the bot on behalf of a managed business account. Returns a Story object.
Callback implementation for Nadia.Behaviour.edit_story/4.
Callback implementation for Nadia.Behaviour.edit_story/5.
Use this method to cancel or re-enable extension of a Telegram Stars subscription.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.edit_user_star_subscription/4.
Use this method to generate a new primary invite link for a chat. Returns the new invite link as String on success.
Callback implementation for Nadia.Behaviour.export_chat_invite_link/2.
Use this method to forward messages of any kind. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.forward_message/4.
Callback implementation for Nadia.Behaviour.forward_message/5.
Use this method to forward multiple messages of any kind. On success, an array of MessageId objects is returned.
Callback implementation for Nadia.Behaviour.forward_messages/4.
Callback implementation for Nadia.Behaviour.forward_messages/5.
Use this method to get all gifts that can be sent by the bot.
Returns a Nadia.Model.Gifts object on success.
Callback implementation for Nadia.Behaviour.get_available_gifts/1.
Use this method to get gifts received and owned by a managed business account.
Returns a Nadia.Model.OwnedGifts object on success.
Callback implementation for Nadia.Behaviour.get_business_account_gifts/2.
Callback implementation for Nadia.Behaviour.get_business_account_gifts/3.
Use this method to get the Telegram Stars balance of a managed business account. Returns a StarAmount object.
Callback implementation for Nadia.Behaviour.get_business_account_star_balance/2.
Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object.
Callback implementation for Nadia.Behaviour.get_business_connection/2.
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.) Returns a Chat object on success.
Callback implementation for Nadia.Behaviour.get_chat/2.
Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
Callback implementation for Nadia.Behaviour.get_chat_administrators/2.
Callback implementation for Nadia.Behaviour.get_chat_administrators/3.
Use this method to get gifts owned by a chat.
Returns a Nadia.Model.OwnedGifts object on success.
Callback implementation for Nadia.Behaviour.get_chat_gifts/2.
Callback implementation for Nadia.Behaviour.get_chat_gifts/3.
Use this method to get information about a member of a chat. Returns a ChatMember object on success.
Callback implementation for Nadia.Behaviour.get_chat_member/3.
Use this method to get the number of members in a chat. Returns Int on success.
Callback implementation for Nadia.Behaviour.get_chat_member_count/2.
Use this method to get the current value of the bot's menu button in a private
chat, or the default menu button.
Returns a Nadia.Model.MenuButton on success.
Callback implementation for Nadia.Behaviour.get_chat_menu_button/1.
Callback implementation for Nadia.Behaviour.get_chat_menu_button/2.
Use this method to get information about custom emoji stickers by their identifiers. Returns an array of Sticker objects.
Callback implementation for Nadia.Behaviour.get_custom_emoji_stickers/2.
Use this method to get basic info about a file and prepare it for downloading.
For the moment, bots can download files of up to 20MB in size.
On success, a File object is returned.
The file can then be downloaded via the link
https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken
from the response. It is guaranteed that the link will be valid for at least 1 hour.
When the link expires, a new one can be requested by calling get_file again.
Callback implementation for Nadia.Behaviour.get_file/2.
Use this method to get link for file for subsequent use.
This method is an extension of the get_file method.
Callback implementation for Nadia.Behaviour.get_file_link/2.
Use this method to get custom emoji stickers that can be used as forum topic icons. Returns an array of Sticker objects.
Callback implementation for Nadia.Behaviour.get_forum_topic_icon_stickers/1.
Use this method to get data for game high score tables. Returns a list of GameHighScore objects.
Callback implementation for Nadia.Behaviour.get_game_high_scores/2.
Callback implementation for Nadia.Behaviour.get_game_high_scores/3.
Use this method to get the access settings of a managed bot. Returns a BotAccessSettings object.
Callback implementation for Nadia.Behaviour.get_managed_bot_access_settings/2.
Use this method to get the token of a managed bot. Returns the token as a string.
Callback implementation for Nadia.Behaviour.get_managed_bot_token/2.
A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.
Callback implementation for Nadia.Behaviour.get_me/1.
Use this method to get the current list of the bot's commands for the given
scope and user language.
Returns a list of Nadia.Model.BotCommand objects on success.
Callback implementation for Nadia.Behaviour.get_my_commands/1.
Callback implementation for Nadia.Behaviour.get_my_commands/2.
Use this method to get the current default administrator rights of the bot.
Returns Nadia.Model.ChatAdministratorRights on success.
Callback implementation for Nadia.Behaviour.get_my_default_administrator_rights/1.
Callback implementation for Nadia.Behaviour.get_my_default_administrator_rights/2.
Use this method to get the current bot description for the given user language.
Returns a Nadia.Model.BotDescription on success.
Callback implementation for Nadia.Behaviour.get_my_description/1.
Callback implementation for Nadia.Behaviour.get_my_description/2.
Use this method to get the current bot name for the given user language.
Returns a Nadia.Model.BotName on success.
Callback implementation for Nadia.Behaviour.get_my_name/1.
Callback implementation for Nadia.Behaviour.get_my_name/2.
Use this method to get the current bot short description for the given user
language.
Returns a Nadia.Model.BotShortDescription on success.
Callback implementation for Nadia.Behaviour.get_my_short_description/1.
Callback implementation for Nadia.Behaviour.get_my_short_description/2.
Use this method to get the current Telegram Stars balance of the bot. Returns a StarAmount object.
Callback implementation for Nadia.Behaviour.get_my_star_balance/1.
Use this method to get the bot's Telegram Star transactions. Returns a StarTransactions object.
Callback implementation for Nadia.Behaviour.get_star_transactions/1.
Callback implementation for Nadia.Behaviour.get_star_transactions/2.
Use this method to get a sticker set. On success, a StickerSet object is returned.
Callback implementation for Nadia.Behaviour.get_sticker_set/2.
Use this method to receive incoming updates using long polling. An Array of Update objects is returned.
Callback implementation for Nadia.Behaviour.get_updates/1.
Callback implementation for Nadia.Behaviour.get_updates/2.
Use this method to get the list of boosts added to a chat by a user. Returns a UserChatBoosts object.
Callback implementation for Nadia.Behaviour.get_user_chat_boosts/3.
Use this method to get gifts owned by a user.
Returns a Nadia.Model.OwnedGifts object on success.
Callback implementation for Nadia.Behaviour.get_user_gifts/2.
Callback implementation for Nadia.Behaviour.get_user_gifts/3.
Use this method to get the last messages from the personal chat of a given user. On success, an array of Message objects is returned.
Callback implementation for Nadia.Behaviour.get_user_personal_chat_messages/3.
Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
Callback implementation for Nadia.Behaviour.get_user_profile_audios/2.
Callback implementation for Nadia.Behaviour.get_user_profile_audios/3.
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Callback implementation for Nadia.Behaviour.get_user_profile_photos/2.
Callback implementation for Nadia.Behaviour.get_user_profile_photos/3.
Use this method to get current webhook status. Requires no parameters.
On success, returns a Nadia.Model.WebhookInfo.t() object with webhook details.
If the bot is using getUpdates, will return an object with the url field empty.
Callback implementation for Nadia.Behaviour.get_webhook_info/1.
Use this method to gift a Telegram Premium subscription to a user.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.gift_premium_subscription/4.
Callback implementation for Nadia.Behaviour.gift_premium_subscription/5.
Use this method to hide the General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.hide_general_forum_topic/2.
Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
Callback implementation for Nadia.Behaviour.leave_chat/2.
Use this method to log out from the cloud Bot API server before launching the
bot locally.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.log_out/1.
Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
Callback implementation for Nadia.Behaviour.pin_chat_message/4.
Use this method to post a story on behalf of a managed business account. Returns a Story object.
Callback implementation for Nadia.Behaviour.post_story/4.
Callback implementation for Nadia.Behaviour.post_story/5.
Use this method to promote or demote a user in a supergroup or a channel. Returns True on success.
Callback implementation for Nadia.Behaviour.promote_chat_member/3.
Callback implementation for Nadia.Behaviour.promote_chat_member/4.
Use this method to mark an incoming message as read on behalf of a business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.read_business_message/4.
Use this method to refund a successful Telegram Stars payment.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.refund_star_payment/3.
Use this method to remove the current profile photo of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.remove_business_account_profile_photo/2.
Callback implementation for Nadia.Behaviour.remove_business_account_profile_photo/3.
Use this method to remove verification from a chat that is currently verified on behalf
of the organization represented by the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.remove_chat_verification/2.
Use this method to remove the bot's profile photo.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.remove_my_profile_photo/1.
Callback implementation for Nadia.Behaviour.remove_my_profile_photo/2.
Use this method to remove verification from a user who is currently verified on behalf
of the organization represented by the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.remove_user_verification/2.
Use this method to reopen a closed forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.reopen_forum_topic/3.
Use this method to reopen a closed General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.reopen_general_forum_topic/2.
Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as a string.
Callback implementation for Nadia.Behaviour.replace_managed_bot_token/2.
Use this method to replace an existing sticker in a sticker set with a new one. Returns True on success.
Callback implementation for Nadia.Behaviour.replace_sticker_in_set/5.
Use this method to repost a story on behalf of a managed business account. Returns a Story object.
Callback implementation for Nadia.Behaviour.repost_story/5.
Callback implementation for Nadia.Behaviour.repost_story/6.
Use this method to restrict a user in a supergroup. Returns True on success.
Callback implementation for Nadia.Behaviour.restrict_chat_member/4.
Callback implementation for Nadia.Behaviour.restrict_chat_member/5.
Use this method to revoke an invite link created by the bot. Returns the revoked invite link as a ChatInviteLink object.
Callback implementation for Nadia.Behaviour.revoke_chat_invite_link/3.
Use this method to store a message that can be sent by a user of a Mini App. On success, a PreparedInlineMessage object is returned.
Callback implementation for Nadia.Behaviour.save_prepared_inline_message/3.
Callback implementation for Nadia.Behaviour.save_prepared_inline_message/4.
Use this method to store a keyboard button that can be used by a user within a Mini App. On success, a PreparedKeyboardButton object is returned.
Callback implementation for Nadia.Behaviour.save_prepared_keyboard_button/3.
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
Callback implementation for Nadia.Behaviour.send_animation/3.
Callback implementation for Nadia.Behaviour.send_animation/4.
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
Callback implementation for Nadia.Behaviour.send_audio/3.
Callback implementation for Nadia.Behaviour.send_audio/4.
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
Callback implementation for Nadia.Behaviour.send_chat_action/3.
Callback implementation for Nadia.Behaviour.send_chat_action/4.
Use this method to process a received chat join request query by showing a
Mini App to the user before deciding the outcome.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.send_chat_join_request_web_app/3.
Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_checklist/4.
Callback implementation for Nadia.Behaviour.send_checklist/5.
Use this method to send phone contacts. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_contact/4.
Callback implementation for Nadia.Behaviour.send_contact/5.
Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_dice/2.
Callback implementation for Nadia.Behaviour.send_dice/3.
Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Callback implementation for Nadia.Behaviour.send_document/3.
Callback implementation for Nadia.Behaviour.send_document/4.
Use this method to send a game. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_game/3.
Callback implementation for Nadia.Behaviour.send_game/4.
Use this method to send a gift to a user or channel chat.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.send_gift/2.
Callback implementation for Nadia.Behaviour.send_gift/3.
Use this method to send invoices. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_invoice/7.
Callback implementation for Nadia.Behaviour.send_invoice/8.
Use this method to send live photos. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_live_photo/4.
Callback implementation for Nadia.Behaviour.send_live_photo/5.
Use this method to send point on the map. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_location/4.
Callback implementation for Nadia.Behaviour.send_location/5.
Use this method to send an album of photos, videos, documents or audios. On success, an array of sent Messages is returned.
Callback implementation for Nadia.Behaviour.send_media_group/3.
Callback implementation for Nadia.Behaviour.send_media_group/4.
Use this method to send text messages. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_message/3.
Callback implementation for Nadia.Behaviour.send_message/4.
Use this method to stream a partial message draft to a user.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.send_message_draft/3.
Callback implementation for Nadia.Behaviour.send_message_draft/4.
Use this method to send paid media. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_paid_media/4.
Callback implementation for Nadia.Behaviour.send_paid_media/5.
Use this method to send photos. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_photo/3.
Callback implementation for Nadia.Behaviour.send_photo/4.
Use this method to send a native poll. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_poll/4.
Use this method to send rich messages. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_rich_message/3.
Callback implementation for Nadia.Behaviour.send_rich_message/4.
Use this method to stream a partial rich message to a user while the message is
being generated.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.send_rich_message_draft/4.
Callback implementation for Nadia.Behaviour.send_rich_message_draft/5.
Use this method to send .webp stickers. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_sticker/3.
Callback implementation for Nadia.Behaviour.send_sticker/4.
Use this method to send information about a venue. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_venue/6.
Callback implementation for Nadia.Behaviour.send_venue/7.
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Callback implementation for Nadia.Behaviour.send_video/3.
Callback implementation for Nadia.Behaviour.send_video/4.
Use this method to send video messages. On success, the sent Message is returned.
Callback implementation for Nadia.Behaviour.send_video_note/3.
Callback implementation for Nadia.Behaviour.send_video_note/4.
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Callback implementation for Nadia.Behaviour.send_voice/3.
Callback implementation for Nadia.Behaviour.send_voice/4.
Use this method to change the bio of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_business_account_bio/2.
Callback implementation for Nadia.Behaviour.set_business_account_bio/3.
Use this method to change the gift settings of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_business_account_gift_settings/4.
Use this method to change the first and last name of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_business_account_name/3.
Callback implementation for Nadia.Behaviour.set_business_account_name/4.
Use this method to change the profile photo of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_business_account_profile_photo/3.
Callback implementation for Nadia.Behaviour.set_business_account_profile_photo/4.
Use this method to change the username of a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_business_account_username/2.
Callback implementation for Nadia.Behaviour.set_business_account_username/3.
Use this method to set a custom title for an administrator in a supergroup. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_administrator_custom_title/4.
Use this method to change the description of a chat. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_description/2.
Callback implementation for Nadia.Behaviour.set_chat_description/3.
Use this method to change the tag of a user in a direct messages chat. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_member_tag/3.
Callback implementation for Nadia.Behaviour.set_chat_member_tag/4.
Use this method to change the bot's menu button in a private chat, or the
default menu button.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_chat_menu_button/1.
Callback implementation for Nadia.Behaviour.set_chat_menu_button/2.
Use this method to set default chat permissions for all members. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_permissions/3.
Callback implementation for Nadia.Behaviour.set_chat_permissions/4.
Use this method to set a new profile photo for the chat. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_photo/3.
Use this method to set a new group sticker set for a supergroup. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_sticker_set/3.
Use this method to change the title of a chat. Returns True on success.
Callback implementation for Nadia.Behaviour.set_chat_title/3.
Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
Callback implementation for Nadia.Behaviour.set_custom_emoji_sticker_set_thumbnail/2.
Callback implementation for Nadia.Behaviour.set_custom_emoji_sticker_set_thumbnail/3.
Use this method to set a user's score in a game message.
On success, the edited Message is returned, or :ok is returned when editing
an inline message.
Callback implementation for Nadia.Behaviour.set_game_score/3.
Callback implementation for Nadia.Behaviour.set_game_score/4.
Use this method to change the access settings of a managed bot. Returns True on success.
Callback implementation for Nadia.Behaviour.set_managed_bot_access_settings/3.
Callback implementation for Nadia.Behaviour.set_managed_bot_access_settings/4.
Use this method to change the chosen reactions on a message. Returns True on success.
Callback implementation for Nadia.Behaviour.set_message_reaction/3.
Callback implementation for Nadia.Behaviour.set_message_reaction/4.
Use this method to change the list of the bot's commands.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_commands/2.
Callback implementation for Nadia.Behaviour.set_my_commands/3.
Use this method to change the default administrator rights requested by the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_default_administrator_rights/1.
Callback implementation for Nadia.Behaviour.set_my_default_administrator_rights/2.
Use this method to change the bot's description.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_description/1.
Callback implementation for Nadia.Behaviour.set_my_description/2.
Use this method to change the bot's name.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_name/1.
Callback implementation for Nadia.Behaviour.set_my_name/2.
Use this method to change the bot's profile photo.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_profile_photo/2.
Use this method to change the bot's short description.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_my_short_description/1.
Callback implementation for Nadia.Behaviour.set_my_short_description/2.
Use this method to inform a user that Telegram Passport elements they provided
contain errors.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_passport_data_errors/3.
Use this method to change the list of emoji assigned to a regular or custom emoji sticker. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_emoji_list/3.
Use this method to change search keywords assigned to a regular or custom emoji sticker. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_keywords/2.
Callback implementation for Nadia.Behaviour.set_sticker_keywords/3.
Use this method to change the mask position of a mask sticker. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_mask_position/2.
Callback implementation for Nadia.Behaviour.set_sticker_mask_position/3.
Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_position_in_set/3.
Use this method to set the thumbnail of a regular or mask sticker set. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_set_thumbnail/3.
Callback implementation for Nadia.Behaviour.set_sticker_set_thumbnail/4.
Use this method to set the title of a created sticker set. Returns True on success.
Callback implementation for Nadia.Behaviour.set_sticker_set_title/3.
Use this method to change the emoji status for a given user.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.set_user_emoji_status/2.
Callback implementation for Nadia.Behaviour.set_user_emoji_status/3.
Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
Callback implementation for Nadia.Behaviour.set_webhook/1.
Callback implementation for Nadia.Behaviour.set_webhook/2.
Use this method to stop updating a live location message before live_period
expires. On success, the edited Message is returned, or :ok is returned
when editing an inline message.
Callback implementation for Nadia.Behaviour.stop_message_live_location/2.
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
Callback implementation for Nadia.Behaviour.stop_poll/3.
Callback implementation for Nadia.Behaviour.stop_poll/4.
Use this method to transfer Telegram Stars from a business account balance to the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.transfer_business_account_stars/3.
Use this method to transfer an owned gift to another user.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.transfer_gift/4.
Callback implementation for Nadia.Behaviour.transfer_gift/5.
Use this method to unban a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work. Returns True on success.
Callback implementation for Nadia.Behaviour.unban_chat_member/3.
Callback implementation for Nadia.Behaviour.unban_chat_member/4.
Use this method to unban a previously banned channel chat. Returns True on success.
Callback implementation for Nadia.Behaviour.unban_chat_sender_chat/3.
Use this method to unhide the General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.unhide_general_forum_topic/2.
Use this method to clear the list of pinned messages in a chat. Returns True on success.
Callback implementation for Nadia.Behaviour.unpin_all_chat_messages/2.
Use this method to clear the list of pinned messages in a forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.unpin_all_forum_topic_messages/3.
Use this method to clear pinned messages in the General forum topic. Returns True on success.
Callback implementation for Nadia.Behaviour.unpin_all_general_forum_topic_messages/2.
Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
Callback implementation for Nadia.Behaviour.unpin_chat_message/2.
Callback implementation for Nadia.Behaviour.unpin_chat_message/3.
Use this method to upgrade a gift received by a managed business account.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.upgrade_gift/3.
Callback implementation for Nadia.Behaviour.upgrade_gift/4.
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
Callback implementation for Nadia.Behaviour.upload_sticker_file/3.
Use this method to verify a chat on behalf of the organization represented by the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.verify_chat/2.
Callback implementation for Nadia.Behaviour.verify_chat/3.
Use this method to verify a user on behalf of the organization represented by the bot.
Returns :ok on success.
Callback implementation for Nadia.Behaviour.verify_user/2.
Callback implementation for Nadia.Behaviour.verify_user/3.
Functions
Use this method to add a new sticker to a set created by the bot. Returns True on success.
Args:
user_id- User identifier of created sticker set ownername- Sticker set namepng_sticker- Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Either afile_idto resend a file that is already on the Telegram servers, or afile_pathto upload a new file from local, or aHTTP URLto get a file from the internet.emojis- One or more emoji corresponding to the sticker
Options:
mask_position- ANadia.Model.MaskPositionobject for position where the mask should be placed on faces
@spec add_sticker_to_set(Nadia.Client.t(), integer(), binary(), binary(), binary(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.add_sticker_to_set/6.
Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
Args:
callback_query_id- Unique identifier for the query to be answeredoptions- orddict of options
Options:
:text- Text of the notification. If not specified, nothing will be shown to the user:show_alert- If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
@spec answer_callback_query(binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_callback_query/2.
@spec answer_callback_query(Nadia.Client.t(), binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_callback_query/3.
@spec answer_chat_join_request_query(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to process a received chat join request query.
Returns :ok on success.
@spec answer_chat_join_request_query(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_chat_join_request_query/3.
Use this method to reply to a received guest message. On success, a SentGuestMessage object is returned.
Args:
guest_query_id- Unique identifier for the query to be answeredresult- An inline query result describing the message to be sentoptions- orddict of options
@spec answer_guest_query(binary(), Nadia.Model.InlineQueryResult.t(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.SentGuestMessage.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_guest_query/3.
@spec answer_guest_query( Nadia.Client.t(), binary(), Nadia.Model.InlineQueryResult.t(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.SentGuestMessage.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_guest_query/4.
Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.
Args:
inline_query_id- Unique identifier for the answered queryresults- An array of results for the inline queryoptions- orddict of options
Options:
cache_time- The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.is_personal- Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same querynext_offset- Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes.switch_pm_text- If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter.switch_pm_parameter- Parameter for the start message sent to the bot when user presses the switch button.
@spec answer_inline_query(binary(), [Nadia.Model.InlineQueryResult.t()], [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_inline_query/3.
@spec answer_inline_query( Nadia.Client.t(), binary(), [Nadia.Model.InlineQueryResult.t()], [ {atom(), any()} ] ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_inline_query/4.
@spec answer_pre_checkout_query(binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to respond to pre-checkout queries.
Returns :ok on success.
Args:
pre_checkout_query_id- Unique identifier for the query to be answeredok- Pass true if the bot is ready to proceed with the orderoptions- orddict of options
Options:
:error_message- Error message to display whenokis false
@spec answer_pre_checkout_query(binary(), boolean(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec answer_pre_checkout_query(Nadia.Client.t(), binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_pre_checkout_query/3.
@spec answer_pre_checkout_query( Nadia.Client.t(), binary(), boolean(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_pre_checkout_query/4.
@spec answer_shipping_query(binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to reply to shipping queries.
Returns :ok on success.
Args:
shipping_query_id- Unique identifier for the query to be answeredok- Pass true if delivery to the specified address is possibleoptions- orddict of options
Options:
:shipping_options- JSON-serializable list of shipping options:error_message- Error message to display whenokis false
@spec answer_shipping_query(binary(), boolean(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec answer_shipping_query(Nadia.Client.t(), binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_shipping_query/3.
@spec answer_shipping_query( Nadia.Client.t(), binary(), boolean(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_shipping_query/4.
@spec answer_web_app_query(binary(), list() | map() | struct() | binary()) :: {:ok, Nadia.Model.SentWebAppMessage.t()} | {:error, Nadia.Model.Error.t()}
Use this method to set the result of an interaction with a Web App. On success, a SentWebAppMessage object is returned.
Args:
web_app_query_id- Unique identifier for the query to be answeredresult- An inline query result describing the message to be sent
@spec answer_web_app_query( Nadia.Client.t(), binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.SentWebAppMessage.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.answer_web_app_query/3.
@spec approve_chat_join_request(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to approve a chat join request. Returns True on success.
@spec approve_chat_join_request(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.approve_chat_join_request/3.
@spec approve_suggested_post(integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to approve a suggested post in a direct messages chat.
Returns :ok on success.
Args:
chat_id- Unique identifier for the target direct messages chatmessage_id- Identifier of a suggested post message to approveoptions- orddict of options
@spec approve_suggested_post(integer(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec approve_suggested_post(Nadia.Client.t(), integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.approve_suggested_post/3.
@spec approve_suggested_post(Nadia.Client.t(), integer(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.approve_suggested_post/4.
@spec ban_chat_member(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
Args:
chat_id- Unique identifier for the target group or username of the target supergroup or channel (in the format @username)user_id- Unique identifier of the target useroptions- orddict of options
@spec ban_chat_member(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec ban_chat_member(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.ban_chat_member/3.
@spec ban_chat_member(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec ban_chat_sender_chat(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to ban a channel chat in a supergroup or a channel. Returns True on success.
@spec ban_chat_sender_chat(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.ban_chat_sender_chat/3.
@spec close() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to close the bot instance before moving it from one local
server to another.
Returns :ok on success.
@spec close(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.close/1.
@spec close_forum_topic(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to close an open forum topic. Returns True on success.
@spec close_forum_topic(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.close_forum_topic/3.
@spec close_general_forum_topic(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to close an open General forum topic. Returns True on success.
@spec close_general_forum_topic(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.close_general_forum_topic/2.
@spec convert_gift_to_stars(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to convert a gift received by a managed business account to Telegram Stars.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionowned_gift_id- Unique identifier of the regular gift that should be converted to Telegram Stars
@spec convert_gift_to_stars(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.convert_gift_to_stars/3.
@spec copy_message(integer() | binary(), integer() | binary(), integer()) :: {:ok, Nadia.Model.MessageId.t()} | {:error, Nadia.Model.Error.t()}
Use this method to copy messages of any kind. On success, the MessageId of the sent message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)from_chat_id- Unique identifier for the chat where the original message was sent or username of the target channel (in the format @channelusername)message_id- Unique message identifieroptions- orddict of options
Options:
:message_thread_id- Unique identifier for the target message thread:direct_messages_topic_id- Identifier of the direct messages topic:video_start_timestamp- New start timestamp for copied videos:caption- New caption for media:parse_mode- Mode for parsing entities in the new caption:caption_entities- JSON-serialized list of caption entities:show_caption_above_media- Pass True to show the caption above media:disable_notification- Sends the message silently or without notification:protect_content- Protects the contents of the sent message:allow_paid_broadcast- Allows paid broadcast throughput:message_effect_id- Unique identifier of the message effect to be added:suggested_post_parameters- Suggested post parameters:reply_parameters- Description of the message to reply to:reply_markup- Additional interface options
@spec copy_message(integer() | binary(), integer() | binary(), integer(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.MessageId.t()} | {:error, Nadia.Model.Error.t()}
@spec copy_message( Nadia.Client.t(), integer() | binary(), integer() | binary(), integer() ) :: {:ok, Nadia.Model.MessageId.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.copy_message/4.
@spec copy_message( Nadia.Client.t(), integer() | binary(), integer() | binary(), integer(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.MessageId.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.copy_message/5.
@spec copy_messages(integer() | binary(), integer() | binary(), [integer()]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to copy multiple messages of any kind. On success, an array of MessageId objects is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)from_chat_id- Unique identifier for the chat where the original messages were sent or username of the target channel (in the format @channelusername)message_ids- List of message identifiersoptions- orddict of options
Options:
:message_thread_id- Unique identifier for the target message thread:direct_messages_topic_id- Identifier of the direct messages topic:disable_notification- Sends the messages silently or without notification:protect_content- Protects the contents of the sent messages:remove_caption- Pass True to copy the messages without their captions
@spec copy_messages(integer() | binary(), integer() | binary(), [integer()], [ {atom(), any()} ]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
@spec copy_messages(Nadia.Client.t(), integer() | binary(), integer() | binary(), [ integer() ]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.copy_messages/4.
@spec copy_messages( Nadia.Client.t(), integer() | binary(), integer() | binary(), [integer()], [ {atom(), any()} ] ) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.copy_messages/5.
@spec create_chat_invite_link(integer() | binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Use this method to create an additional invite link for a chat. Returns the new invite link as a ChatInviteLink object.
@spec create_chat_invite_link(integer() | binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
@spec create_chat_invite_link(Nadia.Client.t(), integer() | binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_chat_invite_link/2.
@spec create_chat_invite_link( Nadia.Client.t(), integer() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_chat_invite_link/3.
@spec create_chat_subscription_invite_link(integer() | binary(), integer(), integer()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Use this method to create a subscription invite link for a channel chat. Returns the new invite link as a ChatInviteLink object.
@spec create_chat_subscription_invite_link( integer() | binary(), integer(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
@spec create_chat_subscription_invite_link( Nadia.Client.t(), integer() | binary(), integer(), integer() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_chat_subscription_invite_link/4.
@spec create_chat_subscription_invite_link( Nadia.Client.t(), integer() | binary(), integer(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_chat_subscription_invite_link/5.
@spec create_forum_topic(integer() | binary(), binary()) :: {:ok, Nadia.Model.ForumTopic.t()} | {:error, Nadia.Model.Error.t()}
Use this method to create a topic in a forum supergroup chat or private chat. Returns information about the created topic as a ForumTopic object.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroupname- Topic nameoptions- orddict of options
Options:
:icon_color- Color of the topic icon in RGB format:icon_custom_emoji_id- Unique identifier of the custom emoji shown as the topic icon
@spec create_forum_topic(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.ForumTopic.t()} | {:error, Nadia.Model.Error.t()}
@spec create_forum_topic(Nadia.Client.t(), integer() | binary(), binary()) :: {:ok, Nadia.Model.ForumTopic.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_forum_topic/3.
@spec create_forum_topic(Nadia.Client.t(), integer() | binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.ForumTopic.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_forum_topic/4.
@spec create_invoice_link( binary(), binary(), binary(), binary(), list() | map() | struct() | binary() ) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Use this method to create a link for an invoice. On success, the created invoice link is returned as a string.
Args:
title- Product namedescription- Product descriptionpayload- Bot-defined invoice payloadcurrency- Three-letter ISO 4217 currency code, orXTRfor Starsprices- JSON-serializable price breakdown array or a pre-encoded JSON stringoptions- orddict or map of options
@spec create_invoice_link( binary(), binary(), binary(), binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
@spec create_invoice_link( Nadia.Client.t(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary() ) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_invoice_link/6.
@spec create_invoice_link( Nadia.Client.t(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_invoice_link/7.
Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns True on success.
Args:
user_id- User identifier of created sticker set ownername- Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “by<bot username>”. <bot_username> is case insensitive. 1-64 characters.title- Sticker set title, 1-64 characterspng_sticker- Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Either afile_idto resend a file that is already on the Telegram servers, or afile_pathto upload a new file from local, or aHTTP URLto get a file from the internet.emojis- One or more emoji corresponding to the sticker
Options:
contains_masks- Pass True, if a set of mask stickers should be createdmask_position- ANadia.Model.MaskPositionobject for position where the mask should be placed on faces
@spec create_new_sticker_set( Nadia.Client.t(), integer(), binary(), binary(), binary(), binary(), [ {atom(), any()} ] ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.create_new_sticker_set/7.
@spec decline_chat_join_request(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to decline a chat join request. Returns True on success.
@spec decline_chat_join_request(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.decline_chat_join_request/3.
@spec decline_suggested_post(integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to decline a suggested post in a direct messages chat.
Returns :ok on success.
Args:
chat_id- Unique identifier for the target direct messages chatmessage_id- Identifier of a suggested post message to declineoptions- orddict of options
@spec decline_suggested_post(integer(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec decline_suggested_post(Nadia.Client.t(), integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.decline_suggested_post/3.
@spec decline_suggested_post(Nadia.Client.t(), integer(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.decline_suggested_post/4.
Use this method to remove recent reactions added by a given user or chat. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup (in the format @username)options- orddict of options
Options:
:user_id- Identifier of the user whose reactions will be removed:actor_chat_id- Identifier of the chat whose reactions will be removed
@spec delete_all_message_reactions(integer() | binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_all_message_reactions/2.
@spec delete_all_message_reactions(Nadia.Client.t(), integer() | binary(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_all_message_reactions/3.
@spec delete_business_messages(binary(), [integer()]) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete messages on behalf of a business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionmessage_ids- List of message identifiers to delete
@spec delete_business_messages(Nadia.Client.t(), binary(), [integer()]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_business_messages/3.
@spec delete_chat_photo(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a chat photo. Returns True on success.
@spec delete_chat_photo(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_chat_photo/2.
@spec delete_chat_sticker_set(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a group sticker set from a supergroup. Returns True on success.
@spec delete_chat_sticker_set(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_chat_sticker_set/2.
@spec delete_forum_topic(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a forum topic and all its messages. Returns True on success.
@spec delete_forum_topic(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_forum_topic/3.
@spec delete_message(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete message from a chat. Bot should have admin permission to do that, and remember you can't delete messages that are more than 48 hours old.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Required if inline_message_id is not specified. Unique identifier of the sent message
@spec delete_message(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove a reaction from a message. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup (in the format @username)message_id- Identifier of the target messageoptions- orddict of options
Options:
:user_id- Identifier of the user whose reaction will be removed:actor_chat_id- Identifier of the chat whose reaction will be removed
@spec delete_message_reaction(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_message_reaction/3.
@spec delete_message_reaction(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_message_reaction/4.
@spec delete_messages(integer() | binary(), [integer()]) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete multiple messages simultaneously. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_ids- List of message identifiers to delete
@spec delete_messages(Nadia.Client.t(), integer() | binary(), [integer()]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_messages/3.
@spec delete_my_commands() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete the list of the bot's commands for the given scope
and user language.
Returns :ok on success.
@spec delete_my_commands([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec delete_my_commands(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_my_commands/1.
@spec delete_my_commands(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_my_commands/2.
@spec delete_sticker_from_set(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a sticker from a set created by the bot. Returns True on success.
Args:
sticker- File identifier of the sticker
@spec delete_sticker_from_set(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_sticker_from_set/2.
@spec delete_sticker_set(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a sticker set created by the bot. Returns True on success.
Args:
name- Sticker set name
@spec delete_sticker_set(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_sticker_set/2.
@spec delete_story(binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to delete a story previously posted by the bot on behalf of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionstory_id- Unique identifier of the story to delete
@spec delete_story(Nadia.Client.t(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_story/3.
@spec delete_webhook() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove webhook integration if you decide to switch back to Nadia.get_updates/1.
Returns :ok on success.
Args:
options- orddict of options
Options:
:drop_pending_updates- Pass True to drop all pending updates
@spec delete_webhook([{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec delete_webhook(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_webhook/1.
@spec delete_webhook(Nadia.Client.t(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.delete_webhook/2.
@spec edit_chat_invite_link(integer() | binary(), binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit a non-primary invite link created by the bot. Returns the edited invite link as a ChatInviteLink object.
@spec edit_chat_invite_link(integer() | binary(), binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
@spec edit_chat_invite_link(Nadia.Client.t(), integer() | binary(), binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_chat_invite_link/3.
@spec edit_chat_invite_link( Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_chat_invite_link/4.
@spec edit_chat_subscription_invite_link(integer() | binary(), binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit a subscription invite link created by the bot. Returns the edited invite link as a ChatInviteLink object.
@spec edit_chat_subscription_invite_link( integer() | binary(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
@spec edit_chat_subscription_invite_link( Nadia.Client.t(), integer() | binary(), binary() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_chat_subscription_invite_link/3.
@spec edit_chat_subscription_invite_link( Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_chat_subscription_invite_link/4.
@spec edit_forum_topic(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to edit name and icon of a forum topic. Returns True on success.
@spec edit_forum_topic(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec edit_forum_topic(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_forum_topic/3.
@spec edit_forum_topic(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_forum_topic/4.
@spec edit_general_forum_topic(integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to edit the name of the General forum topic. Returns True on success.
@spec edit_general_forum_topic(Nadia.Client.t(), integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_general_forum_topic/3.
Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned.
Args:
chat_id- Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Required if inline_message_id is not specified. Unique identifier of the sent messageinline_message_id- Required ifchat_idandmessage_idare not specified. Identifier of the inline messageoptions- orddict of options
Options:
:caption- New caption of the message:reply_markup- A JSON-serialized object for an inline keyboard -Nadia.Model.InlineKeyboardMarkup
@spec edit_message_caption(integer() | binary(), integer(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_caption/4.
@spec edit_message_caption( Nadia.Client.t(), integer() | binary(), integer(), binary(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_caption/5.
@spec edit_message_checklist( binary(), integer() | binary(), integer(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.
Args:
business_connection_id- Unique identifier of the business connectionchat_id- Unique identifier for the target chat or username of the target botmessage_id- Unique identifier for the target messagechecklist- JSON-serializable checklist object or a pre-encoded JSON stringoptions- orddict of options
@spec edit_message_checklist( binary(), integer() | binary(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec edit_message_checklist( Nadia.Client.t(), binary(), integer() | binary(), integer(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_checklist/5.
@spec edit_message_checklist( Nadia.Client.t(), binary(), integer() | binary(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_checklist/6.
@spec edit_message_live_location(float(), float(), [{atom(), any()}]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit live location messages. On success, the edited Message
is returned, or :ok is returned when editing an inline message.
Args:
latitude- Latitude of new locationlongitude- Longitude of new locationoptions- orddict of options
@spec edit_message_live_location(Nadia.Client.t(), float(), float(), [{atom(), any()}]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_live_location/4.
@spec edit_message_media(list() | map() | struct() | binary(), [{atom(), any()}]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit animation, audio, document, live photo, photo, or video
messages, or to add media to text messages. On success, the edited Message is
returned, or :ok is returned when editing an inline message.
Args:
media- JSON-serializable media object or a pre-encoded JSON stringoptions- orddict of options
@spec edit_message_media(Nadia.Client.t(), list() | map() | struct() | binary(), [ {atom(), any()} ]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_media/3.
Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned.
Args:
chat_id- Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Required if inline_message_id is not specified. Unique identifier of the sent messageinline_message_id- Required ifchat_idandmessage_idare not specified. Identifier of the inline messageoptions- orddict of options
Options:
:reply_markup- A JSON-serialized object for an inline keyboard -Nadia.Model.InlineKeyboardMarkup
@spec edit_message_reply_markup(integer() | binary(), integer(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_reply_markup/4.
@spec edit_message_reply_markup( Nadia.Client.t(), integer() | binary(), integer(), binary(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_reply_markup/5.
Use this method to edit text messages sent by the bot or via the bot (for inline bots). On success, the edited Message is returned
Args:
chat_id- Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Required if inline_message_id is not specified. Unique identifier of the sent messageinline_message_id- Required ifchat_idandmessage_idare not specified. Identifier of the inline messagetext- New text of the messageoptions- orddict of options
Options:
:parse_mode- Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.:disable_web_page_preview- Disables link previews for links in this message:reply_markup- A JSON-serialized object for an inline keyboard -Nadia.Model.InlineKeyboardMarkup
@spec edit_message_text( integer() | binary(), integer() | nil, binary() | nil, binary() | nil, [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_text/5.
@spec edit_message_text( Nadia.Client.t(), integer() | binary(), integer() | nil, binary() | nil, binary() | nil, [{atom(), any()}] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_message_text/6.
@spec edit_story(binary(), integer(), list() | map() | struct() | binary()) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Use this method to edit a story previously posted by the bot on behalf of a managed business account. Returns a Story object.
Args:
business_connection_id- Unique identifier of the business connectionstory_id- Unique identifier of the story to editcontent- JSON-serializable story content object or a pre-encoded JSON stringoptions- orddict or map of options
Options:
:caption- Caption of the story:parse_mode- Mode for parsing entities in the story caption:caption_entities- JSON-serializable caption entities array or a pre-encoded JSON string:areas- JSON-serializable story areas array or a pre-encoded JSON string
@spec edit_story( binary(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
@spec edit_story( Nadia.Client.t(), binary(), integer(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_story/4.
@spec edit_story( Nadia.Client.t(), binary(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_story/5.
@spec edit_user_star_subscription(integer(), binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to cancel or re-enable extension of a Telegram Stars subscription.
Returns :ok on success.
Args:
user_id- Identifier of the user whose subscription will be editedtelegram_payment_charge_id- Telegram payment identifier for the subscriptionis_canceled- Pass true to cancel extension, or false to re-enable it
@spec edit_user_star_subscription(Nadia.Client.t(), integer(), binary(), boolean()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.edit_user_star_subscription/4.
@spec export_chat_invite_link(integer() | binary()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Use this method to generate a new primary invite link for a chat. Returns the new invite link as String on success.
@spec export_chat_invite_link(Nadia.Client.t(), integer() | binary()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.export_chat_invite_link/2.
@spec forward_message(integer() | binary(), integer() | binary(), integer()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to forward messages of any kind. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)from_chat_id- Unique identifier for the chat where the original message was sent or username of the target channel (in the format @channelusername)message_id- Unique message identifieroptions- orddict of options
Options:
:message_thread_id- Unique identifier for the target message thread:direct_messages_topic_id- Identifier of the direct messages topic:video_start_timestamp- New start timestamp for forwarded videos:disable_notification- Sends the message silently or without notification:protect_content- Protects the contents of the forwarded message:message_effect_id- Unique identifier of the message effect to be added:suggested_post_parameters- Suggested post parameters
@spec forward_message(integer() | binary(), integer() | binary(), integer(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec forward_message( Nadia.Client.t(), integer() | binary(), integer() | binary(), integer() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.forward_message/4.
@spec forward_message( Nadia.Client.t(), integer() | binary(), integer() | binary(), integer(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.forward_message/5.
@spec forward_messages(integer() | binary(), integer() | binary(), [integer()]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to forward multiple messages of any kind. On success, an array of MessageId objects is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)from_chat_id- Unique identifier for the chat where the original messages were sent or username of the target channel (in the format @channelusername)message_ids- List of message identifiersoptions- orddict of options
Options:
:message_thread_id- Unique identifier for the target message thread:direct_messages_topic_id- Identifier of the direct messages topic:disable_notification- Sends the messages silently or without notification:protect_content- Protects the contents of the forwarded messages
@spec forward_messages(integer() | binary(), integer() | binary(), [integer()], [ {atom(), any()} ]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
@spec forward_messages(Nadia.Client.t(), integer() | binary(), integer() | binary(), [ integer() ]) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.forward_messages/4.
@spec forward_messages( Nadia.Client.t(), integer() | binary(), integer() | binary(), [integer()], [ {atom(), any()} ] ) :: {:ok, [Nadia.Model.MessageId.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.forward_messages/5.
@spec get_available_gifts() :: {:ok, Nadia.Model.Gifts.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get all gifts that can be sent by the bot.
Returns a Nadia.Model.Gifts object on success.
@spec get_available_gifts(Nadia.Client.t()) :: {:ok, Nadia.Model.Gifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_available_gifts/1.
@spec get_business_account_gifts(binary()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get gifts received and owned by a managed business account.
Returns a Nadia.Model.OwnedGifts object on success.
Args:
business_connection_id- Unique identifier of the business connectionoptions- orddict or map of options
@spec get_business_account_gifts(binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
@spec get_business_account_gifts(Nadia.Client.t(), binary()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_business_account_gifts/2.
@spec get_business_account_gifts( Nadia.Client.t(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_business_account_gifts/3.
@spec get_business_account_star_balance(binary()) :: {:ok, Nadia.Model.StarAmount.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the Telegram Stars balance of a managed business account. Returns a StarAmount object.
Args:
business_connection_id- Unique identifier of the business connection
@spec get_business_account_star_balance(Nadia.Client.t(), binary()) :: {:ok, Nadia.Model.StarAmount.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_business_account_star_balance/2.
@spec get_business_connection(binary()) :: {:ok, Nadia.Model.BusinessConnection.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object.
Args:
business_connection_id- Unique identifier of the business connection
@spec get_business_connection(Nadia.Client.t(), binary()) :: {:ok, Nadia.Model.BusinessConnection.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_business_connection/2.
@spec get_chat(integer() | binary()) :: {:ok, Chat.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.) Returns a Chat object on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup or channel (in the format @supergroupusername)
@spec get_chat(Nadia.Client.t(), integer() | binary()) :: {:ok, Chat.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat/2.
@spec get_chat_administrators(integer() | binary()) :: {:ok, [ChatMember.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)options- orddict of options
Options:
:return_bots- Pass True to include bots in the returned administrator list
@spec get_chat_administrators(integer() | binary(), [{atom(), any()}]) :: {:ok, [ChatMember.t()]} | {:error, Nadia.Model.Error.t()}
@spec get_chat_administrators(Nadia.Client.t(), integer() | binary()) :: {:ok, [ChatMember.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_administrators/2.
@spec get_chat_administrators(Nadia.Client.t(), integer() | binary(), [ {atom(), any()} ]) :: {:ok, [ChatMember.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_administrators/3.
@spec get_chat_gifts(integer() | binary()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get gifts owned by a chat.
Returns a Nadia.Model.OwnedGifts object on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channeloptions- orddict or map of options
@spec get_chat_gifts(integer() | binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
@spec get_chat_gifts(Nadia.Client.t(), integer() | binary()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_gifts/2.
@spec get_chat_gifts( Nadia.Client.t(), integer() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_gifts/3.
@spec get_chat_member(integer() | binary(), integer()) :: {:ok, ChatMember.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get information about a member of a chat. Returns a ChatMember object on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)user_id- Unique identifier of the target user
@spec get_chat_member(Nadia.Client.t(), integer() | binary(), integer()) :: {:ok, ChatMember.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_member/3.
@spec get_chat_member_count(integer() | binary()) :: {:ok, integer()} | {:error, Nadia.Model.Error.t()}
Use this method to get the number of members in a chat. Returns Int on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
@spec get_chat_member_count(Nadia.Client.t(), integer() | binary()) :: {:ok, integer()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_chat_member_count/2.
@spec get_custom_emoji_stickers([binary()] | binary()) :: {:ok, [Nadia.Model.Sticker.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get information about custom emoji stickers by their identifiers. Returns an array of Sticker objects.
Args:
custom_emoji_ids- List of custom emoji identifiers
@spec get_custom_emoji_stickers(Nadia.Client.t(), [binary()] | binary()) :: {:ok, [Nadia.Model.Sticker.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_custom_emoji_stickers/2.
@spec get_file(binary()) :: {:ok, Nadia.Model.File.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get basic info about a file and prepare it for downloading.
For the moment, bots can download files of up to 20MB in size.
On success, a File object is returned.
The file can then be downloaded via the link
https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken
from the response. It is guaranteed that the link will be valid for at least 1 hour.
When the link expires, a new one can be requested by calling get_file again.
Args:
file_id- File identifier to get info about
@spec get_file(Nadia.Client.t(), binary()) :: {:ok, Nadia.Model.File.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_file/2.
@spec get_file_link(Nadia.Model.File.t()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Use this method to get link for file for subsequent use.
This method is an extension of the get_file method.
iex> Nadia.get_file_link(%Nadia.Model.File{file_id: "BQADBQADBgADmEjsA1aqdSxtzvvVAg",
...> file_path: "document/file_10", file_size: 17680})
{:ok,
"https://api.telegram.org/file/bot#{Nadia.Config.token()}/document/file_10"}
@spec get_file_link(Nadia.Client.t(), Nadia.Model.File.t()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_file_link/2.
@spec get_forum_topic_icon_stickers() :: {:ok, [Nadia.Model.Sticker.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get custom emoji stickers that can be used as forum topic icons. Returns an array of Sticker objects.
@spec get_forum_topic_icon_stickers(Nadia.Client.t()) :: {:ok, [Nadia.Model.Sticker.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_forum_topic_icon_stickers/1.
@spec get_game_high_scores(integer()) :: {:ok, [Nadia.Model.GameHighScore.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get data for game high score tables. Returns a list of GameHighScore objects.
Args:
user_id- Target user identifieroptions- orddict or map of options
@spec get_game_high_scores(integer(), [{atom(), any()}] | map()) :: {:ok, [Nadia.Model.GameHighScore.t()]} | {:error, Nadia.Model.Error.t()}
@spec get_game_high_scores(Nadia.Client.t(), integer()) :: {:ok, [Nadia.Model.GameHighScore.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_game_high_scores/2.
@spec get_game_high_scores(Nadia.Client.t(), integer(), [{atom(), any()}] | map()) :: {:ok, [Nadia.Model.GameHighScore.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_game_high_scores/3.
@spec get_managed_bot_access_settings(integer()) :: {:ok, Nadia.Model.BotAccessSettings.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the access settings of a managed bot. Returns a BotAccessSettings object.
Args:
user_id- User identifier of the managed bot whose access settings will be returned
@spec get_managed_bot_access_settings(Nadia.Client.t(), integer()) :: {:ok, Nadia.Model.BotAccessSettings.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_managed_bot_access_settings/2.
@spec get_managed_bot_token(integer()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Use this method to get the token of a managed bot. Returns the token as a string.
Args:
user_id- User identifier of the managed bot whose token will be returned
@spec get_managed_bot_token(Nadia.Client.t(), integer()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_managed_bot_token/2.
@spec get_me() :: {:ok, Nadia.Model.User.t()} | {:error, Nadia.Model.Error.t()}
A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.
@spec get_me(Nadia.Client.t()) :: {:ok, Nadia.Model.User.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_me/1.
@spec get_my_commands() :: {:ok, [Nadia.Model.BotCommand.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get the current list of the bot's commands for the given
scope and user language.
Returns a list of Nadia.Model.BotCommand objects on success.
@spec get_my_commands([{atom(), any()}] | map()) :: {:ok, [Nadia.Model.BotCommand.t()]} | {:error, Nadia.Model.Error.t()}
@spec get_my_commands(Nadia.Client.t()) :: {:ok, [Nadia.Model.BotCommand.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_commands/1.
@spec get_my_commands(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, [Nadia.Model.BotCommand.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_commands/2.
@spec get_my_default_administrator_rights() :: {:ok, Nadia.Model.ChatAdministratorRights.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the current default administrator rights of the bot.
Returns Nadia.Model.ChatAdministratorRights on success.
@spec get_my_default_administrator_rights([{atom(), any()}] | map()) :: {:ok, Nadia.Model.ChatAdministratorRights.t()} | {:error, Nadia.Model.Error.t()}
@spec get_my_default_administrator_rights(Nadia.Client.t()) :: {:ok, Nadia.Model.ChatAdministratorRights.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_default_administrator_rights/1.
@spec get_my_default_administrator_rights(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.ChatAdministratorRights.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_default_administrator_rights/2.
@spec get_my_description() :: {:ok, Nadia.Model.BotDescription.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the current bot description for the given user language.
Returns a Nadia.Model.BotDescription on success.
@spec get_my_description([{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotDescription.t()} | {:error, Nadia.Model.Error.t()}
@spec get_my_description(Nadia.Client.t()) :: {:ok, Nadia.Model.BotDescription.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_description/1.
@spec get_my_description(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotDescription.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_description/2.
@spec get_my_name() :: {:ok, Nadia.Model.BotName.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the current bot name for the given user language.
Returns a Nadia.Model.BotName on success.
@spec get_my_name([{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotName.t()} | {:error, Nadia.Model.Error.t()}
@spec get_my_name(Nadia.Client.t()) :: {:ok, Nadia.Model.BotName.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_name/1.
@spec get_my_name(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotName.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_name/2.
@spec get_my_short_description() :: {:ok, Nadia.Model.BotShortDescription.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the current bot short description for the given user
language.
Returns a Nadia.Model.BotShortDescription on success.
@spec get_my_short_description([{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotShortDescription.t()} | {:error, Nadia.Model.Error.t()}
@spec get_my_short_description(Nadia.Client.t()) :: {:ok, Nadia.Model.BotShortDescription.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_short_description/1.
@spec get_my_short_description(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.BotShortDescription.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_short_description/2.
@spec get_my_star_balance() :: {:ok, Nadia.Model.StarAmount.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the current Telegram Stars balance of the bot. Returns a StarAmount object.
@spec get_my_star_balance(Nadia.Client.t()) :: {:ok, Nadia.Model.StarAmount.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_my_star_balance/1.
@spec get_star_transactions() :: {:ok, Nadia.Model.StarTransactions.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the bot's Telegram Star transactions. Returns a StarTransactions object.
Args:
options- orddict or map of options
@spec get_star_transactions([{atom(), any()}] | map()) :: {:ok, Nadia.Model.StarTransactions.t()} | {:error, Nadia.Model.Error.t()}
@spec get_star_transactions(Nadia.Client.t()) :: {:ok, Nadia.Model.StarTransactions.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_star_transactions/1.
@spec get_star_transactions(Nadia.Client.t(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.StarTransactions.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_star_transactions/2.
@spec get_sticker_set(binary()) :: {:ok, Nadia.Model.StickerSet.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get a sticker set. On success, a StickerSet object is returned.
Args:
name- Name of the sticker set
@spec get_sticker_set(Nadia.Client.t(), binary()) :: {:ok, Nadia.Model.StickerSet.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_sticker_set/2.
Use this method to receive incoming updates using long polling. An Array of Update objects is returned.
Args:
options- orddict of options
Options:
:offset- Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon asget_updatesis called with anoffsethigher than itsupdate_id.:limit- Limits the number of updates to be retrieved. Values between 1—100 are accepted. Defaults to 100:timeout- Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling:allowed_updates- JSON-serializable list of update types to receive
@spec get_updates([{atom(), any()}]) :: {:ok, [Nadia.Model.Update.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_updates/1.
@spec get_updates(Nadia.Client.t(), [{atom(), any()}]) :: {:ok, [Nadia.Model.Update.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_updates/2.
@spec get_user_chat_boosts(integer() | binary(), integer()) :: {:ok, Nadia.Model.UserChatBoosts.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get the list of boosts added to a chat by a user. Returns a UserChatBoosts object.
Args:
chat_id- Unique identifier for the chat or username of the channeluser_id- Unique identifier of the target user
@spec get_user_chat_boosts(Nadia.Client.t(), integer() | binary(), integer()) :: {:ok, Nadia.Model.UserChatBoosts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_chat_boosts/3.
@spec get_user_gifts(integer()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get gifts owned by a user.
Returns a Nadia.Model.OwnedGifts object on success.
Args:
user_id- Unique identifier of the target useroptions- orddict or map of options
@spec get_user_gifts(integer(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
@spec get_user_gifts(Nadia.Client.t(), integer()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_gifts/2.
@spec get_user_gifts(Nadia.Client.t(), integer(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.OwnedGifts.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_gifts/3.
@spec get_user_personal_chat_messages(integer(), integer()) :: {:ok, [Nadia.Model.Message.t()]} | {:error, Nadia.Model.Error.t()}
Use this method to get the last messages from the personal chat of a given user. On success, an array of Message objects is returned.
Args:
user_id- Unique identifier for the target userlimit- The maximum number of messages to return
@spec get_user_personal_chat_messages(Nadia.Client.t(), integer(), integer()) :: {:ok, [Nadia.Model.Message.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_personal_chat_messages/3.
@spec get_user_profile_audios(integer()) :: {:ok, Nadia.Model.UserProfileAudios.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
Args:
user_id- Unique identifier of the target useroptions- orddict of options
Options:
:offset- Sequential number of the first audio to be returned:limit- Limits the number of audios to be retrieved
@spec get_user_profile_audios(integer(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.UserProfileAudios.t()} | {:error, Nadia.Model.Error.t()}
@spec get_user_profile_audios(Nadia.Client.t(), integer()) :: {:ok, Nadia.Model.UserProfileAudios.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_profile_audios/2.
@spec get_user_profile_audios(Nadia.Client.t(), integer(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.UserProfileAudios.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_profile_audios/3.
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Args:
user_id- Unique identifier of the target useroptions- orddict of options
Options:
:offset- Sequential number of the first photo to be returned. By default, all photos are returned:limit- Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100
@spec get_user_profile_photos(integer(), [{atom(), any()}]) :: {:ok, Nadia.Model.UserProfilePhotos.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_profile_photos/2.
@spec get_user_profile_photos(Nadia.Client.t(), integer(), [{atom(), any()}]) :: {:ok, Nadia.Model.UserProfilePhotos.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_user_profile_photos/3.
@spec get_webhook_info() :: {:ok, Nadia.Model.WebhookInfo.t()} | {:error, Nadia.Model.Error.t()}
Use this method to get current webhook status. Requires no parameters.
On success, returns a Nadia.Model.WebhookInfo.t() object with webhook details.
If the bot is using getUpdates, will return an object with the url field empty.
@spec get_webhook_info(Nadia.Client.t()) :: {:ok, Nadia.Model.WebhookInfo.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.get_webhook_info/1.
@spec hide_general_forum_topic(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to hide the General forum topic. Returns True on success.
@spec hide_general_forum_topic(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.hide_general_forum_topic/2.
@spec leave_chat(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup or channel (in the format @supergroupusername)
@spec leave_chat(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.leave_chat/2.
@spec log_out() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to log out from the cloud Bot API server before launching the
bot locally.
Returns :ok on success.
@spec log_out(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.log_out/1.
Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Identifier of a message to pin
Options:
disable_notification- Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels.
@spec pin_chat_message(Nadia.Client.t(), integer() | binary(), integer() | binary(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.pin_chat_message/4.
@spec post_story(binary(), list() | map() | struct() | binary(), integer()) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Use this method to post a story on behalf of a managed business account. Returns a Story object.
Args:
business_connection_id- Unique identifier of the business connectioncontent- JSON-serializable story content object or a pre-encoded JSON stringactive_period- Period after which the story is moved to the archive, in secondsoptions- orddict or map of options
Options:
:caption- Caption of the story:parse_mode- Mode for parsing entities in the story caption:caption_entities- JSON-serializable caption entities array or a pre-encoded JSON string:areas- JSON-serializable story areas array or a pre-encoded JSON string:post_to_chat_page- Pass true to keep the story accessible after it expires:protect_content- Pass true if the content of the story must be protected
@spec post_story( binary(), list() | map() | struct() | binary(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
@spec post_story( Nadia.Client.t(), binary(), list() | map() | struct() | binary(), integer() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.post_story/4.
@spec post_story( Nadia.Client.t(), binary(), list() | map() | struct() | binary(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.post_story/5.
@spec promote_chat_member(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to promote or demote a user in a supergroup or a channel. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channeluser_id- Unique identifier of the target useroptions- orddict of options
@spec promote_chat_member(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec promote_chat_member(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.promote_chat_member/3.
@spec promote_chat_member(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.promote_chat_member/4.
@spec read_business_message(binary(), integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to mark an incoming message as read on behalf of a business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionchat_id- Unique identifier of the chat in which the message was receivedmessage_id- Unique identifier of the message to mark as read
@spec read_business_message(Nadia.Client.t(), binary(), integer(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.read_business_message/4.
@spec refund_star_payment(integer(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to refund a successful Telegram Stars payment.
Returns :ok on success.
Args:
user_id- Identifier of the user whose payment will be refundedtelegram_payment_charge_id- Telegram payment identifier
@spec refund_star_payment(Nadia.Client.t(), integer(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.refund_star_payment/3.
@spec remove_business_account_profile_photo(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove the current profile photo of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionoptions- orddict of options
Options:
:is_public- Pass true to remove the public profile photo
@spec remove_business_account_profile_photo(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec remove_business_account_profile_photo(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_business_account_profile_photo/2.
@spec remove_business_account_profile_photo( Nadia.Client.t(), binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_business_account_profile_photo/3.
@spec remove_chat_verification(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove verification from a chat that is currently verified on behalf
of the organization represented by the bot.
Returns :ok on success.
@spec remove_chat_verification(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_chat_verification/2.
@spec remove_my_profile_photo() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove the bot's profile photo.
Returns :ok on success.
@spec remove_my_profile_photo([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec remove_my_profile_photo(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_my_profile_photo/1.
@spec remove_my_profile_photo(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_my_profile_photo/2.
@spec remove_user_verification(integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to remove verification from a user who is currently verified on behalf
of the organization represented by the bot.
Returns :ok on success.
@spec remove_user_verification(Nadia.Client.t(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.remove_user_verification/2.
@spec reopen_forum_topic(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to reopen a closed forum topic. Returns True on success.
@spec reopen_forum_topic(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.reopen_forum_topic/3.
@spec reopen_general_forum_topic(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to reopen a closed General forum topic. Returns True on success.
@spec reopen_general_forum_topic(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.reopen_general_forum_topic/2.
@spec replace_managed_bot_token(integer()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Use this method to revoke the current token of a managed bot and generate a new one. Returns the new token as a string.
Args:
user_id- User identifier of the managed bot whose token will be replaced
@spec replace_managed_bot_token(Nadia.Client.t(), integer()) :: {:ok, binary()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.replace_managed_bot_token/2.
@spec replace_sticker_in_set( integer(), binary(), binary(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to replace an existing sticker in a sticker set with a new one. Returns True on success.
Args:
user_id- User identifier of the sticker set ownername- Sticker set nameold_sticker- File identifier of the replaced stickersticker- InputSticker object for the new sticker
@spec replace_sticker_in_set( Nadia.Client.t(), integer(), binary(), binary(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.replace_sticker_in_set/5.
@spec repost_story(binary(), integer(), integer(), integer()) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Use this method to repost a story on behalf of a managed business account. Returns a Story object.
Args:
business_connection_id- Unique identifier of the business connectionfrom_chat_id- Unique identifier of the chat which posted the storyfrom_story_id- Unique identifier of the story that should be repostedactive_period- Period after which the story is moved to the archive, in secondsoptions- orddict or map of options
Options:
:post_to_chat_page- Pass true to keep the story accessible after it expires:protect_content- Pass true if the content of the story must be protected
@spec repost_story( binary(), integer(), integer(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
@spec repost_story(Nadia.Client.t(), binary(), integer(), integer(), integer()) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.repost_story/5.
@spec repost_story( Nadia.Client.t(), binary(), integer(), integer(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Story.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.repost_story/6.
@spec restrict_chat_member( integer() | binary(), integer(), map() | keyword() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to restrict a user in a supergroup. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)user_id- Unique identifier of the target userpermissions- New user permissionsoptions- orddict of options
@spec restrict_chat_member( integer() | binary(), integer(), map() | keyword() | struct() | binary(), [{atom(), any()}] ) :: :ok | {:error, Nadia.Model.Error.t()}
@spec restrict_chat_member( Nadia.Client.t(), integer() | binary(), integer(), map() | keyword() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.restrict_chat_member/4.
@spec restrict_chat_member( Nadia.Client.t(), integer() | binary(), integer(), map() | keyword() | struct() | binary(), [{atom(), any()}] ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.restrict_chat_member/5.
@spec revoke_chat_invite_link(integer() | binary(), binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Use this method to revoke an invite link created by the bot. Returns the revoked invite link as a ChatInviteLink object.
@spec revoke_chat_invite_link(Nadia.Client.t(), integer() | binary(), binary()) :: {:ok, Nadia.Model.ChatInviteLink.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.revoke_chat_invite_link/3.
@spec save_prepared_inline_message(integer(), Nadia.Model.InlineQueryResult.t()) :: {:ok, Nadia.Model.PreparedInlineMessage.t()} | {:error, Nadia.Model.Error.t()}
Use this method to store a message that can be sent by a user of a Mini App. On success, a PreparedInlineMessage object is returned.
Args:
user_id- Unique identifier of the target user that can use the prepared messageresult- An inline query result describing the message to be sentoptions- orddict of options
@spec save_prepared_inline_message( integer(), Nadia.Model.InlineQueryResult.t(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.PreparedInlineMessage.t()} | {:error, Nadia.Model.Error.t()}
@spec save_prepared_inline_message( Nadia.Client.t(), integer(), Nadia.Model.InlineQueryResult.t() ) :: {:ok, Nadia.Model.PreparedInlineMessage.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.save_prepared_inline_message/3.
@spec save_prepared_inline_message( Nadia.Client.t(), integer(), Nadia.Model.InlineQueryResult.t(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.PreparedInlineMessage.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.save_prepared_inline_message/4.
@spec save_prepared_keyboard_button(integer(), list() | map() | struct() | binary()) :: {:ok, Nadia.Model.PreparedKeyboardButton.t()} | {:error, Nadia.Model.Error.t()}
Use this method to store a keyboard button that can be used by a user within a Mini App. On success, a PreparedKeyboardButton object is returned.
Args:
user_id- Unique identifier of the target user that can use the buttonbutton- JSON-serializable keyboard button object or a pre-encoded JSON string
@spec save_prepared_keyboard_button( Nadia.Client.t(), integer(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.PreparedKeyboardButton.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.save_prepared_keyboard_button/3.
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)animation- Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data.
Options:
:duration- Duration of sent animation in seconds:width- Animation width:height- Animation height:thumb- Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. thumbnail should be in JPEG format and less than 200 kB in size.:caption- Animation caption (may also be used when resending animation by file_id), 0-1024 characters:parse_mode- Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.:disable_notification- Sends the message silently. Users will receive a notification with no sound.:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
@spec send_animation(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_animation/3.
@spec send_animation(Nadia.Client.t(), integer() | binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_animation/4.
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
For backward compatibility, when the fields title and performer are both empty and the mime-type of the file to be sent is not audio/mpeg, the file will be sent as a playable voice message. For this to work, the audio must be in an .ogg file encoded with OPUS. This behavior will be phased out in the future. For sending voice messages, use the sendVoice method instead.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)audio- Audio to send. Either afile_idto resend an audio that is already on the Telegram servers, or afile_pathto upload a new audiooptions- orddict of options
Options:
:duration- Duration of the audio in seconds:performer- Performer:title- Track name:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_audio(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_audio/3.
@spec send_audio(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_audio/4.
@spec send_chat_action(integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)action- Type of action to broadcast. Choose one, depending on what the user is about to receive:typingfor text messagesupload_photofor photosrecord_videoorupload_videofor videosrecord_audioorupload_audiofor audio filesupload_documentfor general filesfind_locationfor location data
options- orddict of options
Options:
:business_connection_id- Unique identifier of the business connection:message_thread_id- Unique identifier for the target message thread
@spec send_chat_action(integer() | binary(), binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec send_chat_action(Nadia.Client.t(), integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_chat_action/3.
@spec send_chat_action(Nadia.Client.t(), integer() | binary(), binary(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_chat_action/4.
@spec send_chat_join_request_web_app(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to process a received chat join request query by showing a
Mini App to the user before deciding the outcome.
Returns :ok on success.
@spec send_chat_join_request_web_app(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_chat_join_request_web_app/3.
@spec send_checklist( binary(), integer() | binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
Args:
business_connection_id- Unique identifier of the business connectionchat_id- Unique identifier for the target chat or username of the target botchecklist- JSON-serializable checklist object or a pre-encoded JSON stringoptions- orddict of options
@spec send_checklist( binary(), integer() | binary(), list() | map() | struct() | binary(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec send_checklist( Nadia.Client.t(), binary(), integer() | binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_checklist/4.
@spec send_checklist( Nadia.Client.t(), binary(), integer() | binary(), list() | map() | struct() | binary(), [{atom(), any()}] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_checklist/5.
Use this method to send phone contacts. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)phone_number- Contact's phone numberfirst_name- Contact's first nameoptions- orddict of options
Options:
:last_name- Contact's last name:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user. -Nadia.Model.InlineKeyboardMarkuporNadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_contact(integer() | binary(), binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_contact/4.
@spec send_contact(Nadia.Client.t(), integer() | binary(), binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_contact/5.
@spec send_dice(integer() | binary()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
@spec send_dice(integer() | binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec send_dice(Nadia.Client.t(), integer() | binary()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_dice/2.
@spec send_dice(Nadia.Client.t(), integer() | binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_dice/3.
Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)document- File to send. Either afile_idto resend a file that is already on the Telegram servers, or afile_pathto upload a new fileoptions- orddict of options
Options:
:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_document(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_document/3.
@spec send_document(Nadia.Client.t(), integer() | binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_document/4.
@spec send_game(integer() | binary(), binary()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send a game. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chatgame_short_name- Short name of the gameoptions- orddict or map of options
@spec send_game(integer() | binary(), binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec send_game(Nadia.Client.t(), integer() | binary(), binary()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_game/3.
@spec send_game( Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_game/4.
@spec send_gift(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to send a gift to a user or channel chat.
Returns :ok on success.
Args:
gift_id- Identifier of the giftoptions- orddict or map of options, including required:user_idor:chat_id
Options:
:user_id- Unique identifier of the target user:chat_id- Unique identifier or username of the target channel chat:pay_for_upgrade- Pass true to pay for the gift upgrade from the bot's balance:text- Text that will be shown along with the gift:text_parse_mode- Mode for parsing entities in the text:text_entities- JSON-serializable array of message entities or pre-encoded JSON
@spec send_gift(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec send_gift(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_gift/2.
@spec send_gift(Nadia.Client.t(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_gift/3.
@spec send_invoice( integer() | binary(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send invoices. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channeltitle- Product namedescription- Product descriptionpayload- Bot-defined invoice payloadcurrency- Three-letter ISO 4217 currency code, orXTRfor Starsprices- JSON-serializable price breakdown array or a pre-encoded JSON stringoptions- orddict or map of options
@spec send_invoice( integer() | binary(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec send_invoice( Nadia.Client.t(), integer() | binary(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_invoice/7.
@spec send_invoice( Nadia.Client.t(), integer() | binary(), binary(), binary(), binary(), binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_invoice/8.
Use this method to send live photos. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)live_photo- Live photo media to sendphoto- Cover photo to send as a regular Telegram parameteroptions- orddict of options
@spec send_live_photo(integer() | binary(), binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_live_photo/4.
@spec send_live_photo(Nadia.Client.t(), integer() | binary(), binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_live_photo/5.
Use this method to send point on the map. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)latitude- Latitude of locationlongitude- Longitude of locationoptions- orddict of options
Options:
:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_location(integer() | binary(), float(), float(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_location/4.
@spec send_location(Nadia.Client.t(), integer() | binary(), float(), float(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_location/5.
Use this method to send an album of photos, videos, documents or audios. On success, an array of sent Messages is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)media- JSON-serializable media array or a pre-encoded JSON stringoptions- orddict of options
@spec send_media_group(integer() | binary(), list() | map() | struct() | binary(), [ {atom(), any()} ]) :: {:ok, [Nadia.Model.Message.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_media_group/3.
@spec send_media_group( Nadia.Client.t(), integer() | binary(), list() | map() | struct() | binary(), [ {atom(), any()} ] ) :: {:ok, [Nadia.Model.Message.t()]} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_media_group/4.
Use this method to send text messages. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)text- Text of the message to be sentoptions- orddict of options
Options:
:parse_mode- UseMarkdown, if you want Telegram apps to show bold, italic and inline URLs in your bot's message:disable_web_page_preview- Disables link previews for links in this message:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_message(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_message/3.
@spec send_message(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_message/4.
@spec send_message_draft(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to stream a partial message draft to a user.
Returns :ok on success.
@spec send_message_draft(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec send_message_draft(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_message_draft/3.
@spec send_message_draft(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_message_draft/4.
Use this method to send paid media. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)star_count- Amount of Telegram Stars to be paid for the mediamedia- JSON-serializable paid media array or a pre-encoded JSON stringoptions- orddict of options
@spec send_paid_media( integer() | binary(), integer(), list() | map() | struct() | binary(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_paid_media/4.
@spec send_paid_media( Nadia.Client.t(), integer() | binary(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_paid_media/5.
Use this method to send photos. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)photo- Photo to send. Either afile_idto resend a photo that is already on the Telegram servers, or afile_pathto upload a new photooptions- orddict of options
Options:
:caption- Photo caption (may also be used when resending photos byfile_id):disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_photo(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_photo/3.
@spec send_photo(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_photo/4.
@spec send_poll(integer() | binary(), binary(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send a native poll. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)question- Poll questionparams- orddict or map of Telegram parameters, including required:options
@spec send_poll( Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_poll/4.
@spec send_rich_message(integer() | binary(), list() | map() | struct() | binary()) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to send rich messages. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target bot, supergroup, or channelrich_message- JSON-serializable InputRichMessage object or a pre-encoded JSON stringoptions- orddict of options
@spec send_rich_message( integer() | binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
@spec send_rich_message( Nadia.Client.t(), integer() | binary(), list() | map() | struct() | binary() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_rich_message/3.
@spec send_rich_message( Nadia.Client.t(), integer() | binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_rich_message/4.
@spec send_rich_message_draft( integer(), integer(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to stream a partial rich message to a user while the message is
being generated.
Returns :ok on success.
@spec send_rich_message_draft( integer(), integer(), list() | map() | struct() | binary(), [ {atom(), any()} ] ) :: :ok | {:error, Nadia.Model.Error.t()}
@spec send_rich_message_draft( Nadia.Client.t(), integer(), integer(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_rich_message_draft/4.
@spec send_rich_message_draft( Nadia.Client.t(), integer(), integer(), list() | map() | struct() | binary(), [{atom(), any()}] ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_rich_message_draft/5.
Use this method to send .webp stickers. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)sticker- File to send. Either afile_idto resend a sticker that is already on the Telegram servers, or afile_pathto upload a new stickeroptions- orddict of options
Options:
:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_sticker(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_sticker/3.
@spec send_sticker(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_sticker/4.
Use this method to send information about a venue. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)latitude- Latitude of locationlongitude- Longitude of locationtitle- Name of the venueaddress- Address of the venueoptions- orddict of options
Options:
:foursquare_id- Foursquare identifier of the venue:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide reply keyboard or to force a reply from the user. -Nadia.Model.InlineKeyboardMarkuporNadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_venue(integer() | binary(), float(), float(), binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_venue/6.
@spec send_venue( Nadia.Client.t(), integer() | binary(), float(), float(), binary(), binary(), [ {atom(), any()} ] ) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_venue/7.
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)video- Video to send. Either afile_idto resend a video that is already on the Telegram servers, or afile_pathto upload a new videooptions- orddict of options
Options:
:duration- Duration of the video in seconds:caption- Video caption (may also be used when resending videos byfile_id):disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_video(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_video/3.
@spec send_video(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_video/4.
Use this method to send video messages. On success, the sent Message is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)video_note- Video note to send. Either afile_idto resend a video note that is already on the Telegram servers, or afile_pathto upload a new video noteoptions- orddict of options
@spec send_video_note(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_video_note/3.
@spec send_video_note(Nadia.Client.t(), integer() | binary(), binary(), [ {atom(), any()} ]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_video_note/4.
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)voice- Audio to send. Either afile_idto resend an audio that is already on the Telegram servers, or afile_pathto upload a new audiooptions- orddict of options
Options:
:duration- Duration of the audio in seconds:disable_notification- Sends the message silently or without notification:reply_to_message_id- If the message is a reply, ID of the original message:reply_markup- Additional interface options. Instructions to hide keyboard or to force a reply from the user -Nadia.Model.ReplyKeyboardMarkuporNadia.Model.ReplyKeyboardRemoveorNadia.Model.ForceReply
@spec send_voice(integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_voice/3.
@spec send_voice(Nadia.Client.t(), integer() | binary(), binary(), [{atom(), any()}]) :: {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.send_voice/4.
@spec set_business_account_bio(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the bio of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionoptions- orddict of options
Options:
:bio- New bio of the business account
@spec set_business_account_bio(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_business_account_bio(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_bio/2.
@spec set_business_account_bio(Nadia.Client.t(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_bio/3.
@spec set_business_account_gift_settings( binary(), boolean(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the gift settings of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionshow_gift_button- Whether the gift button must always be shown in the input fieldaccepted_gift_types- JSON-serializable accepted gift types object or pre-encoded JSON
@spec set_business_account_gift_settings( Nadia.Client.t(), binary(), boolean(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_gift_settings/4.
@spec set_business_account_name(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the first and last name of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionfirst_name- New first name of the business accountoptions- orddict of options
Options:
:last_name- New last name of the business account
@spec set_business_account_name(binary(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_business_account_name(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_name/3.
@spec set_business_account_name( Nadia.Client.t(), binary(), binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_name/4.
@spec set_business_account_profile_photo( binary(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the profile photo of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionphoto- JSON-serializable profile photo object or a pre-encoded JSON stringoptions- orddict of options
Options:
:is_public- Pass true to set the public profile photo
@spec set_business_account_profile_photo( binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_business_account_profile_photo( Nadia.Client.t(), binary(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_profile_photo/3.
@spec set_business_account_profile_photo( Nadia.Client.t(), binary(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_profile_photo/4.
@spec set_business_account_username(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the username of a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionoptions- orddict of options
Options:
:username- New username of the business account
@spec set_business_account_username(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_business_account_username(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_username/2.
@spec set_business_account_username( Nadia.Client.t(), binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_business_account_username/3.
@spec set_chat_administrator_custom_title(integer() | binary(), integer(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set a custom title for an administrator in a supergroup. Returns True on success.
@spec set_chat_administrator_custom_title( Nadia.Client.t(), integer() | binary(), integer(), binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_administrator_custom_title/4.
@spec set_chat_description(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the description of a chat. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channeloptions- orddict of options
@spec set_chat_description(integer() | binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_chat_description(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_description/2.
@spec set_chat_description(Nadia.Client.t(), integer() | binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_description/3.
@spec set_chat_member_tag(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the tag of a user in a direct messages chat. Returns True on success.
Args:
chat_id- Unique identifier for the target chatuser_id- Unique identifier of the target useroptions- orddict of options
@spec set_chat_member_tag(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_chat_member_tag(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_member_tag/3.
@spec set_chat_member_tag(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_member_tag/4.
@spec set_chat_permissions( integer() | binary(), map() | keyword() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set default chat permissions for all members. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target supergrouppermissions- New default chat permissionsoptions- orddict of options
@spec set_chat_permissions( integer() | binary(), map() | keyword() | struct() | binary(), [ {atom(), any()} ] ) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_chat_permissions( Nadia.Client.t(), integer() | binary(), map() | keyword() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_permissions/3.
@spec set_chat_permissions( Nadia.Client.t(), integer() | binary(), map() | keyword() | struct() | binary(), [{atom(), any()}] ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_permissions/4.
@spec set_chat_photo(integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set a new profile photo for the chat. Returns True on success.
@spec set_chat_photo(Nadia.Client.t(), integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_photo/3.
@spec set_chat_sticker_set(integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set a new group sticker set for a supergroup. Returns True on success.
@spec set_chat_sticker_set(Nadia.Client.t(), integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_sticker_set/3.
@spec set_chat_title(integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the title of a chat. Returns True on success.
@spec set_chat_title(Nadia.Client.t(), integer() | binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_chat_title/3.
@spec set_custom_emoji_sticker_set_thumbnail(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
Args:
name- Sticker set name
Options:
custom_emoji_id- Custom emoji identifier to use as thumbnail
@spec set_custom_emoji_sticker_set_thumbnail(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_custom_emoji_sticker_set_thumbnail(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_custom_emoji_sticker_set_thumbnail/2.
@spec set_custom_emoji_sticker_set_thumbnail( Nadia.Client.t(), binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_custom_emoji_sticker_set_thumbnail/3.
@spec set_game_score(integer(), integer()) :: {:ok, Nadia.Model.Message.t()} | :ok | {:error, Nadia.Model.Error.t()}
Use this method to set a user's score in a game message.
On success, the edited Message is returned, or :ok is returned when editing
an inline message.
Args:
user_id- User identifierscore- New scoreoptions- orddict or map of options
@spec set_game_score(integer(), integer(), [{atom(), any()}] | map()) :: {:ok, Nadia.Model.Message.t()} | :ok | {:error, Nadia.Model.Error.t()}
@spec set_game_score(Nadia.Client.t(), integer(), integer()) :: {:ok, Nadia.Model.Message.t()} | :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_game_score/3.
@spec set_game_score( Nadia.Client.t(), integer(), integer(), [{atom(), any()}] | map() ) :: {:ok, Nadia.Model.Message.t()} | :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_game_score/4.
Use this method to change the access settings of a managed bot. Returns True on success.
Args:
user_id- User identifier of the managed bot whose access settings will be changedis_access_restricted- Pass true if only selected users can access the botoptions- orddict of options
Options:
:added_user_ids- Array of user identifiers allowed to access the bot
@spec set_managed_bot_access_settings(integer(), boolean(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_managed_bot_access_settings/3.
@spec set_managed_bot_access_settings(Nadia.Client.t(), integer(), boolean(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_managed_bot_access_settings/4.
Use this method to change the chosen reactions on a message. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)message_id- Identifier of the target messageoptions- orddict of options
Options:
:reaction- List of reaction types to set on the message:is_big- Pass True to set the reaction with a big animation
@spec set_message_reaction(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_message_reaction/3.
@spec set_message_reaction(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_message_reaction/4.
@spec set_my_commands(list() | map() | struct() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the list of the bot's commands.
Returns :ok on success.
@spec set_my_commands(list() | map() | struct() | binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_my_commands(Nadia.Client.t(), list() | map() | struct() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_commands/2.
@spec set_my_commands( Nadia.Client.t(), list() | map() | struct() | binary(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_commands/3.
@spec set_my_default_administrator_rights() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the default administrator rights requested by the bot.
Returns :ok on success.
@spec set_my_default_administrator_rights([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_my_default_administrator_rights(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_default_administrator_rights/1.
@spec set_my_default_administrator_rights(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_default_administrator_rights/2.
@spec set_my_description() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the bot's description.
Returns :ok on success.
@spec set_my_description([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_my_description(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_description/1.
@spec set_my_description(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_description/2.
@spec set_my_name() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the bot's name.
Returns :ok on success.
@spec set_my_name([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_my_name(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_name/1.
@spec set_my_name(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_name/2.
@spec set_my_profile_photo(list() | map() | struct() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the bot's profile photo.
Returns :ok on success.
@spec set_my_profile_photo(Nadia.Client.t(), list() | map() | struct() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_profile_photo/2.
@spec set_my_short_description() :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the bot's short description.
Returns :ok on success.
@spec set_my_short_description([{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_my_short_description(Nadia.Client.t()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_short_description/1.
@spec set_my_short_description(Nadia.Client.t(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_my_short_description/2.
@spec set_passport_data_errors(integer(), list() | map() | struct() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to inform a user that Telegram Passport elements they provided
contain errors.
Returns :ok on success.
Args:
user_id- User identifiererrors- JSON-serializable list of PassportElementError objects
@spec set_passport_data_errors( Nadia.Client.t(), integer(), list() | map() | struct() | binary() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_passport_data_errors/3.
@spec set_sticker_emoji_list(binary(), [binary()] | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the list of emoji assigned to a regular or custom emoji sticker. Returns True on success.
Args:
sticker- File identifier of the stickeremoji_list- List of emoji associated with the sticker
@spec set_sticker_emoji_list(Nadia.Client.t(), binary(), [binary()] | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_emoji_list/3.
@spec set_sticker_keywords(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change search keywords assigned to a regular or custom emoji sticker. Returns True on success.
Args:
sticker- File identifier of the sticker
Options:
keywords- List of 0-20 search keywords for the sticker
@spec set_sticker_keywords(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_sticker_keywords(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_keywords/2.
@spec set_sticker_keywords(Nadia.Client.t(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_keywords/3.
@spec set_sticker_mask_position(binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the mask position of a mask sticker. Returns True on success.
Args:
sticker- File identifier of the sticker
Options:
mask_position- ANadia.Model.MaskPositionobject for the sticker
@spec set_sticker_mask_position(binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_sticker_mask_position(Nadia.Client.t(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_mask_position/2.
@spec set_sticker_mask_position(Nadia.Client.t(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_mask_position/3.
@spec set_sticker_position_in_set(binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
Args:
sticker- File identifier of the stickerposition- New sticker position in the set, zero-based
@spec set_sticker_position_in_set(Nadia.Client.t(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_position_in_set/3.
@spec set_sticker_set_thumbnail(binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set the thumbnail of a regular or mask sticker set. Returns True on success.
Args:
name- Sticker set nameuser_id- User identifier of the sticker set owner
Options:
thumbnail- Sticker set thumbnail as a file identifier, URL, or attach referenceformat- Format of the thumbnail
@spec set_sticker_set_thumbnail(binary(), integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_sticker_set_thumbnail(Nadia.Client.t(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_set_thumbnail/3.
@spec set_sticker_set_thumbnail( Nadia.Client.t(), binary(), integer(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_set_thumbnail/4.
@spec set_sticker_set_title(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to set the title of a created sticker set. Returns True on success.
Args:
name- Sticker set nametitle- Sticker set title
@spec set_sticker_set_title(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_sticker_set_title/3.
@spec set_user_emoji_status(integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to change the emoji status for a given user.
Returns :ok on success.
@spec set_user_emoji_status(integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec set_user_emoji_status(Nadia.Client.t(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_user_emoji_status/2.
@spec set_user_emoji_status(Nadia.Client.t(), integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_user_emoji_status/3.
Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
Args:
options- orddict of options
Options:
:url- HTTPS url to send updates to.
@spec set_webhook([{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_webhook/1.
@spec set_webhook(Nadia.Client.t(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.set_webhook/2.
@spec stop_message_live_location([{atom(), any()}]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Use this method to stop updating a live location message before live_period
expires. On success, the edited Message is returned, or :ok is returned
when editing an inline message.
Args:
options- orddict of options
@spec stop_message_live_location(Nadia.Client.t(), [{atom(), any()}]) :: :ok | {:ok, Nadia.Model.Message.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.stop_message_live_location/2.
@spec stop_poll(integer() | binary(), integer()) :: {:ok, Nadia.Model.Poll.t()} | {:error, Nadia.Model.Error.t()}
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
Args:
chat_id- Unique identifier for the target chat or username of the target channelmessage_id- Identifier of the original message with the polloptions- orddict of options
@spec stop_poll(integer() | binary(), integer(), [{atom(), any()}]) :: {:ok, Nadia.Model.Poll.t()} | {:error, Nadia.Model.Error.t()}
@spec stop_poll(Nadia.Client.t(), integer() | binary(), integer()) :: {:ok, Nadia.Model.Poll.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.stop_poll/3.
@spec stop_poll(Nadia.Client.t(), integer() | binary(), integer(), [{atom(), any()}]) :: {:ok, Nadia.Model.Poll.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.stop_poll/4.
@spec transfer_business_account_stars(binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to transfer Telegram Stars from a business account balance to the bot.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionstar_count- Number of Telegram Stars to transfer
@spec transfer_business_account_stars(Nadia.Client.t(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.transfer_business_account_stars/3.
@spec transfer_gift(binary(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to transfer an owned gift to another user.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionowned_gift_id- Unique identifier of the regular gift that should be transferrednew_owner_chat_id- Unique identifier of the chat which will own the giftoptions- orddict of options
Options:
:star_count- Number of Telegram Stars that will be paid for the transfer
@spec transfer_gift(binary(), binary(), integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec transfer_gift(Nadia.Client.t(), binary(), binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.transfer_gift/4.
@spec transfer_gift( Nadia.Client.t(), binary(), binary(), integer(), [{atom(), any()}] | map() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.transfer_gift/5.
@spec unban_chat_member(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to unban a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work. Returns True on success.
Args:
chat_id- Unique identifier for the target group or username of the target supergroup (in the format @supergroupusername)user_id- Unique identifier of the target useroptions- orddict of options
Options:
:only_if_banned- Do nothing if the user is not banned
@spec unban_chat_member(integer() | binary(), integer(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec unban_chat_member(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unban_chat_member/3.
@spec unban_chat_member(Nadia.Client.t(), integer() | binary(), integer(), [ {atom(), any()} ]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unban_chat_member/4.
@spec unban_chat_sender_chat(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to unban a previously banned channel chat. Returns True on success.
@spec unban_chat_sender_chat(Nadia.Client.t(), integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unban_chat_sender_chat/3.
@spec unhide_general_forum_topic(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to unhide the General forum topic. Returns True on success.
@spec unhide_general_forum_topic(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unhide_general_forum_topic/2.
@spec unpin_all_chat_messages(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to clear the list of pinned messages in a chat. Returns True on success.
@spec unpin_all_chat_messages(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unpin_all_chat_messages/2.
@spec unpin_all_forum_topic_messages(integer() | binary(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to clear the list of pinned messages in a forum topic. Returns True on success.
@spec unpin_all_forum_topic_messages( Nadia.Client.t(), integer() | binary(), integer() ) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unpin_all_forum_topic_messages/3.
@spec unpin_all_general_forum_topic_messages(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to clear pinned messages in the General forum topic. Returns True on success.
@spec unpin_all_general_forum_topic_messages(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unpin_all_general_forum_topic_messages/2.
@spec unpin_chat_message(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
Args:
chat_id- Unique identifier for the target chat or username of the target channel (in the format @channelusername)options- orddict of options
Options:
:business_connection_id- Unique identifier of the business connection:message_id- Identifier of the message to unpin
@spec unpin_chat_message(integer() | binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
@spec unpin_chat_message(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unpin_chat_message/2.
@spec unpin_chat_message(Nadia.Client.t(), integer() | binary(), [{atom(), any()}]) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.unpin_chat_message/3.
@spec upgrade_gift(binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to upgrade a gift received by a managed business account.
Returns :ok on success.
Args:
business_connection_id- Unique identifier of the business connectionowned_gift_id- Unique identifier of the regular gift that should be upgradedoptions- orddict of options
Options:
:keep_original_details- Pass true to keep the original gift text, sender, and receiver in the upgraded gift:star_count- Number of Telegram Stars that will be paid for the upgrade
@spec upgrade_gift(binary(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec upgrade_gift(Nadia.Client.t(), binary(), binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.upgrade_gift/3.
@spec upgrade_gift(Nadia.Client.t(), binary(), binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.upgrade_gift/4.
@spec upload_sticker_file(integer(), binary()) :: {:ok, Nadia.Model.File.t()} | {:error, Nadia.Model.Error.t()}
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
Args:
user_id- User identifier of sticker file ownerpng_sticker- Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Either afile_idto resend a file that is already on the Telegram servers, or afile_pathto upload a new file from local, or aHTTP URLto get a file from the internet.
@spec upload_sticker_file(Nadia.Client.t(), integer(), binary()) :: {:ok, Nadia.Model.File.t()} | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.upload_sticker_file/3.
@spec verify_chat(integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to verify a chat on behalf of the organization represented by the bot.
Returns :ok on success.
@spec verify_chat(integer() | binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec verify_chat(Nadia.Client.t(), integer() | binary()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.verify_chat/2.
@spec verify_chat(Nadia.Client.t(), integer() | binary(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.verify_chat/3.
@spec verify_user(integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Use this method to verify a user on behalf of the organization represented by the bot.
Returns :ok on success.
@spec verify_user(integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
@spec verify_user(Nadia.Client.t(), integer()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.verify_user/2.
@spec verify_user(Nadia.Client.t(), integer(), [{atom(), any()}] | map()) :: :ok | {:error, Nadia.Model.Error.t()}
Callback implementation for Nadia.Behaviour.verify_user/3.