Documentation
¶
Index ¶
- Constants
- Variables
- func AskUser(user *User) string
- type API
- func (api *API) AddStickerToSet(ctx context.Context, args *AddStickerToSetConfig) (*bool, error)
- func (api *API) AnswerCallbackQuery(ctx context.Context, args *AnswerCallbackQueryConfig) (*bool, error)
- func (api *API) AnswerInlineQuery(ctx context.Context, args *AnswerInlineQueryConfig) (*bool, error)
- func (api *API) AnswerPreCheckoutQuery(ctx context.Context, args *AnswerPreCheckoutQueryConfig) (*bool, error)
- func (api *API) AnswerShippingQuery(ctx context.Context, args *AnswerShippingQueryConfig) (*bool, error)
- func (api *API) AnswerWebAppQuery(ctx context.Context, result InlineQueryResult, webAppQueryID string) (*SentWebAppMessage, error)
- func (api *API) ApproveChatJoinRequest(ctx context.Context, chatID IntStr, userID int64) (*bool, error)
- func (api *API) BanChatMember(ctx context.Context, args *BanChatMemberConfig) (*bool, error)
- func (api *API) BanChatSenderChat(ctx context.Context, chatID IntStr, senderChatID int64) (*bool, error)
- func (api *API) Close(ctx context.Context) (*bool, error)
- func (api *API) CloseForumTopic(ctx context.Context, chatID IntStr, messageThreadID int64) (*bool, error)
- func (api *API) CloseGeneralForumTopic(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) CopyMessage(ctx context.Context, args *CopyMessageConfig) (*MessageID, error)
- func (api *API) CreateChatInviteLink(ctx context.Context, args *CreateChatInviteLinkConfig) (*ChatInviteLink, error)
- func (api *API) CreateForumTopic(ctx context.Context, args *CreateForumTopicConfig) (*ForumTopic, error)
- func (api *API) CreateInvoiceLink(ctx context.Context, args *CreateInvoiceLinkConfig) (string, error)
- func (api *API) CreateNewStickerSet(ctx context.Context, args *CreateNewStickerSetConfig) (*bool, error)
- func (api *API) DeclineChatJoinRequest(ctx context.Context, chatID IntStr, userID int64) (*bool, error)
- func (api *API) DeleteChatPhoto(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) DeleteChatStickerSet(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) DeleteForumTopic(ctx context.Context, chatID IntStr, messageThreadID int64) (*bool, error)
- func (api *API) DeleteMessage(ctx context.Context, chatID IntStr, messageID int64) (*bool, error)
- func (api *API) DeleteMyCommands(ctx context.Context, languageCode *string, scope *BotCommandScope) (*bool, error)
- func (api *API) DeleteStickerFromSet(ctx context.Context, sticker string) (*bool, error)
- func (api *API) DeleteStickerSet(ctx context.Context, name string) (*bool, error)
- func (api *API) DeleteWebhook(ctx context.Context, dropPendingUpdates *bool) (*bool, error)
- func (api *API) EditChatInviteLink(ctx context.Context, args *EditChatInviteLinkConfig) (*ChatInviteLink, error)
- func (api *API) EditForumTopic(ctx context.Context, args *EditForumTopicConfig) (*bool, error)
- func (api *API) EditGeneralForumTopic(ctx context.Context, chatID IntStr, name string) (*bool, error)
- func (api *API) EditMessageCaption(ctx context.Context, args *EditMessageCaptionConfig) (*Message, error)
- func (api *API) EditMessageLiveLocation(ctx context.Context, args *EditMessageLiveLocationConfig) (*Message, error)
- func (api *API) EditMessageMedia(ctx context.Context, args *EditMessageMediaConfig) (*Message, error)
- func (api *API) EditMessageReplyMarkup(ctx context.Context, args *EditMessageReplyMarkupConfig) (*Message, error)
- func (api *API) EditMessageText(ctx context.Context, args *EditMessageTextConfig) (*Message, error)
- func (api *API) ExportChatInviteLink(ctx context.Context, chatID IntStr) (string, error)
- func (api *API) ForwardMessage(ctx context.Context, args *ForwardMessageConfig) (*Message, error)
- func (api *API) GetChat(ctx context.Context, chatID IntStr) (*Chat, error)
- func (api *API) GetChatAdministrators(ctx context.Context, chatID IntStr) ([]ChatMember, error)
- func (api *API) GetChatMember(ctx context.Context, chatID IntStr, userID int64) (*ChatMember, error)
- func (api *API) GetChatMemberCount(ctx context.Context, chatID IntStr) (int64, error)
- func (api *API) GetChatMenuButton(ctx context.Context, chatID *int64) (*MenuButton, error)
- func (api *API) GetCustomEmojiStickers(ctx context.Context, customEmojiIDs []string) ([]Sticker, error)
- func (api *API) GetFile(ctx context.Context, fileID string) (*File, error)
- func (api *API) GetFileDirectly(ctx context.Context, fileID string) (io.ReadCloser, error)
- func (api *API) GetFileDirectlyConfig(ctx context.Context, fileConfig *File) (io.ReadCloser, error)
- func (api *API) GetForumTopicIconStickers(ctx context.Context) ([]Sticker, error)
- func (api *API) GetGameHighScores(ctx context.Context, args *GetGameHighScoresConfig) ([]GameHighScore, error)
- func (api *API) GetMe(ctx context.Context) (*User, error)
- func (api *API) GetMyCommands(ctx context.Context) ([]BotCommand, error)
- func (api *API) GetMyDefaultAdministratorRights(ctx context.Context, forChannels *bool) (*ChatAdministratorRights, error)
- func (api *API) GetMyDescription(ctx context.Context, languageCode *string) (*BotDescription, error)
- func (api *API) GetMyName(ctx context.Context, languageCode *string) (*BotName, error)
- func (api *API) GetMyShortDescription(ctx context.Context, languageCode *string) (*BotShortDescription, error)
- func (api *API) GetStickerSet(ctx context.Context, name string) (*StickerSet, error)
- func (api *API) GetUpdates(ctx context.Context, args *GetUpdatesConfig) ([]Update, error)
- func (api *API) GetUserProfilePhotos(ctx context.Context, args *GetUserProfilePhotosConfig) (*UserProfilePhotos, error)
- func (api *API) GetWebhookInfo(ctx context.Context) (*WebhookInfo, error)
- func (api *API) HideGeneralForumTopic(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) LeaveChat(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) LogOut(ctx context.Context) (*bool, error)
- func (api *API) MakeRequest(ctx context.Context, method string, data interface{}) (*Response, error)
- func (api *API) PinChatMessage(ctx context.Context, args *PinChatMessageConfig) (*bool, error)
- func (api *API) PromoteChatMember(ctx context.Context, args *PromoteChatMemberConfig) (*bool, error)
- func (api *API) ReopenForumTopic(ctx context.Context, chatID IntStr, messageThreadID int64) (*bool, error)
- func (api *API) ReopenGeneralForumTopic(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) RestrictChatMember(ctx context.Context, args *RestrictChatMemberConfig) (*bool, error)
- func (api *API) RevokeChatInviteLink(ctx context.Context, chatID IntStr, inviteLink string) (*ChatInviteLink, error)
- func (api *API) SendAnimation(ctx context.Context, args *SendAnimationConfig) (*Message, error)
- func (api *API) SendAudio(ctx context.Context, args *SendAudioConfig) (*Message, error)
- func (api *API) SendChatAction(ctx context.Context, args *SendChatActionConfig) (*bool, error)
- func (api *API) SendContact(ctx context.Context, args *SendContactConfig) (*Message, error)
- func (api *API) SendDice(ctx context.Context, args *SendDiceConfig) (*Message, error)
- func (api *API) SendDocument(ctx context.Context, args *SendDocumentConfig) (*Message, error)
- func (api *API) SendGame(ctx context.Context, args *SendGameConfig) (*Message, error)
- func (api *API) SendInvoice(ctx context.Context, args *SendInvoiceConfig) (*Message, error)
- func (api *API) SendLocation(ctx context.Context, args *SendLocationConfig) (*Message, error)
- func (api *API) SendMediaGroup(ctx context.Context, args *SendMediaGroupConfig) ([]Message, error)
- func (api *API) SendMessage(ctx context.Context, args *SendMessageConfig) (*Message, error)
- func (api *API) SendPhoto(ctx context.Context, args *SendPhotoConfig) (*Message, error)
- func (api *API) SendPoll(ctx context.Context, args *SendPollConfig) (*Message, error)
- func (api *API) SendSticker(ctx context.Context, args *SendStickerConfig) (*Message, error)
- func (api *API) SendVenue(ctx context.Context, args *SendVenueConfig) (*Message, error)
- func (api *API) SendVideo(ctx context.Context, args *SendVideoConfig) (*Message, error)
- func (api *API) SendVideoNote(ctx context.Context, args *SendVideoNoteConfig) (*Message, error)
- func (api *API) SendVoice(ctx context.Context, args *SendVoiceConfig) (*Message, error)
- func (api *API) SetChatAdministratorCustomTitle(ctx context.Context, args *SetChatAdministratorCustomTitleConfig) (*bool, error)
- func (api *API) SetChatDescription(ctx context.Context, chatID IntStr, description *string) (*bool, error)
- func (api *API) SetChatMenuButton(ctx context.Context, chatID *int64, menuButton *MenuButton) (*bool, error)
- func (api *API) SetChatPermissions(ctx context.Context, args *SetChatPermissionsConfig) (*bool, error)
- func (api *API) SetChatPhoto(ctx context.Context, chatID IntStr, photo InputFile) (*bool, error)
- func (api *API) SetChatStickerSet(ctx context.Context, chatID IntStr, stickerSetName string) (*bool, error)
- func (api *API) SetChatTitle(ctx context.Context, chatID IntStr, title string) (*bool, error)
- func (api *API) SetCustomEmojiStickerSetThumbnail(ctx context.Context, customEmojiID *string, name string) (*bool, error)
- func (api *API) SetGameScore(ctx context.Context, args *SetGameScoreConfig) (*Message, error)
- func (api *API) SetMyCommands(ctx context.Context, args *SetMyCommandsConfig) (*bool, error)
- func (api *API) SetMyDefaultAdministratorRights(ctx context.Context, forChannels *bool, rights *ChatAdministratorRights) (*bool, error)
- func (api *API) SetMyDescription(ctx context.Context, description *string, languageCode *string) (*bool, error)
- func (api *API) SetMyName(ctx context.Context, languageCode *string, name *string) (*bool, error)
- func (api *API) SetMyShortDescription(ctx context.Context, languageCode *string, shortDescription *string) (*bool, error)
- func (api *API) SetPassportDataErrors(ctx context.Context, errors []PassportElementError, userID int64) (*bool, error)
- func (api *API) SetStickerEmojiList(ctx context.Context, emojiList []string, sticker string) (*bool, error)
- func (api *API) SetStickerKeywords(ctx context.Context, keywords []string, sticker string) (*bool, error)
- func (api *API) SetStickerMaskPosition(ctx context.Context, maskPosition *MaskPosition, sticker string) (*bool, error)
- func (api *API) SetStickerPositionInSet(ctx context.Context, position int64, sticker string) (*bool, error)
- func (api *API) SetStickerSetThumbnail(ctx context.Context, args *SetStickerSetThumbnailConfig) (*bool, error)
- func (api *API) SetStickerSetTitle(ctx context.Context, name string, title string) (*bool, error)
- func (api *API) SetWebhook(ctx context.Context, args *SetWebhookConfig) (*bool, error)
- func (api *API) StopMessageLiveLocation(ctx context.Context, args *StopMessageLiveLocationConfig) (*Message, error)
- func (api *API) StopPoll(ctx context.Context, args *StopPollConfig) (*Poll, error)
- func (api *API) UnbanChatMember(ctx context.Context, args *UnbanChatMemberConfig) (*bool, error)
- func (api *API) UnbanChatSenderChat(ctx context.Context, chatID IntStr, senderChatID int64) (*bool, error)
- func (api *API) UnhideGeneralForumTopic(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) UnpinAllChatMessages(ctx context.Context, chatID IntStr) (*bool, error)
- func (api *API) UnpinAllForumTopicMessages(ctx context.Context, chatID IntStr, messageThreadID int64) (*bool, error)
- func (api *API) UnpinChatMessage(ctx context.Context, chatID IntStr, messageID *int64) (*bool, error)
- func (api *API) UploadFile(ctx context.Context, values url.Values, method string, filetype string, ...) (*Response, error)
- type AcceptFunc
- type AddStickerToSetConfig
- type Animation
- func (t *Animation) GetDuration() int64
- func (t *Animation) GetFileID() string
- func (t *Animation) GetFileName() string
- func (t *Animation) GetFileSize() int64
- func (t *Animation) GetFileUniqueID() string
- func (t *Animation) GetHeight() int64
- func (t *Animation) GetMimeType() string
- func (t *Animation) GetThumbnail() *PhotoSize
- func (t *Animation) GetWidth() int64
- type AnswerCallbackQueryConfig
- type AnswerInlineQueryConfig
- type AnswerPreCheckoutQueryConfig
- type AnswerShippingQueryConfig
- type Audio
- func (t *Audio) GetDuration() int64
- func (t *Audio) GetFileID() string
- func (t *Audio) GetFileName() string
- func (t *Audio) GetFileSize() int64
- func (t *Audio) GetFileUniqueID() string
- func (t *Audio) GetMimeType() string
- func (t *Audio) GetPerformer() string
- func (t *Audio) GetThumbnail() *PhotoSize
- func (t *Audio) GetTitle() string
- type BanChatMemberConfig
- 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 BotType
- type CallTree
- type CallbackGame
- func (t *CallbackGame) GetChatID() int64
- func (t *CallbackGame) GetDisableEditMessage() bool
- func (t *CallbackGame) GetForce() bool
- func (t *CallbackGame) GetInlineMessageID() string
- func (t *CallbackGame) GetMessageID() int64
- func (t *CallbackGame) GetScore() int64
- func (t *CallbackGame) GetUserID() int64
- type CallbackQuery
- func (t *CallbackQuery) GetChatInstance() string
- func (t *CallbackQuery) GetData() string
- func (t *CallbackQuery) GetFrom() *User
- func (t *CallbackQuery) GetGameShortName() string
- func (t *CallbackQuery) GetID() string
- func (t *CallbackQuery) GetInlineMessageID() string
- func (t *CallbackQuery) GetMessage() *Message
- type Chat
- func (t *Chat) GetBio() string
- func (t *Chat) GetCanSetStickerSet() *bool
- func (t *Chat) GetDescription() string
- func (t *Chat) GetEmojiStatusCustomEmojiID() string
- func (t *Chat) GetFirstName() string
- func (t *Chat) GetHasAggressiveAntiSpamEnabled() *bool
- func (t *Chat) GetHasHiddenMembers() *bool
- func (t *Chat) GetHasPrivateForwards() *bool
- func (t *Chat) GetHasProtectedContent() *bool
- func (t *Chat) GetHasRestrictedVoiceAndVideoMessages() *bool
- func (t *Chat) GetID() int64
- func (t *Chat) GetInviteLink() string
- func (t *Chat) GetIsForum() *bool
- func (t *Chat) GetJoinByRequest() *bool
- func (t *Chat) GetJoinToSendMessages() *bool
- func (t *Chat) GetLastName() string
- func (t *Chat) GetLinkedChatID() int64
- func (t *Chat) GetLocation() *ChatLocation
- func (t *Chat) GetMessageAutoDeleteTime() int64
- func (t *Chat) GetPermissions() *ChatPermissions
- func (t *Chat) GetPhoto() *ChatPhoto
- func (t *Chat) GetPinnedMessage() *Message
- func (t *Chat) GetSlowModeDelay() int64
- func (t *Chat) GetStickerSetName() string
- func (t *Chat) GetTitle() string
- func (t *Chat) GetType() *ChatType
- func (t *Chat) GetUsername() string
- type ChatAdministratorRights
- func (t *ChatAdministratorRights) GetCanChangeInfo() bool
- func (t *ChatAdministratorRights) GetCanDeleteMessages() bool
- func (t *ChatAdministratorRights) GetCanEditMessages() bool
- func (t *ChatAdministratorRights) GetCanInviteUsers() bool
- func (t *ChatAdministratorRights) GetCanManageChat() bool
- func (t *ChatAdministratorRights) GetCanManageTopics() bool
- func (t *ChatAdministratorRights) GetCanManageVideoChats() bool
- func (t *ChatAdministratorRights) GetCanPinMessages() bool
- func (t *ChatAdministratorRights) GetCanPostMessages() bool
- func (t *ChatAdministratorRights) GetCanPromoteMembers() bool
- func (t *ChatAdministratorRights) GetCanRestrictMembers() bool
- func (t *ChatAdministratorRights) GetIsAnonymous() bool
- type ChatInviteLink
- func (t *ChatInviteLink) GetCreatesJoinRequest() bool
- func (t *ChatInviteLink) GetCreator() *User
- func (t *ChatInviteLink) GetExpireDate() int64
- func (t *ChatInviteLink) GetInviteLink() string
- func (t *ChatInviteLink) GetIsPrimary() bool
- func (t *ChatInviteLink) GetIsRevoked() bool
- func (t *ChatInviteLink) GetMemberLimit() int64
- func (t *ChatInviteLink) GetName() string
- func (t *ChatInviteLink) GetPendingJoinRequestCount() int64
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- func (t *ChatMemberAdministrator) GetCanBeEdited() bool
- func (t *ChatMemberAdministrator) GetCanChangeInfo() bool
- func (t *ChatMemberAdministrator) GetCanDeleteMessages() bool
- func (t *ChatMemberAdministrator) GetCanEditMessages() bool
- func (t *ChatMemberAdministrator) GetCanInviteUsers() bool
- func (t *ChatMemberAdministrator) GetCanManageChat() bool
- func (t *ChatMemberAdministrator) GetCanManageTopics() bool
- func (t *ChatMemberAdministrator) GetCanManageVideoChats() bool
- func (t *ChatMemberAdministrator) GetCanPinMessages() bool
- func (t *ChatMemberAdministrator) GetCanPostMessages() bool
- func (t *ChatMemberAdministrator) GetCanPromoteMembers() bool
- func (t *ChatMemberAdministrator) GetCanRestrictMembers() bool
- func (t *ChatMemberAdministrator) GetCustomTitle() string
- func (t *ChatMemberAdministrator) GetIsAnonymous() bool
- func (t *ChatMemberAdministrator) GetStatus() string
- func (t *ChatMemberAdministrator) GetUser() *User
- type ChatMemberBanned
- type ChatMemberLeft
- type ChatMemberMember
- type ChatMemberOwner
- type ChatMemberRestricted
- func (t *ChatMemberRestricted) GetCanAddWebPagePreviews() bool
- func (t *ChatMemberRestricted) GetCanChangeInfo() bool
- func (t *ChatMemberRestricted) GetCanInviteUsers() bool
- func (t *ChatMemberRestricted) GetCanManageTopics() bool
- func (t *ChatMemberRestricted) GetCanPinMessages() bool
- func (t *ChatMemberRestricted) GetCanSendAudios() bool
- func (t *ChatMemberRestricted) GetCanSendDocuments() bool
- func (t *ChatMemberRestricted) GetCanSendMessages() bool
- func (t *ChatMemberRestricted) GetCanSendOtherMessages() bool
- func (t *ChatMemberRestricted) GetCanSendPhotos() bool
- func (t *ChatMemberRestricted) GetCanSendPolls() bool
- func (t *ChatMemberRestricted) GetCanSendVideoNotes() bool
- func (t *ChatMemberRestricted) GetCanSendVideos() bool
- func (t *ChatMemberRestricted) GetCanSendVoiceNotes() bool
- func (t *ChatMemberRestricted) GetIsMember() bool
- func (t *ChatMemberRestricted) GetStatus() string
- func (t *ChatMemberRestricted) GetUntilDate() int64
- func (t *ChatMemberRestricted) GetUser() *User
- type ChatMemberUpdated
- func (t *ChatMemberUpdated) GetChat() *Chat
- func (t *ChatMemberUpdated) GetDate() int64
- func (t *ChatMemberUpdated) GetFrom() *User
- func (t *ChatMemberUpdated) GetInviteLink() *ChatInviteLink
- func (t *ChatMemberUpdated) GetNewChatMember() *ChatMember
- func (t *ChatMemberUpdated) GetOldChatMember() *ChatMember
- func (t *ChatMemberUpdated) GetViaChatFolderInviteLink() bool
- type ChatPermissions
- func (t *ChatPermissions) GetCanAddWebPagePreviews() bool
- func (t *ChatPermissions) GetCanChangeInfo() bool
- func (t *ChatPermissions) GetCanInviteUsers() bool
- func (t *ChatPermissions) GetCanManageTopics() bool
- func (t *ChatPermissions) GetCanPinMessages() bool
- func (t *ChatPermissions) GetCanSendAudios() bool
- func (t *ChatPermissions) GetCanSendDocuments() bool
- func (t *ChatPermissions) GetCanSendMessages() bool
- func (t *ChatPermissions) GetCanSendOtherMessages() bool
- func (t *ChatPermissions) GetCanSendPhotos() bool
- func (t *ChatPermissions) GetCanSendPolls() bool
- func (t *ChatPermissions) GetCanSendVideoNotes() bool
- func (t *ChatPermissions) GetCanSendVideos() bool
- func (t *ChatPermissions) GetCanSendVoiceNotes() bool
- type ChatPhoto
- type ChatShared
- type ChatType
- type Choice
- type ChosenInlineResult
- type Contact
- type Conversation
- func (c *Conversation) AddChoices(state ConversationState, choices ...Choice)
- func (c *Conversation) AddUser(userID int64, state ConversationState)
- func (c *Conversation) CheckUser(userID int64) bool
- func (c *Conversation) GetUserState(userID int64) (ConversationState, bool)
- func (c *Conversation) Handle(ctx context.Context, msg *Message) (ConversationState, error)
- func (c *Conversation) RemoveUser(userID int64)
- func (c *Conversation) Stop()
- type ConversationState
- type CopyMessageConfig
- type CreateChatInviteLinkConfig
- type CreateForumTopicConfig
- type CreateInvoiceLinkConfig
- type CreateNewStickerSetConfig
- type Dice
- type Document
- type EditChatInviteLinkConfig
- type EditForumTopicConfig
- type EditMessageCaptionConfig
- type EditMessageLiveLocationConfig
- type EditMessageMediaConfig
- type EditMessageReplyMarkupConfig
- type EditMessageTextConfig
- type EncryptedCredentials
- type EncryptedPassportElement
- func (t *EncryptedPassportElement) GetData() string
- func (t *EncryptedPassportElement) GetEmail() string
- func (t *EncryptedPassportElement) GetFrontSide() *PassportFile
- func (t *EncryptedPassportElement) GetHash() string
- func (t *EncryptedPassportElement) GetPhoneNumber() string
- func (t *EncryptedPassportElement) GetReverseSide() *PassportFile
- func (t *EncryptedPassportElement) GetSelfie() *PassportFile
- func (t *EncryptedPassportElement) GetType() *EncryptedType
- type EncryptedType
- type EntityType
- type ErrIncorrectEnum
- type Error
- type ErrorCallback
- type File
- type FileID
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type ForwardMessageConfig
- type Game
- type GameHighScore
- type Games
- func (t *Games) GetAllowSendingWithoutReply() bool
- func (t *Games) GetChatID() int64
- func (t *Games) GetDisableNotification() bool
- func (t *Games) GetGameShortName() string
- func (t *Games) GetMessageThreadID() int64
- func (t *Games) GetProtectContent() bool
- func (t *Games) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *Games) GetReplyToMessageID() int64
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type GetGameHighScoresConfig
- type GetUpdatesConfig
- type GetUserProfilePhotosConfig
- type Handler
- type HandlerFunc
- type InlineKeyboardButton
- func (t *InlineKeyboardButton) GetCallbackData() string
- func (t *InlineKeyboardButton) GetCallbackGame() *CallbackGame
- func (t *InlineKeyboardButton) GetLoginURL() *LoginURL
- func (t *InlineKeyboardButton) GetPay() bool
- func (t *InlineKeyboardButton) GetSwitchInlineQuery() string
- func (t *InlineKeyboardButton) GetSwitchInlineQueryChosenChat() *SwitchInlineQueryChosenChat
- func (t *InlineKeyboardButton) GetSwitchInlineQueryCurrentChat() string
- func (t *InlineKeyboardButton) GetText() string
- func (t *InlineKeyboardButton) GetURL() string
- func (t *InlineKeyboardButton) GetWebApp() *WebAppInfo
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryResult
- func (t *InlineQueryResult) GetDescription() string
- func (t *InlineQueryResult) GetHideURL() bool
- func (t *InlineQueryResult) GetID() string
- func (t *InlineQueryResult) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResult) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResult) GetThumbnailHeight() int64
- func (t *InlineQueryResult) GetThumbnailURL() string
- func (t *InlineQueryResult) GetThumbnailWidth() int64
- func (t *InlineQueryResult) GetTitle() string
- func (t *InlineQueryResult) GetType() *InlineType
- func (t *InlineQueryResult) GetURL() string
- type InlineQueryResultArticle
- func (t *InlineQueryResultArticle) GetDescription() string
- func (t *InlineQueryResultArticle) GetHideURL() bool
- func (t *InlineQueryResultArticle) GetID() string
- func (t *InlineQueryResultArticle) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultArticle) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultArticle) GetThumbnailHeight() int64
- func (t *InlineQueryResultArticle) GetThumbnailURL() string
- func (t *InlineQueryResultArticle) GetThumbnailWidth() int64
- func (t *InlineQueryResultArticle) GetTitle() string
- func (t *InlineQueryResultArticle) GetType() *InlineType
- func (t *InlineQueryResultArticle) GetURL() string
- type InlineQueryResultAudio
- func (t *InlineQueryResultAudio) GetAudioDuration() int64
- func (t *InlineQueryResultAudio) GetAudioURL() string
- func (t *InlineQueryResultAudio) GetCaption() string
- func (t *InlineQueryResultAudio) GetID() string
- func (t *InlineQueryResultAudio) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultAudio) GetParseMode() string
- func (t *InlineQueryResultAudio) GetPerformer() string
- func (t *InlineQueryResultAudio) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultAudio) GetTitle() string
- func (t *InlineQueryResultAudio) GetType() *InlineType
- type InlineQueryResultCachedAudio
- func (t *InlineQueryResultCachedAudio) GetAudioFileID() string
- func (t *InlineQueryResultCachedAudio) GetCaption() string
- func (t *InlineQueryResultCachedAudio) GetID() string
- func (t *InlineQueryResultCachedAudio) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedAudio) GetParseMode() string
- func (t *InlineQueryResultCachedAudio) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedAudio) GetType() *InlineType
- type InlineQueryResultCachedDocument
- func (t *InlineQueryResultCachedDocument) GetCaption() string
- func (t *InlineQueryResultCachedDocument) GetDescription() string
- func (t *InlineQueryResultCachedDocument) GetDocumentFileID() string
- func (t *InlineQueryResultCachedDocument) GetID() string
- func (t *InlineQueryResultCachedDocument) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedDocument) GetParseMode() string
- func (t *InlineQueryResultCachedDocument) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedDocument) GetTitle() string
- func (t *InlineQueryResultCachedDocument) GetType() *InlineType
- type InlineQueryResultCachedGif
- func (t *InlineQueryResultCachedGif) GetCaption() string
- func (t *InlineQueryResultCachedGif) GetGifFileID() string
- func (t *InlineQueryResultCachedGif) GetID() string
- func (t *InlineQueryResultCachedGif) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedGif) GetParseMode() string
- func (t *InlineQueryResultCachedGif) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedGif) GetTitle() string
- func (t *InlineQueryResultCachedGif) GetType() *InlineType
- type InlineQueryResultCachedMpeg4Gif
- func (t *InlineQueryResultCachedMpeg4Gif) GetCaption() string
- func (t *InlineQueryResultCachedMpeg4Gif) GetID() string
- func (t *InlineQueryResultCachedMpeg4Gif) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedMpeg4Gif) GetMpeg4FileID() string
- func (t *InlineQueryResultCachedMpeg4Gif) GetParseMode() string
- func (t *InlineQueryResultCachedMpeg4Gif) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedMpeg4Gif) GetTitle() string
- func (t *InlineQueryResultCachedMpeg4Gif) GetType() *InlineType
- type InlineQueryResultCachedPhoto
- func (t *InlineQueryResultCachedPhoto) GetCaption() string
- func (t *InlineQueryResultCachedPhoto) GetDescription() string
- func (t *InlineQueryResultCachedPhoto) GetID() string
- func (t *InlineQueryResultCachedPhoto) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedPhoto) GetParseMode() string
- func (t *InlineQueryResultCachedPhoto) GetPhotoFileID() string
- func (t *InlineQueryResultCachedPhoto) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedPhoto) GetTitle() string
- func (t *InlineQueryResultCachedPhoto) GetType() *InlineType
- type InlineQueryResultCachedSticker
- func (t *InlineQueryResultCachedSticker) GetID() string
- func (t *InlineQueryResultCachedSticker) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedSticker) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedSticker) GetStickerFileID() string
- func (t *InlineQueryResultCachedSticker) GetType() *InlineType
- type InlineQueryResultCachedVideo
- func (t *InlineQueryResultCachedVideo) GetCaption() string
- func (t *InlineQueryResultCachedVideo) GetDescription() string
- func (t *InlineQueryResultCachedVideo) GetID() string
- func (t *InlineQueryResultCachedVideo) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedVideo) GetParseMode() string
- func (t *InlineQueryResultCachedVideo) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedVideo) GetTitle() string
- func (t *InlineQueryResultCachedVideo) GetType() *InlineType
- func (t *InlineQueryResultCachedVideo) GetVideoFileID() string
- type InlineQueryResultCachedVoice
- func (t *InlineQueryResultCachedVoice) GetCaption() string
- func (t *InlineQueryResultCachedVoice) GetID() string
- func (t *InlineQueryResultCachedVoice) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultCachedVoice) GetParseMode() string
- func (t *InlineQueryResultCachedVoice) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultCachedVoice) GetTitle() string
- func (t *InlineQueryResultCachedVoice) GetType() *InlineType
- func (t *InlineQueryResultCachedVoice) GetVoiceFileID() string
- type InlineQueryResultContact
- func (t *InlineQueryResultContact) GetFirstName() string
- func (t *InlineQueryResultContact) GetID() string
- func (t *InlineQueryResultContact) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultContact) GetLastName() string
- func (t *InlineQueryResultContact) GetPhoneNumber() string
- func (t *InlineQueryResultContact) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultContact) GetThumbnailHeight() int64
- func (t *InlineQueryResultContact) GetThumbnailURL() string
- func (t *InlineQueryResultContact) GetThumbnailWidth() int64
- func (t *InlineQueryResultContact) GetType() *InlineType
- func (t *InlineQueryResultContact) GetVcard() string
- type InlineQueryResultDocument
- func (t *InlineQueryResultDocument) GetCaption() string
- func (t *InlineQueryResultDocument) GetDescription() string
- func (t *InlineQueryResultDocument) GetDocumentURL() string
- func (t *InlineQueryResultDocument) GetID() string
- func (t *InlineQueryResultDocument) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultDocument) GetMimeType() string
- func (t *InlineQueryResultDocument) GetParseMode() string
- func (t *InlineQueryResultDocument) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultDocument) GetThumbnailHeight() int64
- func (t *InlineQueryResultDocument) GetThumbnailURL() string
- func (t *InlineQueryResultDocument) GetThumbnailWidth() int64
- func (t *InlineQueryResultDocument) GetTitle() string
- func (t *InlineQueryResultDocument) GetType() *InlineType
- type InlineQueryResultGame
- type InlineQueryResultGif
- func (t *InlineQueryResultGif) GetCaption() string
- func (t *InlineQueryResultGif) GetGifDuration() int64
- func (t *InlineQueryResultGif) GetGifHeight() int64
- func (t *InlineQueryResultGif) GetGifURL() string
- func (t *InlineQueryResultGif) GetGifWidth() int64
- func (t *InlineQueryResultGif) GetID() string
- func (t *InlineQueryResultGif) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultGif) GetParseMode() string
- func (t *InlineQueryResultGif) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultGif) GetThumbnailMimeType() string
- func (t *InlineQueryResultGif) GetThumbnailURL() string
- func (t *InlineQueryResultGif) GetTitle() string
- func (t *InlineQueryResultGif) GetType() *InlineType
- type InlineQueryResultLocation
- func (t *InlineQueryResultLocation) GetHeading() int64
- func (t *InlineQueryResultLocation) GetHorizontalAccuracy() *float64
- func (t *InlineQueryResultLocation) GetID() string
- func (t *InlineQueryResultLocation) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultLocation) GetLatitude() *float64
- func (t *InlineQueryResultLocation) GetLivePeriod() int64
- func (t *InlineQueryResultLocation) GetLongitude() *float64
- func (t *InlineQueryResultLocation) GetProximityAlertRadius() int64
- func (t *InlineQueryResultLocation) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultLocation) GetThumbnailHeight() int64
- func (t *InlineQueryResultLocation) GetThumbnailURL() string
- func (t *InlineQueryResultLocation) GetThumbnailWidth() int64
- func (t *InlineQueryResultLocation) GetTitle() string
- func (t *InlineQueryResultLocation) GetType() *InlineType
- type InlineQueryResultMpeg4Gif
- func (t *InlineQueryResultMpeg4Gif) GetCaption() string
- func (t *InlineQueryResultMpeg4Gif) GetID() string
- func (t *InlineQueryResultMpeg4Gif) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultMpeg4Gif) GetMpeg4Duration() int64
- func (t *InlineQueryResultMpeg4Gif) GetMpeg4Height() int64
- func (t *InlineQueryResultMpeg4Gif) GetMpeg4URL() string
- func (t *InlineQueryResultMpeg4Gif) GetMpeg4Width() int64
- func (t *InlineQueryResultMpeg4Gif) GetParseMode() string
- func (t *InlineQueryResultMpeg4Gif) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultMpeg4Gif) GetThumbnailMimeType() string
- func (t *InlineQueryResultMpeg4Gif) GetThumbnailURL() string
- func (t *InlineQueryResultMpeg4Gif) GetTitle() string
- func (t *InlineQueryResultMpeg4Gif) GetType() *InlineType
- type InlineQueryResultPhoto
- func (t *InlineQueryResultPhoto) GetCaption() string
- func (t *InlineQueryResultPhoto) GetDescription() string
- func (t *InlineQueryResultPhoto) GetID() string
- func (t *InlineQueryResultPhoto) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultPhoto) GetParseMode() string
- func (t *InlineQueryResultPhoto) GetPhotoHeight() int64
- func (t *InlineQueryResultPhoto) GetPhotoURL() string
- func (t *InlineQueryResultPhoto) GetPhotoWidth() int64
- func (t *InlineQueryResultPhoto) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultPhoto) GetThumbnailURL() string
- func (t *InlineQueryResultPhoto) GetTitle() string
- func (t *InlineQueryResultPhoto) GetType() *InlineType
- type InlineQueryResultVenue
- func (t *InlineQueryResultVenue) GetAddress() string
- func (t *InlineQueryResultVenue) GetFoursquareID() string
- func (t *InlineQueryResultVenue) GetFoursquareType() string
- func (t *InlineQueryResultVenue) GetGooglePlaceID() string
- func (t *InlineQueryResultVenue) GetGooglePlaceType() string
- func (t *InlineQueryResultVenue) GetID() string
- func (t *InlineQueryResultVenue) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultVenue) GetLatitude() *float64
- func (t *InlineQueryResultVenue) GetLongitude() *float64
- func (t *InlineQueryResultVenue) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultVenue) GetThumbnailHeight() int64
- func (t *InlineQueryResultVenue) GetThumbnailURL() string
- func (t *InlineQueryResultVenue) GetThumbnailWidth() int64
- func (t *InlineQueryResultVenue) GetTitle() string
- func (t *InlineQueryResultVenue) GetType() *InlineType
- type InlineQueryResultVideo
- func (t *InlineQueryResultVideo) GetCaption() string
- func (t *InlineQueryResultVideo) GetDescription() string
- func (t *InlineQueryResultVideo) GetID() string
- func (t *InlineQueryResultVideo) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultVideo) GetMimeType() string
- func (t *InlineQueryResultVideo) GetParseMode() string
- func (t *InlineQueryResultVideo) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultVideo) GetThumbnailURL() string
- func (t *InlineQueryResultVideo) GetTitle() string
- func (t *InlineQueryResultVideo) GetType() *InlineType
- func (t *InlineQueryResultVideo) GetVideoDuration() int64
- func (t *InlineQueryResultVideo) GetVideoHeight() int64
- func (t *InlineQueryResultVideo) GetVideoURL() string
- func (t *InlineQueryResultVideo) GetVideoWidth() int64
- type InlineQueryResultVoice
- func (t *InlineQueryResultVoice) GetCaption() string
- func (t *InlineQueryResultVoice) GetID() string
- func (t *InlineQueryResultVoice) GetInputMessageContent() *InputMessageContent
- func (t *InlineQueryResultVoice) GetParseMode() string
- func (t *InlineQueryResultVoice) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *InlineQueryResultVoice) GetTitle() string
- func (t *InlineQueryResultVoice) GetType() *InlineType
- func (t *InlineQueryResultVoice) GetVoiceDuration() int64
- func (t *InlineQueryResultVoice) GetVoiceURL() string
- type InlineQueryResultsButton
- type InlineType
- type InputContactMessageContent
- type InputFile
- type InputInvoiceMessageContent
- func (t *InputInvoiceMessageContent) GetCurrency() string
- func (t *InputInvoiceMessageContent) GetDescription() string
- func (t *InputInvoiceMessageContent) GetIsFlexible() bool
- func (t *InputInvoiceMessageContent) GetMaxTipAmount() int64
- func (t *InputInvoiceMessageContent) GetNeedEmail() bool
- func (t *InputInvoiceMessageContent) GetNeedName() bool
- func (t *InputInvoiceMessageContent) GetNeedPhoneNumber() bool
- func (t *InputInvoiceMessageContent) GetNeedShippingAddress() bool
- func (t *InputInvoiceMessageContent) GetPayload() string
- func (t *InputInvoiceMessageContent) GetPhotoHeight() int64
- func (t *InputInvoiceMessageContent) GetPhotoSize() int64
- func (t *InputInvoiceMessageContent) GetPhotoURL() string
- func (t *InputInvoiceMessageContent) GetPhotoWidth() int64
- func (t *InputInvoiceMessageContent) GetProviderData() string
- func (t *InputInvoiceMessageContent) GetProviderToken() string
- func (t *InputInvoiceMessageContent) GetSendEmailToProvider() bool
- func (t *InputInvoiceMessageContent) GetSendPhoneNumberToProvider() bool
- func (t *InputInvoiceMessageContent) GetTitle() string
- type InputLocationMessageContent
- func (t *InputLocationMessageContent) GetHeading() int64
- func (t *InputLocationMessageContent) GetHorizontalAccuracy() *float64
- func (t *InputLocationMessageContent) GetLatitude() *float64
- func (t *InputLocationMessageContent) GetLivePeriod() int64
- func (t *InputLocationMessageContent) GetLongitude() *float64
- func (t *InputLocationMessageContent) GetProximityAlertRadius() int64
- type InputMedia
- type InputMediaAnimation
- func (t *InputMediaAnimation) GetCaption() string
- func (t *InputMediaAnimation) GetDuration() int64
- func (t *InputMediaAnimation) GetHasSpoiler() bool
- func (t *InputMediaAnimation) GetHeight() int64
- func (t *InputMediaAnimation) GetMedia() string
- func (t *InputMediaAnimation) GetParseMode() string
- func (t *InputMediaAnimation) GetThumbnail() *FileID
- func (t *InputMediaAnimation) GetType() *InputType
- func (t *InputMediaAnimation) GetWidth() int64
- type InputMediaAudio
- func (t *InputMediaAudio) GetCaption() string
- func (t *InputMediaAudio) GetDuration() int64
- func (t *InputMediaAudio) GetMedia() string
- func (t *InputMediaAudio) GetParseMode() string
- func (t *InputMediaAudio) GetPerformer() string
- func (t *InputMediaAudio) GetThumbnail() *FileID
- func (t *InputMediaAudio) GetTitle() string
- func (t *InputMediaAudio) GetType() *InputType
- type InputMediaDocument
- func (t *InputMediaDocument) GetCaption() string
- func (t *InputMediaDocument) GetDisableContentTypeDetection() bool
- func (t *InputMediaDocument) GetMedia() string
- func (t *InputMediaDocument) GetParseMode() string
- func (t *InputMediaDocument) GetThumbnail() *FileID
- func (t *InputMediaDocument) GetType() *InputType
- type InputMediaGraphics
- type InputMediaPhoto
- type InputMediaVideo
- func (t *InputMediaVideo) GetCaption() string
- func (t *InputMediaVideo) GetDuration() int64
- func (t *InputMediaVideo) GetHasSpoiler() bool
- func (t *InputMediaVideo) GetHeight() int64
- func (t *InputMediaVideo) GetMedia() string
- func (t *InputMediaVideo) GetParseMode() string
- func (t *InputMediaVideo) GetSupportsStreaming() bool
- func (t *InputMediaVideo) GetThumbnail() *FileID
- func (t *InputMediaVideo) GetType() *InputType
- func (t *InputMediaVideo) GetWidth() int64
- type InputMessageContent
- type InputSticker
- type InputTextMessageContent
- type InputType
- type InputVenueMessageContent
- func (t *InputVenueMessageContent) GetAddress() string
- func (t *InputVenueMessageContent) GetFoursquareID() string
- func (t *InputVenueMessageContent) GetFoursquareType() string
- func (t *InputVenueMessageContent) GetGooglePlaceID() string
- func (t *InputVenueMessageContent) GetGooglePlaceType() string
- func (t *InputVenueMessageContent) GetLatitude() *float64
- func (t *InputVenueMessageContent) GetLongitude() *float64
- func (t *InputVenueMessageContent) GetTitle() string
- type IntStr
- type Invoice
- type KeyboardButton
- func (t *KeyboardButton) GetRequestChat() *KeyboardButtonRequestChat
- func (t *KeyboardButton) GetRequestContact() bool
- func (t *KeyboardButton) GetRequestLocation() bool
- func (t *KeyboardButton) GetRequestPoll() *KeyboardButtonPollType
- func (t *KeyboardButton) GetRequestUser() *KeyboardButtonRequestUser
- func (t *KeyboardButton) GetText() string
- func (t *KeyboardButton) GetWebApp() *WebAppInfo
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- func (t *KeyboardButtonRequestChat) GetBotAdministratorRights() *ChatAdministratorRights
- func (t *KeyboardButtonRequestChat) GetBotIsMember() bool
- func (t *KeyboardButtonRequestChat) GetChatHasUsername() bool
- func (t *KeyboardButtonRequestChat) GetChatIsChannel() bool
- func (t *KeyboardButtonRequestChat) GetChatIsCreated() bool
- func (t *KeyboardButtonRequestChat) GetChatIsForum() bool
- func (t *KeyboardButtonRequestChat) GetRequestID() int64
- func (t *KeyboardButtonRequestChat) GetUserAdministratorRights() *ChatAdministratorRights
- type KeyboardButtonRequestUser
- type KeyboardButtonType
- type LabeledPrice
- type Location
- type LoginURL
- type LongPoller
- type LongPollerOption
- type MaskPosition
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonWebApp
- type MenuType
- type Message
- func (t *Message) Command() string
- func (t *Message) CommandArguments() string
- func (t *Message) CommandWithAt() string
- func (t *Message) GetAnimation() *Animation
- func (t *Message) GetAudio() *Audio
- func (t *Message) GetAuthorSignature() string
- func (t *Message) GetCaption() string
- func (t *Message) GetChannelChatCreated() *bool
- func (t *Message) GetChat() *Chat
- func (t *Message) GetChatShared() *ChatShared
- func (t *Message) GetConnectedWebsite() string
- func (t *Message) GetContact() *Contact
- func (t *Message) GetDate() int64
- func (t *Message) GetDeleteChatPhoto() *bool
- func (t *Message) GetDice() *Dice
- func (t *Message) GetDocument() *Document
- func (t *Message) GetEditDate() int64
- func (t *Message) GetForumTopicClosed() *ForumTopicClosed
- func (t *Message) GetForumTopicCreated() *ForumTopicCreated
- func (t *Message) GetForumTopicEdited() *ForumTopicEdited
- func (t *Message) GetForumTopicReopened() *ForumTopicReopened
- func (t *Message) GetForwardDate() int64
- func (t *Message) GetForwardFrom() *User
- func (t *Message) GetForwardFromChat() *Chat
- func (t *Message) GetForwardFromMessageID() int64
- func (t *Message) GetForwardSenderName() string
- func (t *Message) GetForwardSignature() string
- func (t *Message) GetFrom() *User
- func (t *Message) GetGame() *Game
- func (t *Message) GetGeneralForumTopicHidden() *GeneralForumTopicHidden
- func (t *Message) GetGeneralForumTopicUnhidden() *GeneralForumTopicUnhidden
- func (t *Message) GetGroupChatCreated() *bool
- func (t *Message) GetHasMediaSpoiler() *bool
- func (t *Message) GetHasProtectedContent() *bool
- func (t *Message) GetInvoice() *Invoice
- func (t *Message) GetIsAutomaticForward() *bool
- func (t *Message) GetIsTopicMessage() *bool
- func (t *Message) GetLeftChatMember() *User
- func (t *Message) GetLocation() *Location
- func (t *Message) GetMediaGroupID() string
- func (t *Message) GetMessageAutoDeleteTimerChanged() *MessageAutoDeleteTimerChanged
- func (t *Message) GetMessageID() int64
- func (t *Message) GetMessageThreadID() int64
- func (t *Message) GetMigrateFromChatID() int64
- func (t *Message) GetMigrateToChatID() int64
- func (t *Message) GetNewChatTitle() string
- func (t *Message) GetPassportData() *PassportData
- func (t *Message) GetPinnedMessage() *Message
- func (t *Message) GetPoll() *Poll
- func (t *Message) GetProximityAlertTriggered() *ProximityAlertTriggered
- func (t *Message) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *Message) GetReplyToMessage() *Message
- func (t *Message) GetSenderChat() *Chat
- func (t *Message) GetSticker() *Sticker
- func (t *Message) GetSuccessfulPayment() *SuccessfulPayment
- func (t *Message) GetSupergroupChatCreated() *bool
- func (t *Message) GetText() string
- func (t *Message) GetUserShared() *UserShared
- func (t *Message) GetVenue() *Venue
- func (t *Message) GetViaBot() *User
- func (t *Message) GetVideo() *Video
- func (t *Message) GetVideoChatEnded() *VideoChatEnded
- func (t *Message) GetVideoChatParticipantsInvited() *VideoChatParticipantsInvited
- func (t *Message) GetVideoChatScheduled() *VideoChatScheduled
- func (t *Message) GetVideoChatStarted() *VideoChatStarted
- func (t *Message) GetVideoNote() *VideoNote
- func (t *Message) GetVoice() *Voice
- func (t *Message) GetWebAppData() *WebAppData
- func (t *Message) GetWriteAccessAllowed() *WriteAccessAllowed
- func (t *Message) IsCommand() bool
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- func (t *MessageEntity) GetCustomEmojiID() string
- func (t *MessageEntity) GetLanguage() string
- func (t *MessageEntity) GetLength() int64
- func (t *MessageEntity) GetOffset() int64
- func (t *MessageEntity) GetType() *EntityType
- func (t *MessageEntity) GetURL() string
- func (t *MessageEntity) GetUser() *User
- func (t *MessageEntity) IsCommand() bool
- type MessageID
- type OrderInfo
- type PassportData
- type PassportElementError
- type PassportElementErrorDataField
- func (t *PassportElementErrorDataField) GetDataHash() string
- func (t *PassportElementErrorDataField) GetFieldName() string
- func (t *PassportElementErrorDataField) GetMessage() string
- func (t *PassportElementErrorDataField) GetSource() string
- func (t *PassportElementErrorDataField) GetType() *PassportType
- type PassportElementErrorFile
- type PassportElementErrorFiles
- type PassportElementErrorFrontSide
- type PassportElementErrorReverseSide
- type PassportElementErrorSelfie
- type PassportElementErrorTranslationFile
- type PassportElementErrorTranslationFiles
- type PassportElementErrorUnspecified
- type PassportFile
- type PassportType
- type Payments
- func (t *Payments) GetAllowSendingWithoutReply() bool
- func (t *Payments) GetChatID() IntStr
- func (t *Payments) GetCurrency() string
- func (t *Payments) GetDescription() string
- func (t *Payments) GetDisableNotification() bool
- func (t *Payments) GetIsFlexible() bool
- func (t *Payments) GetMaxTipAmount() int64
- func (t *Payments) GetMessageThreadID() int64
- func (t *Payments) GetNeedEmail() bool
- func (t *Payments) GetNeedName() bool
- func (t *Payments) GetNeedPhoneNumber() bool
- func (t *Payments) GetNeedShippingAddress() bool
- func (t *Payments) GetPayload() string
- func (t *Payments) GetPhotoHeight() int64
- func (t *Payments) GetPhotoSize() int64
- func (t *Payments) GetPhotoURL() string
- func (t *Payments) GetPhotoWidth() int64
- func (t *Payments) GetProtectContent() bool
- func (t *Payments) GetProviderData() string
- func (t *Payments) GetProviderToken() string
- func (t *Payments) GetReplyMarkup() *InlineKeyboardMarkup
- func (t *Payments) GetReplyToMessageID() int64
- func (t *Payments) GetSendEmailToProvider() bool
- func (t *Payments) GetSendPhoneNumberToProvider() bool
- func (t *Payments) GetStartParameter() string
- func (t *Payments) GetTitle() string
- type PhotoSize
- type PinChatMessageConfig
- type Poll
- func (t *Poll) GetAllowsMultipleAnswers() bool
- func (t *Poll) GetCloseDate() int64
- func (t *Poll) GetCorrectOptionID() int64
- func (t *Poll) GetExplanation() string
- func (t *Poll) GetID() string
- func (t *Poll) GetIsAnonymous() bool
- func (t *Poll) GetIsClosed() bool
- func (t *Poll) GetOpenPeriod() int64
- func (t *Poll) GetQuestion() string
- func (t *Poll) GetTotalVoterCount() int64
- func (t *Poll) GetType() *PollType
- type PollAnswer
- type PollOption
- type PollType
- type PreCheckoutQuery
- func (t *PreCheckoutQuery) GetCurrency() string
- func (t *PreCheckoutQuery) GetFrom() *User
- func (t *PreCheckoutQuery) GetID() string
- func (t *PreCheckoutQuery) GetInvoicePayload() string
- func (t *PreCheckoutQuery) GetOrderInfo() *OrderInfo
- func (t *PreCheckoutQuery) GetShippingOptionID() string
- func (t *PreCheckoutQuery) GetTotalAmount() int64
- type PromoteChatMemberConfig
- type ProximityAlertTriggered
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyMarkup
- type Response
- type ResponseParameters
- type RestrictChatMemberConfig
- type SendAnimationConfig
- type SendAudioConfig
- type SendChatActionConfig
- type SendContactConfig
- type SendDiceConfig
- type SendDocumentConfig
- type SendGameConfig
- type SendInvoiceConfig
- type SendLocationConfig
- type SendMediaGroupConfig
- type SendMessageConfig
- type SendPhotoConfig
- type SendPollConfig
- type SendStickerConfig
- type SendType
- type SendVenueConfig
- type SendVideoConfig
- type SendVideoNoteConfig
- type SendVoiceConfig
- type SentWebAppMessage
- type SetChatAdministratorCustomTitleConfig
- type SetChatPermissionsConfig
- type SetGameScoreConfig
- type SetMyCommandsConfig
- type SetStickerSetThumbnailConfig
- type SetWebhookConfig
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type Sticker
- func (t *Sticker) GetCustomEmojiID() string
- func (t *Sticker) GetEmoji() string
- func (t *Sticker) GetFileID() string
- func (t *Sticker) GetFileSize() int64
- func (t *Sticker) GetFileUniqueID() string
- func (t *Sticker) GetHeight() int64
- func (t *Sticker) GetIsAnimated() bool
- func (t *Sticker) GetIsVideo() bool
- func (t *Sticker) GetMaskPosition() *MaskPosition
- func (t *Sticker) GetNeedsRepainting() *bool
- func (t *Sticker) GetPremiumAnimation() *File
- func (t *Sticker) GetSetName() string
- func (t *Sticker) GetThumbnail() *PhotoSize
- func (t *Sticker) GetType() *StickerType
- func (t *Sticker) GetWidth() int64
- type StickerSet
- type StickerType
- type Stickers
- func (t *Stickers) GetCustomEmojiID() string
- func (t *Stickers) GetEmoji() string
- func (t *Stickers) GetFileID() string
- func (t *Stickers) GetFileSize() int64
- func (t *Stickers) GetFileUniqueID() string
- func (t *Stickers) GetHeight() int64
- func (t *Stickers) GetIsAnimated() bool
- func (t *Stickers) GetIsVideo() bool
- func (t *Stickers) GetMaskPosition() *MaskPosition
- func (t *Stickers) GetNeedsRepainting() *bool
- func (t *Stickers) GetPremiumAnimation() *File
- func (t *Stickers) GetSetName() string
- func (t *Stickers) GetThumbnail() *PhotoSize
- func (t *Stickers) GetType() *StickersType
- func (t *Stickers) GetWidth() int64
- type StickersType
- type StopMessageLiveLocationConfig
- type StopPollConfig
- type SuccessfulPayment
- func (t *SuccessfulPayment) GetCurrency() string
- func (t *SuccessfulPayment) GetInvoicePayload() string
- func (t *SuccessfulPayment) GetOrderInfo() *OrderInfo
- func (t *SuccessfulPayment) GetProviderPaymentChargeID() string
- func (t *SuccessfulPayment) GetShippingOptionID() string
- func (t *SuccessfulPayment) GetTelegramPaymentChargeID() string
- func (t *SuccessfulPayment) GetTotalAmount() int64
- type SwitchInlineQueryChosenChat
- func (t *SwitchInlineQueryChosenChat) GetAllowBotChats() bool
- func (t *SwitchInlineQueryChosenChat) GetAllowChannelChats() bool
- func (t *SwitchInlineQueryChosenChat) GetAllowGroupChats() bool
- func (t *SwitchInlineQueryChosenChat) GetAllowUserChats() bool
- func (t *SwitchInlineQueryChosenChat) GetQuery() string
- type UnbanChatMemberConfig
- type Update
- func (t *Update) GetCallbackQuery() *CallbackQuery
- func (t *Update) GetChannelPost() *Message
- func (t *Update) GetChatJoinRequest() *ChatJoinRequest
- func (t *Update) GetChatMember() *ChatMemberUpdated
- func (t *Update) GetChosenInlineResult() *ChosenInlineResult
- func (t *Update) GetEditedChannelPost() *Message
- func (t *Update) GetEditedMessage() *Message
- func (t *Update) GetInlineQuery() *InlineQuery
- func (t *Update) GetMessage() *Message
- func (t *Update) GetMyChatMember() *ChatMemberUpdated
- func (t *Update) GetPoll() *Poll
- func (t *Update) GetPollAnswer() *PollAnswer
- func (t *Update) GetPreCheckoutQuery() *PreCheckoutQuery
- func (t *Update) GetShippingQuery() *ShippingQuery
- func (t *Update) GetUpdateID() int64
- type UploadStickerFileConfig
- type User
- func (t *User) GetAddedToAttachmentMenu() *bool
- func (t *User) GetCanJoinGroups() bool
- func (t *User) GetCanReadAllGroupMessages() bool
- func (t *User) GetFirstName() string
- func (t *User) GetID() int64
- func (t *User) GetIsBot() bool
- func (t *User) GetIsPremium() *bool
- func (t *User) GetLanguageCode() string
- func (t *User) GetLastName() string
- func (t *User) GetSupportsInlineQueries() bool
- func (t *User) GetUsername() string
- func (t *User) String() string
- type UserProfilePhotos
- type UserShared
- type Venue
- type Video
- func (t *Video) GetDuration() int64
- func (t *Video) GetFileID() string
- func (t *Video) GetFileName() string
- func (t *Video) GetFileSize() int64
- func (t *Video) GetFileUniqueID() string
- func (t *Video) GetHeight() int64
- func (t *Video) GetMimeType() string
- func (t *Video) GetThumbnail() *PhotoSize
- func (t *Video) GetWidth() int64
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoNote
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- func (t *WebhookInfo) GetHasCustomCertificate() bool
- func (t *WebhookInfo) GetIPAddress() string
- func (t *WebhookInfo) GetLastErrorDate() int64
- func (t *WebhookInfo) GetLastErrorMessage() string
- func (t *WebhookInfo) GetLastSynchronizationErrorDate() int64
- func (t *WebhookInfo) GetMaxConnections() int64
- func (t *WebhookInfo) GetPendingUpdateCount() int64
- func (t *WebhookInfo) GetURL() string
- type WriteAccessAllowed
Constants ¶
const ( ParseModeMarkdown = "markdown" ParseModeHTML = "html" )
const APIEndpoint = "https://api.telegram.org"
const FileEndpoint = "https://api.telegram.org/file"
const Version = "6.7"
Variables ¶
var ( ErrNoSuchConversation = errors.New("no such conversation") ErrNoSuchChoice = errors.New("no such choice") )
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) AddStickerToSet ¶
AddStickerToSet Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
func (*API) AnswerCallbackQuery ¶
func (api *API) AnswerCallbackQuery( ctx context.Context, args *AnswerCallbackQueryConfig, ) (*bool, error)
AnswerCallbackQuery Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
func (*API) AnswerInlineQuery ¶
func (api *API) AnswerInlineQuery( ctx context.Context, args *AnswerInlineQueryConfig, ) (*bool, error)
AnswerInlineQuery Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed.
func (*API) AnswerPreCheckoutQuery ¶
func (api *API) AnswerPreCheckoutQuery( ctx context.Context, args *AnswerPreCheckoutQueryConfig, ) (*bool, error)
AnswerPreCheckoutQuery Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
func (*API) AnswerShippingQuery ¶
func (api *API) AnswerShippingQuery( ctx context.Context, args *AnswerShippingQueryConfig, ) (*bool, error)
AnswerShippingQuery If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
func (*API) AnswerWebAppQuery ¶
func (api *API) AnswerWebAppQuery( ctx context.Context, result InlineQueryResult, webAppQueryID string, ) (*SentWebAppMessage, error)
AnswerWebAppQuery Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
func (*API) ApproveChatJoinRequest ¶
func (api *API) ApproveChatJoinRequest( ctx context.Context, chatID IntStr, userID int64, ) (*bool, error)
ApproveChatJoinRequest Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
func (*API) BanChatMember ¶
BanChatMember Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) BanChatSenderChat ¶
func (api *API) BanChatSenderChat( ctx context.Context, chatID IntStr, senderChatID int64, ) (*bool, error)
BanChatSenderChat Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) Close ¶
Close Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
func (*API) CloseForumTopic ¶
func (api *API) CloseForumTopic( ctx context.Context, chatID IntStr, messageThreadID int64, ) (*bool, error)
CloseForumTopic Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
func (*API) CloseGeneralForumTopic ¶
CloseGeneralForumTopic Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
func (*API) CopyMessage ¶
CopyMessage Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
func (*API) CreateChatInviteLink ¶
func (api *API) CreateChatInviteLink( ctx context.Context, args *CreateChatInviteLinkConfig, ) (*ChatInviteLink, error)
CreateChatInviteLink Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
func (*API) CreateForumTopic ¶
func (api *API) CreateForumTopic( ctx context.Context, args *CreateForumTopicConfig, ) (*ForumTopic, error)
CreateForumTopic Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
func (*API) CreateInvoiceLink ¶
func (api *API) CreateInvoiceLink( ctx context.Context, args *CreateInvoiceLinkConfig, ) (string, error)
CreateInvoiceLink Use this method to create a link for an invoice. Returns the created invoice link as String on success.
func (*API) CreateNewStickerSet ¶
func (api *API) CreateNewStickerSet( ctx context.Context, args *CreateNewStickerSetConfig, ) (*bool, error)
CreateNewStickerSet Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.
func (*API) DeclineChatJoinRequest ¶
func (api *API) DeclineChatJoinRequest( ctx context.Context, chatID IntStr, userID int64, ) (*bool, error)
DeclineChatJoinRequest Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
func (*API) DeleteChatPhoto ¶
DeleteChatPhoto Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) DeleteChatStickerSet ¶
DeleteChatStickerSet Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
func (*API) DeleteForumTopic ¶
func (api *API) DeleteForumTopic( ctx context.Context, chatID IntStr, messageThreadID int64, ) (*bool, error)
DeleteForumTopic Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
func (*API) DeleteMessage ¶
func (api *API) DeleteMessage( ctx context.Context, chatID IntStr, messageID int64, ) (*bool, error)
DeleteMessage Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success.
func (*API) DeleteMyCommands ¶
func (api *API) DeleteMyCommands( ctx context.Context, languageCode *string, scope *BotCommandScope, ) (*bool, error)
DeleteMyCommands Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
func (*API) DeleteStickerFromSet ¶
DeleteStickerFromSet Use this method to delete a sticker from a set created by the bot. Returns True on success.
func (*API) DeleteStickerSet ¶
DeleteStickerSet Use this method to delete a sticker set that was created by the bot. Returns True on success.
func (*API) DeleteWebhook ¶
DeleteWebhook Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
func (*API) EditChatInviteLink ¶
func (api *API) EditChatInviteLink( ctx context.Context, args *EditChatInviteLinkConfig, ) (*ChatInviteLink, error)
EditChatInviteLink Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
func (*API) EditForumTopic ¶
EditForumTopic Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
func (*API) EditGeneralForumTopic ¶
func (api *API) EditGeneralForumTopic( ctx context.Context, chatID IntStr, name string, ) (*bool, error)
EditGeneralForumTopic Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.
func (*API) EditMessageCaption ¶
func (api *API) EditMessageCaption( ctx context.Context, args *EditMessageCaptionConfig, ) (*Message, error)
EditMessageCaption Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) EditMessageLiveLocation ¶
func (api *API) EditMessageLiveLocation( ctx context.Context, args *EditMessageLiveLocationConfig, ) (*Message, error)
EditMessageLiveLocation Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) EditMessageMedia ¶
func (api *API) EditMessageMedia( ctx context.Context, args *EditMessageMediaConfig, ) (*Message, error)
EditMessageMedia Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) EditMessageReplyMarkup ¶
func (api *API) EditMessageReplyMarkup( ctx context.Context, args *EditMessageReplyMarkupConfig, ) (*Message, error)
EditMessageReplyMarkup Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) EditMessageText ¶
func (api *API) EditMessageText( ctx context.Context, args *EditMessageTextConfig, ) (*Message, error)
EditMessageText Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) ExportChatInviteLink ¶
ExportChatInviteLink Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
func (*API) ForwardMessage ¶
func (api *API) ForwardMessage( ctx context.Context, args *ForwardMessageConfig, ) (*Message, error)
ForwardMessage Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
func (*API) GetChat ¶
GetChat Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
func (*API) GetChatAdministrators ¶
GetChatAdministrators Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.
func (*API) GetChatMember ¶
func (api *API) GetChatMember( ctx context.Context, chatID IntStr, userID int64, ) (*ChatMember, error)
GetChatMember Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.
func (*API) GetChatMemberCount ¶
GetChatMemberCount Use this method to get the number of members in a chat. Returns Int on success.
func (*API) GetChatMenuButton ¶
GetChatMenuButton Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
func (*API) GetCustomEmojiStickers ¶
func (api *API) GetCustomEmojiStickers( ctx context.Context, customEmojiIDs []string, ) ([]Sticker, error)
GetCustomEmojiStickers Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
func (*API) GetFile ¶
GetFile Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
func (*API) GetFileDirectly ¶
func (*API) GetFileDirectlyConfig ¶
func (*API) GetForumTopicIconStickers ¶
GetForumTopicIconStickers Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.
func (*API) GetGameHighScores ¶
func (api *API) GetGameHighScores( ctx context.Context, args *GetGameHighScoresConfig, ) ([]GameHighScore, error)
GetGameHighScores Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
func (*API) GetMe ¶
GetMe A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
func (*API) GetMyCommands ¶
func (api *API) GetMyCommands( ctx context.Context, ) ([]BotCommand, error)
GetMyCommands Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
func (*API) GetMyDefaultAdministratorRights ¶
func (api *API) GetMyDefaultAdministratorRights( ctx context.Context, forChannels *bool, ) (*ChatAdministratorRights, error)
GetMyDefaultAdministratorRights Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
func (*API) GetMyDescription ¶
func (api *API) GetMyDescription( ctx context.Context, languageCode *string, ) (*BotDescription, error)
GetMyDescription Use this method to get the current bot description for the given user language. Returns BotDescription on success.
func (*API) GetMyName ¶
GetMyName Use this method to get the current bot name for the given user language. Returns BotName on success.
func (*API) GetMyShortDescription ¶
func (api *API) GetMyShortDescription( ctx context.Context, languageCode *string, ) (*BotShortDescription, error)
GetMyShortDescription Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
func (*API) GetStickerSet ¶
GetStickerSet Use this method to get a sticker set. On success, a StickerSet object is returned.
func (*API) GetUpdates ¶
GetUpdates Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
func (*API) GetUserProfilePhotos ¶
func (api *API) GetUserProfilePhotos( ctx context.Context, args *GetUserProfilePhotosConfig, ) (*UserProfilePhotos, error)
GetUserProfilePhotos Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
func (*API) GetWebhookInfo ¶
func (api *API) GetWebhookInfo( ctx context.Context, ) (*WebhookInfo, error)
GetWebhookInfo Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
func (*API) HideGeneralForumTopic ¶
HideGeneralForumTopic Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
func (*API) LeaveChat ¶
LeaveChat Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
func (*API) LogOut ¶
LogOut Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
func (*API) MakeRequest ¶
func (api *API) MakeRequest(ctx context.Context, method string, data interface{}) (*Response, error)
MakeRequest makes a request to a specific endpoint with our token.
func (*API) PinChatMessage ¶
PinChatMessage Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
func (*API) PromoteChatMember ¶
func (api *API) PromoteChatMember( ctx context.Context, args *PromoteChatMemberConfig, ) (*bool, error)
PromoteChatMember Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.
func (*API) ReopenForumTopic ¶
func (api *API) ReopenForumTopic( ctx context.Context, chatID IntStr, messageThreadID int64, ) (*bool, error)
ReopenForumTopic Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
func (*API) ReopenGeneralForumTopic ¶
ReopenGeneralForumTopic Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.
func (*API) RestrictChatMember ¶
func (api *API) RestrictChatMember( ctx context.Context, args *RestrictChatMemberConfig, ) (*bool, error)
RestrictChatMember Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
func (*API) RevokeChatInviteLink ¶
func (api *API) RevokeChatInviteLink( ctx context.Context, chatID IntStr, inviteLink string, ) (*ChatInviteLink, error)
RevokeChatInviteLink Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.
func (*API) SendAnimation ¶
SendAnimation Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.}}
func (*API) SendAudio ¶
SendAudio Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.}}
func (*API) SendChatAction ¶
SendChatAction Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
func (*API) SendContact ¶
SendContact Use this method to send phone contacts. On success, the sent Message is returned.
func (*API) SendDice ¶
SendDice Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
func (*API) SendDocument ¶
SendDocument Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.}}
func (*API) SendGame ¶
SendGame Use this method to send a game. On success, the sent Message is returned.
func (*API) SendInvoice ¶
SendInvoice Use this method to send invoices. On success, the sent Message is returned.
func (*API) SendLocation ¶
SendLocation Use this method to send point on the map. On success, the sent Message is returned.
func (*API) SendMediaGroup ¶
func (api *API) SendMediaGroup( ctx context.Context, args *SendMediaGroupConfig, ) ([]Message, error)
SendMediaGroup Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
func (*API) SendMessage ¶
SendMessage Use this method to send text messages. On success, the sent Message is returned.
func (*API) SendPhoto ¶
SendPhoto Use this method to send photos. On success, the sent Message is returned.}}
func (*API) SendPoll ¶
SendPoll Use this method to send a native poll. On success, the sent Message is returned.
func (*API) SendSticker ¶
SendSticker Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.}}
func (*API) SendVenue ¶
SendVenue Use this method to send information about a venue. On success, the sent Message is returned.
func (*API) SendVideo ¶
SendVideo Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.}}
func (*API) SendVideoNote ¶
SendVideoNote As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.}}
func (*API) SendVoice ¶
SendVoice Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.}}
func (*API) SetChatAdministratorCustomTitle ¶
func (api *API) SetChatAdministratorCustomTitle( ctx context.Context, args *SetChatAdministratorCustomTitleConfig, ) (*bool, error)
SetChatAdministratorCustomTitle Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
func (*API) SetChatDescription ¶
func (api *API) SetChatDescription( ctx context.Context, chatID IntStr, description *string, ) (*bool, error)
SetChatDescription Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) SetChatMenuButton ¶
func (api *API) SetChatMenuButton( ctx context.Context, chatID *int64, menuButton *MenuButton, ) (*bool, error)
SetChatMenuButton Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
func (*API) SetChatPermissions ¶
func (api *API) SetChatPermissions( ctx context.Context, args *SetChatPermissionsConfig, ) (*bool, error)
SetChatPermissions Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.
func (*API) SetChatPhoto ¶
SetChatPhoto Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.}}
func (*API) SetChatStickerSet ¶
func (api *API) SetChatStickerSet( ctx context.Context, chatID IntStr, stickerSetName string, ) (*bool, error)
SetChatStickerSet Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
func (*API) SetChatTitle ¶
SetChatTitle Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) SetCustomEmojiStickerSetThumbnail ¶
func (api *API) SetCustomEmojiStickerSetThumbnail( ctx context.Context, customEmojiID *string, name string, ) (*bool, error)
SetCustomEmojiStickerSetThumbnail Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
func (*API) SetGameScore ¶
SetGameScore Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
func (*API) SetMyCommands ¶
SetMyCommands Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.
func (*API) SetMyDefaultAdministratorRights ¶
func (api *API) SetMyDefaultAdministratorRights( ctx context.Context, forChannels *bool, rights *ChatAdministratorRights, ) (*bool, error)
SetMyDefaultAdministratorRights Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success.
func (*API) SetMyDescription ¶
func (api *API) SetMyDescription( ctx context.Context, description *string, languageCode *string, ) (*bool, error)
SetMyDescription Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.
func (*API) SetMyName ¶
func (api *API) SetMyName( ctx context.Context, languageCode *string, name *string, ) (*bool, error)
SetMyName Use this method to change the bot's name. Returns True on success.
func (*API) SetMyShortDescription ¶
func (api *API) SetMyShortDescription( ctx context.Context, languageCode *string, shortDescription *string, ) (*bool, error)
SetMyShortDescription Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.
func (*API) SetPassportDataErrors ¶
func (api *API) SetPassportDataErrors( ctx context.Context, errors []PassportElementError, userID int64, ) (*bool, error)
SetPassportDataErrors Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
func (*API) SetStickerEmojiList ¶
func (api *API) SetStickerEmojiList( ctx context.Context, emojiList []string, sticker string, ) (*bool, error)
SetStickerEmojiList Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
func (*API) SetStickerKeywords ¶
func (api *API) SetStickerKeywords( ctx context.Context, keywords []string, sticker string, ) (*bool, error)
SetStickerKeywords Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
func (*API) SetStickerMaskPosition ¶
func (api *API) SetStickerMaskPosition( ctx context.Context, maskPosition *MaskPosition, sticker string, ) (*bool, error)
SetStickerMaskPosition Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.
func (*API) SetStickerPositionInSet ¶
func (api *API) SetStickerPositionInSet( ctx context.Context, position int64, sticker string, ) (*bool, error)
SetStickerPositionInSet Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
func (*API) SetStickerSetThumbnail ¶
func (api *API) SetStickerSetThumbnail( ctx context.Context, args *SetStickerSetThumbnailConfig, ) (*bool, error)
SetStickerSetThumbnail Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.
func (*API) SetStickerSetTitle ¶
func (api *API) SetStickerSetTitle( ctx context.Context, name string, title string, ) (*bool, error)
SetStickerSetTitle Use this method to set the title of a created sticker set. Returns True on success.
func (*API) SetWebhook ¶
SetWebhook Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
func (*API) StopMessageLiveLocation ¶
func (api *API) StopMessageLiveLocation( ctx context.Context, args *StopMessageLiveLocationConfig, ) (*Message, error)
StopMessageLiveLocation Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
func (*API) StopPoll ¶
StopPoll Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
func (*API) UnbanChatMember ¶
UnbanChatMember Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
func (*API) UnbanChatSenderChat ¶
func (api *API) UnbanChatSenderChat( ctx context.Context, chatID IntStr, senderChatID int64, ) (*bool, error)
UnbanChatSenderChat Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.
func (*API) UnhideGeneralForumTopic ¶
UnhideGeneralForumTopic Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
func (*API) UnpinAllChatMessages ¶
UnpinAllChatMessages Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
func (*API) UnpinAllForumTopicMessages ¶
func (api *API) UnpinAllForumTopicMessages( ctx context.Context, chatID IntStr, messageThreadID int64, ) (*bool, error)
UnpinAllForumTopicMessages Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
func (*API) UnpinChatMessage ¶
func (api *API) UnpinChatMessage( ctx context.Context, chatID IntStr, messageID *int64, ) (*bool, error)
UnpinChatMessage Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
type AcceptFunc ¶
AcceptFunc is a function for validating incoming Update, similar to the path prefix in http. This function must be non-blocking.
type AddStickerToSetConfig ¶
type AddStickerToSetConfig struct {
// Name
// Sticker set name
Name string `json:"name"`
// Sticker
// A JSON-serialized object with information about the added sticker. If exactly the same
// sticker had already been added to the set, then the set isn't changed.
Sticker InputSticker `json:"sticker"`
// UserID
// User identifier of sticker set owner
UserID int64 `json:"user_id"`
}
AddStickerToSet Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
type Animation ¶
type Animation struct {
// Duration
// Duration of the video in seconds as defined by sender
Duration int64 `json:"duration"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Height
// Video height as defined by sender
Height int64 `json:"height"`
// Width
// Video width as defined by sender
Width int64 `json:"width"`
// FileName
// Original animation filename as defined by sender
FileName *string `json:"file_name,omitempty"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
// MimeType
// MIME type of the file as defined by sender
MimeType *string `json:"mime_type,omitempty"`
// Thumbnail
// Animation thumbnail as defined by sender
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
Animation This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
func (*Animation) GetDuration ¶
func (*Animation) GetFileName ¶
func (*Animation) GetFileSize ¶
func (*Animation) GetFileUniqueID ¶
func (*Animation) GetMimeType ¶
func (*Animation) GetThumbnail ¶
type AnswerCallbackQueryConfig ¶
type AnswerCallbackQueryConfig struct {
// CallbackQueryID
// Unique identifier for the query to be answered
CallbackQueryID string `json:"callback_query_id"`
// CacheTime
// The maximum amount of time in seconds that the result of the callback query may be cached
// client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
CacheTime int64 `json:"cache_time,omitempty"`
// ShowAlert
// If True, an alert will be shown by the client instead of a notification at the top of the
// chat screen. Defaults to false.
ShowAlert bool `json:"show_alert,omitempty"`
// Text
// Text of the notification. If not specified, nothing will be shown to the user, 0-200
// characters
Text string `json:"text,omitempty"`
// URL
// URL that will be opened by the user's client. If you have created a Game and accepted the
// conditions via @BotFather, specify the URL that opens your game - note that this will only
// work if the query comes from a callback_game button.Otherwise, you may use links like
// t.me/your_bot?start=XXXX that open your bot with a parameter.
URL string `json:"url,omitempty"`
}
AnswerCallbackQuery Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
type AnswerInlineQueryConfig ¶
type AnswerInlineQueryConfig struct {
// InlineQueryID
// Unique identifier for the answered query
InlineQueryID string `json:"inline_query_id"`
// Results
// A JSON-serialized array of results for the inline query
Results []InlineQueryResult `json:"results"`
// Button
// A JSON-serialized object describing a button to be shown above inline query results
Button *InlineQueryResultsButton `json:"button,omitempty"`
// CacheTime
// The maximum amount of time in seconds that the result of the inline query may be cached on
// the server. Defaults to 300.
CacheTime int64 `json:"cache_time,omitempty"`
// IsPersonal
// Pass True if results may be cached on the server side only for the user that sent the query.
// By default, results may be returned to any user who sends the same query.
IsPersonal bool `json:"is_personal,omitempty"`
// NextOffset
// Pass the offset that a client should send in the next query with the same text to receive
// more results. Pass an empty string if there are no more results or if you don't support
// pagination. Offset length can't exceed 64 bytes.
NextOffset string `json:"next_offset,omitempty"`
}
AnswerInlineQuery Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed.
type AnswerPreCheckoutQueryConfig ¶
type AnswerPreCheckoutQueryConfig struct {
// Ok
// Specify True if everything is alright (goods are available, etc.) and the bot is ready to
// proceed with the order. Use False if there are any problems.
Ok bool `json:"ok"`
// PreCheckoutQueryID
// Unique identifier for the query to be answered
PreCheckoutQueryID string `json:"pre_checkout_query_id"`
// ErrorMessage
// Required if ok is False. Error message in human readable form that explains the reason for
// failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our
// amazing black T-shirts while you were busy filling out your payment details. Please choose a
// different color or garment!"). Telegram will display this message to the user.
ErrorMessage string `json:"error_message,omitempty"`
}
AnswerPreCheckoutQuery Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
type AnswerShippingQueryConfig ¶
type AnswerShippingQueryConfig struct {
// Ok
// Pass True if delivery to the specified address is possible and False if there are any
// problems (for example, if delivery to the specified address is not possible)
Ok bool `json:"ok"`
// ShippingQueryID
// Unique identifier for the query to be answered
ShippingQueryID string `json:"shipping_query_id"`
// ErrorMessage
// Required if ok is False. Error message in human readable form that explains why it is
// impossible to complete the order (e.g. "Sorry, delivery to your desired address is
// unavailable'). Telegram will display this message to the user.
ErrorMessage string `json:"error_message,omitempty"`
// ShippingOptions
// Required if ok is True. A JSON-serialized array of available shipping options.
ShippingOptions []ShippingOption `json:"shipping_options,omitempty"`
}
AnswerShippingQuery If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
type Audio ¶
type Audio struct {
// Duration
// Duration of the audio in seconds as defined by sender
Duration int64 `json:"duration"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// FileName
// Original filename as defined by sender
FileName *string `json:"file_name,omitempty"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
// MimeType
// MIME type of the file as defined by sender
MimeType *string `json:"mime_type,omitempty"`
// Performer
// Performer of the audio as defined by sender or by audio tags
Performer *string `json:"performer,omitempty"`
// Thumbnail
// Thumbnail of the album cover to which the music file belongs
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
// Title
// Title of the audio as defined by sender or by audio tags
Title *string `json:"title,omitempty"`
}
Audio This object represents an audio file to be treated as music by the Telegram clients.
func (*Audio) GetDuration ¶
func (*Audio) GetFileName ¶
func (*Audio) GetFileSize ¶
func (*Audio) GetFileUniqueID ¶
func (*Audio) GetMimeType ¶
func (*Audio) GetPerformer ¶
func (*Audio) GetThumbnail ¶
type BanChatMemberConfig ¶
type BanChatMemberConfig struct {
// ChatID
// Unique identifier for the target group or username of the target supergroup or channel (in
// the format @channelusername)
ChatID IntStr `json:"chat_id"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
// RevokeMessages
// 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"`
// UntilDate
// 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 int64 `json:"until_date,omitempty"`
}
BanChatMember Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
type BotCommand ¶
type BotCommand struct {
// Command
// Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and
// underscores.
Command string `json:"command"`
// Description
// Description of the command; 1-256 characters.
Description string `json:"description"`
}
BotCommand This object represents a bot command.
func (*BotCommand) GetCommand ¶
func (t *BotCommand) GetCommand() string
func (*BotCommand) GetDescription ¶
func (t *BotCommand) GetDescription() string
type BotCommandScope ¶
type BotCommandScope struct {
// Type
// Scope type, must be default
Type BotType `json:"type"`
}
BotCommandScope This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
func (*BotCommandScope) GetType ¶
func (t *BotCommandScope) GetType() *BotType
type BotCommandScopeAllChatAdministrators ¶
type BotCommandScopeAllChatAdministrators struct {
// Type
// Scope type, must be all_chat_administrators
Type BotType `json:"type"`
}
BotCommandScopeAllChatAdministrators Represents the scope of bot commands, covering all group and supergroup chat administrators.
func (*BotCommandScopeAllChatAdministrators) GetType ¶
func (t *BotCommandScopeAllChatAdministrators) GetType() *BotType
type BotCommandScopeAllGroupChats ¶
type BotCommandScopeAllGroupChats struct {
// Type
// Scope type, must be all_group_chats
Type BotType `json:"type"`
}
BotCommandScopeAllGroupChats Represents the scope of bot commands, covering all group and supergroup chats.
func (*BotCommandScopeAllGroupChats) GetType ¶
func (t *BotCommandScopeAllGroupChats) GetType() *BotType
type BotCommandScopeAllPrivateChats ¶
type BotCommandScopeAllPrivateChats struct {
// Type
// Scope type, must be all_private_chats
Type BotType `json:"type"`
}
BotCommandScopeAllPrivateChats Represents the scope of bot commands, covering all private chats.
func (*BotCommandScopeAllPrivateChats) GetType ¶
func (t *BotCommandScopeAllPrivateChats) GetType() *BotType
type BotCommandScopeChat ¶
type BotCommandScopeChat struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Type
// Scope type, must be chat
Type BotType `json:"type"`
}
BotCommandScopeChat Represents the scope of bot commands, covering a specific chat.
func (*BotCommandScopeChat) GetChatID ¶
func (t *BotCommandScopeChat) GetChatID() IntStr
func (*BotCommandScopeChat) GetType ¶
func (t *BotCommandScopeChat) GetType() *BotType
type BotCommandScopeChatAdministrators ¶
type BotCommandScopeChatAdministrators struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Type
// Scope type, must be chat_administrators
Type BotType `json:"type"`
}
BotCommandScopeChatAdministrators Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
func (*BotCommandScopeChatAdministrators) GetChatID ¶
func (t *BotCommandScopeChatAdministrators) GetChatID() IntStr
func (*BotCommandScopeChatAdministrators) GetType ¶
func (t *BotCommandScopeChatAdministrators) GetType() *BotType
type BotCommandScopeChatMember ¶
type BotCommandScopeChatMember struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Type
// Scope type, must be chat_member
Type BotType `json:"type"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
}
BotCommandScopeChatMember Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
func (*BotCommandScopeChatMember) GetChatID ¶
func (t *BotCommandScopeChatMember) GetChatID() IntStr
func (*BotCommandScopeChatMember) GetType ¶
func (t *BotCommandScopeChatMember) GetType() *BotType
func (*BotCommandScopeChatMember) GetUserID ¶
func (t *BotCommandScopeChatMember) GetUserID() int64
type BotCommandScopeDefault ¶
type BotCommandScopeDefault struct {
// Type
// Scope type, must be default
Type BotType `json:"type"`
}
BotCommandScopeDefault 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) GetType ¶
func (t *BotCommandScopeDefault) GetType() *BotType
type BotDescription ¶
type BotDescription struct {
// Description
// The bot's description
Description string `json:"description"`
}
BotDescription This object represents the bot's description.
func (*BotDescription) GetDescription ¶
func (t *BotDescription) GetDescription() string
type BotName ¶
type BotName struct {
// Name
// The bot's name
Name string `json:"name"`
}
BotName This object represents the bot's name.
type BotShortDescription ¶
type BotShortDescription struct {
// ShortDescription
// The bot's short description
ShortDescription string `json:"short_description"`
}
BotShortDescription This object represents the bot's short description.
func (*BotShortDescription) GetShortDescription ¶
func (t *BotShortDescription) GetShortDescription() string
type CallTree ¶
type CallTree struct {
// contains filtered or unexported fields
}
CallTree is a type for handling the incoming updates.
func NewCallTree ¶
func NewCallTree(defaultHandler HandlerFunc) *CallTree
NewCallTree creates a new instance of the call tree with the given handler.
func (*CallTree) HandleUpdate ¶
HandleUpdate is th implementation method for the Handler interface.
func (*CallTree) NewChild ¶
func (c *CallTree) NewChild(accept AcceptFunc, handler HandlerFunc) *CallTree
NewChild adds a new child to the current node. The priority of the new child is lower than that of the previous child. Does not thread safe.
type CallbackGame ¶
type CallbackGame struct {
// Score
// New score, must be non-negative
Score int64 `json:"score"`
// UserID
// User identifier
UserID int64 `json:"user_id"`
// ChatID
// Required if inline_message_id is not specified. Unique identifier for the target chat
ChatID *int64 `json:"chat_id,omitempty"`
// DisableEditMessage
// Pass True if the game message should not be automatically edited to include the current
// scoreboard
DisableEditMessage *bool `json:"disable_edit_message,omitempty"`
// Force
// Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes
// or banning cheaters
Force *bool `json:"force,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID *string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the sent message
MessageID *int64 `json:"message_id,omitempty"`
}
CallbackGame A placeholder, currently holds no information. Use BotFather to set up your game.
func (*CallbackGame) GetChatID ¶
func (t *CallbackGame) GetChatID() int64
func (*CallbackGame) GetDisableEditMessage ¶
func (t *CallbackGame) GetDisableEditMessage() bool
func (*CallbackGame) GetForce ¶
func (t *CallbackGame) GetForce() bool
func (*CallbackGame) GetInlineMessageID ¶
func (t *CallbackGame) GetInlineMessageID() string
func (*CallbackGame) GetMessageID ¶
func (t *CallbackGame) GetMessageID() int64
func (*CallbackGame) GetScore ¶
func (t *CallbackGame) GetScore() int64
func (*CallbackGame) GetUserID ¶
func (t *CallbackGame) GetUserID() int64
type CallbackQuery ¶
type CallbackQuery struct {
// ChatInstance
// 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"`
// From
// Sender
From User `json:"from"`
// ID
// Unique identifier for this query
ID string `json:"id"`
// Data
// Data associated with the callback button. Be aware that the message originated the query can
// contain no callback buttons with this data.
Data *string `json:"data,omitempty"`
// GameShortName
// Short name of a Game to be returned, serves as the unique identifier for the game
GameShortName *string `json:"game_short_name,omitempty"`
// InlineMessageID
// Identifier of the message sent via the bot in inline mode, that originated the query.
InlineMessageID *string `json:"inline_message_id,omitempty"`
// Message
// 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"`
}
CallbackQuery 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.
func (*CallbackQuery) GetChatInstance ¶
func (t *CallbackQuery) GetChatInstance() string
func (*CallbackQuery) GetData ¶
func (t *CallbackQuery) GetData() string
func (*CallbackQuery) GetFrom ¶
func (t *CallbackQuery) GetFrom() *User
func (*CallbackQuery) GetGameShortName ¶
func (t *CallbackQuery) GetGameShortName() string
func (*CallbackQuery) GetID ¶
func (t *CallbackQuery) GetID() string
func (*CallbackQuery) GetInlineMessageID ¶
func (t *CallbackQuery) GetInlineMessageID() string
func (*CallbackQuery) GetMessage ¶
func (t *CallbackQuery) GetMessage() *Message
type Chat ¶
type Chat struct {
// ID
// 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 int64 `json:"id"`
// Type
// Type of chat, can be either "private", "group", "supergroup" or "channel"
Type ChatType `json:"type"`
// ActiveUsernames
// 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"`
// Bio
// Bio of the other party in a private chat. Returned only in getChat.
Bio *string `json:"bio,omitempty"`
// CanSetStickerSet
// True, if the bot can change the group sticker set. Returned only in getChat.
CanSetStickerSet *bool `json:"can_set_sticker_set,omitempty"`
// Description
// Description, for groups, supergroups and channel chats. Returned only in getChat.
Description *string `json:"description,omitempty"`
// EmojiStatusCustomEmojiID
// 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"`
// FirstName
// First name of the other party in a private chat
FirstName *string `json:"first_name,omitempty"`
// HasAggressiveAntiSpamEnabled
// 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,omitempty"`
// HasHiddenMembers
// 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,omitempty"`
// HasPrivateForwards
// 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. Returned only in getChat.
HasPrivateForwards *bool `json:"has_private_forwards,omitempty"`
// HasProtectedContent
// True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
HasProtectedContent *bool `json:"has_protected_content,omitempty"`
// HasRestrictedVoiceAndVideoMessages
// True, if the privacy settings of the other party restrict sending voice and video note
// messages in the private chat. Returned only in getChat.
HasRestrictedVoiceAndVideoMessages *bool `json:"has_restricted_voice_and_video_messages,omitempty"`
// InviteLink
// Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
InviteLink *string `json:"invite_link,omitempty"`
// IsForum
// True, if the supergroup chat is a forum (has topics enabled)
IsForum *bool `json:"is_forum,omitempty"`
// JoinByRequest
// 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"`
// JoinToSendMessages
// 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"`
// LastName
// Last name of the other party in a private chat
LastName *string `json:"last_name,omitempty"`
// LinkedChatID
// 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. Returned only in getChat.
LinkedChatID *int64 `json:"linked_chat_id,omitempty"`
// Location
// For supergroups, the location to which the supergroup is connected. Returned only in
// getChat.
Location *ChatLocation `json:"location,omitempty"`
// MessageAutoDeleteTime
// The time after which all messages sent to the chat will be automatically deleted; in
// seconds. Returned only in getChat.
MessageAutoDeleteTime *int64 `json:"message_auto_delete_time,omitempty"`
// Permissions
// Default chat member permissions, for groups and supergroups. Returned only in getChat.
Permissions *ChatPermissions `json:"permissions,omitempty"`
// Photo
// Chat photo. Returned only in getChat.
Photo *ChatPhoto `json:"photo,omitempty"`
// PinnedMessage
// The most recent pinned message (by sending date). Returned only in getChat.
PinnedMessage *Message `json:"pinned_message,omitempty"`
// SlowModeDelay
// For supergroups, the minimum allowed delay between consecutive messages sent by each
// unpriviledged user; in seconds. Returned only in getChat.
SlowModeDelay *int64 `json:"slow_mode_delay,omitempty"`
// StickerSetName
// For supergroups, name of group sticker set. Returned only in getChat.
StickerSetName *string `json:"sticker_set_name,omitempty"`
// Title
// Title, for supergroups, channels and group chats
Title *string `json:"title,omitempty"`
// Username
// Username, for private chats, supergroups and channels if available
Username *string `json:"username,omitempty"`
}
Chat This object represents a chat.
func (*Chat) GetCanSetStickerSet ¶
func (*Chat) GetDescription ¶
func (*Chat) GetEmojiStatusCustomEmojiID ¶
func (*Chat) GetFirstName ¶
func (*Chat) GetHasAggressiveAntiSpamEnabled ¶
func (*Chat) GetHasHiddenMembers ¶
func (*Chat) GetHasPrivateForwards ¶
func (*Chat) GetHasProtectedContent ¶
func (*Chat) GetHasRestrictedVoiceAndVideoMessages ¶
func (*Chat) GetInviteLink ¶
func (*Chat) GetIsForum ¶
func (*Chat) GetJoinByRequest ¶
func (*Chat) GetJoinToSendMessages ¶
func (*Chat) GetLastName ¶
func (*Chat) GetLinkedChatID ¶
func (*Chat) GetLocation ¶
func (t *Chat) GetLocation() *ChatLocation
func (*Chat) GetMessageAutoDeleteTime ¶
func (*Chat) GetPermissions ¶
func (t *Chat) GetPermissions() *ChatPermissions
func (*Chat) GetPinnedMessage ¶
func (*Chat) GetSlowModeDelay ¶
func (*Chat) GetStickerSetName ¶
func (*Chat) GetUsername ¶
type ChatAdministratorRights ¶
type ChatAdministratorRights struct {
// CanChangeInfo
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// CanDeleteMessages
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
// CanInviteUsers
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// CanManageChat
// 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"`
// CanManageVideoChats
// True, if the administrator can manage video chats
CanManageVideoChats bool `json:"can_manage_video_chats"`
// CanPromoteMembers
// True, if the administrator can add new administrators with a subset of their own privileges
// or demote administrators that they have promoted, directly or indirectly (promoted by
// administrators that were appointed by the user)
CanPromoteMembers bool `json:"can_promote_members"`
// CanRestrictMembers
// True, if the administrator can restrict, ban or unban chat members
CanRestrictMembers bool `json:"can_restrict_members"`
// IsAnonymous
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// CanEditMessages
// True, if the administrator can edit messages of other users and can pin messages; channels
// only
CanEditMessages *bool `json:"can_edit_messages,omitempty"`
// CanManageTopics
// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups
// only
CanManageTopics *bool `json:"can_manage_topics,omitempty"`
// CanPinMessages
// True, if the user is allowed to pin messages; groups and supergroups only
CanPinMessages *bool `json:"can_pin_messages,omitempty"`
// CanPostMessages
// True, if the administrator can post in the channel; channels only
CanPostMessages *bool `json:"can_post_messages,omitempty"`
}
ChatAdministratorRights Represents the rights of an administrator in a chat.
func (*ChatAdministratorRights) GetCanChangeInfo ¶
func (t *ChatAdministratorRights) GetCanChangeInfo() bool
func (*ChatAdministratorRights) GetCanDeleteMessages ¶
func (t *ChatAdministratorRights) GetCanDeleteMessages() bool
func (*ChatAdministratorRights) GetCanEditMessages ¶
func (t *ChatAdministratorRights) GetCanEditMessages() bool
func (*ChatAdministratorRights) GetCanInviteUsers ¶
func (t *ChatAdministratorRights) GetCanInviteUsers() bool
func (*ChatAdministratorRights) GetCanManageChat ¶
func (t *ChatAdministratorRights) GetCanManageChat() bool
func (*ChatAdministratorRights) GetCanManageTopics ¶
func (t *ChatAdministratorRights) GetCanManageTopics() bool
func (*ChatAdministratorRights) GetCanManageVideoChats ¶
func (t *ChatAdministratorRights) GetCanManageVideoChats() bool
func (*ChatAdministratorRights) GetCanPinMessages ¶
func (t *ChatAdministratorRights) GetCanPinMessages() bool
func (*ChatAdministratorRights) GetCanPostMessages ¶
func (t *ChatAdministratorRights) GetCanPostMessages() bool
func (*ChatAdministratorRights) GetCanPromoteMembers ¶
func (t *ChatAdministratorRights) GetCanPromoteMembers() bool
func (*ChatAdministratorRights) GetCanRestrictMembers ¶
func (t *ChatAdministratorRights) GetCanRestrictMembers() bool
func (*ChatAdministratorRights) GetIsAnonymous ¶
func (t *ChatAdministratorRights) GetIsAnonymous() bool
type ChatInviteLink ¶
type ChatInviteLink struct {
// CreatesJoinRequest
// True, if users joining the chat via the link need to be approved by chat administrators
CreatesJoinRequest bool `json:"creates_join_request"`
// Creator
// Creator of the link
Creator User `json:"creator"`
// InviteLink
// 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"`
// IsPrimary
// True, if the link is primary
IsPrimary bool `json:"is_primary"`
// IsRevoked
// True, if the link is revoked
IsRevoked bool `json:"is_revoked"`
// ExpireDate
// Point in time (Unix timestamp) when the link will expire or has been expired
ExpireDate *int64 `json:"expire_date,omitempty"`
// MemberLimit
// The maximum number of users that can be members of the chat simultaneously after joining the
// chat via this invite link; 1-99999
MemberLimit *int64 `json:"member_limit,omitempty"`
// Name
// Invite link name
Name *string `json:"name,omitempty"`
// PendingJoinRequestCount
// Number of pending join requests created using this link
PendingJoinRequestCount *int64 `json:"pending_join_request_count,omitempty"`
}
ChatInviteLink Represents an invite link for a chat.
func (*ChatInviteLink) GetCreatesJoinRequest ¶
func (t *ChatInviteLink) GetCreatesJoinRequest() bool
func (*ChatInviteLink) GetCreator ¶
func (t *ChatInviteLink) GetCreator() *User
func (*ChatInviteLink) GetExpireDate ¶
func (t *ChatInviteLink) GetExpireDate() int64
func (*ChatInviteLink) GetInviteLink ¶
func (t *ChatInviteLink) GetInviteLink() string
func (*ChatInviteLink) GetIsPrimary ¶
func (t *ChatInviteLink) GetIsPrimary() bool
func (*ChatInviteLink) GetIsRevoked ¶
func (t *ChatInviteLink) GetIsRevoked() bool
func (*ChatInviteLink) GetMemberLimit ¶
func (t *ChatInviteLink) GetMemberLimit() int64
func (*ChatInviteLink) GetName ¶
func (t *ChatInviteLink) GetName() string
func (*ChatInviteLink) GetPendingJoinRequestCount ¶
func (t *ChatInviteLink) GetPendingJoinRequestCount() int64
type ChatJoinRequest ¶
type ChatJoinRequest struct {
// Chat
// Chat to which the request was sent
Chat Chat `json:"chat"`
// Date
// Date the request was sent in Unix time
Date int64 `json:"date"`
// From
// User that sent the join request
From User `json:"from"`
// UserChatID
// 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"`
// Bio
// Bio of the user.
Bio *string `json:"bio,omitempty"`
// InviteLink
// Chat invite link that was used by the user to send the join request
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
}
ChatJoinRequest Represents a join request sent to a chat.
func (*ChatJoinRequest) GetBio ¶
func (t *ChatJoinRequest) GetBio() string
func (*ChatJoinRequest) GetChat ¶
func (t *ChatJoinRequest) GetChat() *Chat
func (*ChatJoinRequest) GetDate ¶
func (t *ChatJoinRequest) GetDate() int64
func (*ChatJoinRequest) GetFrom ¶
func (t *ChatJoinRequest) GetFrom() *User
func (*ChatJoinRequest) GetInviteLink ¶
func (t *ChatJoinRequest) GetInviteLink() *ChatInviteLink
func (*ChatJoinRequest) GetUserChatID ¶
func (t *ChatJoinRequest) GetUserChatID() int64
type ChatLocation ¶
type ChatLocation struct {
// Address
// Location address; 1-64 characters, as defined by the chat owner
Address string `json:"address"`
// Location
// The location to which the supergroup is connected. Can't be a live location.
Location Location `json:"location"`
}
ChatLocation Represents a location to which a chat is connected.
func (*ChatLocation) GetAddress ¶
func (t *ChatLocation) GetAddress() string
func (*ChatLocation) GetLocation ¶
func (t *ChatLocation) GetLocation() *Location
type ChatMember ¶
type ChatMember struct {
// IsAnonymous
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// Status
// The member's status in the chat, always "creator"
Status string `json:"status"`
// User
// Information about the user
User User `json:"user"`
// CustomTitle
// Custom title for this user
CustomTitle *string `json:"custom_title,omitempty"`
}
ChatMember This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
func (*ChatMember) GetCustomTitle ¶
func (t *ChatMember) GetCustomTitle() string
func (*ChatMember) GetIsAnonymous ¶
func (t *ChatMember) GetIsAnonymous() bool
func (*ChatMember) GetStatus ¶
func (t *ChatMember) GetStatus() string
func (*ChatMember) GetUser ¶
func (t *ChatMember) GetUser() *User
type ChatMemberAdministrator ¶
type ChatMemberAdministrator struct {
// CanBeEdited
// True, if the bot is allowed to edit administrator privileges of that user
CanBeEdited bool `json:"can_be_edited"`
// CanChangeInfo
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// CanDeleteMessages
// True, if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages"`
// CanInviteUsers
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// CanManageChat
// 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"`
// CanManageVideoChats
// True, if the administrator can manage video chats
CanManageVideoChats bool `json:"can_manage_video_chats"`
// CanPromoteMembers
// True, if the administrator can add new administrators with a subset of their own privileges
// or demote administrators that they have promoted, directly or indirectly (promoted by
// administrators that were appointed by the user)
CanPromoteMembers bool `json:"can_promote_members"`
// CanRestrictMembers
// True, if the administrator can restrict, ban or unban chat members
CanRestrictMembers bool `json:"can_restrict_members"`
// IsAnonymous
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// Status
// The member's status in the chat, always "administrator"
Status string `json:"status"`
// User
// Information about the user
User User `json:"user"`
// CanEditMessages
// True, if the administrator can edit messages of other users and can pin messages; channels
// only
CanEditMessages *bool `json:"can_edit_messages,omitempty"`
// CanManageTopics
// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups
// only
CanManageTopics *bool `json:"can_manage_topics,omitempty"`
// CanPinMessages
// True, if the user is allowed to pin messages; groups and supergroups only
CanPinMessages *bool `json:"can_pin_messages,omitempty"`
// CanPostMessages
// True, if the administrator can post in the channel; channels only
CanPostMessages *bool `json:"can_post_messages,omitempty"`
// CustomTitle
// Custom title for this user
CustomTitle *string `json:"custom_title,omitempty"`
}
ChatMemberAdministrator Represents a chat member that has some additional privileges.
func (*ChatMemberAdministrator) GetCanBeEdited ¶
func (t *ChatMemberAdministrator) GetCanBeEdited() bool
func (*ChatMemberAdministrator) GetCanChangeInfo ¶
func (t *ChatMemberAdministrator) GetCanChangeInfo() bool
func (*ChatMemberAdministrator) GetCanDeleteMessages ¶
func (t *ChatMemberAdministrator) GetCanDeleteMessages() bool
func (*ChatMemberAdministrator) GetCanEditMessages ¶
func (t *ChatMemberAdministrator) GetCanEditMessages() bool
func (*ChatMemberAdministrator) GetCanInviteUsers ¶
func (t *ChatMemberAdministrator) GetCanInviteUsers() bool
func (*ChatMemberAdministrator) GetCanManageChat ¶
func (t *ChatMemberAdministrator) GetCanManageChat() bool
func (*ChatMemberAdministrator) GetCanManageTopics ¶
func (t *ChatMemberAdministrator) GetCanManageTopics() bool
func (*ChatMemberAdministrator) GetCanManageVideoChats ¶
func (t *ChatMemberAdministrator) GetCanManageVideoChats() bool
func (*ChatMemberAdministrator) GetCanPinMessages ¶
func (t *ChatMemberAdministrator) GetCanPinMessages() bool
func (*ChatMemberAdministrator) GetCanPostMessages ¶
func (t *ChatMemberAdministrator) GetCanPostMessages() bool
func (*ChatMemberAdministrator) GetCanPromoteMembers ¶
func (t *ChatMemberAdministrator) GetCanPromoteMembers() bool
func (*ChatMemberAdministrator) GetCanRestrictMembers ¶
func (t *ChatMemberAdministrator) GetCanRestrictMembers() bool
func (*ChatMemberAdministrator) GetCustomTitle ¶
func (t *ChatMemberAdministrator) GetCustomTitle() string
func (*ChatMemberAdministrator) GetIsAnonymous ¶
func (t *ChatMemberAdministrator) GetIsAnonymous() bool
func (*ChatMemberAdministrator) GetStatus ¶
func (t *ChatMemberAdministrator) GetStatus() string
func (*ChatMemberAdministrator) GetUser ¶
func (t *ChatMemberAdministrator) GetUser() *User
type ChatMemberBanned ¶
type ChatMemberBanned struct {
// Status
// The member's status in the chat, always "kicked"
Status string `json:"status"`
// UntilDate
// Date when restrictions will be lifted for this user; unix time. If 0, then the user is
// banned forever
UntilDate int64 `json:"until_date"`
// User
// Information about the user
User User `json:"user"`
}
ChatMemberBanned Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
func (*ChatMemberBanned) GetStatus ¶
func (t *ChatMemberBanned) GetStatus() string
func (*ChatMemberBanned) GetUntilDate ¶
func (t *ChatMemberBanned) GetUntilDate() int64
func (*ChatMemberBanned) GetUser ¶
func (t *ChatMemberBanned) GetUser() *User
type ChatMemberLeft ¶
type ChatMemberLeft struct {
// Status
// The member's status in the chat, always "left"
Status string `json:"status"`
// User
// Information about the user
User User `json:"user"`
}
ChatMemberLeft Represents a chat member that isn't currently a member of the chat, but may join it themselves.
func (*ChatMemberLeft) GetStatus ¶
func (t *ChatMemberLeft) GetStatus() string
func (*ChatMemberLeft) GetUser ¶
func (t *ChatMemberLeft) GetUser() *User
type ChatMemberMember ¶
type ChatMemberMember struct {
// Status
// The member's status in the chat, always "member"
Status string `json:"status"`
// User
// Information about the user
User User `json:"user"`
}
ChatMemberMember Represents a chat member that has no additional privileges or restrictions.
func (*ChatMemberMember) GetStatus ¶
func (t *ChatMemberMember) GetStatus() string
func (*ChatMemberMember) GetUser ¶
func (t *ChatMemberMember) GetUser() *User
type ChatMemberOwner ¶
type ChatMemberOwner struct {
// IsAnonymous
// True, if the user's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous"`
// Status
// The member's status in the chat, always "creator"
Status string `json:"status"`
// User
// Information about the user
User User `json:"user"`
// CustomTitle
// Custom title for this user
CustomTitle *string `json:"custom_title,omitempty"`
}
ChatMemberOwner Represents a chat member that owns the chat and has all administrator privileges.
func (*ChatMemberOwner) GetCustomTitle ¶
func (t *ChatMemberOwner) GetCustomTitle() string
func (*ChatMemberOwner) GetIsAnonymous ¶
func (t *ChatMemberOwner) GetIsAnonymous() bool
func (*ChatMemberOwner) GetStatus ¶
func (t *ChatMemberOwner) GetStatus() string
func (*ChatMemberOwner) GetUser ¶
func (t *ChatMemberOwner) GetUser() *User
type ChatMemberRestricted ¶
type ChatMemberRestricted struct {
// CanAddWebPagePreviews
// True, if the user is allowed to add web page previews to their messages
CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
// CanChangeInfo
// True, if the user is allowed to change the chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info"`
// CanInviteUsers
// True, if the user is allowed to invite new users to the chat
CanInviteUsers bool `json:"can_invite_users"`
// CanManageTopics
// True, if the user is allowed to create forum topics
CanManageTopics bool `json:"can_manage_topics"`
// CanPinMessages
// True, if the user is allowed to pin messages
CanPinMessages bool `json:"can_pin_messages"`
// CanSendAudios
// True, if the user is allowed to send audios
CanSendAudios bool `json:"can_send_audios"`
// CanSendDocuments
// True, if the user is allowed to send documents
CanSendDocuments bool `json:"can_send_documents"`
// CanSendMessages
// True, if the user is allowed to send text messages, contacts, invoices, locations and venues
CanSendMessages bool `json:"can_send_messages"`
// CanSendOtherMessages
// True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages bool `json:"can_send_other_messages"`
// CanSendPhotos
// True, if the user is allowed to send photos
CanSendPhotos bool `json:"can_send_photos"`
// CanSendPolls
// True, if the user is allowed to send polls
CanSendPolls bool `json:"can_send_polls"`
// CanSendVideoNotes
// True, if the user is allowed to send video notes
CanSendVideoNotes bool `json:"can_send_video_notes"`
// CanSendVideos
// True, if the user is allowed to send videos
CanSendVideos bool `json:"can_send_videos"`
// CanSendVoiceNotes
// True, if the user is allowed to send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
// IsMember
// True, if the user is a member of the chat at the moment of the request
IsMember bool `json:"is_member"`
// Status
// The member's status in the chat, always "restricted"
Status string `json:"status"`
// UntilDate
// Date when restrictions will be lifted for this user; unix time. If 0, then the user is
// restricted forever
UntilDate int64 `json:"until_date"`
// User
// Information about the user
User User `json:"user"`
}
ChatMemberRestricted Represents a chat member that is under certain restrictions in the chat. Supergroups only.
func (*ChatMemberRestricted) GetCanAddWebPagePreviews ¶
func (t *ChatMemberRestricted) GetCanAddWebPagePreviews() bool
func (*ChatMemberRestricted) GetCanChangeInfo ¶
func (t *ChatMemberRestricted) GetCanChangeInfo() bool
func (*ChatMemberRestricted) GetCanInviteUsers ¶
func (t *ChatMemberRestricted) GetCanInviteUsers() bool
func (*ChatMemberRestricted) GetCanManageTopics ¶
func (t *ChatMemberRestricted) GetCanManageTopics() bool
func (*ChatMemberRestricted) GetCanPinMessages ¶
func (t *ChatMemberRestricted) GetCanPinMessages() bool
func (*ChatMemberRestricted) GetCanSendAudios ¶
func (t *ChatMemberRestricted) GetCanSendAudios() bool
func (*ChatMemberRestricted) GetCanSendDocuments ¶
func (t *ChatMemberRestricted) GetCanSendDocuments() bool
func (*ChatMemberRestricted) GetCanSendMessages ¶
func (t *ChatMemberRestricted) GetCanSendMessages() bool
func (*ChatMemberRestricted) GetCanSendOtherMessages ¶
func (t *ChatMemberRestricted) GetCanSendOtherMessages() bool
func (*ChatMemberRestricted) GetCanSendPhotos ¶
func (t *ChatMemberRestricted) GetCanSendPhotos() bool
func (*ChatMemberRestricted) GetCanSendPolls ¶
func (t *ChatMemberRestricted) GetCanSendPolls() bool
func (*ChatMemberRestricted) GetCanSendVideoNotes ¶
func (t *ChatMemberRestricted) GetCanSendVideoNotes() bool
func (*ChatMemberRestricted) GetCanSendVideos ¶
func (t *ChatMemberRestricted) GetCanSendVideos() bool
func (*ChatMemberRestricted) GetCanSendVoiceNotes ¶
func (t *ChatMemberRestricted) GetCanSendVoiceNotes() bool
func (*ChatMemberRestricted) GetIsMember ¶
func (t *ChatMemberRestricted) GetIsMember() bool
func (*ChatMemberRestricted) GetStatus ¶
func (t *ChatMemberRestricted) GetStatus() string
func (*ChatMemberRestricted) GetUntilDate ¶
func (t *ChatMemberRestricted) GetUntilDate() int64
func (*ChatMemberRestricted) GetUser ¶
func (t *ChatMemberRestricted) GetUser() *User
type ChatMemberUpdated ¶
type ChatMemberUpdated struct {
// Chat
// Chat the user belongs to
Chat Chat `json:"chat"`
// Date
// Date the change was done in Unix time
Date int64 `json:"date"`
// From
// Performer of the action, which resulted in the change
From User `json:"from"`
// NewChatMember
// New information about the chat member
NewChatMember ChatMember `json:"new_chat_member"`
// OldChatMember
// Previous information about the chat member
OldChatMember ChatMember `json:"old_chat_member"`
// InviteLink
// 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"`
// ViaChatFolderInviteLink
// True, if the user joined the chat via a chat folder invite link
ViaChatFolderInviteLink *bool `json:"via_chat_folder_invite_link,omitempty"`
}
ChatMemberUpdated This object represents changes in the status of a chat member.
func (*ChatMemberUpdated) GetChat ¶
func (t *ChatMemberUpdated) GetChat() *Chat
func (*ChatMemberUpdated) GetDate ¶
func (t *ChatMemberUpdated) GetDate() int64
func (*ChatMemberUpdated) GetFrom ¶
func (t *ChatMemberUpdated) GetFrom() *User
func (*ChatMemberUpdated) GetInviteLink ¶
func (t *ChatMemberUpdated) GetInviteLink() *ChatInviteLink
func (*ChatMemberUpdated) GetNewChatMember ¶
func (t *ChatMemberUpdated) GetNewChatMember() *ChatMember
func (*ChatMemberUpdated) GetOldChatMember ¶
func (t *ChatMemberUpdated) GetOldChatMember() *ChatMember
func (*ChatMemberUpdated) GetViaChatFolderInviteLink ¶
func (t *ChatMemberUpdated) GetViaChatFolderInviteLink() bool
type ChatPermissions ¶
type ChatPermissions struct {
// CanAddWebPagePreviews
// True, if the user is allowed to add web page previews to their messages
CanAddWebPagePreviews *bool `json:"can_add_web_page_previews,omitempty"`
// CanChangeInfo
// 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"`
// CanInviteUsers
// True, if the user is allowed to invite new users to the chat
CanInviteUsers *bool `json:"can_invite_users,omitempty"`
// CanManageTopics
// True, if the user is allowed to create forum topics. If omitted defaults to the value of
// can_pin_messages
CanManageTopics *bool `json:"can_manage_topics,omitempty"`
// CanPinMessages
// True, if the user is allowed to pin messages. Ignored in public supergroups
CanPinMessages *bool `json:"can_pin_messages,omitempty"`
// CanSendAudios
// True, if the user is allowed to send audios
CanSendAudios *bool `json:"can_send_audios,omitempty"`
// CanSendDocuments
// True, if the user is allowed to send documents
CanSendDocuments *bool `json:"can_send_documents,omitempty"`
// CanSendMessages
// True, if the user is allowed to send text messages, contacts, invoices, locations and venues
CanSendMessages *bool `json:"can_send_messages,omitempty"`
// CanSendOtherMessages
// True, if the user is allowed to send animations, games, stickers and use inline bots
CanSendOtherMessages *bool `json:"can_send_other_messages,omitempty"`
// CanSendPhotos
// True, if the user is allowed to send photos
CanSendPhotos *bool `json:"can_send_photos,omitempty"`
// CanSendPolls
// True, if the user is allowed to send polls
CanSendPolls *bool `json:"can_send_polls,omitempty"`
// CanSendVideoNotes
// True, if the user is allowed to send video notes
CanSendVideoNotes *bool `json:"can_send_video_notes,omitempty"`
// CanSendVideos
// True, if the user is allowed to send videos
CanSendVideos *bool `json:"can_send_videos,omitempty"`
// CanSendVoiceNotes
// True, if the user is allowed to send voice notes
CanSendVoiceNotes *bool `json:"can_send_voice_notes,omitempty"`
}
ChatPermissions Describes actions that a non-administrator user is allowed to take in a chat.
func (*ChatPermissions) GetCanAddWebPagePreviews ¶
func (t *ChatPermissions) GetCanAddWebPagePreviews() bool
func (*ChatPermissions) GetCanChangeInfo ¶
func (t *ChatPermissions) GetCanChangeInfo() bool
func (*ChatPermissions) GetCanInviteUsers ¶
func (t *ChatPermissions) GetCanInviteUsers() bool
func (*ChatPermissions) GetCanManageTopics ¶
func (t *ChatPermissions) GetCanManageTopics() bool
func (*ChatPermissions) GetCanPinMessages ¶
func (t *ChatPermissions) GetCanPinMessages() bool
func (*ChatPermissions) GetCanSendAudios ¶
func (t *ChatPermissions) GetCanSendAudios() bool
func (*ChatPermissions) GetCanSendDocuments ¶
func (t *ChatPermissions) GetCanSendDocuments() bool
func (*ChatPermissions) GetCanSendMessages ¶
func (t *ChatPermissions) GetCanSendMessages() bool
func (*ChatPermissions) GetCanSendOtherMessages ¶
func (t *ChatPermissions) GetCanSendOtherMessages() bool
func (*ChatPermissions) GetCanSendPhotos ¶
func (t *ChatPermissions) GetCanSendPhotos() bool
func (*ChatPermissions) GetCanSendPolls ¶
func (t *ChatPermissions) GetCanSendPolls() bool
func (*ChatPermissions) GetCanSendVideoNotes ¶
func (t *ChatPermissions) GetCanSendVideoNotes() bool
func (*ChatPermissions) GetCanSendVideos ¶
func (t *ChatPermissions) GetCanSendVideos() bool
func (*ChatPermissions) GetCanSendVoiceNotes ¶
func (t *ChatPermissions) GetCanSendVoiceNotes() bool
type ChatPhoto ¶
type ChatPhoto struct {
// BigFileID
// 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"`
// BigFileUniqueID
// 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"`
// SmallFileID
// 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"`
// SmallFileUniqueID
// 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"`
}
ChatPhoto This object represents a chat photo.
func (*ChatPhoto) GetBigFileID ¶
func (*ChatPhoto) GetBigFileUniqueID ¶
func (*ChatPhoto) GetSmallFileID ¶
func (*ChatPhoto) GetSmallFileUniqueID ¶
type ChatShared ¶
type ChatShared struct {
// Identifier of the shared 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 64-bit integer or double-precision float type are safe for
// storing this identifier. The bot may not have access to the chat and could be unable to use
// this identifier, unless the chat is already known to the bot by some other means.
ChatID int64 `json:"chat_id"`
// Identifier of the request
RequestID int64 `json:"request_id"`
}
ChatShared This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.
func (*ChatShared) GetChatID ¶
func (t *ChatShared) GetChatID() int64
func (*ChatShared) GetRequestID ¶
func (t *ChatShared) GetRequestID() int64
type ChatType ¶
type ChatType int
const ( ChatTypeChannel ChatType ChatTypeGroup ChatTypePrivate ChatTypeSupergroup )
func (ChatType) MarshalText ¶
func (*ChatType) UnmarshalText ¶
type ChosenInlineResult ¶
type ChosenInlineResult struct {
// From
// The user that chose the result
From User `json:"from"`
// Query
// The query that was used to obtain the result
Query string `json:"query"`
// ResultID
// The unique identifier for the result that was chosen
ResultID string `json:"result_id"`
// InlineMessageID
// 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"`
// Location
// Sender location, only for bots that require user location
Location *Location `json:"location,omitempty"`
}
ChosenInlineResult Represents a result of an inline query that was chosen by the user and sent to their chat partner.
func (*ChosenInlineResult) GetFrom ¶
func (t *ChosenInlineResult) GetFrom() *User
func (*ChosenInlineResult) GetInlineMessageID ¶
func (t *ChosenInlineResult) GetInlineMessageID() string
func (*ChosenInlineResult) GetLocation ¶
func (t *ChosenInlineResult) GetLocation() *Location
func (*ChosenInlineResult) GetQuery ¶
func (t *ChosenInlineResult) GetQuery() string
func (*ChosenInlineResult) GetResultID ¶
func (t *ChosenInlineResult) GetResultID() string
type Contact ¶
type Contact struct {
// FirstName
// Contact's first name
FirstName string `json:"first_name"`
// PhoneNumber
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// LastName
// Contact's last name
LastName *string `json:"last_name,omitempty"`
// UserID
// Contact's user identifier in Telegram. 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.
UserID *int64 `json:"user_id,omitempty"`
// Vcard
// Additional data about the contact in the form of a vCard
Vcard *string `json:"vcard,omitempty"`
}
Contact This object represents a phone contact.
func (*Contact) GetFirstName ¶
func (*Contact) GetLastName ¶
func (*Contact) GetPhoneNumber ¶
type Conversation ¶
type Conversation struct {
// contains filtered or unexported fields
}
func NewConversation ¶
func NewConversation(cache *ttlcache.Cache) *Conversation
func (*Conversation) AddChoices ¶
func (c *Conversation) AddChoices(state ConversationState, choices ...Choice)
AddChoices to conversation list with given state. unsafe to use after starting a conversation.
func (*Conversation) AddUser ¶
func (c *Conversation) AddUser(userID int64, state ConversationState)
func (*Conversation) CheckUser ¶
func (c *Conversation) CheckUser(userID int64) bool
func (*Conversation) GetUserState ¶
func (c *Conversation) GetUserState(userID int64) (ConversationState, bool)
func (*Conversation) Handle ¶
func (c *Conversation) Handle(ctx context.Context, msg *Message) (ConversationState, error)
func (*Conversation) RemoveUser ¶
func (c *Conversation) RemoveUser(userID int64)
func (*Conversation) Stop ¶
func (c *Conversation) Stop()
type ConversationState ¶
type ConversationState int
type CopyMessageConfig ¶
type CopyMessageConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// FromChatID
// Unique identifier for the chat where the original message was sent (or channel username in
// the format @channelusername)
FromChatID IntStr `json:"from_chat_id"`
// MessageID
// Message identifier in the chat specified in from_chat_id
MessageID int64 `json:"message_id"`
// AllowSendingWithoutReply
// 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"`
// Caption
// New caption for media, 0-1024 characters after entities parsing. If not specified, the
// original caption is kept
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the new caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
CopyMessage Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
type CreateChatInviteLinkConfig ¶
type CreateChatInviteLinkConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// CreatesJoinRequest
// True, if users joining the chat via the link need to be approved by chat administrators. If
// True, member_limit can't be specified
CreatesJoinRequest bool `json:"creates_join_request,omitempty"`
// ExpireDate
// Point in time (Unix timestamp) when the link will expire
ExpireDate int64 `json:"expire_date,omitempty"`
// MemberLimit
// The maximum number of users that can be members of the chat simultaneously after joining the
// chat via this invite link; 1-99999
MemberLimit int64 `json:"member_limit,omitempty"`
// Name
// Invite link name; 0-32 characters
Name string `json:"name,omitempty"`
}
CreateChatInviteLink Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
type CreateForumTopicConfig ¶
type CreateForumTopicConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Name
// Topic name, 1-128 characters
Name string `json:"name"`
// IconColor
// Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0),
// 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or
// 16478047 (0xFB6F5F)
IconColor int64 `json:"icon_color,omitempty"`
// IconCustomEmojiID
// Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers
// to get all allowed custom emoji identifiers.
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}
CreateForumTopic Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
type CreateInvoiceLinkConfig ¶
type CreateInvoiceLinkConfig struct {
// Currency
// Three-letter ISO 4217 currency code, see more on currencies
Currency string `json:"currency"`
// Description
// Product description, 1-255 characters
Description string `json:"description"`
// Payload
// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for
// your internal processes.
Payload string `json:"payload"`
// Prices
// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount,
// delivery cost, delivery tax, bonus, etc.)
Prices []LabeledPrice `json:"prices"`
// ProviderToken
// Payment provider token, obtained via BotFather
ProviderToken string `json:"provider_token"`
// Title
// Product name, 1-32 characters
Title string `json:"title"`
// IsFlexible
// Pass True if the final price depends on the shipping method
IsFlexible bool `json:"is_flexible,omitempty"`
// MaxTipAmount
// 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 int64 `json:"max_tip_amount,omitempty"`
// NeedEmail
// Pass True if you require the user's email address to complete the order
NeedEmail bool `json:"need_email,omitempty"`
// NeedName
// Pass True if you require the user's full name to complete the order
NeedName bool `json:"need_name,omitempty"`
// NeedPhoneNumber
// Pass True if you require the user's phone number to complete the order
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
// NeedShippingAddress
// Pass True if you require the user's shipping address to complete the order
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
// PhotoHeight
// Photo height
PhotoHeight int64 `json:"photo_height,omitempty"`
// PhotoSize
// Photo size in bytes
PhotoSize int64 `json:"photo_size,omitempty"`
// PhotoURL
// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image
// for a service.
PhotoURL string `json:"photo_url,omitempty"`
// PhotoWidth
// Photo width
PhotoWidth int64 `json:"photo_width,omitempty"`
// ProviderData
// JSON-serialized data about the invoice, which will be shared with the payment provider. A
// detailed description of required fields should be provided by the payment provider.
ProviderData string `json:"provider_data,omitempty"`
// SendEmailToProvider
// Pass True if the user's email address should be sent to the provider
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
// SendPhoneNumberToProvider
// Pass True if the user's phone number should be sent to the provider
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
// SuggestedTipAmounts
// A JSON-serialized array of suggested amounts of tips 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 []int64 `json:"suggested_tip_amounts,omitempty"`
}
CreateInvoiceLink Use this method to create a link for an invoice. Returns the created invoice link as String on success.
type CreateNewStickerSetConfig ¶
type CreateNewStickerSetConfig struct {
// Name
// Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain
// only English letters, digits and underscores. Must begin with a letter, can't contain
// consecutive underscores and must end in "_by_<bot_username>". <bot_username> is case
// insensitive. 1-64 characters.
Name string `json:"name"`
// StickerFormat
// Format of stickers in the set, must be one of "static", "animated", "video"
StickerFormat string `json:"sticker_format"`
// Stickers
// A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
Stickers []InputSticker `json:"stickers"`
// Title
// Sticker set title, 1-64 characters
Title string `json:"title"`
// UserID
// User identifier of created sticker set owner
UserID int64 `json:"user_id"`
// NeedsRepainting
// Pass True if stickers in the sticker set must be repainted to the color of text when used in
// messages, the accent color if used as emoji status, white on chat photos, or another
// appropriate color based on context; for custom emoji sticker sets only
NeedsRepainting bool `json:"needs_repainting,omitempty"`
// StickerType
// Type of stickers in the set, pass "regular", "mask", or "custom_emoji". By default, a
// regular sticker set is created.
StickerType string `json:"sticker_type,omitempty"`
}
CreateNewStickerSet Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.
type Dice ¶
type Dice struct {
// Emoji
// Emoji on which the dice throw animation is based
Emoji string `json:"emoji"`
// Value
// Value of the dice, 1-6 for "", "" and "" base emoji, 1-5 for "" and "" base emoji, 1-64 for
// "" base emoji
Value int64 `json:"value"`
}
Dice This object represents an animated emoji that displays a random value.
type Document ¶
type Document struct {
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// FileName
// Original filename as defined by sender
FileName *string `json:"file_name,omitempty"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
// MimeType
// MIME type of the file as defined by sender
MimeType *string `json:"mime_type,omitempty"`
// Thumbnail
// Document thumbnail as defined by sender
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
Document This object represents a general file (as opposed to photos, voice messages and audio files).
func (*Document) GetFileName ¶
func (*Document) GetFileSize ¶
func (*Document) GetFileUniqueID ¶
func (*Document) GetMimeType ¶
func (*Document) GetThumbnail ¶
type EditChatInviteLinkConfig ¶
type EditChatInviteLinkConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// InviteLink
// The invite link to edit
InviteLink string `json:"invite_link"`
// CreatesJoinRequest
// True, if users joining the chat via the link need to be approved by chat administrators. If
// True, member_limit can't be specified
CreatesJoinRequest bool `json:"creates_join_request,omitempty"`
// ExpireDate
// Point in time (Unix timestamp) when the link will expire
ExpireDate int64 `json:"expire_date,omitempty"`
// MemberLimit
// The maximum number of users that can be members of the chat simultaneously after joining the
// chat via this invite link; 1-99999
MemberLimit int64 `json:"member_limit,omitempty"`
// Name
// Invite link name; 0-32 characters
Name string `json:"name,omitempty"`
}
EditChatInviteLink Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
type EditForumTopicConfig ¶
type EditForumTopicConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// MessageThreadID
// Unique identifier for the target message thread of the forum topic
MessageThreadID int64 `json:"message_thread_id"`
// IconCustomEmojiID
// New unique identifier of the custom emoji shown as the topic icon. Use
// getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string
// to remove the icon. If not specified, the current icon will be kept
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
// Name
// New topic name, 0-128 characters. If not specified or empty, the current name of the topic
// will be kept
Name string `json:"name,omitempty"`
}
EditForumTopic Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
type EditMessageCaptionConfig ¶
type EditMessageCaptionConfig struct {
// Caption
// New caption of the message, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message to edit
MessageID int64 `json:"message_id,omitempty"`
// ParseMode
// Mode for parsing entities in the message caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditMessageCaption Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
type EditMessageLiveLocationConfig ¶
type EditMessageLiveLocationConfig struct {
// Latitude
// Latitude of new location
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of new location
Longitude float64 `json:"longitude"`
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// Heading
// Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
Heading int64 `json:"heading,omitempty"`
// HorizontalAccuracy
// The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message to edit
MessageID int64 `json:"message_id,omitempty"`
// ProximityAlertRadius
// The maximum distance for proximity alerts about approaching another chat member, in meters.
// Must be between 1 and 100000 if specified.
ProximityAlertRadius int64 `json:"proximity_alert_radius,omitempty"`
// ReplyMarkup
// A JSON-serialized object for a new inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditMessageLiveLocation Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
type EditMessageMediaConfig ¶
type EditMessageMediaConfig struct {
// Media
// A JSON-serialized object for a new media content of the message
Media InputMedia `json:"media"`
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message to edit
MessageID int64 `json:"message_id,omitempty"`
// ReplyMarkup
// A JSON-serialized object for a new inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditMessageMedia Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
type EditMessageReplyMarkupConfig ¶
type EditMessageReplyMarkupConfig struct {
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message to edit
MessageID int64 `json:"message_id,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditMessageReplyMarkup Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
type EditMessageTextConfig ¶
type EditMessageTextConfig struct {
// Text
// New text of the message, 1-4096 characters after entities parsing
Text string `json:"text"`
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// DisableWebPagePreview
// Disables link previews for links in this message
DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"`
// Entities
// 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"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message to edit
MessageID int64 `json:"message_id,omitempty"`
// ParseMode
// Mode for parsing entities in the message text. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
EditMessageText Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
type EncryptedCredentials ¶
type EncryptedCredentials struct {
// Data
// 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"`
// Hash
// Base64-encoded data hash for data authentication
Hash string `json:"hash"`
// Secret
// Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
Secret string `json:"secret"`
}
EncryptedCredentials Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
func (*EncryptedCredentials) GetData ¶
func (t *EncryptedCredentials) GetData() string
func (*EncryptedCredentials) GetHash ¶
func (t *EncryptedCredentials) GetHash() string
func (*EncryptedCredentials) GetSecret ¶
func (t *EncryptedCredentials) GetSecret() string
type EncryptedPassportElement ¶
type EncryptedPassportElement struct {
// Hash
// Base64-encoded element hash for using in PassportElementErrorUnspecified
Hash string `json:"hash"`
// Type
// 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 EncryptedType `json:"type"`
// Data
// 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"`
// Email
// User's verified email address, available only for "email" type
Email *string `json:"email,omitempty"`
// Files
// 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"`
// FrontSide
// 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"`
// PhoneNumber
// User's verified phone number, available only for "phone_number" type
PhoneNumber *string `json:"phone_number,omitempty"`
// ReverseSide
// 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"`
// Selfie
// 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"`
// Translation
// 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"`
}
EncryptedPassportElement Describes documents or other Telegram Passport elements shared with the bot by the user.
func (*EncryptedPassportElement) GetData ¶
func (t *EncryptedPassportElement) GetData() string
func (*EncryptedPassportElement) GetEmail ¶
func (t *EncryptedPassportElement) GetEmail() string
func (*EncryptedPassportElement) GetFrontSide ¶
func (t *EncryptedPassportElement) GetFrontSide() *PassportFile
func (*EncryptedPassportElement) GetHash ¶
func (t *EncryptedPassportElement) GetHash() string
func (*EncryptedPassportElement) GetPhoneNumber ¶
func (t *EncryptedPassportElement) GetPhoneNumber() string
func (*EncryptedPassportElement) GetReverseSide ¶
func (t *EncryptedPassportElement) GetReverseSide() *PassportFile
func (*EncryptedPassportElement) GetSelfie ¶
func (t *EncryptedPassportElement) GetSelfie() *PassportFile
func (*EncryptedPassportElement) GetType ¶
func (t *EncryptedPassportElement) GetType() *EncryptedType
type EncryptedType ¶
type EncryptedType int
const ( EncryptedTypeAddress EncryptedType EncryptedTypeBankStatement EncryptedTypeDriverLicense EncryptedTypeEmail EncryptedTypeIDentityCard EncryptedTypeInternalPassport EncryptedTypePassport EncryptedTypePassportRegistration EncryptedTypePersonalDetails EncryptedTypePhoneNumber EncryptedTypeRentalAgreement EncryptedTypeTemporaryRegistration EncryptedTypeUtilityBill )
func (EncryptedType) MarshalText ¶
func (enum EncryptedType) MarshalText() ([]byte, error)
func (EncryptedType) String ¶
func (enum EncryptedType) String() string
func (*EncryptedType) UnmarshalText ¶
func (enum *EncryptedType) UnmarshalText(src []byte) error
type EntityType ¶
type EntityType int
const ( EntityTypeBold EntityType EntityTypeBotCommand EntityTypeCashtag EntityTypeCode EntityTypeCustomEmoji EntityTypeEmail EntityTypeHashtag EntityTypeItalic EntityTypeMention EntityTypePhoneNumber EntityTypePre EntityTypeSpoiler EntityTypeStrikethrough EntityTypeTextLink EntityTypeTextMention EntityTypeUnderline EntityTypeURL )
func (EntityType) MarshalText ¶
func (enum EntityType) MarshalText() ([]byte, error)
func (EntityType) String ¶
func (enum EntityType) String() string
func (*EntityType) UnmarshalText ¶
func (enum *EntityType) UnmarshalText(src []byte) error
type ErrIncorrectEnum ¶
type ErrIncorrectEnum struct {
Value string
}
func (ErrIncorrectEnum) Error ¶
func (e ErrIncorrectEnum) Error() string
type Error ¶
type Error struct {
Code int
Message string
ResponseParameters
}
type ErrorCallback ¶
type ErrorCallback func(error)
ErrorCallback is a function that is called when an error occurs during an HTTP request on get updates.
type File ¶
type File struct {
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// FilePath
// File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
FilePath *string `json:"file_path,omitempty"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
}
File This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
func (*File) GetFilePath ¶
func (*File) GetFileSize ¶
func (*File) GetFileUniqueID ¶
type ForceReply ¶
type ForceReply struct {
// ForceReply
// Shows reply interface to the user, as if they manually selected the bot's message and tapped
// 'Reply'
ForceReply bool `json:"force_reply"`
// InputFieldPlaceholder
// The placeholder to be shown in the input field when the reply is active; 1-64 characters
InputFieldPlaceholder *string `json:"input_field_placeholder,omitempty"`
// Selective
// 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"`
}
ForceReply 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.
func (*ForceReply) GetForceReply ¶
func (t *ForceReply) GetForceReply() *bool
func (*ForceReply) GetInputFieldPlaceholder ¶
func (t *ForceReply) GetInputFieldPlaceholder() string
func (*ForceReply) GetSelective ¶
func (t *ForceReply) GetSelective() bool
type ForumTopic ¶
type ForumTopic struct {
// IconColor
// Color of the topic icon in RGB format
IconColor int64 `json:"icon_color"`
// MessageThreadID
// Unique identifier of the forum topic
MessageThreadID int64 `json:"message_thread_id"`
// Name
// Name of the topic
Name string `json:"name"`
// IconCustomEmojiID
// Unique identifier of the custom emoji shown as the topic icon
IconCustomEmojiID *string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopic This object represents a forum topic.
func (*ForumTopic) GetIconColor ¶
func (t *ForumTopic) GetIconColor() int64
func (*ForumTopic) GetIconCustomEmojiID ¶
func (t *ForumTopic) GetIconCustomEmojiID() string
func (*ForumTopic) GetMessageThreadID ¶
func (t *ForumTopic) GetMessageThreadID() int64
func (*ForumTopic) GetName ¶
func (t *ForumTopic) GetName() string
type ForumTopicClosed ¶
type ForumTopicClosed struct {
// IconCustomEmojiID
// 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,omitempty"`
// Name
// New name of the topic, if it was edited
Name *string `json:"name,omitempty"`
}
ForumTopicClosed This object represents a service message about a forum topic closed in the chat. Currently holds no information.
func (*ForumTopicClosed) GetIconCustomEmojiID ¶
func (t *ForumTopicClosed) GetIconCustomEmojiID() string
func (*ForumTopicClosed) GetName ¶
func (t *ForumTopicClosed) GetName() string
type ForumTopicCreated ¶
type ForumTopicCreated struct {
// IconColor
// Color of the topic icon in RGB format
IconColor int64 `json:"icon_color"`
// Name
// Name of the topic
Name string `json:"name"`
// IconCustomEmojiID
// Unique identifier of the custom emoji shown as the topic icon
IconCustomEmojiID *string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopicCreated This object represents a service message about a new forum topic created in the chat.
func (*ForumTopicCreated) GetIconColor ¶
func (t *ForumTopicCreated) GetIconColor() int64
func (*ForumTopicCreated) GetIconCustomEmojiID ¶
func (t *ForumTopicCreated) GetIconCustomEmojiID() string
func (*ForumTopicCreated) GetName ¶
func (t *ForumTopicCreated) GetName() string
type ForumTopicEdited ¶
type ForumTopicEdited struct {
// IconCustomEmojiID
// 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,omitempty"`
// Name
// New name of the topic, if it was edited
Name *string `json:"name,omitempty"`
}
ForumTopicEdited This object represents a service message about an edited forum topic.
func (*ForumTopicEdited) GetIconCustomEmojiID ¶
func (t *ForumTopicEdited) GetIconCustomEmojiID() string
func (*ForumTopicEdited) GetName ¶
func (t *ForumTopicEdited) GetName() string
type ForumTopicReopened ¶
type ForumTopicReopened struct {
// RequestID
// Identifier of the request
RequestID int64 `json:"request_id"`
// UserID
// Identifier of the shared user. 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 may not have access to the user and could be unable to use
// this identifier, unless the user is already known to the bot by some other means.
UserID int64 `json:"user_id"`
}
ForumTopicReopened This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
func (*ForumTopicReopened) GetRequestID ¶
func (t *ForumTopicReopened) GetRequestID() int64
func (*ForumTopicReopened) GetUserID ¶
func (t *ForumTopicReopened) GetUserID() int64
type ForwardMessageConfig ¶
type ForwardMessageConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// FromChatID
// Unique identifier for the chat where the original message was sent (or channel username in
// the format @channelusername)
FromChatID IntStr `json:"from_chat_id"`
// MessageID
// Message identifier in the chat specified in from_chat_id
MessageID int64 `json:"message_id"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the forwarded message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
}
ForwardMessage Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
type Game ¶
type Game struct {
// Description
// Description of the game
Description string `json:"description"`
// Photo
// Photo that will be displayed in the game message in chats.
Photo []PhotoSize `json:"photo"`
// Title
// Title of the game
Title string `json:"title"`
// Animation
// Animation that will be displayed in the game message in chats. Upload via BotFather
Animation *Animation `json:"animation,omitempty"`
// Text
// 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"`
// TextEntities
// Special entities that appear in text, such as usernames, URLs, bot commands, etc.
TextEntities []MessageEntity `json:"text_entities,omitempty"`
}
Game This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
func (*Game) GetAnimation ¶
func (*Game) GetDescription ¶
type GameHighScore ¶
type GameHighScore struct {
// Position
// Position in high score table for the game
Position int64 `json:"position"`
// Score
// Score
Score int64 `json:"score"`
// User
// User
User User `json:"user"`
}
GameHighScore This object represents one row of the high scores table for a game.
func (*GameHighScore) GetPosition ¶
func (t *GameHighScore) GetPosition() int64
func (*GameHighScore) GetScore ¶
func (t *GameHighScore) GetScore() int64
func (*GameHighScore) GetUser ¶
func (t *GameHighScore) GetUser() *User
type Games ¶
type Games struct {
// ChatID
// Unique identifier for the target chat
ChatID int64 `json:"chat_id"`
// GameShortName
// Short name of the game, serves as the unique identifier for the game. Set up your games via
// @BotFather.
GameShortName string `json:"game_short_name"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification *bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID *int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent *bool `json:"protect_content,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will
// be shown. If not empty, the first button must launch the game.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID *int64 `json:"reply_to_message_id,omitempty"`
}
Games Your bot can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Create games via @BotFather using the /newgame command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.
func (*Games) GetAllowSendingWithoutReply ¶
func (*Games) GetDisableNotification ¶
func (*Games) GetGameShortName ¶
func (*Games) GetMessageThreadID ¶
func (*Games) GetProtectContent ¶
func (*Games) GetReplyMarkup ¶
func (t *Games) GetReplyMarkup() *InlineKeyboardMarkup
func (*Games) GetReplyToMessageID ¶
type GeneralForumTopicHidden ¶
type GeneralForumTopicHidden struct {
// RequestID
// Identifier of the request
RequestID int64 `json:"request_id"`
// UserID
// Identifier of the shared user. 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 may not have access to the user and could be unable to use
// this identifier, unless the user is already known to the bot by some other means.
UserID int64 `json:"user_id"`
}
GeneralForumTopicHidden This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
func (*GeneralForumTopicHidden) GetRequestID ¶
func (t *GeneralForumTopicHidden) GetRequestID() int64
func (*GeneralForumTopicHidden) GetUserID ¶
func (t *GeneralForumTopicHidden) GetUserID() int64
type GeneralForumTopicUnhidden ¶
type GeneralForumTopicUnhidden struct {
// Identifier of the request
RequestID int64 `json:"request_id"`
// Identifier of the shared user. 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 may not have access to the user and could be unable to use
// this identifier, unless the user is already known to the bot by some other means.
UserID int64 `json:"user_id"`
}
GeneralForumTopicUnhidden This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
func (*GeneralForumTopicUnhidden) GetRequestID ¶
func (t *GeneralForumTopicUnhidden) GetRequestID() int64
func (*GeneralForumTopicUnhidden) GetUserID ¶
func (t *GeneralForumTopicUnhidden) GetUserID() int64
type GetGameHighScoresConfig ¶
type GetGameHighScoresConfig struct {
// UserID
// Target user id
UserID int64 `json:"user_id"`
// ChatID
// Required if inline_message_id is not specified. Unique identifier for the target chat
ChatID int64 `json:"chat_id,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the sent message
MessageID int64 `json:"message_id,omitempty"`
}
GetGameHighScores Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
type GetUpdatesConfig ¶
type GetUpdatesConfig struct {
// AllowedUpdates
// 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 getUpdates, so unwanted updates may be received for a short period of time.
AllowedUpdates []string `json:"allowed_updates,omitempty"`
// Limit
// Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to
// 100.
Limit int64 `json:"limit,omitempty"`
// Offset
// Identifier of the first update to be returned. Must be greater by one than the highest among
// the identifiers of previously received updates. By default, updates starting with the
// earliest unconfirmed update are returned. An update is considered confirmed as soon 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 be forgotten.
Offset int64 `json:"offset,omitempty"`
// Timeout
// 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 int64 `json:"timeout,omitempty"`
}
GetUpdates Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
type GetUserProfilePhotosConfig ¶
type GetUserProfilePhotosConfig struct {
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
// Limit
// Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to
// 100.
Limit int64 `json:"limit,omitempty"`
// Offset
// Sequential number of the first photo to be returned. By default, all photos are returned.
Offset int64 `json:"offset,omitempty"`
}
GetUserProfilePhotos Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
type HandlerFunc ¶
HandlerFunc is a function that is called for an Update that satisfies all upstream AcceptFunc.
type InlineKeyboardButton ¶
type InlineKeyboardButton struct {
// Text
// Label text on the button
Text string `json:"text"`
// CallbackData
// Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
CallbackData *string `json:"callback_data,omitempty"`
// CallbackGame
// 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"`
// LoginURL
// An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the
// Telegram Login Widget.
LoginURL *LoginURL `json:"login_url,omitempty"`
// Pay
// 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"`
// SwitchInlineQuery
// 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. May 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"`
// SwitchInlineQueryChosenChat
// 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"`
// SwitchInlineQueryCurrentChat
// If set, pressing the button will insert the bot's username and the specified inline query in
// the current chat's input field. May 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"`
// URL
// 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"`
// WebApp
// 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"`
}
InlineKeyboardButton This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
func (*InlineKeyboardButton) GetCallbackData ¶
func (t *InlineKeyboardButton) GetCallbackData() string
func (*InlineKeyboardButton) GetCallbackGame ¶
func (t *InlineKeyboardButton) GetCallbackGame() *CallbackGame
func (*InlineKeyboardButton) GetLoginURL ¶
func (t *InlineKeyboardButton) GetLoginURL() *LoginURL
func (*InlineKeyboardButton) GetPay ¶
func (t *InlineKeyboardButton) GetPay() bool
func (*InlineKeyboardButton) GetSwitchInlineQuery ¶
func (t *InlineKeyboardButton) GetSwitchInlineQuery() string
func (*InlineKeyboardButton) GetSwitchInlineQueryChosenChat ¶
func (t *InlineKeyboardButton) GetSwitchInlineQueryChosenChat() *SwitchInlineQueryChosenChat
func (*InlineKeyboardButton) GetSwitchInlineQueryCurrentChat ¶
func (t *InlineKeyboardButton) GetSwitchInlineQueryCurrentChat() string
func (*InlineKeyboardButton) GetText ¶
func (t *InlineKeyboardButton) GetText() string
func (*InlineKeyboardButton) GetURL ¶
func (t *InlineKeyboardButton) GetURL() string
func (*InlineKeyboardButton) GetWebApp ¶
func (t *InlineKeyboardButton) GetWebApp() *WebAppInfo
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
// InlineKeyboard
// Array of button rows, each represented by an Array of InlineKeyboardButton objects
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}
InlineKeyboardMarkup This object represents an inline keyboard that appears right next to the message it belongs to.
type InlineQuery ¶
type InlineQuery struct {
// From
// Sender
From User `json:"from"`
// ID
// Unique identifier for this query
ID string `json:"id"`
// Offset
// Offset of the results to be returned, can be controlled by the bot
Offset string `json:"offset"`
// Query
// Text of the query (up to 256 characters)
Query string `json:"query"`
// ChatType
// 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"`
// Location
// Sender location, only for bots that request user location
Location *Location `json:"location,omitempty"`
}
InlineQuery This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
func (*InlineQuery) GetChatType ¶
func (t *InlineQuery) GetChatType() string
func (*InlineQuery) GetFrom ¶
func (t *InlineQuery) GetFrom() *User
func (*InlineQuery) GetID ¶
func (t *InlineQuery) GetID() string
func (*InlineQuery) GetLocation ¶
func (t *InlineQuery) GetLocation() *Location
func (*InlineQuery) GetOffset ¶
func (t *InlineQuery) GetOffset() string
func (*InlineQuery) GetQuery ¶
func (t *InlineQuery) GetQuery() string
type InlineQueryResult ¶
type InlineQueryResult struct {
// ID
// Unique identifier for this result, 1-64 Bytes
ID string `json:"id"`
// InputMessageContent
// Content of the message to be sent
InputMessageContent InputMessageContent `json:"input_message_content"`
// Title
// Title of the result
Title string `json:"title"`
// Type
// Type of the result, must be article
Type InlineType `json:"type"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// HideURL
// Pass True if you don't want the URL to be shown in the message
HideURL *bool `json:"hide_url,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// Url of the thumbnail for the result
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
// URL
// URL of the result
URL *string `json:"url,omitempty"`
}
InlineQueryResult This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
func (*InlineQueryResult) GetDescription ¶
func (t *InlineQueryResult) GetDescription() string
func (*InlineQueryResult) GetHideURL ¶
func (t *InlineQueryResult) GetHideURL() bool
func (*InlineQueryResult) GetID ¶
func (t *InlineQueryResult) GetID() string
func (*InlineQueryResult) GetInputMessageContent ¶
func (t *InlineQueryResult) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResult) GetReplyMarkup ¶
func (t *InlineQueryResult) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResult) GetThumbnailHeight ¶
func (t *InlineQueryResult) GetThumbnailHeight() int64
func (*InlineQueryResult) GetThumbnailURL ¶
func (t *InlineQueryResult) GetThumbnailURL() string
func (*InlineQueryResult) GetThumbnailWidth ¶
func (t *InlineQueryResult) GetThumbnailWidth() int64
func (*InlineQueryResult) GetTitle ¶
func (t *InlineQueryResult) GetTitle() string
func (*InlineQueryResult) GetType ¶
func (t *InlineQueryResult) GetType() *InlineType
func (*InlineQueryResult) GetURL ¶
func (t *InlineQueryResult) GetURL() string
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct {
// ID
// Unique identifier for this result, 1-64 Bytes
ID string `json:"id"`
// InputMessageContent
// Content of the message to be sent
InputMessageContent InputMessageContent `json:"input_message_content"`
// Title
// Title of the result
Title string `json:"title"`
// Type
// Type of the result, must be article
Type InlineType `json:"type"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// HideURL
// Pass True if you don't want the URL to be shown in the message
HideURL *bool `json:"hide_url,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// Url of the thumbnail for the result
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
// URL
// URL of the result
URL *string `json:"url,omitempty"`
}
InlineQueryResultArticle Represents a link to an article or web page.
func (*InlineQueryResultArticle) GetDescription ¶
func (t *InlineQueryResultArticle) GetDescription() string
func (*InlineQueryResultArticle) GetHideURL ¶
func (t *InlineQueryResultArticle) GetHideURL() bool
func (*InlineQueryResultArticle) GetID ¶
func (t *InlineQueryResultArticle) GetID() string
func (*InlineQueryResultArticle) GetInputMessageContent ¶
func (t *InlineQueryResultArticle) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultArticle) GetReplyMarkup ¶
func (t *InlineQueryResultArticle) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultArticle) GetThumbnailHeight ¶
func (t *InlineQueryResultArticle) GetThumbnailHeight() int64
func (*InlineQueryResultArticle) GetThumbnailURL ¶
func (t *InlineQueryResultArticle) GetThumbnailURL() string
func (*InlineQueryResultArticle) GetThumbnailWidth ¶
func (t *InlineQueryResultArticle) GetThumbnailWidth() int64
func (*InlineQueryResultArticle) GetTitle ¶
func (t *InlineQueryResultArticle) GetTitle() string
func (*InlineQueryResultArticle) GetType ¶
func (t *InlineQueryResultArticle) GetType() *InlineType
func (*InlineQueryResultArticle) GetURL ¶
func (t *InlineQueryResultArticle) GetURL() string
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct {
// AudioURL
// A valid URL for the audio file
AudioURL string `json:"audio_url"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Title
// Title
Title string `json:"title"`
// Type
// Type of the result, must be audio
Type InlineType `json:"type"`
// AudioDuration
// Audio duration in seconds
AudioDuration *int64 `json:"audio_duration,omitempty"`
// Caption
// Caption, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the audio
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// Performer
// Performer
Performer *string `json:"performer,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultAudio 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.
func (*InlineQueryResultAudio) GetAudioDuration ¶
func (t *InlineQueryResultAudio) GetAudioDuration() int64
func (*InlineQueryResultAudio) GetAudioURL ¶
func (t *InlineQueryResultAudio) GetAudioURL() string
func (*InlineQueryResultAudio) GetCaption ¶
func (t *InlineQueryResultAudio) GetCaption() string
func (*InlineQueryResultAudio) GetID ¶
func (t *InlineQueryResultAudio) GetID() string
func (*InlineQueryResultAudio) GetInputMessageContent ¶
func (t *InlineQueryResultAudio) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultAudio) GetParseMode ¶
func (t *InlineQueryResultAudio) GetParseMode() string
func (*InlineQueryResultAudio) GetPerformer ¶
func (t *InlineQueryResultAudio) GetPerformer() string
func (*InlineQueryResultAudio) GetReplyMarkup ¶
func (t *InlineQueryResultAudio) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultAudio) GetTitle ¶
func (t *InlineQueryResultAudio) GetTitle() string
func (*InlineQueryResultAudio) GetType ¶
func (t *InlineQueryResultAudio) GetType() *InlineType
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct {
// AudioFileID
// A valid file identifier for the audio file
AudioFileID string `json:"audio_file_id"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Type
// Type of the result, must be audio
Type InlineType `json:"type"`
// Caption
// Caption, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the audio
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultCachedAudio 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.
func (*InlineQueryResultCachedAudio) GetAudioFileID ¶
func (t *InlineQueryResultCachedAudio) GetAudioFileID() string
func (*InlineQueryResultCachedAudio) GetCaption ¶
func (t *InlineQueryResultCachedAudio) GetCaption() string
func (*InlineQueryResultCachedAudio) GetID ¶
func (t *InlineQueryResultCachedAudio) GetID() string
func (*InlineQueryResultCachedAudio) GetInputMessageContent ¶
func (t *InlineQueryResultCachedAudio) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedAudio) GetParseMode ¶
func (t *InlineQueryResultCachedAudio) GetParseMode() string
func (*InlineQueryResultCachedAudio) GetReplyMarkup ¶
func (t *InlineQueryResultCachedAudio) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedAudio) GetType ¶
func (t *InlineQueryResultCachedAudio) GetType() *InlineType
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct {
// DocumentFileID
// A valid file identifier for the file
DocumentFileID string `json:"document_file_id"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Title
// Title for the result
Title string `json:"title"`
// Type
// Type of the result, must be document
Type InlineType `json:"type"`
// Caption
// Caption of the document to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the file
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultCachedDocument 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.
func (*InlineQueryResultCachedDocument) GetCaption ¶
func (t *InlineQueryResultCachedDocument) GetCaption() string
func (*InlineQueryResultCachedDocument) GetDescription ¶
func (t *InlineQueryResultCachedDocument) GetDescription() string
func (*InlineQueryResultCachedDocument) GetDocumentFileID ¶
func (t *InlineQueryResultCachedDocument) GetDocumentFileID() string
func (*InlineQueryResultCachedDocument) GetID ¶
func (t *InlineQueryResultCachedDocument) GetID() string
func (*InlineQueryResultCachedDocument) GetInputMessageContent ¶
func (t *InlineQueryResultCachedDocument) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedDocument) GetParseMode ¶
func (t *InlineQueryResultCachedDocument) GetParseMode() string
func (*InlineQueryResultCachedDocument) GetReplyMarkup ¶
func (t *InlineQueryResultCachedDocument) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedDocument) GetTitle ¶
func (t *InlineQueryResultCachedDocument) GetTitle() string
func (*InlineQueryResultCachedDocument) GetType ¶
func (t *InlineQueryResultCachedDocument) GetType() *InlineType
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct {
// GifFileID
// A valid file identifier for the GIF file
GifFileID string `json:"gif_file_id"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Type
// Type of the result, must be gif
Type InlineType `json:"type"`
// Caption
// Caption of the GIF file to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the GIF animation
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultCachedGif 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.
func (*InlineQueryResultCachedGif) GetCaption ¶
func (t *InlineQueryResultCachedGif) GetCaption() string
func (*InlineQueryResultCachedGif) GetGifFileID ¶
func (t *InlineQueryResultCachedGif) GetGifFileID() string
func (*InlineQueryResultCachedGif) GetID ¶
func (t *InlineQueryResultCachedGif) GetID() string
func (*InlineQueryResultCachedGif) GetInputMessageContent ¶
func (t *InlineQueryResultCachedGif) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedGif) GetParseMode ¶
func (t *InlineQueryResultCachedGif) GetParseMode() string
func (*InlineQueryResultCachedGif) GetReplyMarkup ¶
func (t *InlineQueryResultCachedGif) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedGif) GetTitle ¶
func (t *InlineQueryResultCachedGif) GetTitle() string
func (*InlineQueryResultCachedGif) GetType ¶
func (t *InlineQueryResultCachedGif) GetType() *InlineType
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Mpeg4FileID
// A valid file identifier for the MPEG4 file
Mpeg4FileID string `json:"mpeg4_file_id"`
// Type
// Type of the result, must be mpeg4_gif
Type InlineType `json:"type"`
// Caption
// Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the video animation
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultCachedMpeg4Gif 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.
func (*InlineQueryResultCachedMpeg4Gif) GetCaption ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetCaption() string
func (*InlineQueryResultCachedMpeg4Gif) GetID ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetID() string
func (*InlineQueryResultCachedMpeg4Gif) GetInputMessageContent ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedMpeg4Gif) GetMpeg4FileID ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetMpeg4FileID() string
func (*InlineQueryResultCachedMpeg4Gif) GetParseMode ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetParseMode() string
func (*InlineQueryResultCachedMpeg4Gif) GetReplyMarkup ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedMpeg4Gif) GetTitle ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetTitle() string
func (*InlineQueryResultCachedMpeg4Gif) GetType ¶
func (t *InlineQueryResultCachedMpeg4Gif) GetType() *InlineType
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// PhotoFileID
// A valid file identifier of the photo
PhotoFileID string `json:"photo_file_id"`
// Type
// Type of the result, must be photo
Type InlineType `json:"type"`
// Caption
// Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the photo
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultCachedPhoto 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.
func (*InlineQueryResultCachedPhoto) GetCaption ¶
func (t *InlineQueryResultCachedPhoto) GetCaption() string
func (*InlineQueryResultCachedPhoto) GetDescription ¶
func (t *InlineQueryResultCachedPhoto) GetDescription() string
func (*InlineQueryResultCachedPhoto) GetID ¶
func (t *InlineQueryResultCachedPhoto) GetID() string
func (*InlineQueryResultCachedPhoto) GetInputMessageContent ¶
func (t *InlineQueryResultCachedPhoto) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedPhoto) GetParseMode ¶
func (t *InlineQueryResultCachedPhoto) GetParseMode() string
func (*InlineQueryResultCachedPhoto) GetPhotoFileID ¶
func (t *InlineQueryResultCachedPhoto) GetPhotoFileID() string
func (*InlineQueryResultCachedPhoto) GetReplyMarkup ¶
func (t *InlineQueryResultCachedPhoto) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedPhoto) GetTitle ¶
func (t *InlineQueryResultCachedPhoto) GetTitle() string
func (*InlineQueryResultCachedPhoto) GetType ¶
func (t *InlineQueryResultCachedPhoto) GetType() *InlineType
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// StickerFileID
// A valid file identifier of the sticker
StickerFileID string `json:"sticker_file_id"`
// Type
// Type of the result, must be sticker
Type InlineType `json:"type"`
// InputMessageContent
// Content of the message to be sent instead of the sticker
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultCachedSticker 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.
func (*InlineQueryResultCachedSticker) GetID ¶
func (t *InlineQueryResultCachedSticker) GetID() string
func (*InlineQueryResultCachedSticker) GetInputMessageContent ¶
func (t *InlineQueryResultCachedSticker) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedSticker) GetReplyMarkup ¶
func (t *InlineQueryResultCachedSticker) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedSticker) GetStickerFileID ¶
func (t *InlineQueryResultCachedSticker) GetStickerFileID() string
func (*InlineQueryResultCachedSticker) GetType ¶
func (t *InlineQueryResultCachedSticker) GetType() *InlineType
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Title
// Title for the result
Title string `json:"title"`
// Type
// Type of the result, must be video
Type InlineType `json:"type"`
// VideoFileID
// A valid file identifier for the video file
VideoFileID string `json:"video_file_id"`
// Caption
// Caption of the video to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the video
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultCachedVideo 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.
func (*InlineQueryResultCachedVideo) GetCaption ¶
func (t *InlineQueryResultCachedVideo) GetCaption() string
func (*InlineQueryResultCachedVideo) GetDescription ¶
func (t *InlineQueryResultCachedVideo) GetDescription() string
func (*InlineQueryResultCachedVideo) GetID ¶
func (t *InlineQueryResultCachedVideo) GetID() string
func (*InlineQueryResultCachedVideo) GetInputMessageContent ¶
func (t *InlineQueryResultCachedVideo) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedVideo) GetParseMode ¶
func (t *InlineQueryResultCachedVideo) GetParseMode() string
func (*InlineQueryResultCachedVideo) GetReplyMarkup ¶
func (t *InlineQueryResultCachedVideo) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedVideo) GetTitle ¶
func (t *InlineQueryResultCachedVideo) GetTitle() string
func (*InlineQueryResultCachedVideo) GetType ¶
func (t *InlineQueryResultCachedVideo) GetType() *InlineType
func (*InlineQueryResultCachedVideo) GetVideoFileID ¶
func (t *InlineQueryResultCachedVideo) GetVideoFileID() string
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Title
// Voice message title
Title string `json:"title"`
// Type
// Type of the result, must be voice
Type InlineType `json:"type"`
// VoiceFileID
// A valid file identifier for the voice message
VoiceFileID string `json:"voice_file_id"`
// Caption
// Caption, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the voice message
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the voice message caption. See formatting options for more
// details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultCachedVoice 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.
func (*InlineQueryResultCachedVoice) GetCaption ¶
func (t *InlineQueryResultCachedVoice) GetCaption() string
func (*InlineQueryResultCachedVoice) GetID ¶
func (t *InlineQueryResultCachedVoice) GetID() string
func (*InlineQueryResultCachedVoice) GetInputMessageContent ¶
func (t *InlineQueryResultCachedVoice) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultCachedVoice) GetParseMode ¶
func (t *InlineQueryResultCachedVoice) GetParseMode() string
func (*InlineQueryResultCachedVoice) GetReplyMarkup ¶
func (t *InlineQueryResultCachedVoice) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultCachedVoice) GetTitle ¶
func (t *InlineQueryResultCachedVoice) GetTitle() string
func (*InlineQueryResultCachedVoice) GetType ¶
func (t *InlineQueryResultCachedVoice) GetType() *InlineType
func (*InlineQueryResultCachedVoice) GetVoiceFileID ¶
func (t *InlineQueryResultCachedVoice) GetVoiceFileID() string
type InlineQueryResultContact ¶
type InlineQueryResultContact struct {
// FirstName
// Contact's first name
FirstName string `json:"first_name"`
// ID
// Unique identifier for this result, 1-64 Bytes
ID string `json:"id"`
// PhoneNumber
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// Type
// Type of the result, must be contact
Type InlineType `json:"type"`
// InputMessageContent
// Content of the message to be sent instead of the contact
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// LastName
// Contact's last name
LastName *string `json:"last_name,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// Url of the thumbnail for the result
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
// Vcard
// Additional data about the contact in the form of a vCard, 0-2048 bytes
Vcard *string `json:"vcard,omitempty"`
}
InlineQueryResultContact 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.
func (*InlineQueryResultContact) GetFirstName ¶
func (t *InlineQueryResultContact) GetFirstName() string
func (*InlineQueryResultContact) GetID ¶
func (t *InlineQueryResultContact) GetID() string
func (*InlineQueryResultContact) GetInputMessageContent ¶
func (t *InlineQueryResultContact) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultContact) GetLastName ¶
func (t *InlineQueryResultContact) GetLastName() string
func (*InlineQueryResultContact) GetPhoneNumber ¶
func (t *InlineQueryResultContact) GetPhoneNumber() string
func (*InlineQueryResultContact) GetReplyMarkup ¶
func (t *InlineQueryResultContact) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultContact) GetThumbnailHeight ¶
func (t *InlineQueryResultContact) GetThumbnailHeight() int64
func (*InlineQueryResultContact) GetThumbnailURL ¶
func (t *InlineQueryResultContact) GetThumbnailURL() string
func (*InlineQueryResultContact) GetThumbnailWidth ¶
func (t *InlineQueryResultContact) GetThumbnailWidth() int64
func (*InlineQueryResultContact) GetType ¶
func (t *InlineQueryResultContact) GetType() *InlineType
func (*InlineQueryResultContact) GetVcard ¶
func (t *InlineQueryResultContact) GetVcard() string
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct {
// DocumentURL
// A valid URL for the file
DocumentURL string `json:"document_url"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// MimeType
// MIME type of the content of the file, either "application/pdf" or "application/zip"
MimeType string `json:"mime_type"`
// Title
// Title for the result
Title string `json:"title"`
// Type
// Type of the result, must be document
Type InlineType `json:"type"`
// Caption
// Caption of the document to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the file
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// URL of the thumbnail (JPEG only) for the file
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
}
InlineQueryResultDocument 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.
func (*InlineQueryResultDocument) GetCaption ¶
func (t *InlineQueryResultDocument) GetCaption() string
func (*InlineQueryResultDocument) GetDescription ¶
func (t *InlineQueryResultDocument) GetDescription() string
func (*InlineQueryResultDocument) GetDocumentURL ¶
func (t *InlineQueryResultDocument) GetDocumentURL() string
func (*InlineQueryResultDocument) GetID ¶
func (t *InlineQueryResultDocument) GetID() string
func (*InlineQueryResultDocument) GetInputMessageContent ¶
func (t *InlineQueryResultDocument) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultDocument) GetMimeType ¶
func (t *InlineQueryResultDocument) GetMimeType() string
func (*InlineQueryResultDocument) GetParseMode ¶
func (t *InlineQueryResultDocument) GetParseMode() string
func (*InlineQueryResultDocument) GetReplyMarkup ¶
func (t *InlineQueryResultDocument) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultDocument) GetThumbnailHeight ¶
func (t *InlineQueryResultDocument) GetThumbnailHeight() int64
func (*InlineQueryResultDocument) GetThumbnailURL ¶
func (t *InlineQueryResultDocument) GetThumbnailURL() string
func (*InlineQueryResultDocument) GetThumbnailWidth ¶
func (t *InlineQueryResultDocument) GetThumbnailWidth() int64
func (*InlineQueryResultDocument) GetTitle ¶
func (t *InlineQueryResultDocument) GetTitle() string
func (*InlineQueryResultDocument) GetType ¶
func (t *InlineQueryResultDocument) GetType() *InlineType
type InlineQueryResultGame ¶
type InlineQueryResultGame struct {
// GameShortName
// Short name of the game
GameShortName string `json:"game_short_name"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Type
// Type of the result, must be game
Type InlineType `json:"type"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultGame Represents a Game.
func (*InlineQueryResultGame) GetGameShortName ¶
func (t *InlineQueryResultGame) GetGameShortName() string
func (*InlineQueryResultGame) GetID ¶
func (t *InlineQueryResultGame) GetID() string
func (*InlineQueryResultGame) GetReplyMarkup ¶
func (t *InlineQueryResultGame) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultGame) GetType ¶
func (t *InlineQueryResultGame) GetType() *InlineType
type InlineQueryResultGif ¶
type InlineQueryResultGif struct {
// GifURL
// A valid URL for the GIF file. File size must not exceed 1MB
GifURL string `json:"gif_url"`
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// ThumbnailURL
// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
ThumbnailURL string `json:"thumbnail_url"`
// Type
// Type of the result, must be gif
Type InlineType `json:"type"`
// Caption
// Caption of the GIF file to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// GifDuration
// Duration of the GIF in seconds
GifDuration *int64 `json:"gif_duration,omitempty"`
// GifHeight
// Height of the GIF
GifHeight *int64 `json:"gif_height,omitempty"`
// GifWidth
// Width of the GIF
GifWidth *int64 `json:"gif_width,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the GIF animation
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailMimeType
// MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4".
// Defaults to "image/jpeg"
ThumbnailMimeType *string `json:"thumbnail_mime_type,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultGif 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.
func (*InlineQueryResultGif) GetCaption ¶
func (t *InlineQueryResultGif) GetCaption() string
func (*InlineQueryResultGif) GetGifDuration ¶
func (t *InlineQueryResultGif) GetGifDuration() int64
func (*InlineQueryResultGif) GetGifHeight ¶
func (t *InlineQueryResultGif) GetGifHeight() int64
func (*InlineQueryResultGif) GetGifURL ¶
func (t *InlineQueryResultGif) GetGifURL() string
func (*InlineQueryResultGif) GetGifWidth ¶
func (t *InlineQueryResultGif) GetGifWidth() int64
func (*InlineQueryResultGif) GetID ¶
func (t *InlineQueryResultGif) GetID() string
func (*InlineQueryResultGif) GetInputMessageContent ¶
func (t *InlineQueryResultGif) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultGif) GetParseMode ¶
func (t *InlineQueryResultGif) GetParseMode() string
func (*InlineQueryResultGif) GetReplyMarkup ¶
func (t *InlineQueryResultGif) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultGif) GetThumbnailMimeType ¶
func (t *InlineQueryResultGif) GetThumbnailMimeType() string
func (*InlineQueryResultGif) GetThumbnailURL ¶
func (t *InlineQueryResultGif) GetThumbnailURL() string
func (*InlineQueryResultGif) GetTitle ¶
func (t *InlineQueryResultGif) GetTitle() string
func (*InlineQueryResultGif) GetType ¶
func (t *InlineQueryResultGif) GetType() *InlineType
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct {
// ID
// Unique identifier for this result, 1-64 Bytes
ID string `json:"id"`
// Latitude
// Location latitude in degrees
Latitude float64 `json:"latitude"`
// Longitude
// Location longitude in degrees
Longitude float64 `json:"longitude"`
// Title
// Location title
Title string `json:"title"`
// Type
// Type of the result, must be location
Type InlineType `json:"type"`
// Heading
// For live locations, a direction in which the user is moving, in degrees. Must be between 1
// and 360 if specified.
Heading *int64 `json:"heading,omitempty"`
// HorizontalAccuracy
// The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the location
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// LivePeriod
// Period in seconds for which the location can be updated, should be between 60 and 86400.
LivePeriod *int64 `json:"live_period,omitempty"`
// ProximityAlertRadius
// 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 *int64 `json:"proximity_alert_radius,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// Url of the thumbnail for the result
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
}
InlineQueryResultLocation 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.
func (*InlineQueryResultLocation) GetHeading ¶
func (t *InlineQueryResultLocation) GetHeading() int64
func (*InlineQueryResultLocation) GetHorizontalAccuracy ¶
func (t *InlineQueryResultLocation) GetHorizontalAccuracy() *float64
func (*InlineQueryResultLocation) GetID ¶
func (t *InlineQueryResultLocation) GetID() string
func (*InlineQueryResultLocation) GetInputMessageContent ¶
func (t *InlineQueryResultLocation) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultLocation) GetLatitude ¶
func (t *InlineQueryResultLocation) GetLatitude() *float64
func (*InlineQueryResultLocation) GetLivePeriod ¶
func (t *InlineQueryResultLocation) GetLivePeriod() int64
func (*InlineQueryResultLocation) GetLongitude ¶
func (t *InlineQueryResultLocation) GetLongitude() *float64
func (*InlineQueryResultLocation) GetProximityAlertRadius ¶
func (t *InlineQueryResultLocation) GetProximityAlertRadius() int64
func (*InlineQueryResultLocation) GetReplyMarkup ¶
func (t *InlineQueryResultLocation) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultLocation) GetThumbnailHeight ¶
func (t *InlineQueryResultLocation) GetThumbnailHeight() int64
func (*InlineQueryResultLocation) GetThumbnailURL ¶
func (t *InlineQueryResultLocation) GetThumbnailURL() string
func (*InlineQueryResultLocation) GetThumbnailWidth ¶
func (t *InlineQueryResultLocation) GetThumbnailWidth() int64
func (*InlineQueryResultLocation) GetTitle ¶
func (t *InlineQueryResultLocation) GetTitle() string
func (*InlineQueryResultLocation) GetType ¶
func (t *InlineQueryResultLocation) GetType() *InlineType
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Mpeg4URL
// A valid URL for the MPEG4 file. File size must not exceed 1MB
Mpeg4URL string `json:"mpeg4_url"`
// ThumbnailURL
// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
ThumbnailURL string `json:"thumbnail_url"`
// Type
// Type of the result, must be mpeg4_gif
Type InlineType `json:"type"`
// Caption
// Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the video animation
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// Mpeg4Duration
// Video duration in seconds
Mpeg4Duration *int64 `json:"mpeg4_duration,omitempty"`
// Mpeg4Height
// Video height
Mpeg4Height *int64 `json:"mpeg4_height,omitempty"`
// Mpeg4Width
// Video width
Mpeg4Width *int64 `json:"mpeg4_width,omitempty"`
// ParseMode
// Mode for parsing entities in the caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailMimeType
// MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4".
// Defaults to "image/jpeg"
ThumbnailMimeType *string `json:"thumbnail_mime_type,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultMpeg4Gif 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.
func (*InlineQueryResultMpeg4Gif) GetCaption ¶
func (t *InlineQueryResultMpeg4Gif) GetCaption() string
func (*InlineQueryResultMpeg4Gif) GetID ¶
func (t *InlineQueryResultMpeg4Gif) GetID() string
func (*InlineQueryResultMpeg4Gif) GetInputMessageContent ¶
func (t *InlineQueryResultMpeg4Gif) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultMpeg4Gif) GetMpeg4Duration ¶
func (t *InlineQueryResultMpeg4Gif) GetMpeg4Duration() int64
func (*InlineQueryResultMpeg4Gif) GetMpeg4Height ¶
func (t *InlineQueryResultMpeg4Gif) GetMpeg4Height() int64
func (*InlineQueryResultMpeg4Gif) GetMpeg4URL ¶
func (t *InlineQueryResultMpeg4Gif) GetMpeg4URL() string
func (*InlineQueryResultMpeg4Gif) GetMpeg4Width ¶
func (t *InlineQueryResultMpeg4Gif) GetMpeg4Width() int64
func (*InlineQueryResultMpeg4Gif) GetParseMode ¶
func (t *InlineQueryResultMpeg4Gif) GetParseMode() string
func (*InlineQueryResultMpeg4Gif) GetReplyMarkup ¶
func (t *InlineQueryResultMpeg4Gif) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultMpeg4Gif) GetThumbnailMimeType ¶
func (t *InlineQueryResultMpeg4Gif) GetThumbnailMimeType() string
func (*InlineQueryResultMpeg4Gif) GetThumbnailURL ¶
func (t *InlineQueryResultMpeg4Gif) GetThumbnailURL() string
func (*InlineQueryResultMpeg4Gif) GetTitle ¶
func (t *InlineQueryResultMpeg4Gif) GetTitle() string
func (*InlineQueryResultMpeg4Gif) GetType ¶
func (t *InlineQueryResultMpeg4Gif) GetType() *InlineType
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// PhotoURL
// A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
PhotoURL string `json:"photo_url"`
// ThumbnailURL
// URL of the thumbnail for the photo
ThumbnailURL string `json:"thumbnail_url"`
// Type
// Type of the result, must be photo
Type InlineType `json:"type"`
// Caption
// Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the photo
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// PhotoHeight
// Height of the photo
PhotoHeight *int64 `json:"photo_height,omitempty"`
// PhotoWidth
// Width of the photo
PhotoWidth *int64 `json:"photo_width,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// Title
// Title for the result
Title *string `json:"title,omitempty"`
}
InlineQueryResultPhoto 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.
func (*InlineQueryResultPhoto) GetCaption ¶
func (t *InlineQueryResultPhoto) GetCaption() string
func (*InlineQueryResultPhoto) GetDescription ¶
func (t *InlineQueryResultPhoto) GetDescription() string
func (*InlineQueryResultPhoto) GetID ¶
func (t *InlineQueryResultPhoto) GetID() string
func (*InlineQueryResultPhoto) GetInputMessageContent ¶
func (t *InlineQueryResultPhoto) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultPhoto) GetParseMode ¶
func (t *InlineQueryResultPhoto) GetParseMode() string
func (*InlineQueryResultPhoto) GetPhotoHeight ¶
func (t *InlineQueryResultPhoto) GetPhotoHeight() int64
func (*InlineQueryResultPhoto) GetPhotoURL ¶
func (t *InlineQueryResultPhoto) GetPhotoURL() string
func (*InlineQueryResultPhoto) GetPhotoWidth ¶
func (t *InlineQueryResultPhoto) GetPhotoWidth() int64
func (*InlineQueryResultPhoto) GetReplyMarkup ¶
func (t *InlineQueryResultPhoto) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultPhoto) GetThumbnailURL ¶
func (t *InlineQueryResultPhoto) GetThumbnailURL() string
func (*InlineQueryResultPhoto) GetTitle ¶
func (t *InlineQueryResultPhoto) GetTitle() string
func (*InlineQueryResultPhoto) GetType ¶
func (t *InlineQueryResultPhoto) GetType() *InlineType
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct {
// Address
// Address of the venue
Address string `json:"address"`
// ID
// Unique identifier for this result, 1-64 Bytes
ID string `json:"id"`
// Latitude
// Latitude of the venue location in degrees
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of the venue location in degrees
Longitude float64 `json:"longitude"`
// Title
// Title of the venue
Title string `json:"title"`
// Type
// Type of the result, must be venue
Type InlineType `json:"type"`
// FoursquareID
// Foursquare identifier of the venue if known
FoursquareID *string `json:"foursquare_id,omitempty"`
// FoursquareType
// 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
// Google Places identifier of the venue
GooglePlaceID *string `json:"google_place_id,omitempty"`
// GooglePlaceType
// Google Places type of the venue. (See supported types.)
GooglePlaceType *string `json:"google_place_type,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the venue
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ThumbnailHeight
// Thumbnail height
ThumbnailHeight *int64 `json:"thumbnail_height,omitempty"`
// ThumbnailURL
// Url of the thumbnail for the result
ThumbnailURL *string `json:"thumbnail_url,omitempty"`
// ThumbnailWidth
// Thumbnail width
ThumbnailWidth *int64 `json:"thumbnail_width,omitempty"`
}
InlineQueryResultVenue 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.
func (*InlineQueryResultVenue) GetAddress ¶
func (t *InlineQueryResultVenue) GetAddress() string
func (*InlineQueryResultVenue) GetFoursquareID ¶
func (t *InlineQueryResultVenue) GetFoursquareID() string
func (*InlineQueryResultVenue) GetFoursquareType ¶
func (t *InlineQueryResultVenue) GetFoursquareType() string
func (*InlineQueryResultVenue) GetGooglePlaceID ¶
func (t *InlineQueryResultVenue) GetGooglePlaceID() string
func (*InlineQueryResultVenue) GetGooglePlaceType ¶
func (t *InlineQueryResultVenue) GetGooglePlaceType() string
func (*InlineQueryResultVenue) GetID ¶
func (t *InlineQueryResultVenue) GetID() string
func (*InlineQueryResultVenue) GetInputMessageContent ¶
func (t *InlineQueryResultVenue) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultVenue) GetLatitude ¶
func (t *InlineQueryResultVenue) GetLatitude() *float64
func (*InlineQueryResultVenue) GetLongitude ¶
func (t *InlineQueryResultVenue) GetLongitude() *float64
func (*InlineQueryResultVenue) GetReplyMarkup ¶
func (t *InlineQueryResultVenue) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultVenue) GetThumbnailHeight ¶
func (t *InlineQueryResultVenue) GetThumbnailHeight() int64
func (*InlineQueryResultVenue) GetThumbnailURL ¶
func (t *InlineQueryResultVenue) GetThumbnailURL() string
func (*InlineQueryResultVenue) GetThumbnailWidth ¶
func (t *InlineQueryResultVenue) GetThumbnailWidth() int64
func (*InlineQueryResultVenue) GetTitle ¶
func (t *InlineQueryResultVenue) GetTitle() string
func (*InlineQueryResultVenue) GetType ¶
func (t *InlineQueryResultVenue) GetType() *InlineType
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// MimeType
// MIME type of the content of the video URL, "text/html" or "video/mp4"
MimeType string `json:"mime_type"`
// ThumbnailURL
// URL of the thumbnail (JPEG only) for the video
ThumbnailURL string `json:"thumbnail_url"`
// Title
// Title for the result
Title string `json:"title"`
// Type
// Type of the result, must be video
Type InlineType `json:"type"`
// VideoURL
// A valid URL for the embedded video player or video file
VideoURL string `json:"video_url"`
// Caption
// Caption of the video to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Description
// Short description of the result
Description *string `json:"description,omitempty"`
// InputMessageContent
// 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"`
// ParseMode
// Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// VideoDuration
// Video duration in seconds
VideoDuration *int64 `json:"video_duration,omitempty"`
// VideoHeight
// Video height
VideoHeight *int64 `json:"video_height,omitempty"`
// VideoWidth
// Video width
VideoWidth *int64 `json:"video_width,omitempty"`
}
InlineQueryResultVideo 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.
func (*InlineQueryResultVideo) GetCaption ¶
func (t *InlineQueryResultVideo) GetCaption() string
func (*InlineQueryResultVideo) GetDescription ¶
func (t *InlineQueryResultVideo) GetDescription() string
func (*InlineQueryResultVideo) GetID ¶
func (t *InlineQueryResultVideo) GetID() string
func (*InlineQueryResultVideo) GetInputMessageContent ¶
func (t *InlineQueryResultVideo) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultVideo) GetMimeType ¶
func (t *InlineQueryResultVideo) GetMimeType() string
func (*InlineQueryResultVideo) GetParseMode ¶
func (t *InlineQueryResultVideo) GetParseMode() string
func (*InlineQueryResultVideo) GetReplyMarkup ¶
func (t *InlineQueryResultVideo) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultVideo) GetThumbnailURL ¶
func (t *InlineQueryResultVideo) GetThumbnailURL() string
func (*InlineQueryResultVideo) GetTitle ¶
func (t *InlineQueryResultVideo) GetTitle() string
func (*InlineQueryResultVideo) GetType ¶
func (t *InlineQueryResultVideo) GetType() *InlineType
func (*InlineQueryResultVideo) GetVideoDuration ¶
func (t *InlineQueryResultVideo) GetVideoDuration() int64
func (*InlineQueryResultVideo) GetVideoHeight ¶
func (t *InlineQueryResultVideo) GetVideoHeight() int64
func (*InlineQueryResultVideo) GetVideoURL ¶
func (t *InlineQueryResultVideo) GetVideoURL() string
func (*InlineQueryResultVideo) GetVideoWidth ¶
func (t *InlineQueryResultVideo) GetVideoWidth() int64
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct {
// ID
// Unique identifier for this result, 1-64 bytes
ID string `json:"id"`
// Title
// Recording title
Title string `json:"title"`
// Type
// Type of the result, must be voice
Type InlineType `json:"type"`
// VoiceURL
// A valid URL for the voice recording
VoiceURL string `json:"voice_url"`
// Caption
// Caption, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// InputMessageContent
// Content of the message to be sent instead of the voice recording
InputMessageContent *InputMessageContent `json:"input_message_content,omitempty"`
// ParseMode
// Mode for parsing entities in the voice message caption. See formatting options for more
// details.
ParseMode *string `json:"parse_mode,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// VoiceDuration
// Recording duration in seconds
VoiceDuration *int64 `json:"voice_duration,omitempty"`
}
InlineQueryResultVoice 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.
func (*InlineQueryResultVoice) GetCaption ¶
func (t *InlineQueryResultVoice) GetCaption() string
func (*InlineQueryResultVoice) GetID ¶
func (t *InlineQueryResultVoice) GetID() string
func (*InlineQueryResultVoice) GetInputMessageContent ¶
func (t *InlineQueryResultVoice) GetInputMessageContent() *InputMessageContent
func (*InlineQueryResultVoice) GetParseMode ¶
func (t *InlineQueryResultVoice) GetParseMode() string
func (*InlineQueryResultVoice) GetReplyMarkup ¶
func (t *InlineQueryResultVoice) GetReplyMarkup() *InlineKeyboardMarkup
func (*InlineQueryResultVoice) GetTitle ¶
func (t *InlineQueryResultVoice) GetTitle() string
func (*InlineQueryResultVoice) GetType ¶
func (t *InlineQueryResultVoice) GetType() *InlineType
func (*InlineQueryResultVoice) GetVoiceDuration ¶
func (t *InlineQueryResultVoice) GetVoiceDuration() int64
func (*InlineQueryResultVoice) GetVoiceURL ¶
func (t *InlineQueryResultVoice) GetVoiceURL() string
type InlineQueryResultsButton ¶
type InlineQueryResultsButton struct {
// Text
// Label text on the button
Text string `json:"text"`
// StartParameter
// 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"`
// WebApp
// 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"`
}
InlineQueryResultsButton This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
func (*InlineQueryResultsButton) GetStartParameter ¶
func (t *InlineQueryResultsButton) GetStartParameter() string
func (*InlineQueryResultsButton) GetText ¶
func (t *InlineQueryResultsButton) GetText() string
func (*InlineQueryResultsButton) GetWebApp ¶
func (t *InlineQueryResultsButton) GetWebApp() *WebAppInfo
type InlineType ¶
type InlineType int
const ( InlineTypeArticle InlineType InlineTypeAudio InlineTypeContact InlineTypeDocument InlineTypeGame InlineTypeGif InlineTypeLocation InlineTypeMpeg4Gif InlineTypePhoto InlineTypeSticker InlineTypeVenue InlineTypeVideo InlineTypeVoice )
func (InlineType) MarshalText ¶
func (enum InlineType) MarshalText() ([]byte, error)
func (InlineType) String ¶
func (enum InlineType) String() string
func (*InlineType) UnmarshalText ¶
func (enum *InlineType) UnmarshalText(src []byte) error
type InputContactMessageContent ¶
type InputContactMessageContent struct {
// FirstName
// Contact's first name
FirstName string `json:"first_name"`
// PhoneNumber
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// LastName
// Contact's last name
LastName *string `json:"last_name,omitempty"`
// Vcard
// Additional data about the contact in the form of a vCard, 0-2048 bytes
Vcard *string `json:"vcard,omitempty"`
}
InputContactMessageContent Represents the content of a contact message to be sent as the result of an inline query.
func (*InputContactMessageContent) GetFirstName ¶
func (t *InputContactMessageContent) GetFirstName() string
func (*InputContactMessageContent) GetLastName ¶
func (t *InputContactMessageContent) GetLastName() string
func (*InputContactMessageContent) GetPhoneNumber ¶
func (t *InputContactMessageContent) GetPhoneNumber() string
func (*InputContactMessageContent) GetVcard ¶
func (t *InputContactMessageContent) GetVcard() string
type InputFile ¶
func (InputFile) MarshalText ¶
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct {
// Currency
// Three-letter ISO 4217 currency code, see more on currencies
Currency string `json:"currency"`
// Description
// Product description, 1-255 characters
Description string `json:"description"`
// Payload
// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for
// your internal processes.
Payload string `json:"payload"`
// Prices
// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount,
// delivery cost, delivery tax, bonus, etc.)
Prices []LabeledPrice `json:"prices"`
// ProviderToken
// Payment provider token, obtained via @BotFather
ProviderToken string `json:"provider_token"`
// Title
// Product name, 1-32 characters
Title string `json:"title"`
// IsFlexible
// Pass True if the final price depends on the shipping method
IsFlexible *bool `json:"is_flexible,omitempty"`
// MaxTipAmount
// 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 *int64 `json:"max_tip_amount,omitempty"`
// NeedEmail
// Pass True if you require the user's email address to complete the order
NeedEmail *bool `json:"need_email,omitempty"`
// NeedName
// Pass True if you require the user's full name to complete the order
NeedName *bool `json:"need_name,omitempty"`
// NeedPhoneNumber
// Pass True if you require the user's phone number to complete the order
NeedPhoneNumber *bool `json:"need_phone_number,omitempty"`
// NeedShippingAddress
// Pass True if you require the user's shipping address to complete the order
NeedShippingAddress *bool `json:"need_shipping_address,omitempty"`
// PhotoHeight
// Photo height
PhotoHeight *int64 `json:"photo_height,omitempty"`
// PhotoSize
// Photo size in bytes
PhotoSize *int64 `json:"photo_size,omitempty"`
// PhotoURL
// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image
// for a service.
PhotoURL *string `json:"photo_url,omitempty"`
// PhotoWidth
// Photo width
PhotoWidth *int64 `json:"photo_width,omitempty"`
// ProviderData
// 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"`
// SendEmailToProvider
// Pass True if the user's email address should be sent to provider
SendEmailToProvider *bool `json:"send_email_to_provider,omitempty"`
// SendPhoneNumberToProvider
// Pass True if the user's phone number should be sent to provider
SendPhoneNumberToProvider *bool `json:"send_phone_number_to_provider,omitempty"`
// SuggestedTipAmounts
// 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 []int64 `json:"suggested_tip_amounts,omitempty"`
}
InputInvoiceMessageContent Represents the content of an invoice message to be sent as the result of an inline query.
func (*InputInvoiceMessageContent) GetCurrency ¶
func (t *InputInvoiceMessageContent) GetCurrency() string
func (*InputInvoiceMessageContent) GetDescription ¶
func (t *InputInvoiceMessageContent) GetDescription() string
func (*InputInvoiceMessageContent) GetIsFlexible ¶
func (t *InputInvoiceMessageContent) GetIsFlexible() bool
func (*InputInvoiceMessageContent) GetMaxTipAmount ¶
func (t *InputInvoiceMessageContent) GetMaxTipAmount() int64
func (*InputInvoiceMessageContent) GetNeedEmail ¶
func (t *InputInvoiceMessageContent) GetNeedEmail() bool
func (*InputInvoiceMessageContent) GetNeedName ¶
func (t *InputInvoiceMessageContent) GetNeedName() bool
func (*InputInvoiceMessageContent) GetNeedPhoneNumber ¶
func (t *InputInvoiceMessageContent) GetNeedPhoneNumber() bool
func (*InputInvoiceMessageContent) GetNeedShippingAddress ¶
func (t *InputInvoiceMessageContent) GetNeedShippingAddress() bool
func (*InputInvoiceMessageContent) GetPayload ¶
func (t *InputInvoiceMessageContent) GetPayload() string
func (*InputInvoiceMessageContent) GetPhotoHeight ¶
func (t *InputInvoiceMessageContent) GetPhotoHeight() int64
func (*InputInvoiceMessageContent) GetPhotoSize ¶
func (t *InputInvoiceMessageContent) GetPhotoSize() int64
func (*InputInvoiceMessageContent) GetPhotoURL ¶
func (t *InputInvoiceMessageContent) GetPhotoURL() string
func (*InputInvoiceMessageContent) GetPhotoWidth ¶
func (t *InputInvoiceMessageContent) GetPhotoWidth() int64
func (*InputInvoiceMessageContent) GetProviderData ¶
func (t *InputInvoiceMessageContent) GetProviderData() string
func (*InputInvoiceMessageContent) GetProviderToken ¶
func (t *InputInvoiceMessageContent) GetProviderToken() string
func (*InputInvoiceMessageContent) GetSendEmailToProvider ¶
func (t *InputInvoiceMessageContent) GetSendEmailToProvider() bool
func (*InputInvoiceMessageContent) GetSendPhoneNumberToProvider ¶
func (t *InputInvoiceMessageContent) GetSendPhoneNumberToProvider() bool
func (*InputInvoiceMessageContent) GetTitle ¶
func (t *InputInvoiceMessageContent) GetTitle() string
type InputLocationMessageContent ¶
type InputLocationMessageContent struct {
// Latitude
// Latitude of the location in degrees
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of the location in degrees
Longitude float64 `json:"longitude"`
// Heading
// For live locations, a direction in which the user is moving, in degrees. Must be between 1
// and 360 if specified.
Heading *int64 `json:"heading,omitempty"`
// HorizontalAccuracy
// The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
// LivePeriod
// Period in seconds for which the location can be updated, should be between 60 and 86400.
LivePeriod *int64 `json:"live_period,omitempty"`
// ProximityAlertRadius
// 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 *int64 `json:"proximity_alert_radius,omitempty"`
}
InputLocationMessageContent Represents the content of a location message to be sent as the result of an inline query.
func (*InputLocationMessageContent) GetHeading ¶
func (t *InputLocationMessageContent) GetHeading() int64
func (*InputLocationMessageContent) GetHorizontalAccuracy ¶
func (t *InputLocationMessageContent) GetHorizontalAccuracy() *float64
func (*InputLocationMessageContent) GetLatitude ¶
func (t *InputLocationMessageContent) GetLatitude() *float64
func (*InputLocationMessageContent) GetLivePeriod ¶
func (t *InputLocationMessageContent) GetLivePeriod() int64
func (*InputLocationMessageContent) GetLongitude ¶
func (t *InputLocationMessageContent) GetLongitude() *float64
func (*InputLocationMessageContent) GetProximityAlertRadius ¶
func (t *InputLocationMessageContent) GetProximityAlertRadius() int64
type InputMedia ¶
type InputMedia struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be photo
Type InputType `json:"type"`
// Caption
// Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// HasSpoiler
// Pass True if the photo needs to be covered with a spoiler animation
HasSpoiler *bool `json:"has_spoiler,omitempty"`
// ParseMode
// Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
}
InputMedia This object represents the content of a media message to be sent. It should be one of
func (*InputMedia) GetCaption ¶
func (t *InputMedia) GetCaption() string
func (*InputMedia) GetHasSpoiler ¶
func (t *InputMedia) GetHasSpoiler() bool
func (*InputMedia) GetMedia ¶
func (t *InputMedia) GetMedia() string
func (*InputMedia) GetParseMode ¶
func (t *InputMedia) GetParseMode() string
func (*InputMedia) GetType ¶
func (t *InputMedia) GetType() *InputType
type InputMediaAnimation ¶
type InputMediaAnimation struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be animation
Type InputType `json:"type"`
// Caption
// Caption of the animation to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Duration
// Animation duration in seconds
Duration *int64 `json:"duration,omitempty"`
// HasSpoiler
// Pass True if the animation needs to be covered with a spoiler animation
HasSpoiler *bool `json:"has_spoiler,omitempty"`
// Height
// Animation height
Height *int64 `json:"height,omitempty"`
// ParseMode
// Mode for parsing entities in the animation caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *FileID `json:"thumbnail,omitempty"`
// Width
// Animation width
Width *int64 `json:"width,omitempty"`
}
InputMediaAnimation Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
func (*InputMediaAnimation) GetCaption ¶
func (t *InputMediaAnimation) GetCaption() string
func (*InputMediaAnimation) GetDuration ¶
func (t *InputMediaAnimation) GetDuration() int64
func (*InputMediaAnimation) GetHasSpoiler ¶
func (t *InputMediaAnimation) GetHasSpoiler() bool
func (*InputMediaAnimation) GetHeight ¶
func (t *InputMediaAnimation) GetHeight() int64
func (*InputMediaAnimation) GetMedia ¶
func (t *InputMediaAnimation) GetMedia() string
func (*InputMediaAnimation) GetParseMode ¶
func (t *InputMediaAnimation) GetParseMode() string
func (*InputMediaAnimation) GetThumbnail ¶
func (t *InputMediaAnimation) GetThumbnail() *FileID
func (*InputMediaAnimation) GetType ¶
func (t *InputMediaAnimation) GetType() *InputType
func (*InputMediaAnimation) GetWidth ¶
func (t *InputMediaAnimation) GetWidth() int64
type InputMediaAudio ¶
type InputMediaAudio struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be audio
Type InputType `json:"type"`
// Caption
// Caption of the audio to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Duration
// Duration of the audio in seconds
Duration *int64 `json:"duration,omitempty"`
// ParseMode
// Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// Performer
// Performer of the audio
Performer *string `json:"performer,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *FileID `json:"thumbnail,omitempty"`
// Title
// Title of the audio
Title *string `json:"title,omitempty"`
}
InputMediaAudio Represents an audio file to be treated as music to be sent.
func (*InputMediaAudio) GetCaption ¶
func (t *InputMediaAudio) GetCaption() string
func (*InputMediaAudio) GetDuration ¶
func (t *InputMediaAudio) GetDuration() int64
func (*InputMediaAudio) GetMedia ¶
func (t *InputMediaAudio) GetMedia() string
func (*InputMediaAudio) GetParseMode ¶
func (t *InputMediaAudio) GetParseMode() string
func (*InputMediaAudio) GetPerformer ¶
func (t *InputMediaAudio) GetPerformer() string
func (*InputMediaAudio) GetThumbnail ¶
func (t *InputMediaAudio) GetThumbnail() *FileID
func (*InputMediaAudio) GetTitle ¶
func (t *InputMediaAudio) GetTitle() string
func (*InputMediaAudio) GetType ¶
func (t *InputMediaAudio) GetType() *InputType
type InputMediaDocument ¶
type InputMediaDocument struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be document
Type InputType `json:"type"`
// Caption
// Caption of the document to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// DisableContentTypeDetection
// 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"`
// ParseMode
// Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *FileID `json:"thumbnail,omitempty"`
}
InputMediaDocument Represents a general file to be sent.
func (*InputMediaDocument) GetCaption ¶
func (t *InputMediaDocument) GetCaption() string
func (*InputMediaDocument) GetDisableContentTypeDetection ¶
func (t *InputMediaDocument) GetDisableContentTypeDetection() bool
func (*InputMediaDocument) GetMedia ¶
func (t *InputMediaDocument) GetMedia() string
func (*InputMediaDocument) GetParseMode ¶
func (t *InputMediaDocument) GetParseMode() string
func (*InputMediaDocument) GetThumbnail ¶
func (t *InputMediaDocument) GetThumbnail() *FileID
func (*InputMediaDocument) GetType ¶
func (t *InputMediaDocument) GetType() *InputType
type InputMediaGraphics ¶
type InputMediaGraphics interface{}
type InputMediaPhoto ¶
type InputMediaPhoto struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be photo
Type InputType `json:"type"`
// Caption
// Caption of the photo to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// HasSpoiler
// Pass True if the photo needs to be covered with a spoiler animation
HasSpoiler *bool `json:"has_spoiler,omitempty"`
// ParseMode
// Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
}
InputMediaPhoto Represents a photo to be sent.
func (*InputMediaPhoto) GetCaption ¶
func (t *InputMediaPhoto) GetCaption() string
func (*InputMediaPhoto) GetHasSpoiler ¶
func (t *InputMediaPhoto) GetHasSpoiler() bool
func (*InputMediaPhoto) GetMedia ¶
func (t *InputMediaPhoto) GetMedia() string
func (*InputMediaPhoto) GetParseMode ¶
func (t *InputMediaPhoto) GetParseMode() string
func (*InputMediaPhoto) GetType ¶
func (t *InputMediaPhoto) GetType() *InputType
type InputMediaVideo ¶
type InputMediaVideo struct {
// Media
// 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. More information on Sending Files »
Media string `json:"media"`
// Type
// Type of the result, must be video
Type InputType `json:"type"`
// Caption
// Caption of the video to be sent, 0-1024 characters after entities parsing
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// List of special entities that appear in the caption, which can be specified instead of
// parse_mode
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// Duration
// Video duration in seconds
Duration *int64 `json:"duration,omitempty"`
// HasSpoiler
// Pass True if the video needs to be covered with a spoiler animation
HasSpoiler *bool `json:"has_spoiler,omitempty"`
// Height
// Video height
Height *int64 `json:"height,omitempty"`
// ParseMode
// Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
// SupportsStreaming
// Pass True if the uploaded video is suitable for streaming
SupportsStreaming *bool `json:"supports_streaming,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *FileID `json:"thumbnail,omitempty"`
// Width
// Video width
Width *int64 `json:"width,omitempty"`
}
InputMediaVideo Represents a video to be sent.
func (*InputMediaVideo) GetCaption ¶
func (t *InputMediaVideo) GetCaption() string
func (*InputMediaVideo) GetDuration ¶
func (t *InputMediaVideo) GetDuration() int64
func (*InputMediaVideo) GetHasSpoiler ¶
func (t *InputMediaVideo) GetHasSpoiler() bool
func (*InputMediaVideo) GetHeight ¶
func (t *InputMediaVideo) GetHeight() int64
func (*InputMediaVideo) GetMedia ¶
func (t *InputMediaVideo) GetMedia() string
func (*InputMediaVideo) GetParseMode ¶
func (t *InputMediaVideo) GetParseMode() string
func (*InputMediaVideo) GetSupportsStreaming ¶
func (t *InputMediaVideo) GetSupportsStreaming() bool
func (*InputMediaVideo) GetThumbnail ¶
func (t *InputMediaVideo) GetThumbnail() *FileID
func (*InputMediaVideo) GetType ¶
func (t *InputMediaVideo) GetType() *InputType
func (*InputMediaVideo) GetWidth ¶
func (t *InputMediaVideo) GetWidth() int64
type InputMessageContent ¶
type InputMessageContent struct {
// MessageText
// Text of the message to be sent, 1-4096 characters
MessageText string `json:"message_text"`
// DisableWebPagePreview
// Disables link previews for links in the sent message
DisableWebPagePreview *bool `json:"disable_web_page_preview,omitempty"`
// Entities
// List of special entities that appear in message text, which can be specified instead of
// parse_mode
Entities []MessageEntity `json:"entities,omitempty"`
// ParseMode
// Mode for parsing entities in the message text. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
}
InputMessageContent 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:
func (*InputMessageContent) GetDisableWebPagePreview ¶
func (t *InputMessageContent) GetDisableWebPagePreview() bool
func (*InputMessageContent) GetMessageText ¶
func (t *InputMessageContent) GetMessageText() string
func (*InputMessageContent) GetParseMode ¶
func (t *InputMessageContent) GetParseMode() string
type InputSticker ¶
type InputSticker struct {
// EmojiList
// List of 1-20 emoji associated with the sticker
EmojiList []string `json:"emoji_list"`
// Sticker
// The added sticker. Pass a file_id as a String to send a file that already exists on the
// Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet,
// upload a new one using multipart/form-data, or pass "attach://<file_attach_name>" to upload
// a new one using multipart/form-data under <file_attach_name> name. Animated and video
// stickers can't be uploaded via HTTP URL. More information on Sending Files »
Sticker FileID `json:"sticker"`
// Keywords
// 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,omitempty"`
// MaskPosition
// Position where the mask should be placed on faces. For "mask" stickers only.
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
}
InputSticker This object describes a sticker to be added to a sticker set.
func (*InputSticker) GetMaskPosition ¶
func (t *InputSticker) GetMaskPosition() *MaskPosition
func (*InputSticker) GetSticker ¶
func (t *InputSticker) GetSticker() *FileID
type InputTextMessageContent ¶
type InputTextMessageContent struct {
// MessageText
// Text of the message to be sent, 1-4096 characters
MessageText string `json:"message_text"`
// DisableWebPagePreview
// Disables link previews for links in the sent message
DisableWebPagePreview *bool `json:"disable_web_page_preview,omitempty"`
// Entities
// List of special entities that appear in message text, which can be specified instead of
// parse_mode
Entities []MessageEntity `json:"entities,omitempty"`
// ParseMode
// Mode for parsing entities in the message text. See formatting options for more details.
ParseMode *string `json:"parse_mode,omitempty"`
}
InputTextMessageContent Represents the content of a text message to be sent as the result of an inline query.
func (*InputTextMessageContent) GetDisableWebPagePreview ¶
func (t *InputTextMessageContent) GetDisableWebPagePreview() bool
func (*InputTextMessageContent) GetMessageText ¶
func (t *InputTextMessageContent) GetMessageText() string
func (*InputTextMessageContent) GetParseMode ¶
func (t *InputTextMessageContent) GetParseMode() string
type InputType ¶
type InputType int
const ( InputTypeAnimation InputType InputTypeAudio InputTypeDocument InputTypePhoto InputTypeVideo )
func (InputType) MarshalText ¶
func (*InputType) UnmarshalText ¶
type InputVenueMessageContent ¶
type InputVenueMessageContent struct {
// Address
// Address of the venue
Address string `json:"address"`
// Latitude
// Latitude of the venue in degrees
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of the venue in degrees
Longitude float64 `json:"longitude"`
// Title
// Name of the venue
Title string `json:"title"`
// FoursquareID
// Foursquare identifier of the venue, if known
FoursquareID *string `json:"foursquare_id,omitempty"`
// FoursquareType
// 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
// Google Places identifier of the venue
GooglePlaceID *string `json:"google_place_id,omitempty"`
// GooglePlaceType
// Google Places type of the venue. (See supported types.)
GooglePlaceType *string `json:"google_place_type,omitempty"`
}
InputVenueMessageContent Represents the content of a venue message to be sent as the result of an inline query.
func (*InputVenueMessageContent) GetAddress ¶
func (t *InputVenueMessageContent) GetAddress() string
func (*InputVenueMessageContent) GetFoursquareID ¶
func (t *InputVenueMessageContent) GetFoursquareID() string
func (*InputVenueMessageContent) GetFoursquareType ¶
func (t *InputVenueMessageContent) GetFoursquareType() string
func (*InputVenueMessageContent) GetGooglePlaceID ¶
func (t *InputVenueMessageContent) GetGooglePlaceID() string
func (*InputVenueMessageContent) GetGooglePlaceType ¶
func (t *InputVenueMessageContent) GetGooglePlaceType() string
func (*InputVenueMessageContent) GetLatitude ¶
func (t *InputVenueMessageContent) GetLatitude() *float64
func (*InputVenueMessageContent) GetLongitude ¶
func (t *InputVenueMessageContent) GetLongitude() *float64
func (*InputVenueMessageContent) GetTitle ¶
func (t *InputVenueMessageContent) GetTitle() string
type IntStr ¶
func (IntStr) MarshalText ¶
type Invoice ¶
type Invoice struct {
// Currency
// Three-letter ISO 4217 currency code
Currency string `json:"currency"`
// Description
// Product description
Description string `json:"description"`
// StartParameter
// Unique bot deep-linking parameter that can be used to generate this invoice
StartParameter string `json:"start_parameter"`
// Title
// Product name
Title string `json:"title"`
// TotalAmount
// 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. 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).
TotalAmount int64 `json:"total_amount"`
}
Invoice This object contains basic information about an invoice.
func (*Invoice) GetCurrency ¶
func (*Invoice) GetDescription ¶
func (*Invoice) GetStartParameter ¶
func (*Invoice) GetTotalAmount ¶
type KeyboardButton ¶
type KeyboardButton struct {
// Text
// 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"`
// RequestChat
// 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"`
// RequestContact
// If True, the user's phone number will be sent as a contact when the button is pressed.
// Available in private chats only.
RequestContact *bool `json:"request_contact,omitempty"`
// RequestLocation
// 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,omitempty"`
// RequestPoll
// 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.
RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"`
// RequestUser
// 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"`
// WebApp
// 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"`
}
KeyboardButton This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive.
func (*KeyboardButton) GetRequestChat ¶
func (t *KeyboardButton) GetRequestChat() *KeyboardButtonRequestChat
func (*KeyboardButton) GetRequestContact ¶
func (t *KeyboardButton) GetRequestContact() bool
func (*KeyboardButton) GetRequestLocation ¶
func (t *KeyboardButton) GetRequestLocation() bool
func (*KeyboardButton) GetRequestPoll ¶
func (t *KeyboardButton) GetRequestPoll() *KeyboardButtonPollType
func (*KeyboardButton) GetRequestUser ¶
func (t *KeyboardButton) GetRequestUser() *KeyboardButtonRequestUser
func (*KeyboardButton) GetText ¶
func (t *KeyboardButton) GetText() string
func (*KeyboardButton) GetWebApp ¶
func (t *KeyboardButton) GetWebApp() *WebAppInfo
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
// Type
// 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 *KeyboardButtonType `json:"type,omitempty"`
}
KeyboardButtonPollType This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
func (*KeyboardButtonPollType) GetType ¶
func (t *KeyboardButtonPollType) GetType() *KeyboardButtonType
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct {
// ChatIsChannel
// Pass True to request a channel chat, pass False to request a group or a supergroup chat.
ChatIsChannel bool `json:"chat_is_channel"`
// RequestID
// Signed 32-bit identifier of the request, which will be received back in the ChatShared
// object. Must be unique within the message
RequestID int64 `json:"request_id"`
// BotAdministratorRights
// 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"`
// BotIsMember
// Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions
// are applied.
BotIsMember *bool `json:"bot_is_member,omitempty"`
// ChatHasUsername
// 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,omitempty"`
// ChatIsCreated
// Pass True to request a chat owned by the user. Otherwise, no additional restrictions are
// applied.
ChatIsCreated *bool `json:"chat_is_created,omitempty"`
// ChatIsForum
// 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,omitempty"`
// UserAdministratorRights
// 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"`
}
KeyboardButtonRequestChat This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats »
func (*KeyboardButtonRequestChat) GetBotAdministratorRights ¶
func (t *KeyboardButtonRequestChat) GetBotAdministratorRights() *ChatAdministratorRights
func (*KeyboardButtonRequestChat) GetBotIsMember ¶
func (t *KeyboardButtonRequestChat) GetBotIsMember() bool
func (*KeyboardButtonRequestChat) GetChatHasUsername ¶
func (t *KeyboardButtonRequestChat) GetChatHasUsername() bool
func (*KeyboardButtonRequestChat) GetChatIsChannel ¶
func (t *KeyboardButtonRequestChat) GetChatIsChannel() bool
func (*KeyboardButtonRequestChat) GetChatIsCreated ¶
func (t *KeyboardButtonRequestChat) GetChatIsCreated() bool
func (*KeyboardButtonRequestChat) GetChatIsForum ¶
func (t *KeyboardButtonRequestChat) GetChatIsForum() bool
func (*KeyboardButtonRequestChat) GetRequestID ¶
func (t *KeyboardButtonRequestChat) GetRequestID() int64
func (*KeyboardButtonRequestChat) GetUserAdministratorRights ¶
func (t *KeyboardButtonRequestChat) GetUserAdministratorRights() *ChatAdministratorRights
type KeyboardButtonRequestUser ¶
type KeyboardButtonRequestUser struct {
// RequestID
// Signed 32-bit identifier of the request, which will be received back in the UserShared
// object. Must be unique within the message
RequestID int64 `json:"request_id"`
// UserIsBot
// 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,omitempty"`
// UserIsPremium
// 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,omitempty"`
}
KeyboardButtonRequestUser 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. More about requesting users »
func (*KeyboardButtonRequestUser) GetRequestID ¶
func (t *KeyboardButtonRequestUser) GetRequestID() int64
func (*KeyboardButtonRequestUser) GetUserIsBot ¶
func (t *KeyboardButtonRequestUser) GetUserIsBot() bool
func (*KeyboardButtonRequestUser) GetUserIsPremium ¶
func (t *KeyboardButtonRequestUser) GetUserIsPremium() bool
type KeyboardButtonType ¶
type KeyboardButtonType int
const ( KeyboardButtonTypeQuiz KeyboardButtonType KeyboardButtonTypeRegular )
func (KeyboardButtonType) MarshalText ¶
func (enum KeyboardButtonType) MarshalText() ([]byte, error)
func (KeyboardButtonType) String ¶
func (enum KeyboardButtonType) String() string
func (*KeyboardButtonType) UnmarshalText ¶
func (enum *KeyboardButtonType) UnmarshalText(src []byte) error
type LabeledPrice ¶
type LabeledPrice struct {
// Amount
// 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. 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).
Amount int64 `json:"amount"`
// Label
// Portion label
Label string `json:"label"`
}
LabeledPrice This object represents a portion of the price for goods or services.
func (*LabeledPrice) GetAmount ¶
func (t *LabeledPrice) GetAmount() int64
func (*LabeledPrice) GetLabel ¶
func (t *LabeledPrice) GetLabel() string
type Location ¶
type Location struct {
// Latitude
// Latitude as defined by sender
Latitude float64 `json:"latitude"`
// Longitude
// Longitude as defined by sender
Longitude float64 `json:"longitude"`
// Heading
// The direction in which user is moving, in degrees; 1-360. For active live locations only.
Heading *int64 `json:"heading,omitempty"`
// HorizontalAccuracy
// The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
// LivePeriod
// Time relative to the message sending date, during which the location can be updated; in
// seconds. For active live locations only.
LivePeriod *int64 `json:"live_period,omitempty"`
// ProximityAlertRadius
// The maximum distance for proximity alerts about approaching another chat member, in meters.
// For sent live locations only.
ProximityAlertRadius *int64 `json:"proximity_alert_radius,omitempty"`
}
Location This object represents a point on the map.
func (*Location) GetHeading ¶
func (*Location) GetHorizontalAccuracy ¶
func (*Location) GetLatitude ¶
func (*Location) GetLivePeriod ¶
func (*Location) GetLongitude ¶
func (*Location) GetProximityAlertRadius ¶
type LoginURL ¶
type LoginURL struct {
// URL
// An HTTPS 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"`
// BotUsername
// 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"`
// ForwardText
// New text of the button in forwarded messages.
ForwardText *string `json:"forward_text,omitempty"`
// RequestWriteAccess
// Pass True to request the permission for your bot to send messages to the user.
RequestWriteAccess *bool `json:"request_write_access,omitempty"`
}
LoginURL 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:
func (*LoginURL) GetBotUsername ¶
func (*LoginURL) GetForwardText ¶
func (*LoginURL) GetRequestWriteAccess ¶
type LongPoller ¶
type LongPoller struct {
// contains filtered or unexported fields
}
func NewPoller ¶
func NewPoller(api *API, handler Handler, options ...LongPollerOption) *LongPoller
func (*LongPoller) Listen ¶
func (lp *LongPoller) Listen(updatesConfig *GetUpdatesConfig)
type LongPollerOption ¶
type LongPollerOption func(*pollerOptions)
LongPollerOption is used to customize polling behavior.
func LongPollerErrorListener ¶
func LongPollerErrorListener(listener ErrorCallback) LongPollerOption
LongPollerErrorListener sets up a listener for polling errors.
func LongPollerPollTimeout ¶
func LongPollerPollTimeout(timeout time.Duration) LongPollerOption
LongPollerErrorListener sets the timeout after an error occurs during polling.
type MaskPosition ¶
type MaskPosition struct {
// Point
// The part of the face relative to which the mask should be placed. One of "forehead", "eyes",
// "mouth", or "chin".
Point string `json:"point"`
// Scale
// Mask scaling coefficient. For example, 2.0 means double size.
Scale float64 `json:"scale"`
// XShift
// 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 float64 `json:"x_shift"`
// YShift
// 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 float64 `json:"y_shift"`
}
MaskPosition This object describes the position on faces where a mask should be placed by default.
func (*MaskPosition) GetPoint ¶
func (t *MaskPosition) GetPoint() string
func (*MaskPosition) GetScale ¶
func (t *MaskPosition) GetScale() *float64
func (*MaskPosition) GetXShift ¶
func (t *MaskPosition) GetXShift() *float64
func (*MaskPosition) GetYShift ¶
func (t *MaskPosition) GetYShift() *float64
type MenuButton ¶
type MenuButton struct {
// Type
// Type of the button, must be commands
Type MenuType `json:"type"`
}
MenuButton This object describes the bot's menu button in a private chat. It should be one of
func (*MenuButton) GetType ¶
func (t *MenuButton) GetType() *MenuType
type MenuButtonCommands ¶
type MenuButtonCommands struct {
// Type
// Type of the button, must be commands
Type MenuType `json:"type"`
}
MenuButtonCommands Represents a menu button, which opens the bot's list of commands.
func (*MenuButtonCommands) GetType ¶
func (t *MenuButtonCommands) GetType() *MenuType
type MenuButtonDefault ¶
type MenuButtonDefault struct {
// Type
// Type of the button, must be default
Type MenuType `json:"type"`
}
MenuButtonDefault Describes that no specific value for the menu button was set.
func (*MenuButtonDefault) GetType ¶
func (t *MenuButtonDefault) GetType() *MenuType
type MenuButtonWebApp ¶
type MenuButtonWebApp struct {
// Text
// Text on the button
Text string `json:"text"`
// Type
// Type of the button, must be web_app
Type MenuType `json:"type"`
// WebApp
// 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.
WebApp WebAppInfo `json:"web_app"`
}
MenuButtonWebApp Represents a menu button, which launches a Web App.
func (*MenuButtonWebApp) GetText ¶
func (t *MenuButtonWebApp) GetText() string
func (*MenuButtonWebApp) GetType ¶
func (t *MenuButtonWebApp) GetType() *MenuType
func (*MenuButtonWebApp) GetWebApp ¶
func (t *MenuButtonWebApp) GetWebApp() *WebAppInfo
type Message ¶
type Message struct {
// Chat
// Conversation the message belongs to
Chat Chat `json:"chat"`
// Date
// Date the message was sent in Unix time
Date int64 `json:"date"`
// MessageID
// Unique message identifier inside this chat
MessageID int64 `json:"message_id"`
// Animation
// 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"`
// Audio
// Message is an audio file, information about the file
Audio *Audio `json:"audio,omitempty"`
// AuthorSignature
// Signature of the post author for messages in channels, or the custom title of an anonymous
// group administrator
AuthorSignature *string `json:"author_signature,omitempty"`
// Caption
// Caption for the animation, audio, document, photo, video or voice
Caption *string `json:"caption,omitempty"`
// CaptionEntities
// For messages with a caption, special entities like usernames, URLs, bot commands, etc. that
// appear in the caption
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
// ChannelChatCreated
// 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"`
// Service message: a chat was shared with the bot
ChatShared *ChatShared `json:"chat_shared,omitempty"`
// ConnectedWebsite
// The domain name of the website on which the user has logged in. More about Telegram Login »
ConnectedWebsite *string `json:"connected_website,omitempty"`
// Contact
// Message is a shared contact, information about the contact
Contact *Contact `json:"contact,omitempty"`
// DeleteChatPhoto
// Service message: the chat photo was deleted
DeleteChatPhoto *bool `json:"delete_chat_photo,omitempty"`
// Dice
// Message is a dice with random value
Dice *Dice `json:"dice,omitempty"`
// Document
// Message is a general file, information about the file
Document *Document `json:"document,omitempty"`
// EditDate
// Date the message was last edited in Unix time
EditDate *int64 `json:"edit_date,omitempty"`
// Entities
// For text messages, special entities like usernames, URLs, bot commands, etc. that appear in
// the text
Entities []MessageEntity `json:"entities,omitempty"`
// ForumTopicClosed
// Service message: forum topic closed
ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"`
// ForumTopicCreated
// Service message: forum topic created
ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"`
// ForumTopicEdited
// Service message: forum topic edited
ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"`
// ForumTopicReopened
// Service message: forum topic reopened
ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened,omitempty"`
// ForwardDate
// For forwarded messages, date the original message was sent in Unix time
ForwardDate *int64 `json:"forward_date,omitempty"`
// ForwardFrom
// For forwarded messages, sender of the original message
ForwardFrom *User `json:"forward_from,omitempty"`
// ForwardFromChat
// For messages forwarded from channels or from anonymous administrators, information about the
// original sender chat
ForwardFromChat *Chat `json:"forward_from_chat,omitempty"`
// ForwardFromMessageID
// For messages forwarded from channels, identifier of the original message in the channel
ForwardFromMessageID *int64 `json:"forward_from_message_id,omitempty"`
// ForwardSenderName
// 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"`
// ForwardSignature
// For forwarded messages that were originally sent in channels or by an anonymous chat
// administrator, signature of the message sender if present
ForwardSignature *string `json:"forward_signature,omitempty"`
// From
// Sender of the message; empty for messages sent to channels. For backward compatibility, the
// field contains a fake sender user in non-channel chats, if the message was sent on behalf of
// a chat.
From *User `json:"from,omitempty"`
// Game
// Message is a game, information about the game. More about games »
Game *Game `json:"game,omitempty"`
// GeneralForumTopicHidden
// Service message: the 'General' forum topic hidden
GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"`
// Service message: the 'General' forum topic unhidden
GeneralForumTopicUnhidden *GeneralForumTopicUnhidden `json:"general_forum_topic_unhidden,omitempty"`
// GroupChatCreated
// Service message: the group has been created
GroupChatCreated *bool `json:"group_chat_created,omitempty"`
// HasMediaSpoiler
// True, if the message media is covered by a spoiler animation
HasMediaSpoiler *bool `json:"has_media_spoiler,omitempty"`
// HasProtectedContent
// True, if the message can't be forwarded
HasProtectedContent *bool `json:"has_protected_content,omitempty"`
// Invoice
// Message is an invoice for a payment, information about the invoice. More about payments »
Invoice *Invoice `json:"invoice,omitempty"`
// IsAutomaticForward
// True, if the message is a channel post that was automatically forwarded to the connected
// discussion group
IsAutomaticForward *bool `json:"is_automatic_forward,omitempty"`
// IsTopicMessage
// True, if the message is sent to a forum topic
IsTopicMessage *bool `json:"is_topic_message,omitempty"`
// LeftChatMember
// A member was removed from the group, information about them (this member may be the bot
// itself)
LeftChatMember *User `json:"left_chat_member,omitempty"`
// Location
// Message is a shared location, information about the location
Location *Location `json:"location,omitempty"`
// MediaGroupID
// The unique identifier of a media message group this message belongs to
MediaGroupID *string `json:"media_group_id,omitempty"`
// MessageAutoDeleteTimerChanged
// Service message: auto-delete timer settings changed in the chat
MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
// MessageThreadID
// Unique identifier of a message thread to which the message belongs; for supergroups only
MessageThreadID *int64 `json:"message_thread_id,omitempty"`
// MigrateFromChatID
// 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 *int64 `json:"migrate_from_chat_id,omitempty"`
// MigrateToChatID
// 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 *int64 `json:"migrate_to_chat_id,omitempty"`
// NewChatMembers
// 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"`
// NewChatPhoto
// A chat photo was change to this value
NewChatPhoto []PhotoSize `json:"new_chat_photo,omitempty"`
// NewChatTitle
// A chat title was changed to this value
NewChatTitle *string `json:"new_chat_title,omitempty"`
// PassportData
// Telegram Passport data
PassportData *PassportData `json:"passport_data,omitempty"`
// Photo
// Message is a photo, available sizes of the photo
Photo []PhotoSize `json:"photo,omitempty"`
// PinnedMessage
// 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"`
// Poll
// Message is a native poll, information about the poll
Poll *Poll `json:"poll,omitempty"`
// ProximityAlertTriggered
// Service message. A user in the chat triggered another user's proximity alert while sharing
// Live Location.
ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"`
// ReplyMarkup
// Inline keyboard attached to the message. login_url buttons are represented as ordinary url
// buttons.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ReplyToMessage
// 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"`
// SenderChat
// Sender of the message, sent on behalf of a chat. For example, the channel itself for channel
// posts, the supergroup itself for messages from anonymous group administrators, the linked
// channel for messages automatically forwarded to the discussion group. For backward
// compatibility, the field from contains a fake sender user in non-channel chats, if the
// message was sent on behalf of a chat.
SenderChat *Chat `json:"sender_chat,omitempty"`
// Sticker
// Message is a sticker, information about the sticker
Sticker *Sticker `json:"sticker,omitempty"`
// SuccessfulPayment
// Message is a service message about a successful payment, information about the payment. More
// about payments »
SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"`
// SupergroupChatCreated
// 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"`
// Text
// For text messages, the actual UTF-8 text of the message
Text *string `json:"text,omitempty"`
// Service message: a user was shared with the bot
UserShared *UserShared `json:"user_shared,omitempty"`
// Venue
// 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"`
// ViaBot
// Bot through which the message was sent
ViaBot *User `json:"via_bot,omitempty"`
// Video
// Message is a video, information about the video
Video *Video `json:"video,omitempty"`
// VideoChatEnded
// Service message: video chat ended
VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"`
// VideoChatParticipantsInvited
// Service message: new participants invited to a video chat
VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"`
// VideoChatScheduled
// Service message: video chat scheduled
VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"`
// VideoChatStarted
// Service message: video chat started
VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"`
// VideoNote
// Message is a video note, information about the video message
VideoNote *VideoNote `json:"video_note,omitempty"`
// Voice
// Message is a voice message, information about the file
Voice *Voice `json:"voice,omitempty"`
// WebAppData
// Service message: data sent by a Web App
WebAppData *WebAppData `json:"web_app_data,omitempty"`
// WriteAccessAllowed
// Service message: the user allowed the bot added to the attachment menu to write messages
WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"`
}
Message This object represents a message.
func (*Message) Command ¶
Command checks if the message was a command and if it was, returns the command. If the Message was not a command, it returns an empty string.
If the command contains the at name syntax, it is removed. Use CommandWithAt() if you do not want that.
func (*Message) CommandArguments ¶
CommandArguments checks if the message was a command and if it was, returns all text after the command name. If the Message was not a command, it returns an empty string.
Note: The first character after the command name is omitted: - "/foo bar baz" yields "bar baz", not " bar baz" - "/foo-bar baz" yields "bar baz", too Even though the latter is not a command conforming to the spec, the API marks "/foo" as command entity.
func (*Message) CommandWithAt ¶
CommandWithAt checks if the message was a command and if it was, returns the command. If the Message was not a command, it returns an empty string.
If the command contains the at name syntax, it is not removed. Use Command() if you want that.
func (*Message) GetAnimation ¶
func (*Message) GetAuthorSignature ¶
func (*Message) GetCaption ¶
func (*Message) GetChannelChatCreated ¶
func (*Message) GetChatShared ¶
func (t *Message) GetChatShared() *ChatShared
func (*Message) GetConnectedWebsite ¶
func (*Message) GetContact ¶
func (*Message) GetDeleteChatPhoto ¶
func (*Message) GetDocument ¶
func (*Message) GetEditDate ¶
func (*Message) GetForumTopicClosed ¶
func (t *Message) GetForumTopicClosed() *ForumTopicClosed
func (*Message) GetForumTopicCreated ¶
func (t *Message) GetForumTopicCreated() *ForumTopicCreated
func (*Message) GetForumTopicEdited ¶
func (t *Message) GetForumTopicEdited() *ForumTopicEdited
func (*Message) GetForumTopicReopened ¶
func (t *Message) GetForumTopicReopened() *ForumTopicReopened
func (*Message) GetForwardDate ¶
func (*Message) GetForwardFrom ¶
func (*Message) GetForwardFromChat ¶
func (*Message) GetForwardFromMessageID ¶
func (*Message) GetForwardSenderName ¶
func (*Message) GetForwardSignature ¶
func (*Message) GetGeneralForumTopicHidden ¶
func (t *Message) GetGeneralForumTopicHidden() *GeneralForumTopicHidden
func (*Message) GetGeneralForumTopicUnhidden ¶
func (t *Message) GetGeneralForumTopicUnhidden() *GeneralForumTopicUnhidden
func (*Message) GetGroupChatCreated ¶
func (*Message) GetHasMediaSpoiler ¶
func (*Message) GetHasProtectedContent ¶
func (*Message) GetInvoice ¶
func (*Message) GetIsAutomaticForward ¶
func (*Message) GetIsTopicMessage ¶
func (*Message) GetLeftChatMember ¶
func (*Message) GetLocation ¶
func (*Message) GetMediaGroupID ¶
func (*Message) GetMessageAutoDeleteTimerChanged ¶
func (t *Message) GetMessageAutoDeleteTimerChanged() *MessageAutoDeleteTimerChanged
func (*Message) GetMessageID ¶
func (*Message) GetMessageThreadID ¶
func (*Message) GetMigrateFromChatID ¶
func (*Message) GetMigrateToChatID ¶
func (*Message) GetNewChatTitle ¶
func (*Message) GetPassportData ¶
func (t *Message) GetPassportData() *PassportData
func (*Message) GetPinnedMessage ¶
func (*Message) GetProximityAlertTriggered ¶
func (t *Message) GetProximityAlertTriggered() *ProximityAlertTriggered
func (*Message) GetReplyMarkup ¶
func (t *Message) GetReplyMarkup() *InlineKeyboardMarkup
func (*Message) GetReplyToMessage ¶
func (*Message) GetSenderChat ¶
func (*Message) GetSticker ¶
func (*Message) GetSuccessfulPayment ¶
func (t *Message) GetSuccessfulPayment() *SuccessfulPayment
func (*Message) GetSupergroupChatCreated ¶
func (*Message) GetUserShared ¶
func (t *Message) GetUserShared() *UserShared
func (*Message) GetVideoChatEnded ¶
func (t *Message) GetVideoChatEnded() *VideoChatEnded
func (*Message) GetVideoChatParticipantsInvited ¶
func (t *Message) GetVideoChatParticipantsInvited() *VideoChatParticipantsInvited
func (*Message) GetVideoChatScheduled ¶
func (t *Message) GetVideoChatScheduled() *VideoChatScheduled
func (*Message) GetVideoChatStarted ¶
func (t *Message) GetVideoChatStarted() *VideoChatStarted
func (*Message) GetVideoNote ¶
func (*Message) GetWebAppData ¶
func (t *Message) GetWebAppData() *WebAppData
func (*Message) GetWriteAccessAllowed ¶
func (t *Message) GetWriteAccessAllowed() *WriteAccessAllowed
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
// MessageAutoDeleteTime
// New auto-delete time for messages in the chat; in seconds
MessageAutoDeleteTime int64 `json:"message_auto_delete_time"`
}
MessageAutoDeleteTimerChanged This object represents a service message about a change in auto-delete timer settings.
func (*MessageAutoDeleteTimerChanged) GetMessageAutoDeleteTime ¶
func (t *MessageAutoDeleteTimerChanged) GetMessageAutoDeleteTime() int64
type MessageEntity ¶
type MessageEntity struct {
// Length
// Length of the entity in UTF-16 code units
Length int64 `json:"length"`
// Offset
// Offset in UTF-16 code units to the start of the entity
Offset int64 `json:"offset"`
// Type
// Type of the entity. Currently, can be "mention" (@username), "hashtag" (#hashtag), "cashtag"
// ($USD), "bot_command" (/start@jobs_bot), "url" (https://telegram.org), "email"
// ([email protected]), "phone_number" (+1-212-555-0123), "bold" (bold text), "italic"
// (italic text), "underline" (underlined text), "strikethrough" (strikethrough text),
// "spoiler" (spoiler message), "code" (monowidth string), "pre" (monowidth block), "text_link"
// (for clickable text URLs), "text_mention" (for users without usernames), "custom_emoji" (for
// inline custom emoji stickers)
Type EntityType `json:"type"`
// CustomEmojiID
// For "custom_emoji" only, unique identifier of the custom emoji. Use getCustomEmojiStickers
// to get full information about the sticker
CustomEmojiID *string `json:"custom_emoji_id,omitempty"`
// Language
// For "pre" only, the programming language of the entity text
Language *string `json:"language,omitempty"`
// URL
// For "text_link" only, URL that will be opened after user taps on the text
URL *string `json:"url,omitempty"`
// User
// For "text_mention" only, the mentioned user
User *User `json:"user,omitempty"`
}
MessageEntity This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
func (*MessageEntity) GetCustomEmojiID ¶
func (t *MessageEntity) GetCustomEmojiID() string
func (*MessageEntity) GetLanguage ¶
func (t *MessageEntity) GetLanguage() string
func (*MessageEntity) GetLength ¶
func (t *MessageEntity) GetLength() int64
func (*MessageEntity) GetOffset ¶
func (t *MessageEntity) GetOffset() int64
func (*MessageEntity) GetType ¶
func (t *MessageEntity) GetType() *EntityType
func (*MessageEntity) GetURL ¶
func (t *MessageEntity) GetURL() string
func (*MessageEntity) GetUser ¶
func (t *MessageEntity) GetUser() *User
func (*MessageEntity) IsCommand ¶
func (t *MessageEntity) IsCommand() bool
type MessageID ¶
type MessageID struct {
// MessageID
// Unique message identifier
MessageID int64 `json:"message_id"`
}
MessageID This object represents a unique message identifier.
func (*MessageID) GetMessageID ¶
type OrderInfo ¶
type OrderInfo struct {
// Email
// User email
Email *string `json:"email,omitempty"`
// Name
// User name
Name *string `json:"name,omitempty"`
// PhoneNumber
// User's phone number
PhoneNumber *string `json:"phone_number,omitempty"`
// ShippingAddress
// User shipping address
ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
}
OrderInfo This object represents information about an order.
func (*OrderInfo) GetPhoneNumber ¶
func (*OrderInfo) GetShippingAddress ¶
func (t *OrderInfo) GetShippingAddress() *ShippingAddress
type PassportData ¶
type PassportData struct {
// Credentials
// Encrypted credentials required to decrypt the data
Credentials EncryptedCredentials `json:"credentials"`
// Data
// Array with information about documents and other Telegram Passport elements that was shared
// with the bot
Data []EncryptedPassportElement `json:"data"`
}
PassportData Describes Telegram Passport data shared with the bot by the user.
func (*PassportData) GetCredentials ¶
func (t *PassportData) GetCredentials() *EncryptedCredentials
type PassportElementError ¶
type PassportElementError struct {
// DataHash
// Base64-encoded data hash
DataHash string `json:"data_hash"`
// FieldName
// Name of the data field which has the error
FieldName string `json:"field_name"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be data
Source string `json:"source"`
// Type
// 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 PassportType `json:"type"`
}
PassportElementError 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:
func (*PassportElementError) GetDataHash ¶
func (t *PassportElementError) GetDataHash() string
func (*PassportElementError) GetFieldName ¶
func (t *PassportElementError) GetFieldName() string
func (*PassportElementError) GetMessage ¶
func (t *PassportElementError) GetMessage() string
func (*PassportElementError) GetSource ¶
func (t *PassportElementError) GetSource() string
func (*PassportElementError) GetType ¶
func (t *PassportElementError) GetType() *PassportType
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct {
// DataHash
// Base64-encoded data hash
DataHash string `json:"data_hash"`
// FieldName
// Name of the data field which has the error
FieldName string `json:"field_name"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be data
Source string `json:"source"`
// Type
// 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 PassportType `json:"type"`
}
PassportElementErrorDataField 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.
func (*PassportElementErrorDataField) GetDataHash ¶
func (t *PassportElementErrorDataField) GetDataHash() string
func (*PassportElementErrorDataField) GetFieldName ¶
func (t *PassportElementErrorDataField) GetFieldName() string
func (*PassportElementErrorDataField) GetMessage ¶
func (t *PassportElementErrorDataField) GetMessage() string
func (*PassportElementErrorDataField) GetSource ¶
func (t *PassportElementErrorDataField) GetSource() string
func (*PassportElementErrorDataField) GetType ¶
func (t *PassportElementErrorDataField) GetType() *PassportType
type PassportElementErrorFile ¶
type PassportElementErrorFile struct {
// FileHash
// Base64-encoded file hash
FileHash string `json:"file_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be file
Source string `json:"source"`
// Type
// The section of the user's Telegram Passport which has the issue, one of "utility_bill",
// "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type PassportType `json:"type"`
}
PassportElementErrorFile Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
func (*PassportElementErrorFile) GetFileHash ¶
func (t *PassportElementErrorFile) GetFileHash() string
func (*PassportElementErrorFile) GetMessage ¶
func (t *PassportElementErrorFile) GetMessage() string
func (*PassportElementErrorFile) GetSource ¶
func (t *PassportElementErrorFile) GetSource() string
func (*PassportElementErrorFile) GetType ¶
func (t *PassportElementErrorFile) GetType() *PassportType
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct {
// FileHashes
// List of base64-encoded file hashes
FileHashes []string `json:"file_hashes"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be files
Source string `json:"source"`
// Type
// The section of the user's Telegram Passport which has the issue, one of "utility_bill",
// "bank_statement", "rental_agreement", "passport_registration", "temporary_registration"
Type PassportType `json:"type"`
}
PassportElementErrorFiles Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
func (*PassportElementErrorFiles) GetMessage ¶
func (t *PassportElementErrorFiles) GetMessage() string
func (*PassportElementErrorFiles) GetSource ¶
func (t *PassportElementErrorFiles) GetSource() string
func (*PassportElementErrorFiles) GetType ¶
func (t *PassportElementErrorFiles) GetType() *PassportType
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct {
// FileHash
// Base64-encoded hash of the file with the front side of the document
FileHash string `json:"file_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be front_side
Source string `json:"source"`
// Type
// The section of the user's Telegram Passport which has the issue, one of "passport",
// "driver_license", "identity_card", "internal_passport"
Type PassportType `json:"type"`
}
PassportElementErrorFrontSide 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.
func (*PassportElementErrorFrontSide) GetFileHash ¶
func (t *PassportElementErrorFrontSide) GetFileHash() string
func (*PassportElementErrorFrontSide) GetMessage ¶
func (t *PassportElementErrorFrontSide) GetMessage() string
func (*PassportElementErrorFrontSide) GetSource ¶
func (t *PassportElementErrorFrontSide) GetSource() string
func (*PassportElementErrorFrontSide) GetType ¶
func (t *PassportElementErrorFrontSide) GetType() *PassportType
type PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct {
// FileHash
// Base64-encoded hash of the file with the reverse side of the document
FileHash string `json:"file_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be reverse_side
Source string `json:"source"`
// Type
// The section of the user's Telegram Passport which has the issue, one of "driver_license",
// "identity_card"
Type PassportType `json:"type"`
}
PassportElementErrorReverseSide 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.
func (*PassportElementErrorReverseSide) GetFileHash ¶
func (t *PassportElementErrorReverseSide) GetFileHash() string
func (*PassportElementErrorReverseSide) GetMessage ¶
func (t *PassportElementErrorReverseSide) GetMessage() string
func (*PassportElementErrorReverseSide) GetSource ¶
func (t *PassportElementErrorReverseSide) GetSource() string
func (*PassportElementErrorReverseSide) GetType ¶
func (t *PassportElementErrorReverseSide) GetType() *PassportType
type PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct {
// FileHash
// Base64-encoded hash of the file with the selfie
FileHash string `json:"file_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be selfie
Source string `json:"source"`
// Type
// The section of the user's Telegram Passport which has the issue, one of "passport",
// "driver_license", "identity_card", "internal_passport"
Type PassportType `json:"type"`
}
PassportElementErrorSelfie Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
func (*PassportElementErrorSelfie) GetFileHash ¶
func (t *PassportElementErrorSelfie) GetFileHash() string
func (*PassportElementErrorSelfie) GetMessage ¶
func (t *PassportElementErrorSelfie) GetMessage() string
func (*PassportElementErrorSelfie) GetSource ¶
func (t *PassportElementErrorSelfie) GetSource() string
func (*PassportElementErrorSelfie) GetType ¶
func (t *PassportElementErrorSelfie) GetType() *PassportType
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct {
// FileHash
// Base64-encoded file hash
FileHash string `json:"file_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be translation_file
Source string `json:"source"`
// Type
// Type of element of the user's Telegram Passport which has the issue, one of "passport",
// "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement",
// "rental_agreement", "passport_registration", "temporary_registration"
Type PassportType `json:"type"`
}
PassportElementErrorTranslationFile Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
func (*PassportElementErrorTranslationFile) GetFileHash ¶
func (t *PassportElementErrorTranslationFile) GetFileHash() string
func (*PassportElementErrorTranslationFile) GetMessage ¶
func (t *PassportElementErrorTranslationFile) GetMessage() string
func (*PassportElementErrorTranslationFile) GetSource ¶
func (t *PassportElementErrorTranslationFile) GetSource() string
func (*PassportElementErrorTranslationFile) GetType ¶
func (t *PassportElementErrorTranslationFile) GetType() *PassportType
type PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct {
// FileHashes
// List of base64-encoded file hashes
FileHashes []string `json:"file_hashes"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be translation_files
Source string `json:"source"`
// Type
// Type of element of the user's Telegram Passport which has the issue, one of "passport",
// "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement",
// "rental_agreement", "passport_registration", "temporary_registration"
Type PassportType `json:"type"`
}
PassportElementErrorTranslationFiles Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
func (*PassportElementErrorTranslationFiles) GetMessage ¶
func (t *PassportElementErrorTranslationFiles) GetMessage() string
func (*PassportElementErrorTranslationFiles) GetSource ¶
func (t *PassportElementErrorTranslationFiles) GetSource() string
func (*PassportElementErrorTranslationFiles) GetType ¶
func (t *PassportElementErrorTranslationFiles) GetType() *PassportType
type PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct {
// ElementHash
// Base64-encoded element hash
ElementHash string `json:"element_hash"`
// Message
// Error message
Message string `json:"message"`
// Source
// Error source, must be unspecified
Source string `json:"source"`
// Type
// Type of element of the user's Telegram Passport which has the issue
Type PassportType `json:"type"`
}
PassportElementErrorUnspecified Represents an issue in an unspecified place. The error is considered resolved when new data is added.
func (*PassportElementErrorUnspecified) GetElementHash ¶
func (t *PassportElementErrorUnspecified) GetElementHash() string
func (*PassportElementErrorUnspecified) GetMessage ¶
func (t *PassportElementErrorUnspecified) GetMessage() string
func (*PassportElementErrorUnspecified) GetSource ¶
func (t *PassportElementErrorUnspecified) GetSource() string
func (*PassportElementErrorUnspecified) GetType ¶
func (t *PassportElementErrorUnspecified) GetType() *PassportType
type PassportFile ¶
type PassportFile struct {
// FileDate
// Unix time when the file was uploaded
FileDate int64 `json:"file_date"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileSize
// File size in bytes
FileSize int64 `json:"file_size"`
// FileUniqueID
// 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"`
}
PassportFile 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.
func (*PassportFile) GetFileDate ¶
func (t *PassportFile) GetFileDate() int64
func (*PassportFile) GetFileID ¶
func (t *PassportFile) GetFileID() string
func (*PassportFile) GetFileSize ¶
func (t *PassportFile) GetFileSize() int64
func (*PassportFile) GetFileUniqueID ¶
func (t *PassportFile) GetFileUniqueID() string
type PassportType ¶
type PassportType int
const ( PassportTypeAddress PassportType PassportTypeBankStatement PassportTypeDriverLicense PassportTypeIDentityCard PassportTypeInternalPassport PassportTypePassport PassportTypePassportRegistration PassportTypePersonalDetails PassportTypeRentalAgreement PassportTypeTemporaryRegistration PassportTypeUtilityBill )
func (PassportType) MarshalText ¶
func (enum PassportType) MarshalText() ([]byte, error)
func (PassportType) String ¶
func (enum PassportType) String() string
func (*PassportType) UnmarshalText ¶
func (enum *PassportType) UnmarshalText(src []byte) error
type Payments ¶
type Payments struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Currency
// Three-letter ISO 4217 currency code, see more on currencies
Currency string `json:"currency"`
// Description
// Product description, 1-255 characters
Description string `json:"description"`
// Payload
// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for
// your internal processes.
Payload string `json:"payload"`
// Prices
// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount,
// delivery cost, delivery tax, bonus, etc.)
Prices []LabeledPrice `json:"prices"`
// ProviderToken
// Payment provider token, obtained via @BotFather
ProviderToken string `json:"provider_token"`
// Title
// Product name, 1-32 characters
Title string `json:"title"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification *bool `json:"disable_notification,omitempty"`
// IsFlexible
// Pass True if the final price depends on the shipping method
IsFlexible *bool `json:"is_flexible,omitempty"`
// MaxTipAmount
// 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 *int64 `json:"max_tip_amount,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID *int64 `json:"message_thread_id,omitempty"`
// NeedEmail
// Pass True if you require the user's email address to complete the order
NeedEmail *bool `json:"need_email,omitempty"`
// NeedName
// Pass True if you require the user's full name to complete the order
NeedName *bool `json:"need_name,omitempty"`
// NeedPhoneNumber
// Pass True if you require the user's phone number to complete the order
NeedPhoneNumber *bool `json:"need_phone_number,omitempty"`
// NeedShippingAddress
// Pass True if you require the user's shipping address to complete the order
NeedShippingAddress *bool `json:"need_shipping_address,omitempty"`
// PhotoHeight
// Photo height
PhotoHeight *int64 `json:"photo_height,omitempty"`
// PhotoSize
// Photo size in bytes
PhotoSize *int64 `json:"photo_size,omitempty"`
// PhotoURL
// 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"`
// PhotoWidth
// Photo width
PhotoWidth *int64 `json:"photo_width,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent *bool `json:"protect_content,omitempty"`
// ProviderData
// JSON-serialized data about the invoice, which will be shared with the payment provider. A
// detailed description of required fields should be provided by the payment provider.
ProviderData *string `json:"provider_data,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will
// be shown. If not empty, the first button must be a Pay button.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID *int64 `json:"reply_to_message_id,omitempty"`
// SendEmailToProvider
// Pass True if the user's email address should be sent to provider
SendEmailToProvider *bool `json:"send_email_to_provider,omitempty"`
// SendPhoneNumberToProvider
// Pass True if the user's phone number should be sent to provider
SendPhoneNumberToProvider *bool `json:"send_phone_number_to_provider,omitempty"`
// StartParameter
// Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have
// a Pay button, allowing multiple users to pay directly from the forwarded message, using the
// same invoice. If non-empty, forwarded copies of the sent message will have a URL button with
// a deep link to the bot (instead of a Pay button), with the value used as the start parameter
StartParameter *string `json:"start_parameter,omitempty"`
// SuggestedTipAmounts
// A JSON-serialized array of suggested amounts of tips 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 []int64 `json:"suggested_tip_amounts,omitempty"`
}
Payments Your bot can accept payments from Telegram users. Please see the introduction to payments for more details on the process and how to set up payments for your bot. Please note that users will need Telegram v.4.0 or higher to use payments (released on May 18, 2017).
func (*Payments) GetAllowSendingWithoutReply ¶
func (*Payments) GetCurrency ¶
func (*Payments) GetDescription ¶
func (*Payments) GetDisableNotification ¶
func (*Payments) GetIsFlexible ¶
func (*Payments) GetMaxTipAmount ¶
func (*Payments) GetMessageThreadID ¶
func (*Payments) GetNeedEmail ¶
func (*Payments) GetNeedName ¶
func (*Payments) GetNeedPhoneNumber ¶
func (*Payments) GetNeedShippingAddress ¶
func (*Payments) GetPayload ¶
func (*Payments) GetPhotoHeight ¶
func (*Payments) GetPhotoSize ¶
func (*Payments) GetPhotoURL ¶
func (*Payments) GetPhotoWidth ¶
func (*Payments) GetProtectContent ¶
func (*Payments) GetProviderData ¶
func (*Payments) GetProviderToken ¶
func (*Payments) GetReplyMarkup ¶
func (t *Payments) GetReplyMarkup() *InlineKeyboardMarkup
func (*Payments) GetReplyToMessageID ¶
func (*Payments) GetSendEmailToProvider ¶
func (*Payments) GetSendPhoneNumberToProvider ¶
func (*Payments) GetStartParameter ¶
type PhotoSize ¶
type PhotoSize struct {
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Height
// Photo height
Height int64 `json:"height"`
// Width
// Photo width
Width int64 `json:"width"`
// FileSize
// File size in bytes
FileSize *int64 `json:"file_size,omitempty"`
}
PhotoSize This object represents one size of a photo or a file / sticker thumbnail.
func (*PhotoSize) GetFileSize ¶
func (*PhotoSize) GetFileUniqueID ¶
type PinChatMessageConfig ¶
type PinChatMessageConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// MessageID
// Identifier of a message to pin
MessageID int64 `json:"message_id"`
// DisableNotification
// Pass True if it is not necessary to send a notification to all chat members about the new
// pinned message. Notifications are always disabled in channels and private chats.
DisableNotification bool `json:"disable_notification,omitempty"`
}
PinChatMessage Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
type Poll ¶
type Poll struct {
// AllowsMultipleAnswers
// True, if the poll allows multiple answers
AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
// ID
// Unique poll identifier
ID string `json:"id"`
// IsAnonymous
// True, if the poll is anonymous
IsAnonymous bool `json:"is_anonymous"`
// IsClosed
// True, if the poll is closed
IsClosed bool `json:"is_closed"`
// Options
// List of poll options
Options []PollOption `json:"options"`
// Question
// Poll question, 1-300 characters
Question string `json:"question"`
// TotalVoterCount
// Total number of users that voted in the poll
TotalVoterCount int64 `json:"total_voter_count"`
// Type
// Poll type, currently can be "regular" or "quiz"
Type PollType `json:"type"`
// CloseDate
// Point in time (Unix timestamp) when the poll will be automatically closed
CloseDate *int64 `json:"close_date,omitempty"`
// CorrectOptionID
// 0-based identifier of the correct answer option. Available only for polls in the quiz mode,
// which are closed, or was sent (not forwarded) by the bot or to the private chat with the
// bot.
CorrectOptionID *int64 `json:"correct_option_id,omitempty"`
// Explanation
// 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
Explanation *string `json:"explanation,omitempty"`
// ExplanationEntities
// Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"`
// OpenPeriod
// Amount of time in seconds the poll will be active after creation
OpenPeriod *int64 `json:"open_period,omitempty"`
}
Poll This object contains information about a poll.
func (*Poll) GetAllowsMultipleAnswers ¶
func (*Poll) GetCloseDate ¶
func (*Poll) GetCorrectOptionID ¶
func (*Poll) GetExplanation ¶
func (*Poll) GetIsAnonymous ¶
func (*Poll) GetIsClosed ¶
func (*Poll) GetOpenPeriod ¶
func (*Poll) GetQuestion ¶
func (*Poll) GetTotalVoterCount ¶
type PollAnswer ¶
type PollAnswer struct {
// OptionIDs
// 0-based identifiers of answer options, chosen by the user. May be empty if the user
// retracted their vote.
OptionIDs []int64 `json:"option_ids"`
// PollID
// Unique poll identifier
PollID string `json:"poll_id"`
// User
// The user, who changed the answer to the poll
User User `json:"user"`
}
PollAnswer This object represents an answer of a user in a non-anonymous poll.
func (*PollAnswer) GetPollID ¶
func (t *PollAnswer) GetPollID() string
func (*PollAnswer) GetUser ¶
func (t *PollAnswer) GetUser() *User
type PollOption ¶
type PollOption struct {
// Text
// Option text, 1-100 characters
Text string `json:"text"`
// VoterCount
// Number of users that voted for this option
VoterCount int64 `json:"voter_count"`
}
PollOption This object contains information about one answer option in a poll.
func (*PollOption) GetText ¶
func (t *PollOption) GetText() string
func (*PollOption) GetVoterCount ¶
func (t *PollOption) GetVoterCount() int64
type PollType ¶
type PollType int
const ( PollTypeQuiz PollType PollTypeRegular )
func (PollType) MarshalText ¶
func (*PollType) UnmarshalText ¶
type PreCheckoutQuery ¶
type PreCheckoutQuery struct {
// Currency
// Three-letter ISO 4217 currency code
Currency string `json:"currency"`
// From
// User who sent the query
From User `json:"from"`
// ID
// Unique query identifier
ID string `json:"id"`
// InvoicePayload
// Bot specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// TotalAmount
// 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. 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).
TotalAmount int64 `json:"total_amount"`
// OrderInfo
// Order information provided by the user
OrderInfo *OrderInfo `json:"order_info,omitempty"`
// ShippingOptionID
// Identifier of the shipping option chosen by the user
ShippingOptionID *string `json:"shipping_option_id,omitempty"`
}
PreCheckoutQuery This object contains information about an incoming pre-checkout query.
func (*PreCheckoutQuery) GetCurrency ¶
func (t *PreCheckoutQuery) GetCurrency() string
func (*PreCheckoutQuery) GetFrom ¶
func (t *PreCheckoutQuery) GetFrom() *User
func (*PreCheckoutQuery) GetID ¶
func (t *PreCheckoutQuery) GetID() string
func (*PreCheckoutQuery) GetInvoicePayload ¶
func (t *PreCheckoutQuery) GetInvoicePayload() string
func (*PreCheckoutQuery) GetOrderInfo ¶
func (t *PreCheckoutQuery) GetOrderInfo() *OrderInfo
func (*PreCheckoutQuery) GetShippingOptionID ¶
func (t *PreCheckoutQuery) GetShippingOptionID() string
func (*PreCheckoutQuery) GetTotalAmount ¶
func (t *PreCheckoutQuery) GetTotalAmount() int64
type PromoteChatMemberConfig ¶
type PromoteChatMemberConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
// CanChangeInfo
// Pass True if the administrator can change chat title, photo and other settings
CanChangeInfo bool `json:"can_change_info,omitempty"`
// CanDeleteMessages
// Pass True if the administrator can delete messages of other users
CanDeleteMessages bool `json:"can_delete_messages,omitempty"`
// CanEditMessages
// Pass True if the administrator can edit messages of other users and can pin messages,
// channels only
CanEditMessages bool `json:"can_edit_messages,omitempty"`
// CanInviteUsers
// Pass True if the administrator can invite new users to the chat
CanInviteUsers bool `json:"can_invite_users,omitempty"`
// CanManageChat
// Pass 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,omitempty"`
// CanManageTopics
// Pass True if the user is allowed to create, rename, close, and reopen forum topics,
// supergroups only
CanManageTopics bool `json:"can_manage_topics,omitempty"`
// CanManageVideoChats
// Pass True if the administrator can manage video chats
CanManageVideoChats bool `json:"can_manage_video_chats,omitempty"`
// CanPinMessages
// Pass True if the administrator can pin messages, supergroups only
CanPinMessages bool `json:"can_pin_messages,omitempty"`
// CanPostMessages
// Pass True if the administrator can create channel posts, channels only
CanPostMessages bool `json:"can_post_messages,omitempty"`
// CanPromoteMembers
// Pass True if the administrator can add new administrators with a subset of their own
// privileges or demote administrators that they have promoted, directly or indirectly
// (promoted by administrators that were appointed by him)
CanPromoteMembers bool `json:"can_promote_members,omitempty"`
// CanRestrictMembers
// Pass True if the administrator can restrict, ban or unban chat members
CanRestrictMembers bool `json:"can_restrict_members,omitempty"`
// IsAnonymous
// Pass True if the administrator's presence in the chat is hidden
IsAnonymous bool `json:"is_anonymous,omitempty"`
}
PromoteChatMember Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.
type ProximityAlertTriggered ¶
type ProximityAlertTriggered struct {
// Distance
// The distance between the users
Distance int64 `json:"distance"`
// Traveler
// User that triggered the alert
Traveler User `json:"traveler"`
// Watcher
// User that set the alert
Watcher User `json:"watcher"`
}
ProximityAlertTriggered This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
func (*ProximityAlertTriggered) GetDistance ¶
func (t *ProximityAlertTriggered) GetDistance() int64
func (*ProximityAlertTriggered) GetTraveler ¶
func (t *ProximityAlertTriggered) GetTraveler() *User
func (*ProximityAlertTriggered) GetWatcher ¶
func (t *ProximityAlertTriggered) GetWatcher() *User
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct {
// Keyboard
// Array of button rows, each represented by an Array of KeyboardButton objects
Keyboard [][]KeyboardButton `json:"keyboard"`
// InputFieldPlaceholder
// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters
InputFieldPlaceholder *string `json:"input_field_placeholder,omitempty"`
// IsPersistent
// 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,omitempty"`
// OneTimeKeyboard
// 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_time_keyboard,omitempty"`
// ResizeKeyboard
// 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,omitempty"`
// Selective
// 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,omitempty"`
}
ReplyKeyboardMarkup This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
func (*ReplyKeyboardMarkup) GetInputFieldPlaceholder ¶
func (t *ReplyKeyboardMarkup) GetInputFieldPlaceholder() string
func (*ReplyKeyboardMarkup) GetIsPersistent ¶
func (t *ReplyKeyboardMarkup) GetIsPersistent() bool
func (*ReplyKeyboardMarkup) GetOneTimeKeyboard ¶
func (t *ReplyKeyboardMarkup) GetOneTimeKeyboard() bool
func (*ReplyKeyboardMarkup) GetResizeKeyboard ¶
func (t *ReplyKeyboardMarkup) GetResizeKeyboard() bool
func (*ReplyKeyboardMarkup) GetSelective ¶
func (t *ReplyKeyboardMarkup) GetSelective() bool
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct {
// RemoveKeyboard
// 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"`
// Selective
// 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,omitempty"`
}
ReplyKeyboardRemove 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 (see ReplyKeyboardMarkup).
func (*ReplyKeyboardRemove) GetRemoveKeyboard ¶
func (t *ReplyKeyboardRemove) GetRemoveKeyboard() *bool
func (*ReplyKeyboardRemove) GetSelective ¶
func (t *ReplyKeyboardRemove) GetSelective() bool
type ReplyMarkup ¶
type ReplyMarkup interface{}
one of
[
"InlineKeyboardMarkup", "ReplyKeyboardMarkup", "ReplyKeyboardRemove", "ForceReply"
]
мне влом писать, сами думайте.
type Response ¶
type Response struct {
OK bool `json:"ok"`
Result json.RawMessage `json:"result"`
Description string `json:"description,omitempty"`
Parameters ResponseParameters `json:"parameters,omitempty"`
ErrorCode int `json:"error_code,omitempty"`
}
type ResponseParameters ¶
type ResponseParameters struct {
// MigrateToChatID
// 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 *int64 `json:"migrate_to_chat_id,omitempty"`
// RetryAfter
// In case of exceeding flood control, the number of seconds left to wait before the request
// can be repeated
RetryAfter *int64 `json:"retry_after,omitempty"`
}
ResponseParameters Describes why a request was unsuccessful.
func (*ResponseParameters) GetMigrateToChatID ¶
func (t *ResponseParameters) GetMigrateToChatID() int64
func (*ResponseParameters) GetRetryAfter ¶
func (t *ResponseParameters) GetRetryAfter() int64
type RestrictChatMemberConfig ¶
type RestrictChatMemberConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Permissions
// A JSON-serialized object for new user permissions
Permissions ChatPermissions `json:"permissions"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
// UntilDate
// Date when restrictions will be lifted for the user, unix time. If user is restricted for
// more than 366 days or less than 30 seconds from the current time, they are considered to be
// restricted forever
UntilDate int64 `json:"until_date,omitempty"`
// UseIndependentChatPermissions
// Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages
// and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios,
// can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
// can_send_voice_notes permissions; the can_send_polls permission will imply the
// can_send_messages permission.
UseIndependentChatPermissions bool `json:"use_independent_chat_permissions,omitempty"`
}
RestrictChatMember Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
type SendAnimationConfig ¶
type SendAnimationConfig struct {
// Animation
// Animation to send. Pass a file_id as String to send an animation that exists on the Telegram
// servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from
// the Internet, or upload a new animation using multipart/form-data. More information on
// Sending Files »
Animation InputFile `json:"animation"`
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Animation caption (may also be used when resending animation by file_id), 0-1024 characters
// after entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Duration
// Duration of sent animation in seconds
Duration int64 `json:"duration,omitempty"`
// HasSpoiler
// Pass True if the animation needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// Height
// Animation height
Height int64 `json:"height,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the animation caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *InputFile `json:"thumbnail,omitempty"`
// Width
// Animation width
Width int64 `json:"width,omitempty"`
}
SendAnimation Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
type SendAudioConfig ¶
type SendAudioConfig struct {
// Audio
// 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. More information on
// Sending Files »
Audio InputFile `json:"audio"`
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Audio caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Duration
// Duration of the audio in seconds
Duration int64 `json:"duration,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the audio caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// Performer
// Performer
Performer string `json:"performer,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *InputFile `json:"thumbnail,omitempty"`
// Title
// Track name
Title string `json:"title,omitempty"`
}
SendAudio Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
type SendChatActionConfig ¶
type SendChatActionConfig struct {
// Action
// 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"`
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// MessageThreadID
// Unique identifier for the target message thread; supergroups only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
}
SendChatAction Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
type SendContactConfig ¶
type SendContactConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// FirstName
// Contact's first name
FirstName string `json:"first_name"`
// PhoneNumber
// Contact's phone number
PhoneNumber string `json:"phone_number"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// LastName
// Contact's last name
LastName string `json:"last_name,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Vcard
// Additional data about the contact in the form of a vCard, 0-2048 bytes
Vcard string `json:"vcard,omitempty"`
}
SendContact Use this method to send phone contacts. On success, the sent Message is returned.
type SendDiceConfig ¶
type SendDiceConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Emoji
// 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"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendDice Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
type SendDocumentConfig ¶
type SendDocumentConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Document
// File to send. Pass a file_id as String to send a file that exists on the Telegram servers
// (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or
// upload a new one using multipart/form-data. More information on Sending Files »
Document InputFile `json:"document"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Document caption (may also be used when resending documents by file_id), 0-1024 characters
// after entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableContentTypeDetection
// Disables automatic server-side content type detection for files uploaded using
// multipart/form-data
DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the document caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *InputFile `json:"thumbnail,omitempty"`
}
SendDocument Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
type SendGameConfig ¶
type SendGameConfig struct {
// ChatID
// Unique identifier for the target chat
ChatID int64 `json:"chat_id"`
// GameShortName
// Short name of the game, serves as the unique identifier for the game. Set up your games via
// @BotFather.
GameShortName string `json:"game_short_name"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will
// be shown. If not empty, the first button must launch the game.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendGame Use this method to send a game. On success, the sent Message is returned.
type SendInvoiceConfig ¶
type SendInvoiceConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Currency
// Three-letter ISO 4217 currency code, see more on currencies
Currency string `json:"currency"`
// Description
// Product description, 1-255 characters
Description string `json:"description"`
// Payload
// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for
// your internal processes.
Payload string `json:"payload"`
// Prices
// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount,
// delivery cost, delivery tax, bonus, etc.)
Prices []LabeledPrice `json:"prices"`
// ProviderToken
// Payment provider token, obtained via @BotFather
ProviderToken string `json:"provider_token"`
// Title
// Product name, 1-32 characters
Title string `json:"title"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// IsFlexible
// Pass True if the final price depends on the shipping method
IsFlexible bool `json:"is_flexible,omitempty"`
// MaxTipAmount
// 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 int64 `json:"max_tip_amount,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// NeedEmail
// Pass True if you require the user's email address to complete the order
NeedEmail bool `json:"need_email,omitempty"`
// NeedName
// Pass True if you require the user's full name to complete the order
NeedName bool `json:"need_name,omitempty"`
// NeedPhoneNumber
// Pass True if you require the user's phone number to complete the order
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
// NeedShippingAddress
// Pass True if you require the user's shipping address to complete the order
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
// PhotoHeight
// Photo height
PhotoHeight int64 `json:"photo_height,omitempty"`
// PhotoSize
// Photo size in bytes
PhotoSize int64 `json:"photo_size,omitempty"`
// PhotoURL
// 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"`
// PhotoWidth
// Photo width
PhotoWidth int64 `json:"photo_width,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ProviderData
// JSON-serialized data about the invoice, which will be shared with the payment provider. A
// detailed description of required fields should be provided by the payment provider.
ProviderData string `json:"provider_data,omitempty"`
// ReplyMarkup
// A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will
// be shown. If not empty, the first button must be a Pay button.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// SendEmailToProvider
// Pass True if the user's email address should be sent to provider
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
// SendPhoneNumberToProvider
// Pass True if the user's phone number should be sent to provider
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
// StartParameter
// Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have
// a Pay button, allowing multiple users to pay directly from the forwarded message, using the
// same invoice. If non-empty, forwarded copies of the sent message will have a URL button with
// a deep link to the bot (instead of a Pay button), with the value used as the start parameter
StartParameter string `json:"start_parameter,omitempty"`
// SuggestedTipAmounts
// A JSON-serialized array of suggested amounts of tips 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 []int64 `json:"suggested_tip_amounts,omitempty"`
}
SendInvoice Use this method to send invoices. On success, the sent Message is returned.
type SendLocationConfig ¶
type SendLocationConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Latitude
// Latitude of the location
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of the location
Longitude float64 `json:"longitude"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Heading
// For live locations, a direction in which the user is moving, in degrees. Must be between 1
// and 360 if specified.
Heading int64 `json:"heading,omitempty"`
// HorizontalAccuracy
// The radius of uncertainty for the location, measured in meters; 0-1500
HorizontalAccuracy *float64 `json:"horizontal_accuracy,omitempty"`
// LivePeriod
// Period in seconds for which the location will be updated (see Live Locations, should be
// between 60 and 86400.
LivePeriod int64 `json:"live_period,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ProximityAlertRadius
// 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 int64 `json:"proximity_alert_radius,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendLocation Use this method to send point on the map. On success, the sent Message is returned.
type SendMediaGroupConfig ¶
type SendMediaGroupConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Media
// A JSON-serialized array describing messages to be sent, must include 2-10 items
Media []InputMediaGraphics `json:"media"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends messages silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent messages from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyToMessageID
// If the messages are a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendMediaGroup Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
type SendMessageConfig ¶
type SendMessageConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Text
// Text of the message to be sent, 1-4096 characters after entities parsing
Text string `json:"text"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// DisableWebPagePreview
// Disables link previews for links in this message
DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"`
// Entities
// 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"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the message text. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendMessage Use this method to send text messages. On success, the sent Message is returned.
type SendPhotoConfig ¶
type SendPhotoConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Photo
// 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. More information on Sending Files »
Photo InputFile `json:"photo"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Photo caption (may also be used when resending photos by file_id), 0-1024 characters after
// entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// HasSpoiler
// Pass True if the photo needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the photo caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendPhoto Use this method to send photos. On success, the sent Message is returned.
type SendPollConfig ¶
type SendPollConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Options
// A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Options []string `json:"options"`
// Question
// Poll question, 1-300 characters
Question string `json:"question"`
// AllowSendingWithoutReply
// 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"`
// AllowsMultipleAnswers
// True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
AllowsMultipleAnswers bool `json:"allows_multiple_answers,omitempty"`
// CloseDate
// Point in time (Unix timestamp) when 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 int64 `json:"close_date,omitempty"`
// CorrectOptionID
// 0-based identifier of the correct answer option, required for polls in quiz mode
CorrectOptionID int64 `json:"correct_option_id,omitempty"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Explanation
// 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"`
// ExplanationEntities
// 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"`
// ExplanationParseMode
// Mode for parsing entities in the explanation. See formatting options for more details.
ExplanationParseMode string `json:"explanation_parse_mode,omitempty"`
// IsAnonymous
// True, if the poll needs to be anonymous, defaults to True
IsAnonymous bool `json:"is_anonymous,omitempty"`
// IsClosed
// Pass True if the poll needs to be immediately closed. This can be useful for poll preview.
IsClosed bool `json:"is_closed,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// OpenPeriod
// Amount of time in seconds the poll will be active after creation, 5-600. Can't be used
// together with close_date.
OpenPeriod int64 `json:"open_period,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Type
// Poll type, "quiz" or "regular", defaults to "regular"
Type *SendType `json:"type,omitempty"`
}
SendPoll Use this method to send a native poll. On success, the sent Message is returned.
type SendStickerConfig ¶
type SendStickerConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Sticker
// Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers
// (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the
// Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information
// on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't
// be sent via an HTTP URL.
Sticker InputFile `json:"sticker"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Emoji
// Emoji associated with the sticker; only for just uploaded stickers
Emoji string `json:"emoji,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendSticker Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
type SendType ¶
type SendType int
const ( SendTypeQuiz SendType SendTypeRegular )
func (SendType) MarshalText ¶
func (*SendType) UnmarshalText ¶
type SendVenueConfig ¶
type SendVenueConfig struct {
// Address
// Address of the venue
Address string `json:"address"`
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Latitude
// Latitude of the venue
Latitude float64 `json:"latitude"`
// Longitude
// Longitude of the venue
Longitude float64 `json:"longitude"`
// Title
// Name of the venue
Title string `json:"title"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// FoursquareID
// Foursquare identifier of the venue
FoursquareID string `json:"foursquare_id,omitempty"`
// FoursquareType
// 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
// Google Places identifier of the venue
GooglePlaceID string `json:"google_place_id,omitempty"`
// GooglePlaceType
// Google Places type of the venue. (See supported types.)
GooglePlaceType string `json:"google_place_type,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendVenue Use this method to send information about a venue. On success, the sent Message is returned.
type SendVideoConfig ¶
type SendVideoConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Video
// Video to send. Pass a file_id as String to send a video that exists on the Telegram servers
// (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet,
// or upload a new video using multipart/form-data. More information on Sending Files »
Video InputFile `json:"video"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Video caption (may also be used when resending videos by file_id), 0-1024 characters after
// entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Duration
// Duration of sent video in seconds
Duration int64 `json:"duration,omitempty"`
// HasSpoiler
// Pass True if the video needs to be covered with a spoiler animation
HasSpoiler bool `json:"has_spoiler,omitempty"`
// Height
// Video height
Height int64 `json:"height,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the video caption. See formatting options for more details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// SupportsStreaming
// Pass True if the uploaded video is suitable for streaming
SupportsStreaming bool `json:"supports_streaming,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *InputFile `json:"thumbnail,omitempty"`
// Width
// Video width
Width int64 `json:"width,omitempty"`
}
SendVideo Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
type SendVideoNoteConfig ¶
type SendVideoNoteConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// VideoNote
// Video note to send. Pass a file_id as String to send a video note that exists on the
// Telegram servers (recommended) or upload a new video using multipart/form-data. More
// information on Sending Files ». Sending video notes by a URL is currently unsupported
VideoNote InputFile `json:"video_note"`
// AllowSendingWithoutReply
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Duration
// Duration of sent video in seconds
Duration int64 `json:"duration,omitempty"`
// Length
// Video width and height, i.e. diameter of the video message
Length int64 `json:"length,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
// Thumbnail
// 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>. More information on Sending Files »
Thumbnail *InputFile `json:"thumbnail,omitempty"`
}
SendVideoNote As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.
type SendVoiceConfig ¶
type SendVoiceConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// Voice
// Audio file to send. Pass a file_id as String to send a file that exists on the Telegram
// servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the
// Internet, or upload a new one using multipart/form-data. More information on Sending Files
// »
Voice InputFile `json:"voice"`
// AllowSendingWithoutReply
// 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"`
// Caption
// Voice message caption, 0-1024 characters after entities parsing
Caption string `json:"caption,omitempty"`
// CaptionEntities
// 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"`
// DisableNotification
// Sends the message silently. Users will receive a notification with no sound.
DisableNotification bool `json:"disable_notification,omitempty"`
// Duration
// Duration of the voice message in seconds
Duration int64 `json:"duration,omitempty"`
// MessageThreadID
// Unique identifier for the target message thread (topic) of the forum; for forum supergroups
// only
MessageThreadID int64 `json:"message_thread_id,omitempty"`
// ParseMode
// Mode for parsing entities in the voice message caption. See formatting options for more
// details.
ParseMode string `json:"parse_mode,omitempty"`
// ProtectContent
// Protects the contents of the sent message from forwarding and saving
ProtectContent bool `json:"protect_content,omitempty"`
// ReplyMarkup
// 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"`
// ReplyToMessageID
// If the message is a reply, ID of the original message
ReplyToMessageID int64 `json:"reply_to_message_id,omitempty"`
}
SendVoice Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
type SentWebAppMessage ¶
type SentWebAppMessage struct {
// InlineMessageID
// Identifier of the sent inline message. Available only if there is an inline keyboard
// attached to the message.
InlineMessageID *string `json:"inline_message_id,omitempty"`
}
SentWebAppMessage Describes an inline message sent by a Web App on behalf of a user.
func (*SentWebAppMessage) GetInlineMessageID ¶
func (t *SentWebAppMessage) GetInlineMessageID() string
type SetChatAdministratorCustomTitleConfig ¶
type SetChatAdministratorCustomTitleConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// CustomTitle
// New custom title for the administrator; 0-16 characters, emoji are not allowed
CustomTitle string `json:"custom_title"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
}
SetChatAdministratorCustomTitle Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
type SetChatPermissionsConfig ¶
type SetChatPermissionsConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target supergroup (in the format
// @supergroupusername)
ChatID IntStr `json:"chat_id"`
// Permissions
// A JSON-serialized object for new default chat permissions
Permissions ChatPermissions `json:"permissions"`
// UseIndependentChatPermissions
// Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages
// and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios,
// can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
// can_send_voice_notes permissions; the can_send_polls permission will imply the
// can_send_messages permission.
UseIndependentChatPermissions bool `json:"use_independent_chat_permissions,omitempty"`
}
SetChatPermissions Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.
type SetGameScoreConfig ¶
type SetGameScoreConfig struct {
// Score
// New score, must be non-negative
Score int64 `json:"score"`
// UserID
// User identifier
UserID int64 `json:"user_id"`
// ChatID
// Required if inline_message_id is not specified. Unique identifier for the target chat
ChatID int64 `json:"chat_id,omitempty"`
// DisableEditMessage
// Pass True if the game message should not be automatically edited to include the current
// scoreboard
DisableEditMessage bool `json:"disable_edit_message,omitempty"`
// Force
// Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes
// or banning cheaters
Force bool `json:"force,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the sent message
MessageID int64 `json:"message_id,omitempty"`
}
SetGameScore Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
type SetMyCommandsConfig ¶
type SetMyCommandsConfig struct {
// Commands
// A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most
// 100 commands can be specified.
Commands []BotCommand `json:"commands"`
// LanguageCode
// A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from
// the given scope, for whose language there are no dedicated commands
LanguageCode string `json:"language_code,omitempty"`
// Scope
// A JSON-serialized object, describing scope of users for which the commands are relevant.
// Defaults to BotCommandScopeDefault.
Scope *BotCommandScope `json:"scope,omitempty"`
}
SetMyCommands Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.
type SetStickerSetThumbnailConfig ¶
type SetStickerSetThumbnailConfig struct {
// Name
// Sticker set name
Name string `json:"name"`
// UserID
// User identifier of the sticker set owner
UserID int64 `json:"user_id"`
// Thumbnail
// A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a
// width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes
// in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated
// sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in
// size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker
// technical requirements. Pass a file_id as a String to send a file that already exists on the
// Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet,
// or upload a new one using multipart/form-data. More information on Sending Files ».
// Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then
// the thumbnail is dropped and the first sticker is used as the thumbnail.
Thumbnail *InputFile `json:"thumbnail,omitempty"`
}
SetStickerSetThumbnail Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.
type SetWebhookConfig ¶
type SetWebhookConfig struct {
// URL
// HTTPS URL to send updates to. Use an empty string to remove webhook integration
URL string `json:"url"`
// AllowedUpdates
// 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 `json:"allowed_updates,omitempty"`
// Certificate
// Upload your public key certificate so that the root certificate in use can be checked. See
// our self-signed guide for details.
Certificate *InputFile `json:"certificate,omitempty"`
// DropPendingUpdates
// Pass True to drop all pending updates
DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
// IPAddress
// The fixed IP address which will be used to send webhook requests instead of the IP address
// resolved through DNS
IPAddress string `json:"ip_address,omitempty"`
// MaxConnections
// The 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 int64 `json:"max_connections,omitempty"`
// SecretToken
// 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"`
}
SetWebhook Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
type ShippingAddress ¶
type ShippingAddress struct {
// City
// City
City string `json:"city"`
// CountryCode
// Two-letter ISO 3166-1 alpha-2 country code
CountryCode string `json:"country_code"`
// PostCode
// Address post code
PostCode string `json:"post_code"`
// State
// State, if applicable
State string `json:"state"`
// StreetLine1
// First line for the address
StreetLine1 string `json:"street_line1"`
// StreetLine2
// Second line for the address
StreetLine2 string `json:"street_line2"`
}
ShippingAddress This object represents a shipping address.
func (*ShippingAddress) GetCity ¶
func (t *ShippingAddress) GetCity() string
func (*ShippingAddress) GetCountryCode ¶
func (t *ShippingAddress) GetCountryCode() string
func (*ShippingAddress) GetPostCode ¶
func (t *ShippingAddress) GetPostCode() string
func (*ShippingAddress) GetState ¶
func (t *ShippingAddress) GetState() string
func (*ShippingAddress) GetStreetLine1 ¶
func (t *ShippingAddress) GetStreetLine1() string
func (*ShippingAddress) GetStreetLine2 ¶
func (t *ShippingAddress) GetStreetLine2() string
type ShippingOption ¶
type ShippingOption struct {
// ID
// Shipping option identifier
ID string `json:"id"`
// Prices
// List of price portions
Prices []LabeledPrice `json:"prices"`
// Title
// Option title
Title string `json:"title"`
}
ShippingOption This object represents one shipping option.
func (*ShippingOption) GetID ¶
func (t *ShippingOption) GetID() string
func (*ShippingOption) GetTitle ¶
func (t *ShippingOption) GetTitle() string
type ShippingQuery ¶
type ShippingQuery struct {
// From
// User who sent the query
From User `json:"from"`
// ID
// Unique query identifier
ID string `json:"id"`
// InvoicePayload
// Bot specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// ShippingAddress
// User specified shipping address
ShippingAddress ShippingAddress `json:"shipping_address"`
}
ShippingQuery This object contains information about an incoming shipping query.
func (*ShippingQuery) GetFrom ¶
func (t *ShippingQuery) GetFrom() *User
func (*ShippingQuery) GetID ¶
func (t *ShippingQuery) GetID() string
func (*ShippingQuery) GetInvoicePayload ¶
func (t *ShippingQuery) GetInvoicePayload() string
func (*ShippingQuery) GetShippingAddress ¶
func (t *ShippingQuery) GetShippingAddress() *ShippingAddress
type Sticker ¶
type Sticker struct {
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Height
// Sticker height
Height int64 `json:"height"`
// IsAnimated
// True, if the sticker is animated
IsAnimated bool `json:"is_animated"`
// IsVideo
// True, if the sticker is a video sticker
IsVideo bool `json:"is_video"`
// Type
// 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 StickerType `json:"type"`
// Width
// Sticker width
Width int64 `json:"width"`
// CustomEmojiID
// For custom emoji stickers, unique identifier of the custom emoji
CustomEmojiID *string `json:"custom_emoji_id,omitempty"`
// Emoji
// Emoji associated with the sticker
Emoji *string `json:"emoji,omitempty"`
// FileSize
// File size in bytes
FileSize *int64 `json:"file_size,omitempty"`
// MaskPosition
// For mask stickers, the position where the mask should be placed
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
// NeedsRepainting
// 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,omitempty"`
// PremiumAnimation
// For premium regular stickers, premium animation for the sticker
PremiumAnimation *File `json:"premium_animation,omitempty"`
// SetName
// Name of the sticker set to which the sticker belongs
SetName *string `json:"set_name,omitempty"`
// Thumbnail
// Sticker thumbnail in the .WEBP or .JPG format
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
Sticker This object represents a sticker.
func (*Sticker) GetCustomEmojiID ¶
func (*Sticker) GetFileSize ¶
func (*Sticker) GetFileUniqueID ¶
func (*Sticker) GetIsAnimated ¶
func (*Sticker) GetIsVideo ¶
func (*Sticker) GetMaskPosition ¶
func (t *Sticker) GetMaskPosition() *MaskPosition
func (*Sticker) GetNeedsRepainting ¶
func (*Sticker) GetPremiumAnimation ¶
func (*Sticker) GetSetName ¶
func (*Sticker) GetThumbnail ¶
func (*Sticker) GetType ¶
func (t *Sticker) GetType() *StickerType
type StickerSet ¶
type StickerSet struct {
// IsAnimated
// True, if the sticker set contains animated stickers
IsAnimated bool `json:"is_animated"`
// IsVideo
// True, if the sticker set contains video stickers
IsVideo bool `json:"is_video"`
// Name
// Sticker set name
Name string `json:"name"`
// StickerType
// Type of stickers in the set, currently one of "regular", "mask", "custom_emoji"
StickerType string `json:"sticker_type"`
// Stickers
// List of all set stickers
Stickers []Sticker `json:"stickers"`
// Title
// Sticker set title
Title string `json:"title"`
// Thumbnail
// Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
StickerSet This object represents a sticker set.
func (*StickerSet) GetIsAnimated ¶
func (t *StickerSet) GetIsAnimated() bool
func (*StickerSet) GetIsVideo ¶
func (t *StickerSet) GetIsVideo() bool
func (*StickerSet) GetName ¶
func (t *StickerSet) GetName() string
func (*StickerSet) GetStickerType ¶
func (t *StickerSet) GetStickerType() string
func (*StickerSet) GetThumbnail ¶
func (t *StickerSet) GetThumbnail() *PhotoSize
func (*StickerSet) GetTitle ¶
func (t *StickerSet) GetTitle() string
type StickerType ¶
type StickerType int
const ( StickerTypeCustomEmoji StickerType StickerTypeMask StickerTypeRegular )
func (StickerType) MarshalText ¶
func (enum StickerType) MarshalText() ([]byte, error)
func (StickerType) String ¶
func (enum StickerType) String() string
func (*StickerType) UnmarshalText ¶
func (enum *StickerType) UnmarshalText(src []byte) error
type Stickers ¶
type Stickers struct {
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Height
// Sticker height
Height int64 `json:"height"`
// IsAnimated
// True, if the sticker is animated
IsAnimated bool `json:"is_animated"`
// IsVideo
// True, if the sticker is a video sticker
IsVideo bool `json:"is_video"`
// Type
// 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 StickersType `json:"type"`
// Width
// Sticker width
Width int64 `json:"width"`
// CustomEmojiID
// For custom emoji stickers, unique identifier of the custom emoji
CustomEmojiID *string `json:"custom_emoji_id,omitempty"`
// Emoji
// Emoji associated with the sticker
Emoji *string `json:"emoji,omitempty"`
// FileSize
// File size in bytes
FileSize *int64 `json:"file_size,omitempty"`
// MaskPosition
// For mask stickers, the position where the mask should be placed
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
// NeedsRepainting
// 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,omitempty"`
// PremiumAnimation
// For premium regular stickers, premium animation for the sticker
PremiumAnimation *File `json:"premium_animation,omitempty"`
// SetName
// Name of the sticker set to which the sticker belongs
SetName *string `json:"set_name,omitempty"`
// Thumbnail
// Sticker thumbnail in the .WEBP or .JPG format
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
Stickers The following methods and objects allow your bot to handle stickers and sticker sets.
func (*Stickers) GetCustomEmojiID ¶
func (*Stickers) GetFileSize ¶
func (*Stickers) GetFileUniqueID ¶
func (*Stickers) GetIsAnimated ¶
func (*Stickers) GetIsVideo ¶
func (*Stickers) GetMaskPosition ¶
func (t *Stickers) GetMaskPosition() *MaskPosition
func (*Stickers) GetNeedsRepainting ¶
func (*Stickers) GetPremiumAnimation ¶
func (*Stickers) GetSetName ¶
func (*Stickers) GetThumbnail ¶
func (*Stickers) GetType ¶
func (t *Stickers) GetType() *StickersType
type StickersType ¶
type StickersType int
const ( StickersTypeCustomEmoji StickersType StickersTypeMask StickersTypeRegular )
func (StickersType) MarshalText ¶
func (enum StickersType) MarshalText() ([]byte, error)
func (StickersType) String ¶
func (enum StickersType) String() string
func (*StickersType) UnmarshalText ¶
func (enum *StickersType) UnmarshalText(src []byte) error
type StopMessageLiveLocationConfig ¶
type StopMessageLiveLocationConfig struct {
// ChatID
// 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 IntStr `json:"chat_id,omitempty"`
// InlineMessageID
// Required if chat_id and message_id are not specified. Identifier of the inline message
InlineMessageID string `json:"inline_message_id,omitempty"`
// MessageID
// Required if inline_message_id is not specified. Identifier of the message with live location
// to stop
MessageID int64 `json:"message_id,omitempty"`
// ReplyMarkup
// A JSON-serialized object for a new inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
StopMessageLiveLocation Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
type StopPollConfig ¶
type StopPollConfig struct {
// ChatID
// Unique identifier for the target chat or username of the target channel (in the format
// @channelusername)
ChatID IntStr `json:"chat_id"`
// MessageID
// Identifier of the original message with the poll
MessageID int64 `json:"message_id"`
// ReplyMarkup
// A JSON-serialized object for a new message inline keyboard.
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
StopPoll Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
type SuccessfulPayment ¶
type SuccessfulPayment struct {
// Currency
// Three-letter ISO 4217 currency code
Currency string `json:"currency"`
// InvoicePayload
// Bot specified invoice payload
InvoicePayload string `json:"invoice_payload"`
// ProviderPaymentChargeID
// Provider payment identifier
ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
// TelegramPaymentChargeID
// Telegram payment identifier
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
// TotalAmount
// 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. 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).
TotalAmount int64 `json:"total_amount"`
// OrderInfo
// Order information provided by the user
OrderInfo *OrderInfo `json:"order_info,omitempty"`
// ShippingOptionID
// Identifier of the shipping option chosen by the user
ShippingOptionID *string `json:"shipping_option_id,omitempty"`
}
SuccessfulPayment This object contains basic information about a successful payment.
func (*SuccessfulPayment) GetCurrency ¶
func (t *SuccessfulPayment) GetCurrency() string
func (*SuccessfulPayment) GetInvoicePayload ¶
func (t *SuccessfulPayment) GetInvoicePayload() string
func (*SuccessfulPayment) GetOrderInfo ¶
func (t *SuccessfulPayment) GetOrderInfo() *OrderInfo
func (*SuccessfulPayment) GetProviderPaymentChargeID ¶
func (t *SuccessfulPayment) GetProviderPaymentChargeID() string
func (*SuccessfulPayment) GetShippingOptionID ¶
func (t *SuccessfulPayment) GetShippingOptionID() string
func (*SuccessfulPayment) GetTelegramPaymentChargeID ¶
func (t *SuccessfulPayment) GetTelegramPaymentChargeID() string
func (*SuccessfulPayment) GetTotalAmount ¶
func (t *SuccessfulPayment) GetTotalAmount() int64
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct {
// AllowBotChats
// True, if private chats with bots can be chosen
AllowBotChats *bool `json:"allow_bot_chats,omitempty"`
// AllowChannelChats
// True, if channel chats can be chosen
AllowChannelChats *bool `json:"allow_channel_chats,omitempty"`
// AllowGroupChats
// True, if group and supergroup chats can be chosen
AllowGroupChats *bool `json:"allow_group_chats,omitempty"`
// AllowUserChats
// True, if private chats with users can be chosen
AllowUserChats *bool `json:"allow_user_chats,omitempty"`
// Query
// 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"`
}
SwitchInlineQueryChosenChat This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
func (*SwitchInlineQueryChosenChat) GetAllowBotChats ¶
func (t *SwitchInlineQueryChosenChat) GetAllowBotChats() bool
func (*SwitchInlineQueryChosenChat) GetAllowChannelChats ¶
func (t *SwitchInlineQueryChosenChat) GetAllowChannelChats() bool
func (*SwitchInlineQueryChosenChat) GetAllowGroupChats ¶
func (t *SwitchInlineQueryChosenChat) GetAllowGroupChats() bool
func (*SwitchInlineQueryChosenChat) GetAllowUserChats ¶
func (t *SwitchInlineQueryChosenChat) GetAllowUserChats() bool
func (*SwitchInlineQueryChosenChat) GetQuery ¶
func (t *SwitchInlineQueryChosenChat) GetQuery() string
type UnbanChatMemberConfig ¶
type UnbanChatMemberConfig struct {
// ChatID
// Unique identifier for the target group or username of the target supergroup or channel (in
// the format @channelusername)
ChatID IntStr `json:"chat_id"`
// UserID
// Unique identifier of the target user
UserID int64 `json:"user_id"`
// OnlyIfBanned
// Do nothing if the user is not banned
OnlyIfBanned bool `json:"only_if_banned,omitempty"`
}
UnbanChatMember Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
type Update ¶
type Update struct {
// UpdateID
// 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.
UpdateID int64 `json:"update_id"`
// CallbackQuery
// New incoming callback query
CallbackQuery *CallbackQuery `json:"callback_query,omitempty"`
// ChannelPost
// New incoming channel post of any kind - text, photo, sticker, etc.
ChannelPost *Message `json:"channel_post,omitempty"`
// ChatJoinRequest
// 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"`
// ChatMember
// 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"`
// ChosenInlineResult
// The result of an inline query that was chosen by a user and sent to their chat partner.
// Please see our documentation on the feedback collecting for details on how to enable these
// updates for your bot.
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"`
// EditedChannelPost
// New version of a channel post that is known to the bot and was edited
EditedChannelPost *Message `json:"edited_channel_post,omitempty"`
// EditedMessage
// New version of a message that is known to the bot and was edited
EditedMessage *Message `json:"edited_message,omitempty"`
// InlineQuery
// New incoming inline query
InlineQuery *InlineQuery `json:"inline_query,omitempty"`
// Message
// New incoming message of any kind - text, photo, sticker, etc.
Message *Message `json:"message,omitempty"`
// MyChatMember
// 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"`
// Poll
// New poll state. Bots receive only updates about stopped polls and polls, which are sent by
// the bot
Poll *Poll `json:"poll,omitempty"`
// PollAnswer
// 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"`
// PreCheckoutQuery
// New incoming pre-checkout query. Contains full information about checkout
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"`
// ShippingQuery
// New incoming shipping query. Only for invoices with flexible price
ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"`
}
Update This object represents an incoming update.At most one of the optional parameters can be present in any given update.
func (*Update) GetCallbackQuery ¶
func (t *Update) GetCallbackQuery() *CallbackQuery
func (*Update) GetChannelPost ¶
func (*Update) GetChatJoinRequest ¶
func (t *Update) GetChatJoinRequest() *ChatJoinRequest
func (*Update) GetChatMember ¶
func (t *Update) GetChatMember() *ChatMemberUpdated
func (*Update) GetChosenInlineResult ¶
func (t *Update) GetChosenInlineResult() *ChosenInlineResult
func (*Update) GetEditedChannelPost ¶
func (*Update) GetEditedMessage ¶
func (*Update) GetInlineQuery ¶
func (t *Update) GetInlineQuery() *InlineQuery
func (*Update) GetMessage ¶
func (*Update) GetMyChatMember ¶
func (t *Update) GetMyChatMember() *ChatMemberUpdated
func (*Update) GetPollAnswer ¶
func (t *Update) GetPollAnswer() *PollAnswer
func (*Update) GetPreCheckoutQuery ¶
func (t *Update) GetPreCheckoutQuery() *PreCheckoutQuery
func (*Update) GetShippingQuery ¶
func (t *Update) GetShippingQuery() *ShippingQuery
func (*Update) GetUpdateID ¶
type UploadStickerFileConfig ¶
type UploadStickerFileConfig struct {
// Sticker
// A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See
// https://core.telegram.org/stickers for technical requirements. More information on Sending
// Files »
Sticker InputFile `json:"sticker"`
// StickerFormat
// Format of the sticker, must be one of "static", "animated", "video"
StickerFormat string `json:"sticker_format"`
// UserID
// User identifier of sticker file owner
UserID int64 `json:"user_id"`
}
UploadStickerFile Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.
type User ¶
type User struct {
// FirstName
// User's or bot's first name
FirstName string `json:"first_name"`
// ID
// 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 int64 `json:"id"`
// IsBot
// True, if this user is a bot
IsBot bool `json:"is_bot"`
// AddedToAttachmentMenu
// True, if this user added the bot to the attachment menu
AddedToAttachmentMenu *bool `json:"added_to_attachment_menu,omitempty"`
// CanJoinGroups
// True, if the bot can be invited to groups. Returned only in getMe.
CanJoinGroups *bool `json:"can_join_groups,omitempty"`
// CanReadAllGroupMessages
// True, if privacy mode is disabled for the bot. Returned only in getMe.
CanReadAllGroupMessages *bool `json:"can_read_all_group_messages,omitempty"`
// IsPremium
// True, if this user is a Telegram Premium user
IsPremium *bool `json:"is_premium,omitempty"`
// LanguageCode
// IETF language tag of the user's language
LanguageCode *string `json:"language_code,omitempty"`
// LastName
// User's or bot's last name
LastName *string `json:"last_name,omitempty"`
// SupportsInlineQueries
// True, if the bot supports inline queries. Returned only in getMe.
SupportsInlineQueries *bool `json:"supports_inline_queries,omitempty"`
// Username
// User's or bot's username
Username *string `json:"username,omitempty"`
}
User This object represents a Telegram user or bot.
func (*User) GetAddedToAttachmentMenu ¶
func (*User) GetCanJoinGroups ¶
func (*User) GetCanReadAllGroupMessages ¶
func (*User) GetFirstName ¶
func (*User) GetIsPremium ¶
func (*User) GetLanguageCode ¶
func (*User) GetLastName ¶
func (*User) GetSupportsInlineQueries ¶
func (*User) GetUsername ¶
type UserProfilePhotos ¶
type UserProfilePhotos struct {
// Photos
// Requested profile pictures (in up to 4 sizes each)
Photos [][]PhotoSize `json:"photos"`
// TotalCount
// Total number of profile pictures the target user has
TotalCount int64 `json:"total_count"`
}
UserProfilePhotos This object represent a user's profile pictures.
func (*UserProfilePhotos) GetTotalCount ¶
func (t *UserProfilePhotos) GetTotalCount() int64
type UserShared ¶
type UserShared struct {
// Identifier of the request
RequestID int64 `json:"request_id"`
// Identifier of the shared user. 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 may not have access to the user and could be unable to use
// this identifier, unless the user is already known to the bot by some other means.
UserID int64 `json:"user_id"`
}
UserShared This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.
func (*UserShared) GetRequestID ¶
func (t *UserShared) GetRequestID() int64
func (*UserShared) GetUserID ¶
func (t *UserShared) GetUserID() int64
type Venue ¶
type Venue struct {
// Address
// Address of the venue
Address string `json:"address"`
// Location
// Venue location. Can't be a live location
Location Location `json:"location"`
// Title
// Name of the venue
Title string `json:"title"`
// FoursquareID
// Foursquare identifier of the venue
FoursquareID *string `json:"foursquare_id,omitempty"`
// FoursquareType
// Foursquare type of the venue. (For example, "arts_entertainment/default",
// "arts_entertainment/aquarium" or "food/icecream".)
FoursquareType *string `json:"foursquare_type,omitempty"`
// GooglePlaceID
// Google Places identifier of the venue
GooglePlaceID *string `json:"google_place_id,omitempty"`
// GooglePlaceType
// Google Places type of the venue. (See supported types.)
GooglePlaceType *string `json:"google_place_type,omitempty"`
}
Venue This object represents a venue.
func (*Venue) GetAddress ¶
func (*Venue) GetFoursquareID ¶
func (*Venue) GetFoursquareType ¶
func (*Venue) GetGooglePlaceID ¶
func (*Venue) GetGooglePlaceType ¶
func (*Venue) GetLocation ¶
type Video ¶
type Video struct {
// Duration
// Duration of the video in seconds as defined by sender
Duration int64 `json:"duration"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Height
// Video height as defined by sender
Height int64 `json:"height"`
// Width
// Video width as defined by sender
Width int64 `json:"width"`
// FileName
// Original filename as defined by sender
FileName *string `json:"file_name,omitempty"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
// MimeType
// MIME type of the file as defined by sender
MimeType *string `json:"mime_type,omitempty"`
// Thumbnail
// Video thumbnail
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
Video This object represents a video file.
func (*Video) GetDuration ¶
func (*Video) GetFileName ¶
func (*Video) GetFileSize ¶
func (*Video) GetFileUniqueID ¶
func (*Video) GetMimeType ¶
func (*Video) GetThumbnail ¶
type VideoChatEnded ¶
type VideoChatEnded struct {
// Duration
// Video chat duration in seconds
Duration int64 `json:"duration"`
}
VideoChatEnded This object represents a service message about a video chat ended in the chat.
func (*VideoChatEnded) GetDuration ¶
func (t *VideoChatEnded) GetDuration() int64
type VideoChatParticipantsInvited ¶
type VideoChatParticipantsInvited struct {
// Users
// New members that were invited to the video chat
Users []User `json:"users"`
}
VideoChatParticipantsInvited This object represents a service message about new members invited to a video chat.
type VideoChatScheduled ¶
type VideoChatScheduled struct {
// StartDate
// Point in time (Unix timestamp) when the video chat is supposed to be started by a chat
// administrator
StartDate int64 `json:"start_date"`
}
VideoChatScheduled This object represents a service message about a video chat scheduled in the chat.
func (*VideoChatScheduled) GetStartDate ¶
func (t *VideoChatScheduled) GetStartDate() int64
type VideoChatStarted ¶
type VideoChatStarted struct {
// Duration
// Video chat duration in seconds
Duration int64 `json:"duration"`
}
VideoChatStarted This object represents a service message about a video chat started in the chat. Currently holds no information.
func (*VideoChatStarted) GetDuration ¶
func (t *VideoChatStarted) GetDuration() int64
type VideoNote ¶
type VideoNote struct {
// Duration
// Duration of the video in seconds as defined by sender
Duration int64 `json:"duration"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// Length
// Video width and height (diameter of the video message) as defined by sender
Length int64 `json:"length"`
// FileSize
// File size in bytes
FileSize *int64 `json:"file_size,omitempty"`
// Thumbnail
// Video thumbnail
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
VideoNote This object represents a video message (available in Telegram apps as of v.4.0).
func (*VideoNote) GetDuration ¶
func (*VideoNote) GetFileSize ¶
func (*VideoNote) GetFileUniqueID ¶
func (*VideoNote) GetThumbnail ¶
type Voice ¶
type Voice struct {
// Duration
// Duration of the audio in seconds as defined by sender
Duration int64 `json:"duration"`
// FileID
// Identifier for this file, which can be used to download or reuse the file
FileID string `json:"file_id"`
// FileUniqueID
// 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"`
// FileSize
// File size in bytes. It can be bigger than 2^31 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 value.
FileSize *int64 `json:"file_size,omitempty"`
// MimeType
// MIME type of the file as defined by sender
MimeType *string `json:"mime_type,omitempty"`
}
Voice This object represents a voice note.
func (*Voice) GetDuration ¶
func (*Voice) GetFileSize ¶
func (*Voice) GetFileUniqueID ¶
func (*Voice) GetMimeType ¶
type WebAppData ¶
type WebAppData struct {
// ButtonText
// Text of the web_app keyboard button 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"`
// Data
// The data. Be aware that a bad client can send arbitrary data in this field.
Data string `json:"data"`
}
WebAppData Describes data sent from a Web App to the bot.
func (*WebAppData) GetButtonText ¶
func (t *WebAppData) GetButtonText() string
func (*WebAppData) GetData ¶
func (t *WebAppData) GetData() string
type WebAppInfo ¶
type WebAppInfo struct {
// URL
// An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web
// Apps
URL string `json:"url"`
}
WebAppInfo Describes a Web App.
func (*WebAppInfo) GetURL ¶
func (t *WebAppInfo) GetURL() string
type WebhookInfo ¶
type WebhookInfo struct {
// HasCustomCertificate
// True, if a custom certificate was provided for webhook certificate checks
HasCustomCertificate bool `json:"has_custom_certificate"`
// PendingUpdateCount
// Number of updates awaiting delivery
PendingUpdateCount int64 `json:"pending_update_count"`
// URL
// Webhook URL, may be empty if webhook is not set up
URL string `json:"url"`
// AllowedUpdates
// A list of update types the bot is subscribed to. Defaults to all update types except
// chat_member
AllowedUpdates []string `json:"allowed_updates,omitempty"`
// IPAddress
// Currently used webhook IP address
IPAddress *string `json:"ip_address,omitempty"`
// LastErrorDate
// Unix time for the most recent error that happened when trying to deliver an update via
// webhook
LastErrorDate *int64 `json:"last_error_date,omitempty"`
// LastErrorMessage
// 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"`
// LastSynchronizationErrorDate
// 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"`
// MaxConnections
// The maximum allowed number of simultaneous HTTPS connections to the webhook for update
// delivery
MaxConnections *int64 `json:"max_connections,omitempty"`
}
WebhookInfo Describes the current status of a webhook.
func (*WebhookInfo) GetHasCustomCertificate ¶
func (t *WebhookInfo) GetHasCustomCertificate() bool
func (*WebhookInfo) GetIPAddress ¶
func (t *WebhookInfo) GetIPAddress() string
func (*WebhookInfo) GetLastErrorDate ¶
func (t *WebhookInfo) GetLastErrorDate() int64
func (*WebhookInfo) GetLastErrorMessage ¶
func (t *WebhookInfo) GetLastErrorMessage() string
func (*WebhookInfo) GetLastSynchronizationErrorDate ¶
func (t *WebhookInfo) GetLastSynchronizationErrorDate() int64
func (*WebhookInfo) GetMaxConnections ¶
func (t *WebhookInfo) GetMaxConnections() int64
func (*WebhookInfo) GetPendingUpdateCount ¶
func (t *WebhookInfo) GetPendingUpdateCount() int64
func (*WebhookInfo) GetURL ¶
func (t *WebhookInfo) GetURL() string
type WriteAccessAllowed ¶
type WriteAccessAllowed struct {
// WebAppName
// Name of the Web App which was launched from a link
WebAppName *string `json:"web_app_name,omitempty"`
}
WriteAccessAllowed 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.
func (*WriteAccessAllowed) GetWebAppName ¶
func (t *WriteAccessAllowed) GetWebAppName() string