Documentation ¶
Index ¶
- type AddStickerSetArgs
- type Animation
- type AnswerCallbackQueryArgs
- type AnswerInlineQueryArgs
- type AnswerPreCheckoutQueryArgs
- type AnswerShippingQueryArgs
- type AnswerWebAppQueryArgs
- type ApproveChatJoinRequestArgs
- type Audio
- type BanChatMemberArgs
- type BanChatSenderChatArgs
- type BotCommand
- type BotCommandScope
- type BotCommandScopeAllChatAdministrators
- type BotCommandScopeAllGroupChats
- type BotCommandScopeAllPrivateChats
- type BotCommandScopeChat
- type BotCommandScopeChatAdministrators
- type BotCommandScopeChatMember
- type BotCommandScopeDefault
- type BotDescription
- type BotName
- type BotShortDescription
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAdministratorRights
- type ChatInviteLink
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- type ChatMemberBanned
- type ChatMemberLeft
- type ChatMemberMember
- type ChatMemberOwner
- type ChatMemberRestricted
- type ChatMemberUpdated
- type ChatMenuButtonArgs
- type ChatPermissions
- type ChatPhoto
- type ChatShared
- type ChatUpdate
- type ChosenInlineResult
- type CloseForumTopicArgs
- type CloseGeneralForumTopic
- type Contact
- type CopyMessageArgs
- type CreateChatInviteLinkArgs
- type CreateForumTopicArgs
- type CreateNewStickerSetArgs
- type DeclineChatJoinRequestArgs
- type DefaultChatArgs
- type DefaultSendMethodsArguments
- type DeleteForumTopicArgs
- type DeleteMessageArgs
- type DeleteStickerFromSetArgs
- type DeleteStickerSetArgs
- type DeleteWebhookArgs
- type Dice
- type Document
- type EditChatInviteLinkArgs
- type EditForumTopicArgs
- type EditGeneralForumTopic
- type EditMessageCaptionArgs
- type EditMessageDefaultArgs
- type EditMessageLiveLocationArgs
- type EditMessageMediaArgs
- type EditMessageReplyMakrupArgs
- type EditMessageTextArgs
- type EncryptedCredentials
- type EncryptedPassportElement
- type FailureResult
- type File
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type ForwardMessageArgs
- type Game
- type GameHighScore
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type GetChatMemberArgs
- type GetCustomEmojiStickersArgs
- type GetFileArgs
- type GetGameHighScoresArgs
- type GetMyDescriptionArgs
- type GetMyNameArgs
- type GetStickerSetArgs
- type GetUpdatesArgs
- type GetUserProfilePhototsArgs
- type HideGeneralForumTopic
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryResult
- type InlineQueryResultArticle
- type InlineQueryResultAudio
- type InlineQueryResultCachedAudio
- type InlineQueryResultCachedDocument
- type InlineQueryResultCachedGif
- type InlineQueryResultCachedMpeg4Gif
- type InlineQueryResultCachedPhoto
- type InlineQueryResultCachedSticker
- type InlineQueryResultCachedVideo
- type InlineQueryResultCachedVocie
- type InlineQueryResultContact
- type InlineQueryResultDefault
- type InlineQueryResultDocument
- type InlineQueryResultGame
- type InlineQueryResultGif
- type InlineQueryResultLocation
- type InlineQueryResultMpeg4Gif
- type InlineQueryResultPhoto
- type InlineQueryResultVenu
- type InlineQueryResultVideo
- type InlineQueryResultVocie
- type InlineQueryResultsButton
- type InputContactMessageContent
- type InputInvoiceMessageContent
- type InputLocationMessageContent
- type InputMedia
- type InputMediaAnimation
- type InputMediaAudio
- type InputMediaDefault
- type InputMediaDocument
- type InputMediaPhoto
- type InputMediaVideo
- type InputMessageContent
- type InputSticker
- type InputTextMessageContent
- type InputVenueMessageContent
- type Invoice
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestUser
- type LabeledPrice
- type Location
- type LoginUrl
- type MaskPosition
- type MenuButton
- type Message
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MethodArguments
- type MyCommandsDefault
- type MyDefaultAdministratorRightsArgs
- type OrderInfo
- type PassportData
- type PassportElementError
- type PassportElementErrorDataField
- type PassportElementErrorFile
- type PassportElementErrorFiles
- type PassportElementErrorFrontSide
- type PassportElementErrorReverseSide
- type PassportElementErrorSelfie
- type PassportElementErrorTranslationFile
- type PassportElementErrorTranslationFiles
- type PassportElementErrorUnspecified
- type PassportElementErrordefault
- type PassportFile
- type PhotoSize
- type PinChatMessageArgs
- type Poll
- type PollAnswer
- type PollOption
- type PreCheckoutQuery
- type PromoteChatMemberArgs
- type ProximityAlertTriggered
- type ReopenForumTopicArgs
- type ReopenGeneralForumTopic
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyMarkup
- type ResponseParameters
- type RestrictChatMemberArgs
- type Result
- type RevokeChatInviteLinkArgs
- type SendAnimationArgs
- type SendAudioArgs
- type SendChatActionArgs
- type SendContactArgs
- type SendDiceArgs
- type SendDocumentArgs
- type SendGameArgs
- type SendInvoiceArgs
- type SendLocationArgs
- type SendMediaGroupArgs
- type SendMessageArgs
- type SendPhotoArgs
- type SendPollArgs
- type SendStickerArgs
- type SendVenueArgs
- type SendVideoArgs
- type SendVideoNoteArgs
- type SendVoiceArgs
- type SentWebAppMessage
- type SetChatAdministratorCustomTitleArgs
- type SetChatDescriptionArgs
- type SetChatPermissionsArgs
- type SetChatPhotoArgs
- type SetChatStcikerSet
- type SetChatTitleArgs
- type SetGameScoreArgs
- type SetMyCommandsArgs
- type SetMyDescriptionArgs
- type SetMyNameArgs
- type SetMyShortDescriptionArgs
- type SetPassportDataErrorsArgs
- type SetStickerEmojiListArgs
- type SetStickerKeywordsArgs
- type SetStickerMaskPositionArgs
- type SetStickerPositionInSetArgs
- type SetStickerSetThumbnailArgs
- type SetStickerSetTitleArgs
- type SetWebhookArgs
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type Sticker
- type StickerSet
- type StopMessageLiveLocationArgs
- type StopPollArgs
- type Story
- type SuccessfulPayment
- type SwitchInlineQueryChosenChat
- type UnbanChatMemberArgsArgs
- type UnbanChatSenderChatArgs
- type UnhideGeneralForumTopic
- type UnpinAllForumTopicMessages
- type UnpinAllGeneralForumTopicMessages
- type UnpinChatMessageArgs
- type Update
- type UploadStickerFileArgs
- type User
- type UserProfilePhotos
- type UserShared
- type Venue
- type Video
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoNote
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- type WriteAccessAllowed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddStickerSetArgs ¶
type AddStickerSetArgs struct { UserId int `json:"user_id"` Name string `json:"name"` Sticker *InputSticker `json:"sticker"` }
func (*AddStickerSetArgs) ToJson ¶
func (args *AddStickerSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AddStickerSetArgs) ToMultiPart ¶
func (args *AddStickerSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Animation ¶
type Animation struct { FileId string `json:"file_id"` FileUniqueId string `json:"file_unique_id"` Width int `json:"width"` Height int `json:"height"` Duration int `json:"duration"` Thumb *PhotoSize `json:"thumbnail,omitempty"` FileName string `json:"file_name,omitempty"` MIMEType string `json:"mime_type,omitempty"` FileSize int64 `json:"file_size,omitempty"` }
type AnswerCallbackQueryArgs ¶
type AnswerCallbackQueryArgs struct { CallbackQueyId string `json:"callback_query_id"` Text string `json:"text,omitempty"` ShowAlert bool `json:"show_alert"` URL string `json:"url,omitempty"` CacheTime int `json:"cache_time,omitempty"` }
func (*AnswerCallbackQueryArgs) ToJson ¶
func (args *AnswerCallbackQueryArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AnswerCallbackQueryArgs) ToMultiPart ¶
func (args *AnswerCallbackQueryArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type AnswerInlineQueryArgs ¶
type AnswerInlineQueryArgs struct { InlineQueryId string `json:"inline_query_id"` Results []InlineQueryResult `json:"results"` CacheTime int `json:"cache_time,omitempty"` IsPersonal bool `json:"is_personal"` NextOffset string `json:"next_offset,omitempty"` Button *InlineQueryResultsButton `json:"button,omitempty"` }
func (*AnswerInlineQueryArgs) ToJson ¶
func (args *AnswerInlineQueryArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AnswerInlineQueryArgs) ToMultiPart ¶
func (args *AnswerInlineQueryArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type AnswerPreCheckoutQueryArgs ¶
type AnswerPreCheckoutQueryArgs struct { PreCheckoutQueryId string `json:"pre_checkout_query_id"` Ok bool `json:"ok"` ErrorMessage string `json:"error_message,omitempty"` }
func (*AnswerPreCheckoutQueryArgs) ToJson ¶
func (args *AnswerPreCheckoutQueryArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AnswerPreCheckoutQueryArgs) ToMultiPart ¶
func (args *AnswerPreCheckoutQueryArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type AnswerShippingQueryArgs ¶
type AnswerShippingQueryArgs struct { ShippingQueryId string `json:"shipping_query_id"` OK bool `json:"ok"` ShippingOptions []ShippingOption `json:"shipping_options,omitempty"` ErrorMessage string `json:"error_message,omitempty"` }
func (*AnswerShippingQueryArgs) ToJson ¶
func (args *AnswerShippingQueryArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AnswerShippingQueryArgs) ToMultiPart ¶
func (args *AnswerShippingQueryArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type AnswerWebAppQueryArgs ¶
type AnswerWebAppQueryArgs struct { WebAppQueryId string `json:"web_app_query_id"` Result InlineQueryResult `json:"result,omitempty"` }
func (*AnswerWebAppQueryArgs) ToJson ¶
func (args *AnswerWebAppQueryArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*AnswerWebAppQueryArgs) ToMultiPart ¶
func (args *AnswerWebAppQueryArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type ApproveChatJoinRequestArgs ¶
type ApproveChatJoinRequestArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` }
func (*ApproveChatJoinRequestArgs) ToJson ¶
func (args *ApproveChatJoinRequestArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*ApproveChatJoinRequestArgs) ToMultiPart ¶
func (args *ApproveChatJoinRequestArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Audio ¶
type Audio struct { FileId string `json:"file_id"` FileUniqueId string `json:"file_unique_id"` Duration int `json:"duration"` Performer string `json:"performer,omitempty"` Title string `json:"title,omitempty"` FileName string `json:"file_name,omitempty"` MIMEType string `json:"mime_type,omitempty"` FileSize int64 `json:"file_size,omitempty"` Thumb *PhotoSize `json:"thumbnail,omitempty"` }
type BanChatMemberArgs ¶
type BanChatMemberArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `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. Applied for supergroups and channels only.*/ UntilDate int `json:"until_date,omitempty"` /*Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.*/ RevokeMessages bool `json:"revoke_messages,omitempty"` }
func (*BanChatMemberArgs) ToJson ¶
func (args *BanChatMemberArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*BanChatMemberArgs) ToMultiPart ¶
func (args *BanChatMemberArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type BanChatSenderChatArgs ¶
type BanChatSenderChatArgs struct { ChatId json.RawMessage `json:"chat_id"` SenderChatId int `json:"sender_chat_id"` }
func (*BanChatSenderChatArgs) ToJson ¶
func (args *BanChatSenderChatArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*BanChatSenderChatArgs) ToMultiPart ¶
func (args *BanChatSenderChatArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type BotCommand ¶
type BotCommand struct { /*Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.*/ Command string `json:"command"` /*Description of the command, 3-256 characters.*/ Description string `json:"description"` }
This object represents a bot command.
type BotCommandScope ¶
type BotCommandScope interface {
FixTheType()
}
type BotCommandScopeAllChatAdministrators ¶
type BotCommandScopeAllChatAdministrators struct {
BotCommandScopeDefault
}
Represents the scope of bot commands, covering all group and supergroup chat administrators.
func (*BotCommandScopeAllChatAdministrators) FixTheType ¶
func (bc *BotCommandScopeAllChatAdministrators) FixTheType()
type BotCommandScopeAllGroupChats ¶
type BotCommandScopeAllGroupChats struct {
BotCommandScopeDefault
}
Represents the scope of bot commands, covering all group and supergroup chats.
func (*BotCommandScopeAllGroupChats) FixTheType ¶
func (bc *BotCommandScopeAllGroupChats) FixTheType()
type BotCommandScopeAllPrivateChats ¶
type BotCommandScopeAllPrivateChats struct {
BotCommandScopeDefault
}
Represents the scope of bot commands, covering all private chats.
func (*BotCommandScopeAllPrivateChats) FixTheType ¶
func (bc *BotCommandScopeAllPrivateChats) FixTheType()
type BotCommandScopeChat ¶
type BotCommandScopeChat struct { BotCommandScopeDefault /*Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)*/ ChatId json.RawMessage `json:"chat_id"` }
Represents the scope of bot commands, covering a specific chat.
func (*BotCommandScopeChat) FixTheType ¶
func (bc *BotCommandScopeChat) FixTheType()
type BotCommandScopeChatAdministrators ¶
type BotCommandScopeChatAdministrators struct {
BotCommandScopeChat
}
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
func (*BotCommandScopeChatAdministrators) FixTheType ¶
func (bc *BotCommandScopeChatAdministrators) FixTheType()
type BotCommandScopeChatMember ¶
type BotCommandScopeChatMember struct { BotCommandScopeChat /*Unique identifier of the target user*/ UserId int `json:"user_id"` }
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
func (*BotCommandScopeChatMember) FixTheType ¶
func (bc *BotCommandScopeChatMember) FixTheType()
type BotCommandScopeDefault ¶
type BotCommandScopeDefault struct { /*Scope type*/ Type string `json:"type"` }
Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
func (*BotCommandScopeDefault) FixTheType ¶
func (bc *BotCommandScopeDefault) FixTheType()
type BotDescription ¶
type BotDescription struct { /*The bot's description*/ Description string `json:"description"` }
type BotShortDescription ¶
type BotShortDescription struct { /*The bot's short description*/ ShortDescription string `json:"short_description"` }
type CallbackGame ¶
type CallbackGame struct { }
A placeholder, currently holds no information. Use BotFather to set up your game.
type CallbackQuery ¶
type CallbackQuery struct { /*Unique identifier for this query*/ Id string `json:"id"` /*Sender*/ From User `json:"from"` /*Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old*/ Message Message `json:"message,omitempty"` /*Optional. Identifier of the message sent via the bot in inline mode, that originated the query.*/ InlineMessageId string `json:"inline_message_id,omitempty"` /*Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.*/ ChatInstance string `json:"chat_instance,omitempty"` /*Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.*/ Data string `json:"data,omitempty"` /*Optional. Short name of a Game to be returned, serves as the unique identifier for the game*/ GameShortName string `json:"game_short_name,omitempty"` }
This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
type Chat ¶
type Chat struct { /*Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.*/ Id int `json:"id"` /*Type of chat, can be either “private”, “group”, “supergroup” or “channel”*/ Type string `json:"type"` /*Optional. Title, for supergroups, channels and group chats*/ Title string `json:"title,omitempty"` /*Optional. Username, for private chats, supergroups and channels if available*/ Username string `json:"username,omitempty"` /*Optional. First name of the other party in a private chat*/ FirstName string `json:"first_name,omitempty"` /*Optional. Last name of the other party in a private chat*/ LastName string `json:"last_name,omitempty"` /*Optional. True, if the supergroup chat is a forum (has topics enabled)*/ IsForum bool `json:"is_forum"` /*Optional. Chat photo. */ Photo *ChatPhoto `json:"photo,omitempty"` /*Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.*/ ActiveUsernames []string `json:"active_usernames,omitempty"` /*Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.*/ EmojiStatusCustomEmojiId string `json:"emoji_status_custom_emoji_id,omitempty"` /*Optional. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.*/ EmojiStatusExpirationDate int `json:"emoji_status_expiration_date,omitempty"` /*Optional. Bio of the other party in a private chat.*/ Bio string `json:"bio,omitempty"` /*Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user.*/ HasPrivateForwards bool `json:"has_private_forwards,omitempty"` /*Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.*/ HasRestrictedVoiceAndVideoMessage bool `json:"has_restricted_voice_and_video_messages"` /*Optional. True, if users need to join the supergroup before they can send messages. Returned only in GetChat.*/ JoinToSendMessages bool `json:"join_to_send_messages,omitempty"` /*Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in GetChat.*/ JoinByRequest bool `json:"join_by_request,omitempty"` /*Optional. Description, for groups, supergroups and channel chats.*/ Description string `json:"description,omitempty"` /*Optional. Primary invite link, for groups, supergroups and channel chats.*/ InviteLink string `json:"invite_link,omitempty"` /*Optional. The most recent pinned message (by sending date).*/ PinnedMessage *Message `json:"pinned_message,omitempty"` /*Optional. Default chat member permissions, for groups and supergroups.*/ Permissions *ChatPermissions `json:"permissions,omitempty"` /*Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds.*/ SlowModeDelay int `json:"slow_mode_delay,omitempty"` /*Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds.*/ MessageAutoDeletTime int `json:"message_auto_delete_time,omitempty"` /*Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.*/ HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled"` /*Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.*/ HasHiddenMembers bool `json:"has_hidden_members"` /*Optional. True, if messages from the chat can't be forwarded to other chats*/ HasProtectedContent bool `json:"has_protected_content,omitempty"` /*Optional. For supergroups, name of group sticker set.*/ StickerSetName string `json:"sticker_set_name,omitempty"` /*Optional. True, if the bot can change the group sticker set.*/ CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"` /*Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.*/ LinkedChatId int `json:"linked_chat_id,omitempty"` /*Optional. For supergroups, the location to which the supergroup is connected. */ Location *ChatLocation `json:"location,omitempty"` }
type ChatAdministratorRights ¶
type ChatAdministratorRights struct { /*True, if the user's presence in the chat is hidden*/ IsAnonymous bool `json:"is_anonymous"` /*True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege*/ CanManageChat bool `json:"can_manage_chat"` /*True, if the administrator can delete messages of other users*/ CanDeleteMessages bool `json:"can_delete_messages"` /*True, if the administrator can manage voice chats*/ CanManageVideoChats bool `json:"can_manage_video_chats"` /*True, if the administrator can restrict, ban or unban chat members*/ CanRestrictMembers bool `json:"can_restrict_members"` /*True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)*/ CanPromoteMembers bool `json:"can_promote_members"` /*True, if the user is allowed to change the chat title, photo and other settings*/ CanChangeInfo bool `json:"can_change_info"` /*True, if the user is allowed to invite new users to the chat*/ CanInviteUsers bool `json:"can_invite_users"` /*Optional. True, if the administrator can post in the channel; channels only*/ CanPostMessages bool `json:"can_post_messages,omitempty"` /*Optional. True, if the administrator can edit messages of other users and can pin messages; channels only*/ CanEditMessages bool `json:"can_edit_messages,omitempty"` /*Optional. True, if the user is allowed to pin messages; groups and supergroups only*/ CanPinMessages bool `json:"can_pin_messages,omitempty"` /*Optional. True, if the administrator can post stories in the channel; channels only*/ CanPostStories bool `json:"can_post_stories"` /*Optional. True, if the administrator can edit stories posted by other users; channels only*/ CanEditStories bool `json:"can_edit_stories"` /*Optional. True, if the administrator can delete stories posted by other users; channels only*/ CanDeleteStories bool `json:"can_delete_stories"` /*Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only*/ CanManageTopics bool `json:"can_manage_topics"` }
type ChatInviteLink ¶
type ChatInviteLink struct { /*The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.*/ InviteLink string `json:"invite_link"` /*Creator of the link*/ Creator *User `json:"user"` /*True, if users joining the chat via the link need to be approved by chat administrators*/ CreatesJoinRequest bool `json:"creates_join_request"` /*True, if the link is primary*/ IsPrimary bool `json:"is_primary"` /*True, if the link is revoked*/ IsRevoked bool `json:"is_revoked"` /*Optional. Invite link name*/ Name string `json:"name,omitempty"` /*Optional. Point in time (Unix timestamp) when the link will expire or has been expired*/ ExpireDate int `json:"expire_date,omitempty"` /*Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999*/ MemberLimit int `json:"member_limit,omitempty"` /*Optional. Number of pending join requests created using this link*/ PendingJoinRequestCount int `json:"pending_join_request_count,omitempty"` }
type ChatJoinRequest ¶
type ChatJoinRequest struct { /*Chat to which the request was sent*/ Chat *Chat `json:"chat"` /*User that sent the join request*/ From *User `json:"from"` /*Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.*/ UserChatId int64 `json:"user_chat_id"` /*Date the request was sent in Unix time*/ Date int `json:"date"` /*Optional. Bio of the user.*/ Bio string `json:"bio,omitempty"` /*Optional. Chat invite link that was used by the user to send the join request*/ InviteLink *ChatInviteLink `json:"invite_link,omitempty"` }
Represents a join request sent to a chat.
type ChatLocation ¶
type ChatLocation struct { /*The location to which the supergroup is connected. Can't be a live location.*/ Location *Location `json:"location"` /*Location address; 1-64 characters, as defined by the chat owner*/ Address string `json:"address"` }
Represents a location to which a chat is connected.
type ChatMember ¶
type ChatMember interface {
// contains filtered or unexported methods
}
type ChatMemberAdministrator ¶
type ChatMemberAdministrator struct { ChatMemberMember /*True, if the bot is allowed to edit administrator privileges of that user*/ CanBeEdited bool `json:"can_be_edited"` /*True, if the user's presence in the chat is hidden*/ IsAnonymous bool `json:"is_anonymous"` /*True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege*/ CanManageChat bool `json:"can_manage_chat"` /*True, if the administrator can delete messages of other users*/ CanDeleteMessages bool `json:"can_delete_messages"` /*True, if the administrator can manage voice chats*/ CanManageVideoChats bool `json:"can_manage_video_chats"` /*True, if the administrator can restrict, ban or unban chat members*/ CanRestrictMembers bool `json:"can_restrict_members"` /*True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)*/ CanPromoteMembers bool `json:"can_promote_members"` /*True, if the user is allowed to change the chat title, photo and other settings*/ CanChangeInfo bool `json:"can_change_info"` /*True, if the user is allowed to invite new users to the chat*/ CanInviteUsers bool `json:"can_invite_users"` /*Optional. True, if the administrator can post in the channel; channels only*/ CanPostMessages bool `json:"can_post_messages,omitempty"` /*Optional. True, if the administrator can edit messages of other users and can pin messages; channels only*/ CanEditMessages bool `json:"can_edit_messages,omitempty"` /*Optional. True, if the user is allowed to pin messages; groups and supergroups only*/ CanPinMessages bool `json:"can_pin_messages,omitempty"` /*Optional. True, if the administrator can post stories in the channel; channels only*/ CanPostStories bool `json:"can_post_stories"` /*Optional. True, if the administrator can edit stories posted by other users; channels only*/ CanEditStories bool `json:"can_edit_stories"` /*Optional. True, if the administrator can delete stories posted by other users; channels only*/ CanDeleteStories bool `json:"can_delete_stories"` /*Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only*/ CanManageTopics bool `json:"can_manage_topics"` /*Optional. Custom title for this user*/ CustomTitle string `json:"custom_title,omitempty"` }
Represents a chat member that has some additional privileges.
type ChatMemberBanned ¶
type ChatMemberBanned struct { ChatMemberMember /*Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever*/ UntilDate int `json:"until_date"` }
Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
type ChatMemberLeft ¶
type ChatMemberLeft struct {
ChatMemberMember
}
Represents a chat member that isn't currently a member of the chat, but may join it themselves.
type ChatMemberMember ¶
type ChatMemberMember struct { /*The member's status in the chat.*/ Status string `json:"status"` /*Information about the user*/ User User `json:"user"` }
Represents a chat member that has no additional privileges or restrictions
type ChatMemberOwner ¶
type ChatMemberOwner struct { ChatMemberMember /*True, if the user's presence in the chat is hidden*/ IsAnonymous bool `json:"is_anonymous"` /*Optional. Custom title for this user*/ CustomTitle string `json:"custom_title,omitempty"` }
type ChatMemberRestricted ¶
type ChatMemberRestricted struct { ChatMemberMember /*True, if the user is a member of the chat at the moment of the request*/ IsMember bool `json:"is_member"` /*True, if the user is allowed to change the chat title, photo and other settings*/ CanChangeInfo bool `json:"can_change_info"` /*True, if the user is allowed to invite new users to the chat*/ CanInviteUsers bool `json:"can_invite_users"` /*True, if the user is allowed to pin messages*/ CanPinMessages bool `json:"can_pin_messages"` /*Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only*/ CanManageTopics bool `json:"can_manage_topics"` /*True, if the user is allowed to send text messages, contacts, locations and venues*/ CanSendMessages bool `json:"can_send_messages"` /*True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes Deprecated, replaced with separate fields can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes for different media types*/ CanSendMediaMessages bool `json:"-"` //True, if the user is allowed to send audios CanSendAudios bool `json:"can_send_audios"` // True, if the user is allowed to send documents CanSendDocumetns bool `json:"can_send_documents"` //True, if the user is allowed to send photos CanSendPhotos bool `json:"can_send_photos"` //True, if the user is allowed to send videos CanSendVideos bool `json:"can_send_videos"` //True, if the user is allowed to send video notes CanSendVideoNotes bool `json:"can_send_video_notes"` //True, if the user is allowed to send voice notes CanSendVoiceNotes bool `json:"can_send_voice_notes"` /*True, if the user is allowed to send polls*/ CanSendPolls bool `json:"can_send_polls"` /*True, if the user is allowed to send animations, games, stickers and use inline bots*/ CanSendOtherMessages bool `json:"can_send_other_messages"` /*True, if the user is allowed to add web page previews to their messages*/ CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` /*Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever*/ UntilDate int `json:"until_date"` }
type ChatMemberUpdated ¶
type ChatMemberUpdated struct { /*Chat the user belongs to*/ Chat *Chat `json:"chat"` /*Performer of the action, which resulted in the change*/ From *User `json:"from"` /*Date the change was done in Unix time*/ Date int `json:"date"` /*Previous information about the chat member*/ OldChatMember json.RawMessage `json:"old_chat_member"` /*New information about the chat member*/ NewChatMember json.RawMessage `json:"new_chat_member"` /*Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.*/ InviteLink *ChatInviteLink `json:"invite_link,omitempty"` //True, if the user joined the chat via a chat folder invite link ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link"` }
This object represents changes in the status of a chat member.
type ChatMenuButtonArgs ¶
type ChatMenuButtonArgs struct { ChatId int64 `json:"chat_id"` MenuButton *MenuButton `json:"menu_button,omitempty"` }
func (*ChatMenuButtonArgs) ToJson ¶
func (args *ChatMenuButtonArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*ChatMenuButtonArgs) ToMultiPart ¶
func (args *ChatMenuButtonArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type ChatPermissions ¶
type ChatPermissions struct { /*Optional. True, if the user is allowed to send text messages, contacts, locations and venues*/ CanSendMessages bool `json:"can_send_messages,omitempty"` /*True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes Deprecated, replaced with separate fields can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes for different media types*/ CanSendMediaMessages bool `json:"-"` //True, if the user is allowed to send audios CanSendAudios bool `json:"can_send_audios"` //True, if the user is allowed to send documents CanSendDocumetns bool `json:"can_send_documents"` //True, if the user is allowed to send photos CanSendPhotos bool `json:"can_send_photos"` //True, if the user is allowed to send videos CanSendVideos bool `json:"can_send_videos"` //True, if the user is allowed to send video notes CanSendVideoNotes bool `json:"can_send_video_notes"` //True, if the user is allowed to send voice notes CanSendVoiceNotes bool `json:"can_send_voice_notes"` /*Optional. True, if the user is allowed to send polls, implies can_send_messages*/ CanSendPolls bool `json:"can_send_polls,omitempty"` /*Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages*/ CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"` /*Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages*/ CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"` /*Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups*/ CanChangeInfo bool `json:"can_change_info,omitempty"` /*Optional. True, if the user is allowed to invite new users to the chat*/ CanInviteUsers bool `json:"can_invite_users,omitempty"` /*Optional. True, if the user is allowed to pin messages. Ignored in public supergroups*/ CanPinMessages bool `json:"can_pin_messages,omitempty"` /*Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only*/ CanManageTopics bool `json:"can_manage_topics"` }
Describes actions that a non-administrator user is allowed to take in a chat.
type ChatPhoto ¶
type ChatPhoto struct { /*File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.*/ SmallFileId string `json:"small_file_id"` /*Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.*/ SmallFileUniqueId string `json:"small_file_unique_id"` /*File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.*/ BigFileId string `json:"big_file_id"` /*Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.*/ BigFileUniqueId string `json:"big_file_unique_id"` }
type ChatShared ¶
type ChatUpdate ¶
Not related to telegram bot api
type ChosenInlineResult ¶
type ChosenInlineResult struct { /*The unique identifier for the result that was chosen*/ ResultId string `json:"result_id"` /*The user that chose the result*/ From User `json:"user"` /*Optional. Sender location, only for bots that require user location*/ Location Location `json:"location,omitempty"` /*Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.*/ InlineMessageId string `json:"inline_message_id,omitempty"` /*The query that was used to obtain the result*/ Query string `json:"query,omitempty"` }
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
func (*ChosenInlineResult) GetType ¶
func (*ChosenInlineResult) GetType() string
type CloseForumTopicArgs ¶
type CloseForumTopicArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageThreadId int `json:"message_thread_id"` }
func (*CloseForumTopicArgs) ToJson ¶
func (args *CloseForumTopicArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CloseForumTopicArgs) ToMultiPart ¶
func (args *CloseForumTopicArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type CloseGeneralForumTopic ¶
type CloseGeneralForumTopic struct {
ChatId json.RawMessage `json:"chat_id"`
}
func (*CloseGeneralForumTopic) ToJson ¶
func (args *CloseGeneralForumTopic) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CloseGeneralForumTopic) ToMultiPart ¶
func (args *CloseGeneralForumTopic) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type CopyMessageArgs ¶
type CopyMessageArgs struct { ForwardMessageArgs /*New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept*/ Caption string `json:"caption,omitempty"` /*Mode for parsing entities in the message text. */ ParseMode string `json:"parse_mode,omitempty"` /*A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*If the message is a reply, ID of the original message*/ ReplyToMessageId int `json:"reply_to_message_id,omitempty"` /*Pass True, if the message should be sent even if the specified replied-to message is not found*/ AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` /*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.*/ ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"` }
func (*CopyMessageArgs) ToJson ¶
func (args *CopyMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CopyMessageArgs) ToMultiPart ¶
func (args *CopyMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type CreateChatInviteLinkArgs ¶
type CreateChatInviteLinkArgs struct { ChatId json.RawMessage `json:"chat_id"` Name string `json:"name,omitempty"` ExpireDate int `json:"expire_date,omitempty"` MemberLimit int `json:"member_limit,omitempty"` CreatesjoinRequest bool `json:"creates_join_request,omitempty"` }
func (*CreateChatInviteLinkArgs) ToJson ¶
func (args *CreateChatInviteLinkArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CreateChatInviteLinkArgs) ToMultiPart ¶
func (args *CreateChatInviteLinkArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type CreateForumTopicArgs ¶
type CreateForumTopicArgs struct { ChatId json.RawMessage `json:"chat_id"` Name string `json:"name"` IconColor int `json:"icon_color,omitempty"` IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"` }
func (*CreateForumTopicArgs) ToJson ¶
func (args *CreateForumTopicArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CreateForumTopicArgs) ToMultiPart ¶
func (args *CreateForumTopicArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type CreateNewStickerSetArgs ¶
type CreateNewStickerSetArgs struct { UserId int `json:"user_id"` Name string `json:"name"` Title string `json:"title"` Stickers []*InputSticker `json:"stickers"` StickerFormat string `json:"sticker_format"` StickerType string `json:"sticker_type"` NeedsRepainting bool `json:"needs_repainting"` }
func (*CreateNewStickerSetArgs) ToJson ¶
func (args *CreateNewStickerSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*CreateNewStickerSetArgs) ToMultiPart ¶
func (args *CreateNewStickerSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DeclineChatJoinRequestArgs ¶
type DeclineChatJoinRequestArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` }
func (*DeclineChatJoinRequestArgs) ToJson ¶
func (args *DeclineChatJoinRequestArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DeclineChatJoinRequestArgs) ToMultiPart ¶
func (args *DeclineChatJoinRequestArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DefaultChatArgs ¶
type DefaultChatArgs struct {
ChatId json.RawMessage `json:"chat_id"`
}
func (*DefaultChatArgs) ToJson ¶
func (args *DefaultChatArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DefaultChatArgs) ToMultiPart ¶
func (args *DefaultChatArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DefaultSendMethodsArguments ¶
type DefaultSendMethodsArguments struct { /*Unique identifier for the target chat or Username of the target channel (in the format @channelusername).*/ ChatId json.RawMessage `json:"chat_id"` /*Sends the message silently. Users will receive a notification with no sound.*/ DisableNotification bool `json:"disable_notification"` /*If the message is a reply, ID of the original message*/ ReplyToMessageId int `json:"reply_to_message_id,omitempty"` /*Pass True, if the message should be sent even if the specified replied-to message is not found*/ AllowSendingWithoutReply bool `json:"allow_sending_without_reply"` /*Protects the contents of sent messages from forwarding and saving*/ ProtectContent bool `json:"protect_content"` /*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.*/ ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"` /*Unique identifier for the target message thread (topic) of the forum; for forum supergroups only*/ MessageThreadId int `json:"message_thread_id,omitempty"` }
type DeleteForumTopicArgs ¶
type DeleteForumTopicArgs struct {
*CloseForumTopicArgs
}
type DeleteMessageArgs ¶
type DeleteMessageArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageId int `json:"message_id"` }
func (*DeleteMessageArgs) ToJson ¶
func (args *DeleteMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DeleteMessageArgs) ToMultiPart ¶
func (args *DeleteMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DeleteStickerFromSetArgs ¶
type DeleteStickerFromSetArgs struct {
Sticker string `json:"sticker"`
}
func (*DeleteStickerFromSetArgs) ToJson ¶
func (args *DeleteStickerFromSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DeleteStickerFromSetArgs) ToMultiPart ¶
func (args *DeleteStickerFromSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DeleteStickerSetArgs ¶
type DeleteStickerSetArgs struct {
Name string `json:"name"`
}
func (*DeleteStickerSetArgs) ToJson ¶
func (args *DeleteStickerSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DeleteStickerSetArgs) ToMultiPart ¶
func (args *DeleteStickerSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type DeleteWebhookArgs ¶
type DeleteWebhookArgs struct {
DropPendingUpdates bool `json:"drop_pending_updates"`
}
func (*DeleteWebhookArgs) ToJson ¶
func (args *DeleteWebhookArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*DeleteWebhookArgs) ToMultiPart ¶
func (args *DeleteWebhookArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditChatInviteLinkArgs ¶
type EditChatInviteLinkArgs struct { ChatId json.RawMessage `json:"chat_id"` InviteLink string `json:"invite_link"` Name string `json:"name,omitempty"` ExpireDate int `json:"expire_date,omitempty"` MemberLimit int `json:"member_limit,omitempty"` CreatesjoinRequest bool `json:"creates_join_request,omitempty"` }
func (*EditChatInviteLinkArgs) ToJson ¶
func (args *EditChatInviteLinkArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditChatInviteLinkArgs) ToMultiPart ¶
func (args *EditChatInviteLinkArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditForumTopicArgs ¶
type EditForumTopicArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageThreadId int `json:"message_thread_id"` Name string `json:"name"` IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"` }
func (*EditForumTopicArgs) ToJson ¶
func (args *EditForumTopicArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditForumTopicArgs) ToMultiPart ¶
func (args *EditForumTopicArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditGeneralForumTopic ¶
type EditGeneralForumTopic struct { ChatId json.RawMessage `json:"chat_id"` Name string `json:"name"` }
func (*EditGeneralForumTopic) ToJson ¶
func (args *EditGeneralForumTopic) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditGeneralForumTopic) ToMultiPart ¶
func (args *EditGeneralForumTopic) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditMessageCaptionArgs ¶
type EditMessageCaptionArgs struct { EditMessageDefaultArgs Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` DisablewebpagePreview bool `json:"disable_web_page_preview"` }
func (*EditMessageCaptionArgs) ToJson ¶
func (args *EditMessageCaptionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditMessageCaptionArgs) ToMultiPart ¶
func (args *EditMessageCaptionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditMessageDefaultArgs ¶
type EditMessageDefaultArgs struct { ChatId json.RawMessage `json:"chat_id,omitempty"` MessageId int `json:"message_id,omitempty"` InlineMessageId string `json:"inline_message_id,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
type EditMessageLiveLocationArgs ¶
type EditMessageLiveLocationArgs struct { /*Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)*/ ChatId json.RawMessage `json:"chat_id,omitempty"` /*Required if inline_message_id is not specified. Identifier of the message to edit*/ MessageId int `json:"message_id,omitempty"` /*Required if chat_id and message_id are not specified. Identifier of the inline message*/ InlineMessageId string `json:"inline_message_id,omitempty"` /*Latitude of the location*/ Latitude float32 `json:"latitude"` /*Longitude of the location*/ Longitude float32 `json:"longitude"` /*The radius of uncertainty for the location, measured in meters; 0-1500*/ HorizontalAccuracy float32 `json:"horizontal_accuracy,omitempty"` /* For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.*/ Heading int `json:"heading,omitempty"` /*For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.*/ ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` /*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.*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
func (*EditMessageLiveLocationArgs) ToJson ¶
func (args *EditMessageLiveLocationArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditMessageLiveLocationArgs) ToMultiPart ¶
func (args *EditMessageLiveLocationArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditMessageMediaArgs ¶
type EditMessageMediaArgs struct { EditMessageDefaultArgs Media InputMedia }
func (*EditMessageMediaArgs) ToJson ¶
func (args *EditMessageMediaArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditMessageMediaArgs) ToMultiPart ¶
func (args *EditMessageMediaArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditMessageReplyMakrupArgs ¶
type EditMessageReplyMakrupArgs struct {
EditMessageDefaultArgs
}
func (*EditMessageReplyMakrupArgs) ToJson ¶
func (args *EditMessageReplyMakrupArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditMessageReplyMakrupArgs) ToMultiPart ¶
func (args *EditMessageReplyMakrupArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EditMessageTextArgs ¶
type EditMessageTextArgs struct { EditMessageDefaultArgs Text string `json:"text"` ParseMode string `json:"parse_mode,omitempty"` Entities []MessageEntity `json:"entities,omitempty"` DisablewebpagePreview bool `json:"disable_web_page_preview"` }
func (*EditMessageTextArgs) ToJson ¶
func (args *EditMessageTextArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*EditMessageTextArgs) ToMultiPart ¶
func (args *EditMessageTextArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type EncryptedCredentials ¶
type EncryptedCredentials struct { /*Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication*/ Data string `json:"data"` /*Base64-encoded data hash for data authentication*/ Hash string `json:"hash"` /*Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption*/ Secret string `json:"secret"` }
Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
type EncryptedPassportElement ¶
type EncryptedPassportElement struct { /*Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.*/ Type string `json:"type"` /*Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.*/ Data string `json:"data,omitempty"` /*Optional. User's verified phone number, available only for “phone_number” type*/ PhoneNumber string `json:"phone_number,omitempty"` /*Optional. User's verified email address, available only for “email” type*/ Email string `json:"email,omitempty"` /*Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials*/ Files []PassportFile `json:"files,omitempty"` /*Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.*/ FrontSide *PassportFile `json:"front_side,omitempty"` /*Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.*/ ReverseSide *PassportFile `json:"reverse_side,omitempty"` /*Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.*/ Selfie *PassportFile `json:"selfie,omitempty"` /*Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.*/ Translation []PassportFile `json:"translation,omitempty"` /* Base64-encoded element hash for using in PassportElementErrorUnspecified*/ Hash string `json:"hash"` }
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
type FailureResult ¶
type FailureResult struct { Ok bool `json:"ok"` ErrorCode int `json:"error_code"` Description string `json:"description"` }
FailureResult represents a failure response that has "ok : false" field.
type ForceReply ¶
type ForceReply struct { /*Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'*/ ForceReply bool `json:"force_reply"` /*Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters*/ InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` /*Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.*/ Selective bool `json:"selective,omitempty"` }
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
type ForumTopic ¶
type ForumTopic struct { //Unique identifier of the forum topic MessageThreadId int `json:"message_thread_id"` //Name of the topic Name string `json:"name"` //Color of the topic icon in RGB format IconColor int `json:"icon_color"` //Optional. Unique identifier of the custom emoji shown as the topic icon IconCustomEmojiId string `json:"icon_custom_emoji_id,omitempty"` }
This object represents a forum topic.
type ForumTopicClosed ¶
type ForumTopicClosed struct{}
This object represents a service message about a forum topic closed in the chat. Currently holds no information.
type ForumTopicCreated ¶
type ForumTopicCreated struct { /*Name of the topic*/ Name string `json:"name"` /*Color of the topic icon in RGB format*/ IconColor int `json:"icon_color"` /*Optional. Unique identifier of the custom emoji shown as the topic icon*/ IconCustomEmojiId string `json:"icon_custom_emoji_id"` }
This object represents a service message about a new forum topic created in the chat.
type ForumTopicEdited ¶
type ForumTopicEdited struct { /*Optional. New name of the topic, if it was edited*/ Name string `json:"name"` /*Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed*/ IconCustomEmojiId string `json:"icon_custom_emoji_id"` }
This object represents a service message about an edited forum topic.
type ForumTopicReopened ¶
type ForumTopicReopened struct{}
This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
type ForwardMessageArgs ¶
type ForwardMessageArgs struct { /*Unique identifier for the target chat or Username of the target channel (in the format @channelusername).*/ ChatId json.RawMessage `json:"chat_id"` /*Unique identifier for the chat where the original message was sent or Channel username in the format @channelusername*/ FromChatId json.RawMessage `json:"from_chat_id"` /*Sends the message silently. Users will receive a notification with no sound.*/ DisableNotification bool `json:"disable_notification,omitempty"` /*Protects the contents of sent messages from forwarding and saving*/ ProtectContent bool `json:"protect_content"` /*Message identifier in the chat specified in from_chat_id*/ MessageId int `json:"message_id"` /*Unique identifier for the target message thread (topic) of the forum; for forum supergroups only*/ MessageThreadId int `json:"message_thread_id,omitempty"` }
func (*ForwardMessageArgs) ToJson ¶
func (args *ForwardMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*ForwardMessageArgs) ToMultiPart ¶
func (args *ForwardMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Game ¶
type Game struct { /*Title of the game*/ Title string `json:"title"` /*Description of the game*/ Description string `json:"description"` /*Photo that will be displayed in the game message in chats.*/ Photo []PhotoSize `json:"photo"` /*Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.*/ Text string `json:"text,omitempty"` /*Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.*/ TextEntities []MessageEntity `json:"text_entities,omitempty"` /*Optional. Animation that will be displayed in the game message in chats. Upload via BotFather*/ Animation *Animation `json:"animation,omitempty"` }
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
type GameHighScore ¶
type GameHighScore struct { /*Position in high score table for the game*/ Position int `json:"position"` /*User*/ User User `json:"user"` /*Score*/ Score int `json:"score"` }
This object represents one row of the high scores table for a game.
type GeneralForumTopicHidden ¶
type GeneralForumTopicHidden struct{}
This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
type GeneralForumTopicUnhidden ¶
type GeneralForumTopicUnhidden struct{}
This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
type GetChatMemberArgs ¶
type GetChatMemberArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` }
func (*GetChatMemberArgs) ToJson ¶
func (args *GetChatMemberArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetChatMemberArgs) ToMultiPart ¶
func (args *GetChatMemberArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetCustomEmojiStickersArgs ¶
type GetCustomEmojiStickersArgs struct {
CustomEmojiIds []string `json:"custom_emoji_ids"`
}
func (*GetCustomEmojiStickersArgs) ToJson ¶
func (args *GetCustomEmojiStickersArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetCustomEmojiStickersArgs) ToMultiPart ¶
func (args *GetCustomEmojiStickersArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetFileArgs ¶
type GetFileArgs struct {
FileId string `json:"file_id"`
}
func (*GetFileArgs) ToJson ¶
func (args *GetFileArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetFileArgs) ToMultiPart ¶
func (args *GetFileArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetGameHighScoresArgs ¶
type GetGameHighScoresArgs struct { UserId int `json:"user_id"` ChatId int `json:"chat_id,omitempty"` MessageId int `json:"message_id,omitempty"` InlineMessageId string `json:"inline_message_id,omitempty"` }
func (*GetGameHighScoresArgs) ToJson ¶
func (args *GetGameHighScoresArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetGameHighScoresArgs) ToMultiPart ¶
func (args *GetGameHighScoresArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetMyDescriptionArgs ¶
type GetMyDescriptionArgs struct { //A two-letter ISO 639-1 language code or an empty string LanguageCode string `json:"language_code"` }
func (*GetMyDescriptionArgs) ToJson ¶
func (args *GetMyDescriptionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetMyDescriptionArgs) ToMultiPart ¶
func (args *GetMyDescriptionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetMyNameArgs ¶
type GetMyNameArgs struct {
LanguageCode string `json:"language_code"`
}
func (*GetMyNameArgs) ToJson ¶
func (args *GetMyNameArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetMyNameArgs) ToMultiPart ¶
func (args *GetMyNameArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetStickerSetArgs ¶
type GetStickerSetArgs struct {
Name string `json:"name"`
}
func (*GetStickerSetArgs) ToJson ¶
func (args *GetStickerSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetStickerSetArgs) ToMultiPart ¶
func (args *GetStickerSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetUpdatesArgs ¶
type GetUpdatesArgs struct { /*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 as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.*/ Offset int `json:"offset,omitempty"` /*Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.*/ Limit int `json:"limit,omitempty"` /*Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.*/ Timeout int `json:"timeout,omitempty"` /*A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used. Please note that this parameter doesnt affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.*/ AllowedUpdates []string `json:"allowed_updates,omitempty"` }
func (*GetUpdatesArgs) ToJson ¶
func (args *GetUpdatesArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetUpdatesArgs) ToMultiPart ¶
func (args *GetUpdatesArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type GetUserProfilePhototsArgs ¶
type GetUserProfilePhototsArgs struct { /*Unique identifier of the target user*/ UserId int `json:"user_id"` /*Sequential number of the first photo to be returned. By default, all photos are returned.*/ Offset int `json:"offset,omitempty"` /*Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.*/ Limit int `json:"limit,omitempty"` }
func (*GetUserProfilePhototsArgs) ToJson ¶
func (args *GetUserProfilePhototsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*GetUserProfilePhototsArgs) ToMultiPart ¶
func (args *GetUserProfilePhototsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type HideGeneralForumTopic ¶
type HideGeneralForumTopic struct {
*CloseGeneralForumTopic
}
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { /*Label text on the button*/ Text string `json:"text"` /*Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.*/ URL string `json:"url,omitempty"` /*Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.*/ LoginURL *LoginUrl `json:"login_url,omitempty"` /*Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes*/ CallbackData string `json:"callback_data,omitempty"` /*Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.*/ SwitchInlineQuery string `json:"switch_inline_query,omitempty"` /*Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.*/ SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"` //Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"` /*Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.*/ CallbackGame *CallbackGame `json:"callback_game,omitempty"` /*Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.*/ Pay bool `json:"pay,omitempty"` /*A web app info (url) for launching a web app Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */ WebApp *WebAppInfo `json:"web_app,omitempty"` }
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct { /*Array of button rows, each represented by an Array of InlineKeyboardButton objects*/ InlineKeyboard [][]*InlineKeyboardButton `json:"inline_keyboard"` }
This object represents an inline keyboard that appears right next to the message it belongs to.
type InlineQuery ¶
type InlineQuery struct { /*Unique identifier for this query*/ Id string `json:"id"` /*Sender*/ From *User `json:"from"` /*Text of the query (up to 256 characters)*/ Query string `json:"query"` /*Offset of the results to be returned, can be controlled by the bot*/ Offset string `json:"offset"` /*Optional. Type of the chat, from which the inline query was sent.Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat*/ ChatType string `json:"chat_type,omitempty"` /*Optional. Sender location, only for bots that request user location*/ Location *Location `json:"location,omitempty"` }
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
type InlineQueryResult ¶
type InlineQueryResult interface {
GetResultType() string
}
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct { InlineQueryResultDefault /*Content of the message to be sent*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. URL of the result*/ URL string `json:"url,omitempty"` /*Optional. Pass True, if you don't want the URL to be shown in the message*/ HideURL bool `json:"hide_url,omitempty"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Url of the thumbnail for the result*/ ThumbURL string `json:"thumbnail_url,omitempty"` /*Optional. Thumbnail width*/ ThumbWidth int `json:"thumbnail_width,omitempty"` /*Optional. Thumbnail height*/ ThumbHeight int `json:"thumbnail_height,omitempty"` }
Represents a link to an article or web page.
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct { InlineQueryResultDefault /*A valid URL for the audio file*/ AudioURL string `json:"audio_url"` /*Optional. Performer*/ Performer string `json:"performer,omitempty"` /*Optional. Audio duration in seconds*/ AudioDuration int `json:"audio_duration,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the audio*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct { InlineQueryResultDefault /*A valid file identifier for the audio*/ AudioFileId string `json:"audio_file_id"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the audio*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio. This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct { InlineQueryResultDefault /*A valid file identifier for the file*/ DocumentFileId string `json:"document_file_id"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the file*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct { InlineQueryResultDefault /*A valid file identifier for the gif*/ GifFileId string `json:"gif_file_id"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the GIF animation*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct { InlineQueryResultDefault /*A valid file identifier for the animation*/ Mpeg4FileId string `json:"mpeg4_file_id"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the animation*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct { InlineQueryResultDefault /*A valid file identifier for the photo*/ PhotoFileId string `json:"photo_file_id"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the photo*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct { /*Type of the result*/ Type string `json:"type"` /*Unique identifier for this result, 1-64 Bytes*/ Id string `json:"id"` /*A valid file identifier for the sticker*/ StickerFileId string `json:"sticker_file_id"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the animation*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker. This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.
func (*InlineQueryResultCachedSticker) GetResultType ¶
func (i *InlineQueryResultCachedSticker) GetResultType() string
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct { InlineQueryResultDefault /*A valid file identifier for the video*/ VideoFileId string `json:"video_file_id"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
type InlineQueryResultCachedVocie ¶
type InlineQueryResultCachedVocie struct { InlineQueryResultDefault /*A valid file identifier for the video*/ VoiceFileId string `json:"voice_file_id"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the voice recording*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message. This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultContact ¶
type InlineQueryResultContact struct { InlineQueryResultDefault /*Contact's phone number*/ PhoneNumber string `json:"phone_number"` /*Optional. Contact's first name*/ Firstname string `json:"first_name"` /*Optional. Contact's last name*/ LastName string `json:"last_name,omitempty"` /*Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes*/ Vcard string `json:"vcard,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the contact*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` /*Optional. Url of the thumbnail for the result*/ ThumbURL string `json:"thumbnail_url,omitempty"` /*Optional. Thumbnail width*/ ThumbWidth int `json:"thumbnail_width,omitempty"` /*Optional. Thumbnail height*/ ThumbHeight int `json:"thumbnail_height,omitempty"` }
Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultDefault ¶
type InlineQueryResultDefault struct { /*Type of the result*/ Type string `json:"type"` /*Unique identifier for this result, 1-64 Bytes*/ Id string `json:"id"` /*Title of the result*/ Title string `json:"title"` }
This object should not be used at all.
func (*InlineQueryResultDefault) GetResultType ¶
func (i *InlineQueryResultDefault) GetResultType() string
Returns the type of the result. The returned value is one of the following : CachedAudio CachedDocument CachedGif CachedMpeg4Gif CachedPhoto CachedSticker CachedVideo CachedVoice Article Audio Contact Game Document Gif Location Mpeg4Gif Photo Venue Video Voice
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct { InlineQueryResultDefault /*A valid URL for the file*/ DocumentURL string `json:"document_url"` /*Mime type of the content of the file, either “application/pdf” or “application/zip”*/ MIMEType string `json:"mime_type"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the file*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` /*Optional. Url of the thumbnail for the result*/ ThumbURL string `json:"thumbnail_url,omitempty"` /*Optional. Thumbnail width*/ ThumbWidth int `json:"thumbnail_width,omitempty"` /*Optional. Thumbnail height*/ ThumbHeight int `json:"thumbnail_height,omitempty"` }
Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultGame ¶
type InlineQueryResultGame struct { /*Type of the result*/ Type string `json:"type"` /*Unique identifier for this result, 1-64 Bytes*/ Id string `json:"id"` /*Type of the result, must be game*/ GameShortName string `json:"game_short_name"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
Represents a Game. Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.
func (*InlineQueryResultGame) GetResultType ¶
func (i *InlineQueryResultGame) GetResultType() string
type InlineQueryResultGif ¶
type InlineQueryResultGif struct { InlineQueryResultDefault /*A valid URL for the GIF file. File size must not exceed 1MB*/ GifURL string `json:"gif_url"` /*Optional. Width of the GIF*/ GifWidth int `json:"gif_width,omitempty"` /*Optional. Height of the GIF*/ GifHeight int `json:"gif_height,omitempty"` /*Optional. Duration of the GIF in seconds*/ GifDuration int `json:"gif_duration,omitempty"` /*URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result*/ ThumbURL string `json:"thumbnail_url"` /*Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”*/ ThumbMIMEType string `json:"thumbnail_mime_type"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the GIF animation*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct { InlineQueryResultDefault /*Location latitude in degrees*/ Latitude float32 `json:"latitude"` /*Location longitude in degrees*/ Longitude float32 `json:"longitude"` /*Optional. The radius of uncertainty for the location, measured in meters; 0-1500*/ HorizontalAccuracy float32 `json:"horizontal_accuracy,omitempty"` /*Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.*/ LivePeriod int `json:"live_peroid,omitempty"` /*Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.*/ Heading int `json:"heading,omitempty"` /*Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.*/ ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the location*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` /*Optional. Url of the thumbnail for the result*/ ThumbURL string `json:"thumbnail_url,omitempty"` /*Optional. Thumbnail width*/ ThumbWidth int `json:"thumbnail_width,omitempty"` /*Optional. Thumbnail height*/ ThumbHeight int `json:"thumbnail_height,omitempty"` }
Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct { InlineQueryResultDefault /*A valid URL for the MP4 file. File size must not exceed 1MB*/ Mpeg4URL string `json:"mpeg4_url"` /*Optional. Video width*/ Mpeg4Width int `json:"mpeg4_width,omitempty"` /*Optional. Video height*/ Mpeg4Height int `json:"mpeg4_height,omitempty"` /*Optional. Video duration in seconds*/ Mpeg4Duration int `json:"mpeg4_duration,omitempty"` /*URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result*/ ThumbURL string `json:"thumbnail_url"` /*Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”*/ ThumbMIMEType string `json:"thumbnail_mime_type"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the animation*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { InlineQueryResultDefault /*A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB*/ PhotoURL string `json:"photo_url"` /*URL of the thumbnail for the photo*/ ThumbURL string `json:"thumbnail_url"` /*Optional. Width of the photo*/ PhotoWidth int `json:"photo_width,omitempty"` /*Optional. Height of the photo*/ PhotoHeight int `json:"photo_height,omitempty"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the photo*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
type InlineQueryResultVenu ¶
type InlineQueryResultVenu struct { InlineQueryResultDefault /*Latitude of the venue location in degrees*/ Latitude float32 `json:"latitude"` /*Longitude of the venue location in degrees*/ Longitude float32 `json:"longitude"` /*Address of the venue*/ Address string `json:"address"` /*Optional. Foursquare identifier of the venue if known*/ FourquareId string `json:"fourquare_id,omitempty"` /*Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)*/ FoursquareType string `json:"fourquare_type,omitempty"` /*Optional. Google Places identifier of the venue*/ GooglePlaceId string `json:"google_place_id,omitempty"` /*Optional. Google Places type of the venue.*/ GoogleplaceType string `json:"google_place_type,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the venue*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` /*Optional. Url of the thumbnail for the result*/ ThumbURL string `json:"thumbnail_url,omitempty"` /*Optional. Thumbnail width*/ ThumbWidth int `json:"thumbnail_width,omitempty"` /*Optional. Thumbnail height*/ ThumbHeight int `json:"thumbnail_height,omitempty"` }
Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { InlineQueryResultDefault /*A valid URL for the embedded video player or video file*/ VideoURL string `json:"video_url"` /*Mime type of the content of video url, “text/html” or “video/mp4”*/ MIMEType string `json:"mime_type"` /*URL of the thumbnail (JPEG only) for the video*/ ThumbURL string `json:"thumbnail_url"` /*Optional. Video width*/ VideoWidth int `json:"video_width,omitempty"` /*Optional. Video height*/ VideoHeight int `json:"video_height,omitempty"` /*Optional. Video duration in seconds*/ VideoDuration int `json:"video_duration,omitempty"` /*Optional. Short description of the result*/ Description string `json:"description,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.
type InlineQueryResultVocie ¶
type InlineQueryResultVocie struct { InlineQueryResultDefault /*A valid URL for the voice recording*/ VoiceURL string `json:"voice_url"` /*Optional. Recording duration in seconds*/ VoiceDuration int `json:"voice_duration,omitempty"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the caption. See formatting options for more details.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. Inline keyboard attached to the message*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` /*Optional. Content of the message to be sent instead of the voice recording*/ InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` }
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
type InlineQueryResultsButton ¶
type InlineQueryResultsButton struct { //Label text on the button Text string `json:"text"` // Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App. WebApp *WebAppInfo `json:"web_app,omitempty"` /* Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. */ StartParameter string `json:"start_parameter,omitempty"` }
This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
type InputContactMessageContent ¶
type InputContactMessageContent struct { /*Contact's phone number*/ PhoneNumber string `json:"phone_number"` /*Contact's first name*/ FirstName string `json:"first_name"` /*Optional. Contact's last name*/ LastName string `json:"last_name,omitempty"` /*Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes*/ Vcard string `json:"vcard,omitempty"` }
Represents the content of a contact message to be sent as the result of an inline query.
func (*InputContactMessageContent) GetType ¶
func (*InputContactMessageContent) GetType() string
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct { /*Product name, 1-32 characters*/ Title string `json:"title"` /*Product description, 1-255 characters*/ Description string `json:"description"` /*Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.*/ Payload string `json:"payload"` /*Payment provider token, obtained via Botfather*/ ProviderToken string `json:"provider_token"` /*Three-letter ISO 4217 currency code*/ Currency string `json:"currency"` /*Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)*/ Prices []LabeledPrice `json:"prices"` /*Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0*/ MaxTipAmount int `json:"max_tip_amount,omitempty"` /*Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.*/ SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"` /*Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.*/ ProviderData string `json:"provider_data,omitempty"` /* Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.*/ PhotoURL string `json:"photo_url,omitempty"` /* Optional. Photo size*/ PhotoSize int `json:"photo_size,omitempty"` /* Optional. Photo width*/ PhotoWidth int `json:"photo_width,omitempty"` /* Optional. Photo height*/ PhotoHeight int `json:"photo_height,omitempty"` /*Optional. Pass True, if you require the user's full name to complete the order*/ NeedName bool `json:"need_name,omitempty"` /*Optional. Pass True, if you require the user's phone number to complete the order*/ NeedPhoneNumber bool `json:"need_phone_number,omitempty"` /*Optional. Pass True, if you require the user's email address to complete the order*/ NeedEmail bool `json:"need_email,omitempty"` /*Optional. Pass True, if you require the user's shipping address to complete the order*/ NeedShippingAddress bool `json:"need_shipping_address,omitempty"` /* Optional. Pass True, if user's phone number should be sent to provider*/ SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"` /*Optional. Pass True, if user's email address should be sent to provider*/ SendEmailToProvider bool `json:"send_email_to_provider,omitempty"` /*Optional. Pass True, if the final price depends on the shipping method*/ IsFlexible bool `json:"is_flexible,omitempty"` }
func (*InputInvoiceMessageContent) GetType ¶
func (*InputInvoiceMessageContent) GetType() string
type InputLocationMessageContent ¶
type InputLocationMessageContent struct { /*Latitude of the location in degrees*/ Latitude float32 `json:"latitude"` /*Longitude of the location in degrees*/ Longitude float32 `json:"longitude"` /*Optional. The radius of uncertainty for the location, measured in meters; 0-1500*/ HorizontalAccuracy float32 `json:"horizontal_accuracy,omitempty"` /*Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.*/ LivePeriod int `json:"live_period,omitempty"` /*Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.*/ Heading int `json:"heading,omitempty"` /* Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.*/ ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` }
Represents the content of a location message to be sent as the result of an inline query.
func (*InputLocationMessageContent) GetType ¶
func (*InputLocationMessageContent) GetType() string
type InputMedia ¶
type InputMedia interface {
// contains filtered or unexported methods
}
type InputMediaAnimation ¶
type InputMediaAnimation struct { InputMediaDefault /*Optional. 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 string `json:"thumbnail,omitempty"` /*Optional. Animation width*/ Width int `json:"width,omitempty"` /*Optional. Animation height*/ Height int `json:"height,omitempty"` /*Optional. Animation duration in seconds*/ Duration int `json:"duration,omitempty"` /*Optional. Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` }
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
type InputMediaAudio ¶
type InputMediaAudio struct { InputMediaDefault /*Optional. 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 string `json:"thumbnail,omitempty"` /*Optional. Animation duration in seconds*/ Duration int `json:"duration,omitempty"` /*Optional. Performer of the audio*/ Performer string `json:"performer,omitempty"` /*Optional. Title of the audio*/ Title string `json:"title,omitempty"` }
Represents an audio file to be treated as music to be sent.
type InputMediaDefault ¶
type InputMediaDefault struct { /*Type of the result, can be photo,video,animation,audio or document.*/ Type string `json:"type"` /*File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.*/ Media string `json:"media"` /*Optional. Caption of the file to be sent, 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Optional. Mode for parsing entities in the file caption.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` }
This should not be used at all
type InputMediaDocument ¶
type InputMediaDocument struct { InputMediaDefault /*Optional. 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 string `json:"thumbnail,omitempty"` /*Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.*/ DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"` }
Represents a general file to be sent.
type InputMediaPhoto ¶
type InputMediaPhoto struct { InputMediaDefault /*Optional. Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` }
Represents a photo to be sent.
type InputMediaVideo ¶
type InputMediaVideo struct { InputMediaDefault /*Optional. 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 string `json:"thumbnail,omitempty"` /*Optional. Video width*/ Width int `json:"width,omitempty"` /*Optional. Video height*/ Height int `json:"height,omitempty"` /*Optional. Video duration in seconds*/ Duration int `json:"duration,omitempty"` /*Optional. Pass True, if the uploaded video is suitable for streaming*/ SupportsStreaming bool `json:"supports_streaming,omitempty"` /*Optional. Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` }
Represents a video to be sent.
type InputMessageContent ¶
type InputMessageContent interface { /*Returns the full name of this object*/ GetType() string }
This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:
InputTextMessageContent InputLocationMessageContent InputVenueMessageContent InputContactMessageContent InputInvoiceMessageContent
type InputSticker ¶
type InputSticker struct { Sticker string `json:"sticker"` /*List of 1-20 emoji associated with the sticker*/ EmojiList []string `json:"emoji_list"` /*Optional. Position where the mask should be placed on faces. For “mask” stickers only.*/ MaskPosition *MaskPosition `json:"mask_position,omitempty"` /*Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.*/ KeyWords []string `json:"keywords"` }
type InputTextMessageContent ¶
type InputTextMessageContent struct { /*Text of the message to be sent, 1-4096 characters*/ MessageText string `json:"message_text"` /*Optional. Mode for parsing entities in the message text.*/ ParseMode string `json:"parse_mode,omitempty"` /*Optional. List of special entities that appear in message text, which can be specified instead of parse_mode*/ Entities []MessageEntity `json:"entities,omitempty"` /*Optional. Disables link previews for links in the sent message*/ DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` }
Represents the content of a text message to be sent as the result of an inline query.
func (*InputTextMessageContent) GetType ¶
func (*InputTextMessageContent) GetType() string
type InputVenueMessageContent ¶
type InputVenueMessageContent struct { /*Latitude of the venue in degrees*/ Latitude float32 `json:"latitude"` /*Longitude of the venue in degrees*/ Longitude float32 `json:"longitude"` /*Name of the venue*/ Title string `json:"title"` /*Address of the venue*/ Address string `json:"address"` /*Optional. Foursquare identifier of the venue, if known*/ FoursquareId string `json:"fourquare_id,omitempty"` /*Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)*/ FoursquareType string `json:"foursquare_type,omitempty"` /*Optional. Google Places identifier of the venue*/ GooglePlaceId string `json:"google_place_id,omitempty"` /*Optional. Google Places type of the venue.*/ GooglePlaceType string `json:"google_place_type,omitempty"` }
Represents the content of a venue message to be sent as the result of an inline query.
func (*InputVenueMessageContent) GetType ¶
func (*InputVenueMessageContent) GetType() string
type Invoice ¶
type Invoice struct { /*Product name*/ Title string `json:"title"` /*Product description*/ Description string `json:"description"` /*Unique bot deep-linking parameter that can be used to generate this invoice*/ StartParameter string `json:"start_parameter"` /*Three-letter ISO 4217 currency code*/ Currency string `json:"currency"` /*Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145.*/ TotalAmount string `json:"total_amount"` }
This object contains basic information about an invoice.
type KeyboardButton ¶
type KeyboardButton struct { /*Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed*/ Text string `json:"text"` /*Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.*/ RequestUser *KeyboardButtonRequestUser `json:"request_user,omitempty"` /*Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.*/ RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"` /*Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.*/ RequestContact bool `json:"request_contact"` /*Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only*/ RequestLocation bool `json:"request_location"` /*Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only. Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.*/ RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"` /*A web app info (url) for launching a web app If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.*/ WebApp *WebAppInfo `json:"web_app,omitempty"` }
This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct { /*Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.*/ Type string `json:"type,omitempty"` }
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct { /*Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message*/ RequestId int `json:"request_id"` /*Pass True to request a channel chat, pass False to request a group or a supergroup chat.*/ ChatIsChannel bool `json:"chat_is_channel"` /*Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.*/ ChatIsForum bool `json:"chat_is_forum"` /*Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.*/ ChatHasUsername bool `json:"chat_has_username"` /*Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.*/ ChatIsCreated bool `json:"chat_is_created"` /*Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.*/ UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` /*Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.*/ BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"` /*Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.*/ BotIsMemeber bool `json:"bot_is_member"` }
type KeyboardButtonRequestUser ¶
type KeyboardButtonRequestUser struct { /*Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message*/ RequestId int `json:"request_id"` /*Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.*/ UserIsBot bool `json:"user_is_bot"` /*Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.*/ UserIsPremium bool `json:"user_is_premium"` }
This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.
type LabeledPrice ¶
type LabeledPrice struct { /*Portion label*/ Label string `json:"label"` /*Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145.*/ Amount int `json:"amount"` }
This object represents a portion of the price for goods or services.
type Location ¶
type Location struct { Longitude float32 `json:"longitude"` Latitude float32 `json:"Latitude"` HorizontalAccuracy float32 `json:"horizontal_accuracy,omitempty"` LivePeriod int `json:"live_period,omitempty"` Heading int `json:"heading,omitempty"` ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` }
type LoginUrl ¶
type LoginUrl struct { /*An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.*/ URL string `json:"url"` /*Optional. New text of the button in forwarded messages.*/ ForwardText string `json:"forward_text,omitempty"` /*Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.*/ BotUsername string `json:"bot_username,omitempty"` /*Optional. Pass True to request the permission for your bot to send messages to the user.*/ RequestWriteAccess bool `json:"request_write_access"` }
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in.
type MaskPosition ¶
type MaskPosition struct { /*The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.*/ Point string `json:"point"` /*Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.*/ XShift float32 `json:"x_shift"` /*Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.*/ YShift float32 `json:"y_shift"` /*Mask scaling coefficient. For example, 2.0 means double size.*/ Scale float32 `json:"scale"` }
MaskPosition describes the position on faces where a mask should be placed by default.
type MenuButton ¶
type MenuButton struct { Type string `json:"type"` Text string `json:"text,omitempty"` WebApp *WebAppInfo `json:"web_app,omitempty"` }
type Message ¶
type Message struct { /*Unique message identifier inside this chat*/ MessageId int `json:"message_id"` /*Optional. Unique identifier of a message thread to which the message belongs; for supergroups only*/ MessageThreadId int `json:"message_thread_id"` /*Optional. Sender, empty for messages sent to channels*/ From *User `json:"from,omitempty"` /*Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group*/ SenderChat *Chat `json:"sender_chat,omitempty"` /*Date the message was sent in Unix time*/ Date int `json:"date"` /*Conversation the message belongs to*/ Chat *Chat `json:"chat"` /*Optional. For forwarded messages, sender of the original message*/ ForwardFrom *User `json:"forward_from,omitempty"` /*Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat*/ ForwardFromChat *Chat `json:"forward_from_chat,omitempty"` /*Optional. For messages forwarded from channels, identifier of the original message in the channel*/ ForwardFromMessageId int `json:"forward_from_message_id,omitempty"` /*Optional. For messages forwarded from channels, signature of the post author if present*/ ForwardSignature string `json:"forward_signature,omitempty"` /*Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages*/ ForwardSenderName string `json:"forward_sender_name,omitempty"` /*Optional. For forwarded messages, date the original message was sent in Unix time*/ ForwardDate int `json:"forward_date,omitempty"` /*Optional. True, if the message is sent to a forum topic*/ IsTopicMessage bool `json:"is_topic_message"` /*Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group*/ IsAutomaticForward bool `json:"is_automatic_forward,omitempty"` /*Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.*/ ReplyToMessage *Message `json:"reply_to_message,omitempty"` /*Optional. Bot through which the message was sent*/ ViaBot User `json:"via_bot,omitempty"` /*Optional. Date the message was last edited in Unix time*/ EditDate int `json:"edit_date,omitempty"` /*Optional. True, if the message can't be forwarded*/ HasProtectedContent bool `json:"has_protected_content,omitempty"` /*Optional. The unique identifier of a media message group this message belongs to*/ MediaGroupId string `json:"media_group_id,omitempty"` /*Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator*/ AuthorSignature string `json:"author_signature,omitempty"` /*Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters*/ Text string `json:"text,omitempty"` /*Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text*/ Entities []MessageEntity `json:"entities,omitempty"` /*Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set*/ Animation *Animation `json:"animation,omitempty"` /*Optional. Message is an audio file, information about the file*/ Audio *Audio `json:"audio,omitempty"` /*Optional. Message is a general file, information about the file*/ Document *Document `json:"document,omitempty"` /*Optional. Message is a photo, available sizes of the photo*/ Photo []PhotoSize `json:"photo,omitempty"` /*Optional. Message is a sticker, information about the sticker*/ Sticker *Sticker `json:"sticker,omitempty"` /*Optional. Message is a forwarded story*/ Story *Story `json:"story"` /*Optional. Message is a video, information about the video*/ Video *Video `json:"video,omitempty"` /*Optional. Message is a video note, information about the video message*/ VideoNote *VideoNote `json:"video_note,omitempty"` /*Optional. Message is a voice message, information about the file*/ Vocie *Voice `json:"voice,omitempty"` /*Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters*/ Caption string `json:"caption,omitempty"` /*Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Optional. True, if the message media is covered by a spoiler animation*/ HasMediaSpoiler bool `json:"has_media_spoiler"` /*Optional. Message is a shared contact, information about the contact*/ Contact *Contact `json:"contact,omitempty"` /*Optional. Message is a dice with random value*/ Dice *Dice `json:"dice,omitempty"` /*Optional. Message is a game, information about the game.*/ Game *Game `json:"game,omitempty"` /*Optional. Message is a native poll, information about the poll*/ Poll *Poll `json:"poll,omitempty"` /*Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set*/ Venue *Venue `json:"venue,omitempty"` /*Optional. Message is a shared location, information about the location*/ Location *Location `json:"location,omitempty"` /*Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)*/ NewChatMembers []User `json:"new_chat_members,omitempty"` /*Optional. A member was removed from the group, information about them (this member may be the bot itself)*/ LeftChatMember *User `json:"left_chat_member,omitempty"` /*Optional. A chat title was changed to this value*/ NewChatTitle string `json:"new_chat_title,omitempty"` /*Optional. A chat photo was change to this value*/ NewChatPhoto []PhotoSize `json:"new_chat_photo,omitempty"` /*Optional. Service message: the chat photo was deleted*/ DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"` /*Optional. Service message: the group has been created*/ GroupChatCreated bool `json:"group_chat_created,omitempty"` /*Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.*/ SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"` /*Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.*/ ChannelChatCreated bool `json:"channel_chat_created,omitempty"` /*Optional. Service message: auto-delete timer settings changed in the chat*/ MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"` /*Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.*/ MigrateToChatId int `json:"migrate_to_chat_id,omitempty"` /*Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.*/ MigrateFromChatId int `json:"migrate_from_chat_id,omitempty"` /*Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.*/ PinnedMessage *Message `json:"pinned_message,omitempty"` /*Optional. Message is an invoice for a payment, information about the invoice*/ Invoice *Invoice `json:"invoice,omitempty"` /*Optional. Message is a service message about a successful payment, information about the payment.*/ SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"` UserShared *UserShared `json:"user_shared"` ChatShared *ChatShared `json:"chat_shared"` /*Optional. The domain name of the website on which the user has logged in.*/ ConnectedWebsite string `json:"connected_website,omitempty"` /*Optional. Service message: the user allowed the bot added to the attachment menu to write messages*/ WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed"` /*Optional. Telegram Passport data*/ PassportData *PassportData `json:"passport_data,omitempty"` /*Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.*/ ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` /*Optional. Service message: forum topic created*/ ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created"` /*Optional. Service message: forum topic edited*/ ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited"` /*Optional. Service message: forum topic closed*/ ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed"` /*Optional. Service message: forum topic reopened*/ ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened"` /*Optional. Service message: the 'General' forum topic hidden*/ GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden"` GeneralForumTopicUnhidden *GeneralForumTopicUnhidden `json:"general_forum_topic_unhidden"` /*Optional. Service message: voice chat scheduled*/ VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"` /*Optional. Service message: voice chat started*/ VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"` /*Optional. Service message: voice chat ended*/ VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"` /*Optional. Service message: new participants invited to a voice chat*/ VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"` /*Optional. Service message: data sent by a Web App*/ WebAppData *WebAppData `json:"web_app_data,omitempty"` /*Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.*/ ReplyMakrup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
This object represents a message.
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}
type MessageEntity ¶
type MethodArguments ¶
type MyCommandsDefault ¶
type MyCommandsDefault struct { Scope BotCommandScope `json:"scope,omitempty"` LanguageCode string `json:"language_code,omitempty"` }
func (*MyCommandsDefault) ToJson ¶
func (args *MyCommandsDefault) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*MyCommandsDefault) ToMultiPart ¶
func (args *MyCommandsDefault) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type MyDefaultAdministratorRightsArgs ¶
type MyDefaultAdministratorRightsArgs struct { /*Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.*/ ForChannels bool `json:"for_channels"` /*A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.*/ Rights *ChatAdministratorRights `json:"rights,omitempty"` }
func (*MyDefaultAdministratorRightsArgs) ToJson ¶
func (args *MyDefaultAdministratorRightsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*MyDefaultAdministratorRightsArgs) ToMultiPart ¶
func (args *MyDefaultAdministratorRightsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type OrderInfo ¶
type OrderInfo struct { /*Optional. User name*/ Name string `json:"name,omitempty"` /*Optional. User's phone number*/ PhoneNumber string `json:"phone_number,omitempty"` /*Optional. User email*/ Email string `json:"email,omitempty"` /*Optional. User shipping address*/ ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"` }
This object represents information about an order.
type PassportData ¶
type PassportData struct { /*Array with information about documents and other Telegram Passport elements that was shared with the bot*/ Data []EncryptedPassportElement `json:"data"` /*Encrypted credentials required to decrypt the data*/ Credentials *EncryptedCredentials `json:"credentials"` }
Contains information about Telegram Passport data shared with the bot by the user.
type PassportElementError ¶
type PassportElementError interface {
// contains filtered or unexported methods
}
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct { /*Error source, must be data*/ Source string `json:"source"` /*The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”*/ Type string `json:"type"` /*Error message*/ Message string `json:"message"` /*Name of the data field which has the error*/ FieldName string `json:"field_name"` /*Base64-encoded data hash*/ DataHash string `json:"data_hash"` }
Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
type PassportElementErrorFile ¶
type PassportElementErrorFile struct {
PassportElementErrordefault
}
Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct { /*Error source, must be data*/ Source string `json:"source"` /*The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”*/ Type string `json:"type"` /*List of base64-encoded file hashes*/ FileHashes []string `json:"file_hashes"` /*Error message*/ Message string `json:"message"` }
Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct {
PassportElementErrordefault
}
Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
type PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct {
PassportElementErrordefault
}
Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
type PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct {
PassportElementErrordefault
}
Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct {
PassportElementErrordefault
}
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
type PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct {
PassportElementErrorFiles
}
Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
type PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct { /*Error source, must be unspecified*/ Source string `json:"source"` /*Type of element of the user's Telegram Passport which has the issue*/ Type string `json:"type"` /*Base64-encoded element hash*/ ElementHash string `json:"element_hash"` /*Error message*/ Message string `json:"mesaage"` }
Represents an issue in an unspecified place. The error is considered resolved when new data is added.
type PassportElementErrordefault ¶
type PassportElementErrordefault struct { /*Error source, must be data*/ Source string `json:"source"` /*The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”*/ Type string `json:"type"` /*Base64-encoded hash of the file with the front side of the document*/ FileHash string `json:"file_hash"` /*Error message*/ Message string `json:"message"` }
This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
PassportElementErrorDataField PassportElementErrorFrontSide PassportElementErrorReverseSide PassportElementErrorSelfie PassportElementErrorFile PassportElementErrorFiles PassportElementErrorTranslationFile PassportElementErrorTranslationFiles PassportElementErrorUnspecified
This object should not be used at all.
type PassportFile ¶
type PassportFile struct { /*Identifier for this file, which can be used to download or reuse the file*/ FileId string `json:"file_id"` /*Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.*/ FileUniqueId string `json:"file_unique_id"` /*File size in bytes*/ FileSize int `json:"file_size"` /*Unix time when the file was uploaded*/ FileDate int `json:"file_date"` }
This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
type PinChatMessageArgs ¶
type PinChatMessageArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageId int `json:"message_id"` DisableNotification bool `json:"disable_notification"` }
func (*PinChatMessageArgs) ToJson ¶
func (args *PinChatMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*PinChatMessageArgs) ToMultiPart ¶
func (args *PinChatMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Poll ¶
type Poll struct { Id string `json:"id"` Question string `json:"question"` Options []PollOption `json:"options"` TotalVoterCount int `json:"total_voter_count"` IsClosed bool `json:"is_closed"` IsAnonymous bool `json:"is_anonymous"` Type string `json:"type"` AllowsMultipleAnswers bool `json:"allows_multiple_answers"` CorrectOptionId int `json:"correct_option_id,omitempty"` Explanation string `json:"explanation,omitempty"` ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"` OpenPeriod int `json:"open_period,omitempty"` CloseDate int `json:"close_date,omitempty"` }
type PollAnswer ¶
type PollAnswer struct { //Unique poll identifier PollId string `json:"poll_id"` //Optional. The chat that changed the answer to the poll, if the voter is anonymous VoterChat *Chat `json:"voter_chat"` /*Optional. The user that changed the answer to the poll, if the voter isn't anonymous For backward compatibility, the field user in such objects will contain the user 136817688. */ User *User `json:"user"` //0-based identifiers of chosen answer options. May be empty if the vote was retracted. OptionIds []int `json:"option_ids"` }
type PollOption ¶
type PreCheckoutQuery ¶
type PreCheckoutQuery struct { /*Unique query identifier*/ Id string `json:"id"` /*User who sent the query*/ From *User `json:"from"` /*Three-letter ISO 4217 currency code*/ Currency string `json:"currency"` /*Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145.*/ TotalAmount int `json:"total_amount"` /*Bot specified invoice payload*/ InvoicePayload string `json:"invoice_payload"` /*Optional. Identifier of the shipping option chosen by the user*/ ShippingOptionId string `json:"shipping_option_id,omitempty"` /*Optional. Order info provided by the user*/ OrderInfo *OrderInfo `json:"order_info,omitempty"` }
This object contains information about an incoming pre-checkout query.
type PromoteChatMemberArgs ¶
type PromoteChatMemberArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` IsAnonymous bool `json:"is_anonymous"` CanManageChat bool `json:"can_manage_chat"` CanPostMessages bool `json:"can_post_messages"` CanEditMessages bool `json:"can_edit_messages"` CanDeleteMessages bool `json:"can_delete_messages"` CanPostStories bool `json:"can_post_stories"` CanEditStories bool `json:"can_edit_stories"` CanDeleteStories bool `json:"can_delete_stories"` CanManageVideoChats bool `json:"can_manage_video_chats"` CanRestrictMembers bool `json:"can_restrict_members"` CanPromoteMembers bool `json:"can_promote_members"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPinMessages bool `json:"can_pin_messages"` CanManageTopics bool `json:"can_manage_topics"` }
func (*PromoteChatMemberArgs) ToJson ¶
func (args *PromoteChatMemberArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*PromoteChatMemberArgs) ToMultiPart ¶
func (args *PromoteChatMemberArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type ProximityAlertTriggered ¶
type ReopenForumTopicArgs ¶
type ReopenForumTopicArgs struct {
*CloseForumTopicArgs
}
type ReopenGeneralForumTopic ¶
type ReopenGeneralForumTopic struct {
*CloseGeneralForumTopic
}
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct { /*Array of button rows, each represented by an Array of KeyboardButton objects*/ Keyboard [][]*KeyboardButton `json:"keyboard"` /*Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.*/ IsPersistent bool `json:"is_persistent"` /*Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.*/ ResizeKeyboard bool `json:"resize_keyboard"` /*Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false*/ OneTimeKeyboard bool `json:"one_tijme_keyboard"` /*Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters*/ InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` /*Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.*/ Selective bool `json:"selective"` }
This object represents a custom keyboard with reply options
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct { /*Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)*/ RemoveKeyboard bool `json:"remove_keyboard"` /*Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.*/ Selective bool `json:"selective"` }
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button
type ReplyMarkup ¶
type ReplyMarkup interface {
// contains filtered or unexported methods
}
type ResponseParameters ¶
type ResponseParameters struct { /*Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.*/ MigrateToChatId int `json:"migrate_to_chat_id"` /*ptional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated*/ RetryAfter int `json:"retry_after"` }
Contains information about why a request was unsuccessful.
type RestrictChatMemberArgs ¶
type RestrictChatMemberArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` Permission ChatPermissions `json:"permissions"` UseIndependentChatPermissions bool `json:"use_independent_chat_permissions"` UntilDate int `json:"until_date,omitempty"` }
func (*RestrictChatMemberArgs) ToJson ¶
func (args *RestrictChatMemberArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*RestrictChatMemberArgs) ToMultiPart ¶
func (args *RestrictChatMemberArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type RevokeChatInviteLinkArgs ¶
type RevokeChatInviteLinkArgs struct { ChatId json.RawMessage `json:"chat_id"` InviteLink string `json:"invite_link"` }
func (*RevokeChatInviteLinkArgs) ToJson ¶
func (args *RevokeChatInviteLinkArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*RevokeChatInviteLinkArgs) ToMultiPart ¶
func (args *RevokeChatInviteLinkArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendAnimationArgs ¶
type SendAnimationArgs struct { DefaultSendMethodsArguments Animation string `json:"animation"` /*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 string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` /*Duration of sent video in seconds.*/ Duration int `json:"duration,omitempty"` }
func (*SendAnimationArgs) ToJson ¶
func (args *SendAnimationArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendAnimationArgs) ToMultiPart ¶
func (args *SendAnimationArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendAudioArgs ¶
type SendAudioArgs struct { DefaultSendMethodsArguments /*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 string `json:"audio"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Duration of the audio in secconds*/ Duration int `json:"duration,omitempty"` Performer string `json:"performer,omitempty"` /*Track name*/ Title string `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 string `json:"thumbnail,omitempty"` }
func (*SendAudioArgs) ToJson ¶
func (args *SendAudioArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendAudioArgs) ToMultiPart ¶
func (args *SendAudioArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendChatActionArgs ¶
type SendChatActionArgs struct { ChatId json.RawMessage `json:"chat_id"` /*Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.*/ Action string `json:"action"` /*Unique identifier for the target message thread; supergroups only*/ MessageThreaddId int `json:"message_thread_id"` }
func (*SendChatActionArgs) ToJson ¶
func (args *SendChatActionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendChatActionArgs) ToMultiPart ¶
func (args *SendChatActionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendContactArgs ¶
type SendContactArgs struct { DefaultSendMethodsArguments PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName string `json:"last_name,omitempty"` Vcard string `json:"vcard,omitempty"` }
func (*SendContactArgs) ToJson ¶
func (args *SendContactArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendContactArgs) ToMultiPart ¶
func (args *SendContactArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendDiceArgs ¶
type SendDiceArgs struct { DefaultSendMethodsArguments /*Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”*/ Emoji string `json:"emoji,omitempty"` }
func (*SendDiceArgs) ToJson ¶
func (args *SendDiceArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendDiceArgs) ToMultiPart ¶
func (args *SendDiceArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendDocumentArgs ¶
type SendDocumentArgs struct { DefaultSendMethodsArguments Document string `json:"document"` /*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 string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Disables automatic server-side content type detection for files uploaded using multipart/form-data*/ DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"` }
func (*SendDocumentArgs) ToJson ¶
func (args *SendDocumentArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendDocumentArgs) ToMultiPart ¶
func (args *SendDocumentArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendGameArgs ¶
type SendGameArgs struct { DefaultSendMethodsArguments GameShortName string `json:"game_short_name"` }
func (*SendGameArgs) ToJson ¶
func (args *SendGameArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendGameArgs) ToMultiPart ¶
func (args *SendGameArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendInvoiceArgs ¶
type SendInvoiceArgs struct { DefaultSendMethodsArguments Title string `json:"title"` Description string `json:"description"` Payload string `json:"payload"` ProviderToken string `json:"provider_token"` Currency string `json:"currency"` Prices []LabeledPrice `json:"prices"` MaxTipAmount int `json:"max_tip_amount,omitempty"` SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"` StartParameter string `json:"start_parameter,omitempty"` ProviderData string `json:"provider_data,omitempty"` PhotoURL string `json:"photo_url,omitempty"` PhotoSize int `json:"photo_size,omitempty"` PhotoWidth int `json:"photo_width,omitempty"` PhotoHeight int `json:"photo_height,omitempty"` NeedName bool `json:"need_name"` NeedPhoneNumber bool `json:"need_phone_number"` NeedEmail bool `json:"need_email"` NeedShippingAddress bool `json:"need_shipping_address"` SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider"` SendEmailToProvider bool `json:"send_email_to_provider"` IsFlexible bool `json:"is_flexible"` }
func (*SendInvoiceArgs) ToJson ¶
func (args *SendInvoiceArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendInvoiceArgs) ToMultiPart ¶
func (args *SendInvoiceArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendLocationArgs ¶
type SendLocationArgs struct { DefaultSendMethodsArguments /*Latitude of the location*/ Latitude float32 `json:"latitude"` /*Longitude of the location*/ Longitude float32 `json:"longitude"` /*The radius of uncertainty for the location, measured in meters; 0-1500*/ HorizontalAccuracy float32 `json:"horizontal_accuracy,omitempty"` /*Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.*/ LivePeriod int `json:"live_period,omitempty"` /* For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.*/ Heading int `json:"heading,omitempty"` /*For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.*/ ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` }
func (*SendLocationArgs) ToJson ¶
func (args *SendLocationArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendLocationArgs) ToMultiPart ¶
func (args *SendLocationArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendMediaGroupArgs ¶
type SendMediaGroupArgs struct { DefaultSendMethodsArguments Media []InputMedia `json:"media"` }
func (*SendMediaGroupArgs) ToJson ¶
func (args *SendMediaGroupArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendMediaGroupArgs) ToMultiPart ¶
func (args *SendMediaGroupArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendMessageArgs ¶
type SendMessageArgs struct { DefaultSendMethodsArguments /*Text of the message to be sent, 1-4096 characters after entities parsing*/ Text string `json:"text"` /*Mode for parsing entities in the message text. */ ParseMode string `json:"parse_mode,omitempty"` /*A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode*/ Entities []MessageEntity `json:"entities,omitempty"` /*Disables link previews for links in this message*/ DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` }
func (*SendMessageArgs) ToJson ¶
func (args *SendMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendMessageArgs) ToMultiPart ¶
func (args *SendMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendPhotoArgs ¶
type SendPhotoArgs struct { DefaultSendMethodsArguments /*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. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.*/ Photo string `json:"photo"` /*Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing*/ Caption string `json:"caption,omitempty"` /*Mode for parsing entities in the photo caption. */ ParseMode string `json:"parse_mode,omitempty"` /*A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode*/ CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` }
func (*SendPhotoArgs) ToJson ¶
func (args *SendPhotoArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendPhotoArgs) ToMultiPart ¶
func (args *SendPhotoArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendPollArgs ¶
type SendPollArgs struct { DefaultSendMethodsArguments /*Poll question, 1-300 characters*/ Question string `json:"question"` /*A JSON-serialized list of answer options, 2-10 strings 1-100 characters each*/ Options []string `json:"options"` /*Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.*/ IsClosed bool `json:"is_closed,omitempty"` /*True, if the poll needs to be anonymous, defaults to True*/ IsAnonymous bool `json:"is_anonymous,omitempty"` /*Poll type, “quiz” or “regular”, defaults to “regular”*/ Type string `json:"type,omitempty"` /* True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False*/ AllowsMultipleAnswers bool `json:"allows_multiple_answers,omitempty"` /*0-based identifier of the correct answer option, required for polls in quiz mode*/ CorrectOptionId int `json:"correct_option_id"` /*Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing*/ Explanation string `json:"explanation,omitempty"` /*Mode for parsing entities in the explanation. See formatting options for more details.*/ ExplanationParseMode string `json:"explanation_parse_mode,omitempty"` /* A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode*/ ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"` /* Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.*/ OpenPeriod int `json:"open_period,omitempty"` /*the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.*/ CloseDate int `json:"close_date,omitempty"` }
func (*SendPollArgs) ToJson ¶
func (args *SendPollArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendPollArgs) ToMultiPart ¶
func (args *SendPollArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendStickerArgs ¶
type SendStickerArgs struct { DefaultSendMethodsArguments Sticker string `json:"sticker"` //Emoji associated with the sticker; only for just uploaded stickers Emoji string `json:"emoji"` }
func (*SendStickerArgs) ToJson ¶
func (args *SendStickerArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendStickerArgs) ToMultiPart ¶
func (args *SendStickerArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendVenueArgs ¶
type SendVenueArgs struct { DefaultSendMethodsArguments /*Latitude of the location*/ Latitude float32 `json:"latitude"` /*Longitude of the location*/ Longitude float32 `json:"longitude"` Title string `json:"title"` Address string `json:"address"` /*Foursquare identifier of the venue*/ FoursquareId string `json:"foursquare_id,omitempty"` /*Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)*/ FoursquareType string `json:"foursquare_type,omitempty"` GooglePlaceId string `json:"google_place_id,omitempty"` GooglePlaceType string `json:"google_place_type,omitempty"` }
func (*SendVenueArgs) ToJson ¶
func (args *SendVenueArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendVenueArgs) ToMultiPart ¶
func (args *SendVenueArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendVideoArgs ¶
type SendVideoArgs struct { DefaultSendMethodsArguments Video string `json:"video"` /*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 string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Pass True if the photo needs to be covered with a spoiler animation*/ HasSpoiler bool `json:"has_spoiler"` /*Duration of sent video in seconds.*/ Duration int `json:"duration,omitempty"` /*Pass True, if the uploaded video is suitable for streaming*/ SupportsStreaming bool `json:"supports_streaming,omitempty"` }
func (*SendVideoArgs) ToJson ¶
func (args *SendVideoArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendVideoArgs) ToMultiPart ¶
func (args *SendVideoArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendVideoNoteArgs ¶
type SendVideoNoteArgs struct { DefaultSendMethodsArguments VideoNote string `json:"video_note"` /*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 string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Length int `json:"length,omitempty"` /*Duration of sent video in seconds.*/ Duration int `json:"duration,omitempty"` }
func (*SendVideoNoteArgs) ToJson ¶
func (args *SendVideoNoteArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendVideoNoteArgs) ToMultiPart ¶
func (args *SendVideoNoteArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SendVoiceArgs ¶
type SendVoiceArgs struct { DefaultSendMethodsArguments Voice string `json:"voice"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` /*Duration of sent video in seconds.*/ Duration int `json:"duration,omitempty"` }
func (*SendVoiceArgs) ToJson ¶
func (args *SendVoiceArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SendVoiceArgs) ToMultiPart ¶
func (args *SendVoiceArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SentWebAppMessage ¶
type SentWebAppMessage struct {
InlineMessageId string `json:"inline_message_id"`
}
type SetChatAdministratorCustomTitleArgs ¶
type SetChatAdministratorCustomTitleArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` CustomTitle string `json:"custom_title"` }
func (*SetChatAdministratorCustomTitleArgs) ToJson ¶
func (args *SetChatAdministratorCustomTitleArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatAdministratorCustomTitleArgs) ToMultiPart ¶
func (args *SetChatAdministratorCustomTitleArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetChatDescriptionArgs ¶
type SetChatDescriptionArgs struct { ChatId json.RawMessage `json:"chat_id"` Description string `json:"description"` }
func (*SetChatDescriptionArgs) ToJson ¶
func (args *SetChatDescriptionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatDescriptionArgs) ToMultiPart ¶
func (args *SetChatDescriptionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetChatPermissionsArgs ¶
type SetChatPermissionsArgs struct { ChatId json.RawMessage `json:"chat_id"` Permissions ChatPermissions `json:"permissions"` UseIndependentChatPermissions bool `json:"use_independent_chat_permissions"` }
func (*SetChatPermissionsArgs) ToJson ¶
func (args *SetChatPermissionsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatPermissionsArgs) ToMultiPart ¶
func (args *SetChatPermissionsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetChatPhotoArgs ¶
type SetChatPhotoArgs struct { ChatId json.RawMessage `json:"chat_id"` Photo string `json:"photo"` }
func (*SetChatPhotoArgs) ToJson ¶
func (args *SetChatPhotoArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatPhotoArgs) ToMultiPart ¶
func (args *SetChatPhotoArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetChatStcikerSet ¶
type SetChatStcikerSet struct { ChatId json.RawMessage `json:"chat_id"` StickerSetName string `json:"sticker_set_name"` }
func (*SetChatStcikerSet) ToJson ¶
func (args *SetChatStcikerSet) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatStcikerSet) ToMultiPart ¶
func (args *SetChatStcikerSet) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetChatTitleArgs ¶
type SetChatTitleArgs struct { ChatId json.RawMessage `json:"chat_id"` Title string `json:"title"` }
func (*SetChatTitleArgs) ToJson ¶
func (args *SetChatTitleArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetChatTitleArgs) ToMultiPart ¶
func (args *SetChatTitleArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetGameScoreArgs ¶
type SetGameScoreArgs struct { UserId int `json:"user_id"` Score int `json:"score"` Force bool `json:"force"` DisableEditMessage bool `json:"disable_edit_message"` ChatId int `json:"chat_id,omitempty"` MessageId int `json:"message_id,omitempty"` InlineMessageId string `json:"inline_message_id,omitempty"` }
func (*SetGameScoreArgs) ToJson ¶
func (args *SetGameScoreArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetGameScoreArgs) ToMultiPart ¶
func (args *SetGameScoreArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetMyCommandsArgs ¶
type SetMyCommandsArgs struct { Commands []BotCommand `json:"commands"` MyCommandsDefault }
func (*SetMyCommandsArgs) ToJson ¶
func (args *SetMyCommandsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetMyCommandsArgs) ToMultiPart ¶
func (args *SetMyCommandsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetMyDescriptionArgs ¶
type SetMyDescriptionArgs struct { /*New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.*/ Description string `json:"description"` /*A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.*/ LanguageCode string `json:"language_code"` }
func (*SetMyDescriptionArgs) ToJson ¶
func (args *SetMyDescriptionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetMyDescriptionArgs) ToMultiPart ¶
func (args *SetMyDescriptionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetMyNameArgs ¶
func (*SetMyNameArgs) ToJson ¶
func (args *SetMyNameArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetMyNameArgs) ToMultiPart ¶
func (args *SetMyNameArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetMyShortDescriptionArgs ¶
type SetMyShortDescriptionArgs struct { /*New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.*/ ShortDescription string `json:"short_description"` /*A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.*/ LanguageCode string `json:"language_code"` }
func (*SetMyShortDescriptionArgs) ToJson ¶
func (args *SetMyShortDescriptionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetMyShortDescriptionArgs) ToMultiPart ¶
func (args *SetMyShortDescriptionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetPassportDataErrorsArgs ¶
type SetPassportDataErrorsArgs struct { UserId int `json:"user_id"` Errors []PassportElementError `json:"errors"` }
func (*SetPassportDataErrorsArgs) ToJson ¶
func (args *SetPassportDataErrorsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetPassportDataErrorsArgs) ToMultiPart ¶
func (args *SetPassportDataErrorsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerEmojiListArgs ¶
type SetStickerEmojiListArgs struct { Sticker string `json:"sticker"` EmojiList []string `json:"emoji_list"` }
func (*SetStickerEmojiListArgs) ToJson ¶
func (args *SetStickerEmojiListArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerEmojiListArgs) ToMultiPart ¶
func (args *SetStickerEmojiListArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerKeywordsArgs ¶
type SetStickerKeywordsArgs struct { Sticker string `json:"sticker"` Keywoards []string `json:"keywords"` }
func (*SetStickerKeywordsArgs) ToJson ¶
func (args *SetStickerKeywordsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerKeywordsArgs) ToMultiPart ¶
func (args *SetStickerKeywordsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerMaskPositionArgs ¶
type SetStickerMaskPositionArgs struct { Sticker string `json:"sticker"` MaskPosition *MaskPosition `json:"mask_position"` }
func (*SetStickerMaskPositionArgs) ToJson ¶
func (args *SetStickerMaskPositionArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerMaskPositionArgs) ToMultiPart ¶
func (args *SetStickerMaskPositionArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerPositionInSetArgs ¶
type SetStickerPositionInSetArgs struct { Sticker string `json:"sticker"` Position int `json:"position"` }
func (*SetStickerPositionInSetArgs) ToJson ¶
func (args *SetStickerPositionInSetArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerPositionInSetArgs) ToMultiPart ¶
func (args *SetStickerPositionInSetArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerSetThumbnailArgs ¶
type SetStickerSetThumbnailArgs struct { Name string `json:"name"` UserId int `json:"user_id"` Thumb string `json:"thumb"` }
func (*SetStickerSetThumbnailArgs) ToJson ¶
func (args *SetStickerSetThumbnailArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerSetThumbnailArgs) ToMultiPart ¶
func (args *SetStickerSetThumbnailArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetStickerSetTitleArgs ¶
func (*SetStickerSetTitleArgs) ToJson ¶
func (args *SetStickerSetTitleArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetStickerSetTitleArgs) ToMultiPart ¶
func (args *SetStickerSetTitleArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type SetWebhookArgs ¶
type SetWebhookArgs struct { /*HTTPS url to send updates to. Use an empty string to remove webhook integration*/ URL string /*public key certificate */ Certificate string /*The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS*/ IPAddress string /*Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.*/ MaxConnections int /*A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.*/ AllowedUpdates []string /*Pass True to drop all pending updates*/ DropPendingUpdates bool /*A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.*/ SecretToken string `json:"secret_token,omitempty"` }
func (*SetWebhookArgs) ToJson ¶
func (args *SetWebhookArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*SetWebhookArgs) ToMultiPart ¶
func (args *SetWebhookArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type ShippingAddress ¶
type ShippingAddress struct { /*ISO 3166-1 alpha-2 country code*/ CountryCode string `json:"country_code"` /*State, if applicable*/ State string `json:"state"` /*City*/ City string `json:"city"` /*First line for the address*/ StreetLine1 string `json:"street_line1"` /*Second line for the address*/ StreetLine2 string `json:"street_line2"` /*Address post code*/ PostCode string `json:"post_code"` }
This object represents a shipping address.
type ShippingOption ¶
type ShippingOption struct { /*Shipping option identifier*/ Id string `json:"id"` /*Option title*/ Title string `json:"title"` /*List of price portions*/ Prices []LabeledPrice `json:"prices"` }
This object represents one shipping option.
type ShippingQuery ¶
type ShippingQuery struct { /*Unique query identifier*/ Id string `json:"id"` /*User who sent the query*/ From *User `json:"from"` /*Bot specified invoice payload*/ InvoicePayload string `json:"invoice_payload"` /*User specified shipping address*/ ShippingAddress *ShippingAddress `json:"shipping_address"` }
This object contains information about an incoming shipping query.
type Sticker ¶
type Sticker struct { /*Identifier for this file, which can be used to download or reuse the file*/ FileId string `json:"file_id"` /*Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.*/ FileUniqueId string `json:"file_unique_id"` /*Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.*/ Type string `json:"type"` /*Sticker width*/ Width int `json:"width"` /*Sticker height*/ Height int `json:"height"` /*True, if the sticker is animated*/ IsAnimated bool `json:"is_animated"` /*True, if the sticker is a video sticker*/ IsVideo bool `json:"is_video"` /*Optional. Sticker thumbnail in the .WEBP or .JPG format*/ Thumb *PhotoSize `json:"thumbnail,omitempty"` /*Optional. Emoji associated with the sticker*/ Emoji string `json:"emoji,omitempty"` /*Optional. Name of the sticker set to which the sticker belongs*/ SetName string `json:"set_name,omitempty"` /*Optional. Premium animation for the sticker, if the sticker is premium*/ PremiumAnimation *File `json:"premium_animation,omitempty"` /*Optional. For mask stickers, the position where the mask should be placed*/ MaskPosition *MaskPosition `json:"mask_position,omitempty"` /*Optional. For custom emoji stickers, unique identifier of the custom emoji*/ CustomEmojiId string `json:"custom_emoji_id"` /*Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places*/ NeedsRepainting bool `json:"needs_repainting"` /*Optional. File size in bytes*/ FileSize int `json:"file_size,omitempty"` }
Sticker represents a sticker.
type StickerSet ¶
type StickerSet struct { /*Sticker set name*/ Name string `json:"name"` /*Sticker set title*/ Title string `json:"title"` /*Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”*/ StickerType string `json:"sticker_type"` /*True, if the sticker set contains animated stickers*/ IsAnimated bool `json:"is_animated"` /*True, if the sticker set contains video stickers*/ IsVideo bool `json:"is_video"` /*True, if the sticker set contains masks Caution : The field contains_masks has been removed from the documentation of the class StickerSet. The field is still returned in the object for backward compatibility, but new bots should use the field sticker_type instead. */ ContainsMask bool `json:"contains_mask"` /*List of all set stickers*/ Stickers []Sticker `json:"stickers"` /*Optional. Sticker set thumbnail in the .WEBP or .TGS format*/ Thumb *PhotoSize `json:"thumbnail,omitempty"` }
StickerSet represents a sticker set.
type StopMessageLiveLocationArgs ¶
type StopMessageLiveLocationArgs struct { /*Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)*/ ChatId json.RawMessage `json:"chat_id,omitempty"` /*Required if inline_message_id is not specified. Identifier of the message to edit*/ MessageId int `json:"message_id,omitempty"` /*Required if chat_id and message_id are not specified. Identifier of the inline message*/ InlineMessageId string `json:"inline_message_id,omitempty"` /*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.*/ ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
func (*StopMessageLiveLocationArgs) ToJson ¶
func (args *StopMessageLiveLocationArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*StopMessageLiveLocationArgs) ToMultiPart ¶
func (args *StopMessageLiveLocationArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type StopPollArgs ¶
type StopPollArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageId int `json:"message_id"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
func (*StopPollArgs) ToJson ¶
func (args *StopPollArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*StopPollArgs) ToMultiPart ¶
func (args *StopPollArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Story ¶
type Story struct{}
This object represents a message about a forwarded story in the chat. Currently holds no information.
type SuccessfulPayment ¶
type SuccessfulPayment struct { /*Three-letter ISO 4217 currency code*/ Currency string `json:"currency"` /*Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. */ TotalAmount int `json:"total_amount"` /*Bot specified invoice payload*/ InvoicePayload string `json:"invoice_payload"` /*Optional. Identifier of the shipping option chosen by the user*/ ShippingOptionId string `json:"shipping_option_id,omitempty"` /*Optional. Order info provided by the user*/ OrderInfo *OrderInfo `json:"order_info,omitempty"` /*Telegram payment identifier*/ TelegramPaymentChargeId string `json:"telegram_payment_charge_id"` /*Provider payment identifier*/ ProviderPaymentChargeId string `json:"provider_payment_charge_id"` }
This object contains basic information about a successful payment.
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct { //Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted Query string `json:"query,omitempty"` //Optional. True, if private chats with users can be chosen AllowUserChats bool `json:"allow_user_chats"` //Optional. True, if private chats with bots can be chosen AllowBotChats bool `json:"allow_bot_chats"` //Optional. True, if group and supergroup chats can be chosen AllowGroupChats bool `json:"allow_group_chats"` //Optional. True, if channel chats can be chosen AllowChannelChats bool `json:"allow_channel_chats"` }
This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
type UnbanChatMemberArgsArgs ¶
type UnbanChatMemberArgsArgs struct { ChatId json.RawMessage `json:"chat_id"` UserId int `json:"user_id"` /*Do nothing if the user is not banned*/ OnlyIfBanned bool `json:"only_if_banned,omitempty"` }
func (*UnbanChatMemberArgsArgs) ToJson ¶
func (args *UnbanChatMemberArgsArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*UnbanChatMemberArgsArgs) ToMultiPart ¶
func (args *UnbanChatMemberArgsArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type UnbanChatSenderChatArgs ¶
type UnbanChatSenderChatArgs struct { ChatId json.RawMessage `json:"chat_id"` SenderChatId int `json:"sender_chat_id"` }
func (*UnbanChatSenderChatArgs) ToJson ¶
func (args *UnbanChatSenderChatArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*UnbanChatSenderChatArgs) ToMultiPart ¶
func (args *UnbanChatSenderChatArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type UnhideGeneralForumTopic ¶
type UnhideGeneralForumTopic struct {
*CloseGeneralForumTopic
}
type UnpinAllForumTopicMessages ¶
type UnpinAllForumTopicMessages struct {
*CloseForumTopicArgs
}
type UnpinAllGeneralForumTopicMessages ¶
type UnpinAllGeneralForumTopicMessages struct {
*CloseGeneralForumTopic
}
type UnpinChatMessageArgs ¶
type UnpinChatMessageArgs struct { ChatId json.RawMessage `json:"chat_id"` MessageId int `json:"message_id"` }
func (*UnpinChatMessageArgs) ToJson ¶
func (args *UnpinChatMessageArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*UnpinChatMessageArgs) ToMultiPart ¶
func (args *UnpinChatMessageArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type Update ¶
type Update struct { /*The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.*/ Update_id int `json:"update_id"` /*Optional. New incoming message of any kind — text, photo, sticker, etc.*/ Message *Message `json:"message,omitempty"` /*Optional. New version of a message that is known to the bot and was edited*/ EditedMessage *Message `json:"edited_message,omitempty"` /*Optional. New incoming channel post of any kind — text, photo, sticker, etc.*/ ChannelPost *Message `json:"channel_post,omitempty"` /*Optional. New version of a channel post that is known to the bot and was edited*/ EditedChannelPost *Message `json:"edited_channel_post,omitempty"` /*Optional. New incoming inline query*/ InlineQuery *InlineQuery `json:"inline_query,omitempty"` /*Optional. The result of an inline query that was chosen by a user and sent to their chat partner. */ ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"` /*Optional. New incoming callback query*/ CallbackQuery *CallbackQuery `json:"callback_query,omitempty"` /*Optional. New incoming shipping query. Only for invoices with flexible price*/ ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"` /*Optional. New incoming pre-checkout query. Contains full information about checkout*/ PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"` /*Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot*/ Poll *Poll `json:"poll,omitempty"` /*Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.*/ PollAnswer *PollAnswer `json:"poll_answer,omitempty"` /*Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.*/ MyChatMember *ChatMemberUpdated `json:"my_chat_member,omitempty"` /*Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.*/ ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"` /*Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.*/ ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"` }
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
type UploadStickerFileArgs ¶
type UploadStickerFileArgs struct { UserId int `json:"user_id"` Sticker *InputSticker `json:"sticker"` StickerFormat string `json:"sticker_format"` }
func (*UploadStickerFileArgs) ToJson ¶
func (args *UploadStickerFileArgs) ToJson() []byte
ToJson converts this strcut into json to be sent to the API server.
func (*UploadStickerFileArgs) ToMultiPart ¶
func (args *UploadStickerFileArgs) ToMultiPart(wr *mp.Writer)
ToMultiPart converts this strcut into HTTP multipart form to be sent to the API server.
type User ¶
type User struct { /*Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.*/ Id int `json:"id"` /*True, if this user is a bot*/ IsBot bool `json:"is_bot"` /*User's or bot's first name*/ FirstName string `json:"first_name"` /*Optional. User's or bot's last name*/ Lastname string `json:"last_name,omitempty"` /*Optional. User's or bot's username*/ Username string `json:"username,omitempty"` /*Optional. IETF language tag of the user's language*/ LanguageCode string `json:"language_code,omitempty"` /*Optional. True, if this user is a Telegram Premium user*/ IsPremium bool `json:"is_premium,omitempty"` /*Optional. True, if this user added the bot to the attachment menu*/ AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"` /*Optional. True, if the bot can be invited to groups.*/ CanJoinGroups bool `json:"can_join_groups,omitempty"` /*Optional. True, if privacy mode is disabled for the bot.*/ CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"` /*Optional. True, if the bot supports inline queries.*/ SuportsInlineQueries bool `json:"supports_inline_queries,omitempty"` }
type UserProfilePhotos ¶
type UserShared ¶
type Venue ¶
type Venue struct { Location *Location `json:"location"` Title string `json:"title"` Address string `json:"address"` FoursquareId string `json:"foursquare_id,omitempty"` FoursquareType string `json:"foursquare_type,omitempty"` GooglePlaceId string `json:"google_place_id,omitempty"` GooglePlaceType string `json:"google_place_type,omitempty"` }
type Video ¶
type Video struct { FileId string `json:"file_id"` FileUniqueId string `json:"file_unique_id"` Width int `json:"width"` Height int `json:"height"` Duration int `json:"duration"` Thumb *PhotoSize `json:"thumbnail,omitempty"` FileName string `json:"file_name,omitempty"` MIMEType string `json:"mime_type,omitempty"` FileSize int64 `json:"file_size,omitempty"` }
type VideoChatEnded ¶
type VideoChatEnded struct {
Duration int `json:"duration"`
}
type VideoChatParticipantsInvited ¶
type VideoChatParticipantsInvited struct {
Users []User `json:"users"`
}
type VideoChatScheduled ¶
type VideoChatScheduled struct {
StartDate int `json:"start_date"`
}
type VideoChatStarted ¶
type VideoChatStarted struct{}
type WebAppData ¶
type WebAppData struct { /*The data. Be aware that a bad client can send arbitrary data in this field.*/ Data string `json:"data"` /*Text of the web_app keyboard bu tton from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.*/ ButtonText string `json:"button_text"` }
type WebAppInfo ¶
type WebAppInfo struct {
URL string `json:"url"`
}
type WebhookInfo ¶
type WebhookInfo struct { /*Webhook URL, may be empty if webhook is not set up*/ URL string `json:"url"` /*True, if a custom certificate was provided for webhook certificate checks*/ HasCustomCertificate bool `json:"has_custom_certificate"` /*Number of updates awaiting delivery*/ PendingUpdateCount int `json:"pending_update_count"` /*Optional. Currently used webhook IP address*/ IPAddress string `json:"ip_address,omitempty"` /*Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook*/ LastErrorDate int `json:"last_error_date,omitempty"` /*Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook*/ LastErrorMessage string `json:"last_error_message,omitempty"` /*Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters*/ LastSynchronizationErrorDate int64 `json:"last_synchronization_error_date,omitempty"` /*Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery*/ MaxConnection int `json:"max_connections,omitempty"` /*Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member*/ AllowedUpdates []string `json:"allowed_updates,omitempty"` }
Contains information about the current status of a webhook.
type WriteAccessAllowed ¶
type WriteAccessAllowed struct { /*Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess*/ FromRequest bool `json:"from_request"` /*Optional. Name of the Web App which was launched from a link*/ WebAppName string `json:"web_app_name"` /*Optional. True, if the access was granted when the bot was added to the attachment or side menu*/ FromAttachmentMenu bool `json:"from_attachment_menu"` }
This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.
Source Files ¶
- botCommandScopeObjects.go
- chatMemberObjects.go
- chatObjects.go
- forumObjects.go
- gameObjects.go
- inlineQueryResultObjects.go
- inputMediaObjects.go
- inputMessageContentObjects.go
- keyboardObjects.go
- mainObjects.go
- mediaObjects.go
- methodsArgumentsObjects.go
- methodsResults.go
- miscObjects.go
- paymentObjects.go
- stickerObjects.go
- telegramPassportObjects.go
- webAppObject.go