[][src]Module telegram_bot::types::requests

Telegram Bot API methods.

Modules

_base
answer_callback_query
answer_inline_query
delete_message
edit_message_caption
edit_message_live_location
edit_message_reply_markup
edit_message_text
export_chat_invite_link
forward_message
get_chat
get_chat_administrators
get_chat_member
get_chat_members_count
get_file
get_me
get_updates
get_user_profile_photos
kick_chat_member
leave_chat
pin_chat_message
send_audio
send_chat_action
send_contact
send_document
send_location
send_message
send_photo
send_poll
send_venue
send_video
stop_message_live_location
stop_poll
unban_chat_member
unpin_chat_message

Structs

AnswerCallbackQuery

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.

AnswerInlineQuery
DeleteMessage
DetachedRequest
DetachedRequestType
EditMessageCaption

Use this method to edit captions of messages sent by the bot.

EditMessageLiveLocation

Use this method to edit live location messages sent by the bot. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation.

EditMessageReplyMarkup

Use this method to edit only the reply markup of messages sent by the bot.

EditMessageText

Use this method to edit text messages sent by the bot.

Error
ExportChatInviteLink

Use this method to export chat invite links.

ForwardMessage

Use this method to forward messages of any kind.

GetChat

Use this method to get up to date information about the chat.

GetChatAdministrators

Use this method to get a list of administrators in a chat. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.

GetChatMember

Use this method to get information about a member of a chat.

GetChatMembersCount

Use this method to get the number of members in a chat.

GetFile

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.

GetMe

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.

GetUpdates

Use this method to receive incoming updates using long polling.

GetUserProfilePhotos

Use this method to get a list of profile pictures for a user.

HttpRequest
HttpResponse
JsonIdResponse
JsonRequestType
JsonTrueToUnitResponse
KickChatMember

Use this method to kick a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the group for this to work.

LeaveChat

Use this method for your bot to leave a group, supergroup or channel.

MultipartRequestType
PinChatMessage

Use this method to pin a message in 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.

SendAudio

Use this method to send an audio

SendChatAction

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

SendContact

Use this method to send phone contacts.

SendDocument

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.

SendLocation

Use this method to send point on the map.

SendMessage

Use this method to send text messages.

SendPhoto

Use this method to send photos

SendPoll

Use this method to send polls.

SendVenue

Use this method to send information about a venue.

SendVideo

Use this method to send an video

StopMessageLiveLocation

Use this method to stop updating a live location message sent by the bot before live_period expires.

StopPoll

Use this method to stop a poll which was sent by the bot.

UnbanChatMember

Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work.

UnpinChatMessage

Use this method to unpin a message in 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.

Enums

AllowedUpdate
Body
ChatAction

Strongly typed ChatAction. Instead of passing a String to the chat_action method, this is used.

Method
MultipartValue
RequestUrl

Traits

CanAnswerCallbackQuery

Send answers to callback queries sent from inline keyboards.

CanAnswerInlineQuery
CanDeleteMessage

Delete messages..

CanEditMessageCaption

Edit captions of messages sent by the bot.

CanEditMessageLiveLocation

Edit live location messages sent by the bot.

CanEditMessageReplyMarkup

Edit reply markup of messages sent by the bot.

CanEditMessageText

Edit text of messages sent by the bot.

CanExportChatInviteLink

Export chat invite link.

CanForwardMessage

Forward message.

CanGetChat

Get up to date information about the chat.

CanGetChatAdministrators

Get a list of administrators in a chat.

CanGetChatMemberForChat

Get information about a member of a chat.

CanGetChatMemberForUser

Get information about a member of a chat.

CanGetChatMembersCount

Get the number of members in a chat.

CanGetFile

Get basic info about a file and prepare it for downloading.

CanGetUserProfilePhotos

Get a list of profile pictures for a user.

CanKickChatMemberForChat

Kick a user from a group or a supergroup.

CanKickChatMemberForUser

Kick a user from a group or a supergroup.

CanLeaveChat

Leave a group, supergroup or channel.

CanPinMessage
CanReplySendAudio

Can reply with an audio

CanReplySendContact

Reply with phone contact.

CanReplySendDocument

Can reply with a document

CanReplySendLocation

Reply with point on the map.

CanReplySendMessage

Reply with text message.

CanReplySendPhoto

Can reply with an photo

CanReplySendPoll
CanReplySendVenue

Reply with information about a venue.

CanReplySendVideo

Can reply with an video

CanSendAudio

Send an audio

CanSendChatAction

Send action to a chat.

CanSendContact

Send phone contact.

CanSendDocument

Send a document

CanSendLocation

Send point on the map.

CanSendMessage

Send text message.

CanSendPhoto

Send an photo

CanSendPoll

Send message with a poll.

CanSendVenue

Send information about a venue.

CanSendVideo

Send an video

CanStopMessageLiveLocation

Stop updating a live location message sent by the bot.

CanStopPoll

Stop a poll which was sent by the bot.

CanUnbanChatMemberForChat

Unban a previously kicked user in a supergroup or channel.

CanUnbanChatMemberForUser

Unban a previously kicked user in a supergroup or channel.

CanUnpinMessage
JsonResponse
Request
RequestType
ResponseType
ToMultipart
ToMultipartValue
ToReplyRequest

Use this trait to convert a complex type to corresponding request and reply to the message.

ToRequest

Use this trait to convert a complex type to corresponding request and send it to the chat.

Type Definitions

Multipart