// 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.
// Message identifier in the chat specified in from_chat_id
MessageIDint`json:"message_id"`
}
// SendPhoto represents data for SendPhoto method.
SendPhotostruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data.
Photo*InputFile`json:"photo"`
// Photo caption (may also be used when resending photos by file_id), 0-200 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Disables link previews for links in this message
// 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.
// SendAudio represents data for SendVenue method.
SendAudiostruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data.
Audio*InputFile`json:"audio"`
// Audio caption, 0-1024 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Duration of the audio in seconds
Durationint`json:"duration,omitempty"`
// Performer
Performerstring`json:"performer,omitempty"`
// Track name
Titlestring`json:"title,omitempty"`
// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
Thumb*InputFile`json:"thumb,omitempty"`
// Sends the message silently. Users will receive a notification with no sound.
// 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.
// SendDocument represents data for SendDocument method.
SendDocumentstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
Document*InputFile`json:"document"`
// Document caption (may also be used when resending documents by file_id), 0-200 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Sends the message silently. Users will receive a notification with no sound.
// 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.
// SendDocument represents data for SendVideo method.
SendVideostruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data.
Video*InputFile`json:"video"`
// Duration of sent video in seconds
Durationint`json:"duration,omitempty"`
// Video width
Widthint`json:"width,omitempty"`
// Video height
Heightint`json:"height,omitempty"`
// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
Thumb*InputFile`json:"thumb,omitempty"`
// Video caption (may also be used when resending videos by file_id), 0-1024 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Pass True, if the uploaded video is suitable for streaming
// 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.
// SendAnimation represents data for SendAnimation method.
SendAnimationstruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// 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.
Animation*InputFile`json:"animation"`
// Duration of sent animation in seconds
Durationint`json:"duration,omitempty"`
// Animation width
Widthint`json:"width,omitempty"`
// Animation height
Heightint`json:"height,omitempty"`
// Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
Thumb*InputFile`json:"thumb,omitempty"`
// Animation caption (may also be used when resending animation by file_id), 0-200 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Sends the message silently. Users will receive a notification with no sound.
// 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.
// SendVoice represents data for SendVoice method.
SendVoicestruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
Voice*InputFile`json:"voice"`
// Voice message caption, 0-1024 characters
Captionstring`json:"caption,omitempty"`
// Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
ParseModestring`json:"parse_mode,omitempty"`
// Duration of the voice message in seconds
Durationint`json:"duration,omitempty"`
// Sends the message silently. Users will receive a notification with no sound.
// 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.
// SendVideoNote represents data for SendVideoNote method.
SendVideoNotestruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported
VideoNote*InputFile`json:"video_note"`
// Duration of sent video in seconds
Durationint`json:"duration,omitempty"`
// Video width and height, i.e. diameter of the video message
Lengthint`json:"length,omitempty"`
// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
Thumb*InputFile`json:"thumb,omitempty"`
// Sends the message silently. Users will receive a notification with no sound.
// 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.
// A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
// EditMessageLiveLocation represents data for EditMessageLiveLocation method.
EditMessageLiveLocationstruct{
// Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id,omitempty"`
// Required if inline_message_id is not specified. Identifier of the sent message
MessageIDint`json:"message_id,omitempty"`
// Required if chat_id and message_id are not specified. Identifier of the inline message
// StopMessageLiveLocation represents data for StopMessageLiveLocation method.
StopMessageLiveLocationstruct{
// Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id,omitempty"`
// Required if inline_message_id is not specified. Identifier of the message with live location to stop
MessageIDint`json:"message_id,omitempty"`
// Required if chat_id and message_id are not specified. Identifier of the inline message
// A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
// A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
// 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.
// SendChatAction represents data for SendChatAction method.
SendChatActionstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Type of action to broadcast
Actionstring`json:"action"`
}
// GetUserProfilePhotos represents data for GetUserProfilePhotos method.
GetUserProfilePhotosstruct{
// Unique identifier of the target user
UserIDint`json:"user_id"`
// Sequential number of the first photo to be returned. By default, all photos are returned.
Offsetint`json:"offset,omitempty"`
// Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100.
Limitint`json:"limit,omitempty"`
}
// GetFile represents data for GetFile method.
GetFilestruct{
// File identifier to get info about
FileIDstring`json:"file_id"`
}
// KickChatMember represents data for KickChatMember method.
KickChatMemberstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Unique identifier of the target user
UserIDint`json:"user_id"`
// Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
UntilDateint64`json:"until_date"`
}
// UnbanChatMember represents data for UnbanChatMember method.
UnbanChatMemberstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
UserIDint`json:"user_id"`
}
// RestrictChatMember represents data for RestrictChatMember method.
RestrictChatMemberstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Unique identifier of the target user
UserIDint`json:"user_id"`
// New user permissions
Permissions*ChatPermissions`json:"permissions"`
// Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
UntilDateint64`json:"until_date,omitempty"`
}
// PromoteChatMember represents data for PromoteChatMember method.
PromoteChatMemberstruct{
// Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ChatIDint64`json:"chat_id"`
// Unique identifier of the target user
UserIDint`json:"user_id"`
// Pass True, if the administrator can change chat title, photo and other settings
// Pass True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
// SetChatAdministratorCustomTitle represents data for SetChatAdministratorCustomTitle method.
SetChatAdministratorCustomTitlestruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Unique identifier of the target user
UserIDint`json:"user_id"`
// New custom title for the administrator; 0-16 characters, emoji are not allowed
CustomTitlestring`json:"custom_title"`
}
// SetChatPermissions represents data for SetChatPermissions method.
SetChatPermissionsstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// New default chat permissions
PermissionsChatPermissions`json:"permissions"`
}
// ExportChatInviteLink represents data for ExportChatInviteLink method.
ExportChatInviteLinkstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// SetChatPhoto represents data for SetChatPhoto method.
SetChatPhotostruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// New chat photo, uploaded using multipart/form-data
ChatPhotoInputFile`json:"chat_photo"`
}
// DeleteChatPhoto represents data for DeleteChatPhoto method.
DeleteChatPhotostruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// SetChatTitle represents data for SetChatTitle method.
SetChatTitlestruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// New chat title, 1-255 characters
Titlestring`json:"title"`
}
// SetChatDescription represents data for SetChatDescription method.
SetChatDescriptionstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// New chat description, 0-255 characters
Descriptionstring`json:"description"`
}
// PinChatMessage represents data for PinChatMessage method.
PinChatMessagestruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Identifier of a message to pin
MessageIDint`json:"message_id"`
// 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.
// UnpinChatMessage represents data for UnpinChatMessage method.
UnpinChatMessagestruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// LeaveChat represents data for LeaveChat method.
LeaveChatstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// GetChat represents data for GetChat method.
GetChatstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// GetChatAdministrators represents data for GetChatAdministrators method.
GetChatAdministratorsstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// GetChatMembersCount represents data for GetChatMembersCount method.
GetChatMembersCountstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// GetChatMember represents data for GetChatMember method.
GetChatMemberstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Unique identifier of the target user
UserIDint`json:"user_id"`
}
// SetChatStickerSet represents data for SetChatStickerSet method.
SetChatStickerSetstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
// Name of the sticker set to be set as the group sticker set
StickerSetNamestring`json:"sticker_set_name"`
}
// DeleteChatStickerSet represents data for DeleteChatStickerSet method.
DeleteChatStickerSetstruct{
// Unique identifier for the target chat
ChatIDint64`json:"chat_id"`
}
// AnswerCallbackQuery represents data for AnswerCallbackQuery method.
AnswerCallbackQuerystruct{
// Unique identifier for the query to be answered
CallbackQueryIDstring`json:"callback_query_id"`
// Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
Textstring`json:"text,omitempty"`
// URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game – note that this will only work if the query comes from a callback_game button.
//
// Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
URLstring`json:"url,omitempty"`
// If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
ShowAlertbool`json:"show_alert,omitempty"`
// The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
CacheTimeint`json:"cache_time,omitempty"`
}
)
// GetMe testing your bot's auth token. Returns basic information about the bot in form of a User object.
// SendAudio send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A 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 sending voice messages, use the sendVoice method instead.
// SendDocument 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.
// SendVideo 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.
// SendAnimation 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.
// SendVoice 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.
// EditMessageLiveLocation edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
// StopMessageLiveLocation stop updating a live location message before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.
// SendChatAction 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). Returns True on success.
//
// We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
// GetFile 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 getFile again.
//
// Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
// KickChatMember kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, 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 chat for this to work and must have the appropriate admin rights. Returns True on success.
//
// Note: In regular groups (non-supergroups), this method will only work if the 'All Members Are Admins' setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.
// UnbanChatMember 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 for this to work. Returns True on success.
// restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
// PromoteChatMember promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean to demote a user. Returns True on success.
// SetChatPermissions set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.
// ExportChatInviteLink export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns exported invite link as String on success.
// SetChatPhoto set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
// DeleteChatPhoto delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
// SetChatTitle change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
// SetChatDescription change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
// PinChatMessage 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.
// UnpinChatMessage 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.
// GetChat 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.
// GetChatAdministrators 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.
// SetChatStickerSet set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
// DeleteChatStickerSet delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
// AnswerCallbackQuery 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.