Documentation ¶
Index ¶
- func SetFilePath(path string)
- func SetLogVerbosityLevel(level int)
- type AccountTTL
- type Animation
- type Animations
- type Audio
- type AuthenticationCodeInfo
- type AuthenticationCodeType
- type AuthenticationCodeTypeCall
- type AuthenticationCodeTypeEnum
- type AuthenticationCodeTypeFlashCall
- type AuthenticationCodeTypeSms
- type AuthenticationCodeTypeTelegramMessage
- type AuthorizationState
- type AuthorizationStateClosed
- type AuthorizationStateClosing
- type AuthorizationStateEnum
- type AuthorizationStateLoggingOut
- type AuthorizationStateReady
- type AuthorizationStateWaitCode
- type AuthorizationStateWaitEncryptionKey
- type AuthorizationStateWaitPassword
- type AuthorizationStateWaitPhoneNumber
- type AuthorizationStateWaitTdlibParameters
- type BasicGroup
- type BasicGroupFullInfo
- type BotCommand
- type BotInfo
- type Call
- type CallConnection
- type CallDiscardReason
- type CallDiscardReasonDeclined
- type CallDiscardReasonDisconnected
- type CallDiscardReasonEmpty
- type CallDiscardReasonEnum
- type CallDiscardReasonHungUp
- type CallDiscardReasonMissed
- type CallID
- type CallProtocol
- type CallState
- type CallStateDiscarded
- type CallStateEnum
- type CallStateError
- type CallStateExchangingKeys
- type CallStateHangingUp
- type CallStatePending
- type CallStateReady
- type CallbackQueryAnswer
- type CallbackQueryPayload
- type CallbackQueryPayloadData
- type CallbackQueryPayloadEnum
- type CallbackQueryPayloadGame
- type Chat
- type ChatAction
- type ChatActionCancel
- type ChatActionChoosingContact
- type ChatActionChoosingLocation
- type ChatActionEnum
- type ChatActionRecordingVideo
- type ChatActionRecordingVideoNote
- type ChatActionRecordingVoiceNote
- type ChatActionStartPlayingGame
- type ChatActionTyping
- type ChatActionUploadingDocument
- type ChatActionUploadingPhoto
- type ChatActionUploadingVideo
- type ChatActionUploadingVideoNote
- type ChatActionUploadingVoiceNote
- type ChatEvent
- type ChatEventAction
- type ChatEventActionEnum
- type ChatEventDescriptionChanged
- type ChatEventInvitesToggled
- type ChatEventIsAllHistoryAvailableToggled
- type ChatEventLogFilters
- type ChatEventMemberInvited
- type ChatEventMemberJoined
- type ChatEventMemberLeft
- type ChatEventMemberPromoted
- type ChatEventMemberRestricted
- type ChatEventMessageDeleted
- type ChatEventMessageEdited
- type ChatEventMessagePinned
- type ChatEventMessageUnpinned
- type ChatEventPhotoChanged
- type ChatEventSignMessagesToggled
- type ChatEventStickerSetChanged
- type ChatEventTitleChanged
- type ChatEventUsernameChanged
- type ChatEvents
- type ChatInviteLink
- type ChatInviteLinkInfo
- type ChatMember
- type ChatMemberStatus
- type ChatMemberStatusAdministrator
- type ChatMemberStatusBanned
- type ChatMemberStatusCreator
- type ChatMemberStatusEnum
- type ChatMemberStatusLeft
- type ChatMemberStatusMember
- type ChatMemberStatusRestricted
- type ChatMembers
- type ChatPhoto
- type ChatReportReason
- type ChatReportReasonCustom
- type ChatReportReasonEnum
- type ChatReportReasonPornography
- type ChatReportReasonSpam
- type ChatReportReasonViolence
- type ChatReportSpamState
- type ChatType
- type ChatTypeBasicGroup
- type ChatTypeEnum
- type ChatTypePrivate
- type ChatTypeSecret
- type ChatTypeSupergroup
- type Chats
- type CheckChatUsernameResult
- type CheckChatUsernameResultEnum
- type CheckChatUsernameResultOk
- type CheckChatUsernameResultPublicChatsTooMuch
- type CheckChatUsernameResultPublicGroupsUnavailable
- type CheckChatUsernameResultUsernameInvalid
- type CheckChatUsernameResultUsernameOccupied
- type Client
- func (client *Client) AcceptCall(callID int32, protocol *CallProtocol) (*Ok, error)
- func (client *Client) AddChatMember(chatID int64, userID int32, forwardLimit int32) (*Ok, error)
- func (client *Client) AddChatMembers(chatID int64, userIDs []int32) (*Ok, error)
- func (client *Client) AddEventReceiver(msgInstance TdMessage, filterFunc EventFilterFunc, channelCapacity int) EventReceiver
- func (client *Client) AddFavoriteSticker(sticker InputFile) (*Ok, error)
- func (client *Client) AddNetworkStatistics(entry NetworkStatisticsEntry) (*Ok, error)
- func (client *Client) AddRecentSticker(isAttached bool, sticker InputFile) (*Stickers, error)
- func (client *Client) AddRecentlyFoundChat(chatID int64) (*Ok, error)
- func (client *Client) AddSavedAnimation(animation InputFile) (*Ok, error)
- func (client *Client) AddStickerToSet(userID int32, name string, sticker *InputSticker) (*StickerSet, error)
- func (client *Client) AnswerCallbackQuery(callbackQueryID JSONInt64, text string, showAlert bool, uRL string, ...) (*Ok, error)
- func (client *Client) AnswerCustomQuery(customQueryID JSONInt64, data string) (*Ok, error)
- func (client *Client) AnswerInlineQuery(inlineQueryID JSONInt64, isPersonal bool, results []InputInlineQueryResult, ...) (*Ok, error)
- func (client *Client) AnswerPreCheckoutQuery(preCheckoutQueryID JSONInt64, errorMessage string) (*Ok, error)
- func (client *Client) AnswerShippingQuery(shippingQueryID JSONInt64, shippingOptions []ShippingOption, ...) (*Ok, error)
- func (client *Client) Authorize() (AuthorizationState, error)
- func (client *Client) BlockUser(userID int32) (*Ok, error)
- func (client *Client) CancelDownloadFile(fileID int32, onlyIfPending bool) (*Ok, error)
- func (client *Client) CancelUploadFile(fileID int32) (*Ok, error)
- func (client *Client) ChangeChatReportSpamState(chatID int64, isSpamChat bool) (*Ok, error)
- func (client *Client) ChangeImportedContacts(contacts []Contact) (*ImportedContacts, error)
- func (client *Client) ChangePhoneNumber(phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*AuthenticationCodeInfo, error)
- func (client *Client) ChangeStickerSet(setID JSONInt64, isInstalled bool, isArchived bool) (*Ok, error)
- func (client *Client) CheckAuthenticationBotToken(token string) (*Ok, error)
- func (client *Client) CheckAuthenticationCode(code string, firstName string, lastName string) (*Ok, error)
- func (client *Client) CheckAuthenticationPassword(password string) (*Ok, error)
- func (client *Client) CheckChangePhoneNumberCode(code string) (*Ok, error)
- func (client *Client) CheckChatInviteLink(inviteLink string) (*ChatInviteLinkInfo, error)
- func (client *Client) CheckChatUsername(chatID JSONInt64, username string) (CheckChatUsernameResult, error)
- func (client *Client) CheckDatabaseEncryptionKey(encryptionKey []byte) (*Ok, error)
- func (client *Client) ClearImportedContacts() (*Ok, error)
- func (client *Client) ClearRecentStickers(isAttached bool) (*Ok, error)
- func (client *Client) ClearRecentlyFoundChats() (*Ok, error)
- func (client *Client) Close() (*Ok, error)
- func (client *Client) CloseChat(chatID int64) (*Ok, error)
- func (client *Client) CloseSecretChat(secretChatID int32) (*Ok, error)
- func (client *Client) CreateBasicGroupChat(basicGroupID int32, force bool) (*Chat, error)
- func (client *Client) CreateCall(userID int32, protocol *CallProtocol) (*CallID, error)
- func (client *Client) CreateNewBasicGroupChat(userIDs []int32, title string) (*Chat, error)
- func (client *Client) CreateNewSecretChat(userID int32) (*Chat, error)
- func (client *Client) CreateNewStickerSet(userID int32, title string, name string, isMasks bool, stickers []InputSticker) (*StickerSet, error)
- func (client *Client) CreateNewSupergroupChat(title string, isChannel bool, description string) (*Chat, error)
- func (client *Client) CreatePrivateChat(userID int32, force bool) (*Chat, error)
- func (client *Client) CreateSecretChat(secretChatID int32) (*Chat, error)
- func (client *Client) CreateSupergroupChat(supergroupID int32, force bool) (*Chat, error)
- func (client *Client) CreateTemporaryPassword(password string, validFor int32) (*TemporaryPasswordState, error)
- func (client *Client) DeleteAccount(reason string) (*Ok, error)
- func (client *Client) DeleteChatHistory(chatID int64, removeFromChatList bool) (*Ok, error)
- func (client *Client) DeleteChatMessagesFromUser(chatID int64, userID int32) (*Ok, error)
- func (client *Client) DeleteChatReplyMarkup(chatID int64, messageID int64) (*Ok, error)
- func (client *Client) DeleteFile(fileID int32) (*Ok, error)
- func (client *Client) DeleteMessages(chatID int64, messageIDs []int64, revoke bool) (*Ok, error)
- func (client *Client) DeleteProfilePhoto(profilePhotoID JSONInt64) (*Ok, error)
- func (client *Client) DeleteSavedCredentials() (*Ok, error)
- func (client *Client) DeleteSavedOrderInfo() (*Ok, error)
- func (client *Client) DeleteSupergroup(supergroupID int32) (*Ok, error)
- func (client *Client) Destroy() (*Ok, error)
- func (client *Client) DestroyInstance()
- func (client *Client) DiscardCall(callID int32, isDisconnected bool, duration int32, connectionID JSONInt64) (*Ok, error)
- func (client *Client) DisconnectAllWebsites() (*Ok, error)
- func (client *Client) DisconnectWebsite(websiteID JSONInt64) (*Ok, error)
- func (client *Client) DownloadFile(fileID int32, priority int32) (*File, error)
- func (client *Client) EditInlineMessageCaption(inlineMessageID string, replyMarkup ReplyMarkup, caption *FormattedText) (*Ok, error)
- func (client *Client) EditInlineMessageLiveLocation(inlineMessageID string, replyMarkup ReplyMarkup, location *Location) (*Ok, error)
- func (client *Client) EditInlineMessageReplyMarkup(inlineMessageID string, replyMarkup ReplyMarkup) (*Ok, error)
- func (client *Client) EditInlineMessageText(inlineMessageID string, replyMarkup ReplyMarkup, ...) (*Ok, error)
- func (client *Client) EditMessageCaption(chatID int64, messageID int64, replyMarkup ReplyMarkup, caption *FormattedText) (*Message, error)
- func (client *Client) EditMessageLiveLocation(chatID int64, messageID int64, replyMarkup ReplyMarkup, location *Location) (*Message, error)
- func (client *Client) EditMessageReplyMarkup(chatID int64, messageID int64, replyMarkup ReplyMarkup) (*Message, error)
- func (client *Client) EditMessageText(chatID int64, messageID int64, replyMarkup ReplyMarkup, ...) (*Message, error)
- func (client *Client) Execute(jsonQuery interface{}) UpdateMsg
- func (client *Client) FinishFileGeneration(generationID JSONInt64, error *Error) (*Ok, error)
- func (client *Client) ForwardMessages(chatID int64, fromChatID int64, messageIDs []int64, disableNotification bool, ...) (*Messages, error)
- func (client *Client) GenerateChatInviteLink(chatID int64) (*ChatInviteLink, error)
- func (client *Client) GetAccountTTL() (*AccountTTL, error)
- func (client *Client) GetActiveLiveLocationMessages() (*Messages, error)
- func (client *Client) GetActiveSessions() (*Sessions, error)
- func (client *Client) GetArchivedStickerSets(isMasks bool, offsetStickerSetID JSONInt64, limit int32) (*StickerSets, error)
- func (client *Client) GetAttachedStickerSets(fileID int32) (*StickerSets, error)
- func (client *Client) GetAuthorizationState() (AuthorizationState, error)
- func (client *Client) GetBasicGroup(basicGroupID int32) (*BasicGroup, error)
- func (client *Client) GetBasicGroupFullInfo(basicGroupID int32) (*BasicGroupFullInfo, error)
- func (client *Client) GetBlockedUsers(offset int32, limit int32) (*Users, error)
- func (client *Client) GetCallbackQueryAnswer(chatID int64, messageID int64, payload CallbackQueryPayload) (*CallbackQueryAnswer, error)
- func (client *Client) GetChat(chatID int64) (*Chat, error)
- func (client *Client) GetChatAdministrators(chatID int64) (*Users, error)
- func (client *Client) GetChatEventLog(chatID int64, query string, fromEventID JSONInt64, limit int32, ...) (*ChatEvents, error)
- func (client *Client) GetChatHistory(chatID int64, fromMessageID int64, offset int32, limit int32, onlyLocal bool) (*Messages, error)
- func (client *Client) GetChatMember(chatID int64, userID int32) (*ChatMember, error)
- func (client *Client) GetChatMessageByDate(chatID int64, date int32) (*Message, error)
- func (client *Client) GetChatPinnedMessage(chatID int64) (*Message, error)
- func (client *Client) GetChatReportSpamState(chatID int64) (*ChatReportSpamState, error)
- func (client *Client) GetChats(offsetOrder JSONInt64, offsetChatID int64, limit int32) (*Chats, error)
- func (client *Client) GetConnectedWebsites() (*ConnectedWebsites, error)
- func (client *Client) GetCountryCode() (*Text, error)
- func (client *Client) GetCreatedPublicChats() (*Chats, error)
- func (client *Client) GetFavoriteStickers() (*Stickers, error)
- func (client *Client) GetFile(fileID int32) (*File, error)
- func (client *Client) GetFileExtension(mimeType string) (*Text, error)
- func (client *Client) GetFileMimeType(fileName string) (*Text, error)
- func (client *Client) GetGameHighScores(chatID int64, messageID int64, userID int32) (*GameHighScores, error)
- func (client *Client) GetGroupsInCommon(userID int32, offsetChatID int64, limit int32) (*Chats, error)
- func (client *Client) GetImportedContactCount() (*Count, error)
- func (client *Client) GetInlineGameHighScores(inlineMessageID string, userID int32) (*GameHighScores, error)
- func (client *Client) GetInlineQueryResults(botUserID int32, chatID int64, userLocation *Location, query string, ...) (*InlineQueryResults, error)
- func (client *Client) GetInstalledStickerSets(isMasks bool) (*StickerSets, error)
- func (client *Client) GetInviteText() (*Text, error)
- func (client *Client) GetMe() (*User, error)
- func (client *Client) GetMessage(chatID int64, messageID int64) (*Message, error)
- func (client *Client) GetMessages(chatID int64, messageIDs []int64) (*Messages, error)
- func (client *Client) GetNetworkStatistics(onlyCurrent bool) (*NetworkStatistics, error)
- func (client *Client) GetNotificationSettings(scope NotificationSettingsScope) (*NotificationSettings, error)
- func (client *Client) GetOption(name string) (OptionValue, error)
- func (client *Client) GetPasswordState() (*PasswordState, error)
- func (client *Client) GetPaymentForm(chatID int64, messageID int64) (*PaymentForm, error)
- func (client *Client) GetPaymentReceipt(chatID int64, messageID int64) (*PaymentReceipt, error)
- func (client *Client) GetProxy() (Proxy, error)
- func (client *Client) GetPublicMessageLink(chatID int64, messageID int64, forAlbum bool) (*PublicMessageLink, error)
- func (client *Client) GetRawUpdatesChannel(capacity int) chan UpdateMsg
- func (client *Client) GetRecentInlineBots() (*Users, error)
- func (client *Client) GetRecentStickers(isAttached bool) (*Stickers, error)
- func (client *Client) GetRecentlyVisitedTMeURLs(referrer string) (*TMeURLs, error)
- func (client *Client) GetRecoveryEmailAddress(password string) (*RecoveryEmailAddress, error)
- func (client *Client) GetRemoteFile(remoteFileID string, fileType FileType) (*File, error)
- func (client *Client) GetRepliedMessage(chatID int64, messageID int64) (*Message, error)
- func (client *Client) GetSavedAnimations() (*Animations, error)
- func (client *Client) GetSavedOrderInfo() (*OrderInfo, error)
- func (client *Client) GetSecretChat(secretChatID int32) (*SecretChat, error)
- func (client *Client) GetStickerEmojis(sticker InputFile) (*StickerEmojis, error)
- func (client *Client) GetStickerSet(setID JSONInt64) (*StickerSet, error)
- func (client *Client) GetStickers(emoji string, limit int32) (*Stickers, error)
- func (client *Client) GetStorageStatistics(chatLimit int32) (*StorageStatistics, error)
- func (client *Client) GetStorageStatisticsFast() (*StorageStatisticsFast, error)
- func (client *Client) GetSupergroup(supergroupID int32) (*Supergroup, error)
- func (client *Client) GetSupergroupFullInfo(supergroupID int32) (*SupergroupFullInfo, error)
- func (client *Client) GetSupergroupMembers(supergroupID int32, filter SupergroupMembersFilter, offset int32, limit int32) (*ChatMembers, error)
- func (client *Client) GetSupportUser() (*User, error)
- func (client *Client) GetTemporaryPasswordState() (*TemporaryPasswordState, error)
- func (client *Client) GetTermsOfService() (*Text, error)
- func (client *Client) GetTextEntities(text string) (*TextEntities, error)
- func (client *Client) GetTopChats(category TopChatCategory, limit int32) (*Chats, error)
- func (client *Client) GetTrendingStickerSets() (*StickerSets, error)
- func (client *Client) GetUser(userID int32) (*User, error)
- func (client *Client) GetUserFullInfo(userID int32) (*UserFullInfo, error)
- func (client *Client) GetUserPrivacySettingRules(setting UserPrivacySetting) (*UserPrivacySettingRules, error)
- func (client *Client) GetUserProfilePhotos(userID int32, offset int32, limit int32) (*UserProfilePhotos, error)
- func (client *Client) GetWallpapers() (*Wallpapers, error)
- func (client *Client) GetWebPageInstantView(uRL string, forceFull bool) (*WebPageInstantView, error)
- func (client *Client) GetWebPagePreview(text *FormattedText) (*WebPage, error)
- func (client *Client) ImportContacts(contacts []Contact) (*ImportedContacts, error)
- func (client *Client) JoinChatByInviteLink(inviteLink string) (*Chat, error)
- func (client *Client) LogOut() (*Ok, error)
- func (client *Client) OpenChat(chatID int64) (*Ok, error)
- func (client *Client) OpenMessageContent(chatID int64, messageID int64) (*Ok, error)
- func (client *Client) OptimizeStorage(size int64, tTL int32, count int32, immunityDelay int32, fileTypes []FileType, ...) (*StorageStatistics, error)
- func (client *Client) ParseTextEntities(text string, parseMode TextParseMode) (*FormattedText, error)
- func (client *Client) PinSupergroupMessage(supergroupID int32, messageID int64, disableNotification bool) (*Ok, error)
- func (client *Client) ProcessDcUpdate(dc string, addr string) (*Ok, error)
- func (client *Client) ReadAllChatMentions(chatID int64) (*Ok, error)
- func (client *Client) Receive(timeout float64) []byte
- func (client *Client) RecoverAuthenticationPassword(recoveryCode string) (*Ok, error)
- func (client *Client) RecoverPassword(recoveryCode string) (*PasswordState, error)
- func (client *Client) RegisterDevice(deviceToken DeviceToken, otherUserIDs []int32) (*Ok, error)
- func (client *Client) RemoveContacts(userIDs []int32) (*Ok, error)
- func (client *Client) RemoveFavoriteSticker(sticker InputFile) (*Ok, error)
- func (client *Client) RemoveRecentHashtag(hashtag string) (*Ok, error)
- func (client *Client) RemoveRecentSticker(isAttached bool, sticker InputFile) (*Ok, error)
- func (client *Client) RemoveRecentlyFoundChat(chatID int64) (*Ok, error)
- func (client *Client) RemoveSavedAnimation(animation InputFile) (*Ok, error)
- func (client *Client) RemoveStickerFromSet(sticker InputFile) (*Ok, error)
- func (client *Client) RemoveTopChat(category TopChatCategory, chatID int64) (*Ok, error)
- func (client *Client) ReorderInstalledStickerSets(isMasks bool, stickerSetIDs []JSONInt64) (*Ok, error)
- func (client *Client) ReportChat(chatID int64, reason ChatReportReason, messageIDs []int64) (*Ok, error)
- func (client *Client) ReportSupergroupSpam(supergroupID int32, userID int32, messageIDs []int64) (*Ok, error)
- func (client *Client) RequestAuthenticationPasswordRecovery() (*Ok, error)
- func (client *Client) RequestPasswordRecovery() (*PasswordRecoveryInfo, error)
- func (client *Client) ResendAuthenticationCode() (*Ok, error)
- func (client *Client) ResendChangePhoneNumberCode() (*AuthenticationCodeInfo, error)
- func (client *Client) ResetAllNotificationSettings() (*Ok, error)
- func (client *Client) ResetNetworkStatistics() (*Ok, error)
- func (client *Client) SearchCallMessages(fromMessageID int64, limit int32, onlyMissed bool) (*Messages, error)
- func (client *Client) SearchChatMembers(chatID int64, query string, limit int32) (*ChatMembers, error)
- func (client *Client) SearchChatMessages(chatID int64, query string, senderUserID int32, fromMessageID int64, ...) (*Messages, error)
- func (client *Client) SearchChatRecentLocationMessages(chatID int64, limit int32) (*Messages, error)
- func (client *Client) SearchChats(query string, limit int32) (*Chats, error)
- func (client *Client) SearchChatsOnServer(query string, limit int32) (*Chats, error)
- func (client *Client) SearchContacts(query string, limit int32) (*Users, error)
- func (client *Client) SearchHashtags(prefix string, limit int32) (*Hashtags, error)
- func (client *Client) SearchInstalledStickerSets(isMasks bool, query string, limit int32) (*StickerSets, error)
- func (client *Client) SearchMessages(query string, offsetDate int32, offsetChatID int64, offsetMessageID int64, ...) (*Messages, error)
- func (client *Client) SearchPublicChat(username string) (*Chat, error)
- func (client *Client) SearchPublicChats(query string) (*Chats, error)
- func (client *Client) SearchSecretMessages(chatID int64, query string, fromSearchID JSONInt64, limit int32, ...) (*FoundMessages, error)
- func (client *Client) SearchStickerSet(name string) (*StickerSet, error)
- func (client *Client) SearchStickerSets(query string) (*StickerSets, error)
- func (client *Client) SearchStickers(emoji string, limit int32) (*Stickers, error)
- func (client *Client) Send(jsonQuery interface{})
- func (client *Client) SendAndCatch(jsonQuery interface{}) (UpdateMsg, error)
- func (client *Client) SendAuthCode(code string) (AuthorizationState, error)
- func (client *Client) SendAuthPassword(password string) (AuthorizationState, error)
- func (client *Client) SendBotStartMessage(botUserID int32, chatID int64, parameter string) (*Message, error)
- func (client *Client) SendCallDebugInformation(callID int32, debugInformation string) (*Ok, error)
- func (client *Client) SendCallRating(callID int32, rating int32, comment string) (*Ok, error)
- func (client *Client) SendChatAction(chatID int64, action ChatAction) (*Ok, error)
- func (client *Client) SendChatScreenshotTakenNotification(chatID int64) (*Ok, error)
- func (client *Client) SendChatSetTTLMessage(chatID int64, tTL int32) (*Message, error)
- func (client *Client) SendCustomRequest(method string, parameters string) (*CustomRequestResult, error)
- func (client *Client) SendInlineQueryResultMessage(chatID int64, replyToMessageID int64, disableNotification bool, ...) (*Message, error)
- func (client *Client) SendMessage(chatID int64, replyToMessageID int64, disableNotification bool, ...) (*Message, error)
- func (client *Client) SendMessageAlbum(chatID int64, replyToMessageID int64, disableNotification bool, ...) (*Messages, error)
- func (client *Client) SendPaymentForm(chatID int64, messageID int64, orderInfoID string, shippingOptionID string, ...) (*PaymentResult, error)
- func (client *Client) SendPhoneNumber(phoneNumber string) (AuthorizationState, error)
- func (client *Client) SetAccountTTL(tTL *AccountTTL) (*Ok, error)
- func (client *Client) SetAlarm(seconds float64) (*Ok, error)
- func (client *Client) SetAuthenticationPhoneNumber(phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*Ok, error)
- func (client *Client) SetBio(bio string) (*Ok, error)
- func (client *Client) SetBotUpdatesStatus(pendingUpdateCount int32, errorMessage string) (*Ok, error)
- func (client *Client) SetChatClientData(chatID int64, clientData string) (*Ok, error)
- func (client *Client) SetChatDraftMessage(chatID int64, draftMessage *DraftMessage) (*Ok, error)
- func (client *Client) SetChatMemberStatus(chatID int64, userID int32, status ChatMemberStatus) (*Ok, error)
- func (client *Client) SetChatPhoto(chatID int64, photo InputFile) (*Ok, error)
- func (client *Client) SetChatTitle(chatID int64, title string) (*Ok, error)
- func (client *Client) SetDatabaseEncryptionKey(newEncryptionKey []byte) (*Ok, error)
- func (client *Client) SetFileGenerationProgress(generationID JSONInt64, expectedSize int32, localPrefixSize int32) (*Ok, error)
- func (client *Client) SetGameScore(chatID int64, messageID int64, editMessage bool, userID int32, score int32, ...) (*Message, error)
- func (client *Client) SetInlineGameScore(inlineMessageID string, editMessage bool, userID int32, score int32, ...) (*Ok, error)
- func (client *Client) SetName(firstName string, lastName string) (*Ok, error)
- func (client *Client) SetNetworkType(typeParam NetworkType) (*Ok, error)
- func (client *Client) SetNotificationSettings(scope NotificationSettingsScope, notificationSettings *NotificationSettings) (*Ok, error)
- func (client *Client) SetOption(name string, value OptionValue) (*Ok, error)
- func (client *Client) SetPassword(oldPassword string, newPassword string, newHint string, ...) (*PasswordState, error)
- func (client *Client) SetPinnedChats(chatIDs []int64) (*Ok, error)
- func (client *Client) SetProfilePhoto(photo InputFile) (*Ok, error)
- func (client *Client) SetProxy(proxy Proxy) (*Ok, error)
- func (client *Client) SetRecoveryEmailAddress(password string, newRecoveryEmailAddress string) (*PasswordState, error)
- func (client *Client) SetStickerPositionInSet(sticker InputFile, position int32) (*Ok, error)
- func (client *Client) SetSupergroupDescription(supergroupID int32, description string) (*Ok, error)
- func (client *Client) SetSupergroupStickerSet(supergroupID int32, stickerSetID JSONInt64) (*Ok, error)
- func (client *Client) SetSupergroupUsername(supergroupID int32, username string) (*Ok, error)
- func (client *Client) SetTdlibParameters(parameters *TdlibParameters) (*Ok, error)
- func (client *Client) SetUserPrivacySettingRules(setting UserPrivacySetting, rules *UserPrivacySettingRules) (*Ok, error)
- func (client *Client) SetUsername(username string) (*Ok, error)
- func (client *Client) TerminateAllOtherSessions() (*Ok, error)
- func (client *Client) TerminateSession(sessionID JSONInt64) (*Ok, error)
- func (client *Client) TestCallBytes(x []byte) (*TestBytes, error)
- func (client *Client) TestCallEmpty() (*Ok, error)
- func (client *Client) TestCallString(x string) (*TestString, error)
- func (client *Client) TestCallVectorInt(x []int32) (*TestVectorInt, error)
- func (client *Client) TestCallVectorIntObject(x []TestInt) (*TestVectorIntObject, error)
- func (client *Client) TestCallVectorString(x []string) (*TestVectorString, error)
- func (client *Client) TestCallVectorStringObject(x []TestString) (*TestVectorStringObject, error)
- func (client *Client) TestGetDifference() (*Ok, error)
- func (client *Client) TestNetwork() (*Ok, error)
- func (client *Client) TestSquareInt(x int32) (*TestInt, error)
- func (client *Client) TestUseUpdate() (Update, error)
- func (client *Client) ToggleBasicGroupAdministrators(basicGroupID int32, everyoneIsAdministrator bool) (*Ok, error)
- func (client *Client) ToggleChatIsPinned(chatID int64, isPinned bool) (*Ok, error)
- func (client *Client) ToggleSupergroupInvites(supergroupID int32, anyoneCanInvite bool) (*Ok, error)
- func (client *Client) ToggleSupergroupIsAllHistoryAvailable(supergroupID int32, isAllHistoryAvailable bool) (*Ok, error)
- func (client *Client) ToggleSupergroupSignMessages(supergroupID int32, signMessages bool) (*Ok, error)
- func (client *Client) UnblockUser(userID int32) (*Ok, error)
- func (client *Client) UnpinSupergroupMessage(supergroupID int32) (*Ok, error)
- func (client *Client) UpgradeBasicGroupChatToSupergroupChat(chatID int64) (*Chat, error)
- func (client *Client) UploadFile(file InputFile, fileType FileType, priority int32) (*File, error)
- func (client *Client) UploadStickerFile(userID int32, pngSticker InputFile) (*File, error)
- func (client *Client) ValidateOrderInfo(chatID int64, messageID int64, orderInfo *OrderInfo, allowSave bool) (*ValidatedOrderInfo, error)
- func (client *Client) ViewMessages(chatID int64, messageIDs []int64, forceRead bool) (*Ok, error)
- func (client *Client) ViewTrendingStickerSets(stickerSetIDs []JSONInt64) (*Ok, error)
- type Config
- type ConnectedWebsite
- type ConnectedWebsites
- type ConnectionState
- type ConnectionStateConnecting
- type ConnectionStateConnectingToProxy
- type ConnectionStateEnum
- type ConnectionStateReady
- type ConnectionStateUpdating
- type ConnectionStateWaitingForNetwork
- type Contact
- type Count
- type CustomRequestResult
- type DeviceToken
- type DeviceTokenApplePush
- type DeviceTokenApplePushVoIP
- type DeviceTokenBlackBerryPush
- type DeviceTokenEnum
- type DeviceTokenGoogleCloudMessaging
- type DeviceTokenMicrosoftPush
- type DeviceTokenMicrosoftPushVoIP
- type DeviceTokenSimplePush
- type DeviceTokenTizenPush
- type DeviceTokenUbuntuPush
- type DeviceTokenWebPush
- type DeviceTokenWindowsPush
- type Document
- type DraftMessage
- type Error
- type EventFilterFunc
- type EventReceiver
- type File
- type FileType
- type FileTypeAnimation
- type FileTypeAudio
- type FileTypeDocument
- type FileTypeEnum
- type FileTypeNone
- type FileTypePhoto
- type FileTypeProfilePhoto
- type FileTypeSecret
- type FileTypeSecretThumbnail
- type FileTypeSticker
- type FileTypeThumbnail
- type FileTypeUnknown
- type FileTypeVideo
- type FileTypeVideoNote
- type FileTypeVoiceNote
- type FileTypeWallpaper
- type FormattedText
- type FoundMessages
- type Game
- type GameHighScore
- type GameHighScores
- type Hashtags
- type ImportedContacts
- type InlineKeyboardButton
- type InlineKeyboardButtonType
- type InlineKeyboardButtonTypeBuy
- type InlineKeyboardButtonTypeCallback
- type InlineKeyboardButtonTypeCallbackGame
- type InlineKeyboardButtonTypeEnum
- type InlineKeyboardButtonTypeSwitchInline
- type InlineKeyboardButtonTypeURL
- type InlineQueryResult
- type InlineQueryResultAnimation
- type InlineQueryResultArticle
- type InlineQueryResultAudio
- type InlineQueryResultContact
- type InlineQueryResultDocument
- type InlineQueryResultEnum
- type InlineQueryResultGame
- type InlineQueryResultLocation
- type InlineQueryResultPhoto
- type InlineQueryResultSticker
- type InlineQueryResultVenue
- type InlineQueryResultVideo
- type InlineQueryResultVoiceNote
- type InlineQueryResults
- type InputCredentials
- type InputCredentialsAndroidPay
- type InputCredentialsApplePay
- type InputCredentialsEnum
- type InputCredentialsNew
- type InputCredentialsSaved
- type InputFile
- type InputFileEnum
- type InputFileGenerated
- type InputFileID
- type InputFileLocal
- type InputFileRemote
- type InputInlineQueryResult
- type InputInlineQueryResultAnimatedGif
- func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) MessageType() string
- func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultAnimatedMpeg4
- func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) MessageType() string
- func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultArticle
- func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) MessageType() string
- func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultAudio
- func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) MessageType() string
- func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultContact
- func (inputInlineQueryResultContact *InputInlineQueryResultContact) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultContact *InputInlineQueryResultContact) MessageType() string
- func (inputInlineQueryResultContact *InputInlineQueryResultContact) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultDocument
- func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) MessageType() string
- func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultEnum
- type InputInlineQueryResultGame
- type InputInlineQueryResultLocation
- func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) MessageType() string
- func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultPhoto
- func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) MessageType() string
- func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultSticker
- func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) MessageType() string
- func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultVenue
- func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) MessageType() string
- func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultVideo
- func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) MessageType() string
- func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) UnmarshalJSON(b []byte) error
- type InputInlineQueryResultVoiceNote
- func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
- func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) MessageType() string
- func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) UnmarshalJSON(b []byte) error
- type InputMessageAnimation
- type InputMessageAudio
- type InputMessageContact
- type InputMessageContent
- type InputMessageContentEnum
- type InputMessageDocument
- type InputMessageForwarded
- type InputMessageGame
- type InputMessageInvoice
- type InputMessageLocation
- type InputMessagePhoto
- type InputMessageSticker
- type InputMessageText
- type InputMessageVenue
- type InputMessageVideo
- type InputMessageVideoNote
- type InputMessageVoiceNote
- type InputSticker
- type InputThumbnail
- type Invoice
- type JSONInt64
- type KeyboardButton
- type KeyboardButtonType
- type KeyboardButtonTypeEnum
- type KeyboardButtonTypeRequestLocation
- type KeyboardButtonTypeRequestPhoneNumber
- type KeyboardButtonTypeText
- type LabeledPricePart
- type LinkState
- type LinkStateEnum
- type LinkStateIsContact
- type LinkStateKnowsPhoneNumber
- type LinkStateNone
- type LocalFile
- type Location
- type MaskPoint
- type MaskPointChin
- type MaskPointEnum
- type MaskPointEyes
- type MaskPointForehead
- type MaskPointMouth
- type MaskPosition
- type Message
- type MessageAnimation
- type MessageAudio
- type MessageBasicGroupChatCreate
- type MessageCall
- type MessageChatAddMembers
- type MessageChatChangePhoto
- type MessageChatChangeTitle
- type MessageChatDeleteMember
- type MessageChatDeletePhoto
- type MessageChatJoinByLink
- type MessageChatSetTTL
- type MessageChatUpgradeFrom
- type MessageChatUpgradeTo
- type MessageContact
- type MessageContactRegistered
- type MessageContent
- type MessageContentEnum
- type MessageCustomServiceAction
- type MessageDocument
- type MessageExpiredPhoto
- type MessageExpiredVideo
- type MessageForwardInfo
- type MessageForwardInfoEnum
- type MessageForwardedFromUser
- type MessageForwardedPost
- type MessageGame
- type MessageGameScore
- type MessageInvoice
- type MessageLocation
- type MessagePaymentSuccessful
- type MessagePaymentSuccessfulBot
- type MessagePhoto
- type MessagePinMessage
- type MessageScreenshotTaken
- type MessageSendingState
- type MessageSendingStateEnum
- type MessageSendingStateFailed
- type MessageSendingStatePending
- type MessageSticker
- type MessageSupergroupChatCreate
- type MessageText
- type MessageUnsupported
- type MessageVenue
- type MessageVideo
- type MessageVideoNote
- type MessageVoiceNote
- type MessageWebsiteConnected
- type Messages
- type NetworkStatistics
- type NetworkStatisticsEntry
- type NetworkStatisticsEntryCall
- type NetworkStatisticsEntryEnum
- type NetworkStatisticsEntryFile
- type NetworkType
- type NetworkTypeEnum
- type NetworkTypeMobile
- type NetworkTypeMobileRoaming
- type NetworkTypeNone
- type NetworkTypeOther
- type NetworkTypeWiFi
- type NotificationSettings
- type NotificationSettingsScope
- type NotificationSettingsScopeAllChats
- type NotificationSettingsScopeBasicGroupChats
- type NotificationSettingsScopeChat
- type NotificationSettingsScopeEnum
- type NotificationSettingsScopePrivateChats
- type Ok
- type OptionValue
- type OptionValueBoolean
- type OptionValueEmpty
- type OptionValueEnum
- type OptionValueInteger
- type OptionValueString
- type OrderInfo
- type PageBlock
- type PageBlockAnchor
- type PageBlockAnimation
- type PageBlockAudio
- type PageBlockAuthorDate
- type PageBlockBlockQuote
- type PageBlockChatLink
- type PageBlockCollage
- type PageBlockCover
- type PageBlockDivider
- type PageBlockEmbedded
- type PageBlockEmbeddedPost
- type PageBlockEnum
- type PageBlockFooter
- type PageBlockHeader
- type PageBlockList
- type PageBlockParagraph
- type PageBlockPhoto
- type PageBlockPreformatted
- type PageBlockPullQuote
- type PageBlockSlideshow
- type PageBlockSubheader
- type PageBlockSubtitle
- type PageBlockTitle
- type PageBlockVideo
- type PasswordRecoveryInfo
- type PasswordState
- type PaymentForm
- type PaymentReceipt
- type PaymentResult
- type PaymentsProviderStripe
- type Photo
- type PhotoSize
- type ProfilePhoto
- type Proxy
- type ProxyEmpty
- type ProxyEnum
- type ProxySocks5
- type PublicMessageLink
- type RecoveryEmailAddress
- type RemoteFile
- type ReplyMarkup
- type ReplyMarkupEnum
- type ReplyMarkupForceReply
- type ReplyMarkupInlineKeyboard
- type ReplyMarkupRemoveKeyboard
- type ReplyMarkupShowKeyboard
- type RichText
- type RichTextBold
- type RichTextEmailAddress
- type RichTextEnum
- type RichTextFixed
- type RichTextItalic
- type RichTextPlain
- type RichTextStrikethrough
- type RichTextURL
- type RichTextUnderline
- type RichTexts
- type SavedCredentials
- type SearchMessagesFilter
- type SearchMessagesFilterAnimation
- type SearchMessagesFilterAudio
- type SearchMessagesFilterCall
- type SearchMessagesFilterChatPhoto
- type SearchMessagesFilterDocument
- type SearchMessagesFilterEmpty
- type SearchMessagesFilterEnum
- type SearchMessagesFilterMention
- type SearchMessagesFilterMissedCall
- type SearchMessagesFilterPhoto
- type SearchMessagesFilterPhotoAndVideo
- type SearchMessagesFilterURL
- type SearchMessagesFilterUnreadMention
- type SearchMessagesFilterVideo
- type SearchMessagesFilterVideoNote
- type SearchMessagesFilterVoiceAndVideoNote
- type SearchMessagesFilterVoiceNote
- type SecretChat
- type SecretChatState
- type SecretChatStateClosed
- type SecretChatStateEnum
- type SecretChatStatePending
- type SecretChatStateReady
- type Session
- type Sessions
- type ShippingAddress
- type ShippingOption
- type Sticker
- type StickerEmojis
- type StickerSet
- type StickerSetInfo
- type StickerSets
- type Stickers
- type StorageStatistics
- type StorageStatisticsByChat
- type StorageStatisticsByFileType
- type StorageStatisticsFast
- type Supergroup
- type SupergroupFullInfo
- type SupergroupMembersFilter
- type SupergroupMembersFilterAdministrators
- type SupergroupMembersFilterBanned
- type SupergroupMembersFilterBots
- type SupergroupMembersFilterEnum
- type SupergroupMembersFilterRecent
- type SupergroupMembersFilterRestricted
- type SupergroupMembersFilterSearch
- type TMeURL
- type TMeURLType
- type TMeURLTypeChatInvite
- type TMeURLTypeEnum
- type TMeURLTypeStickerSet
- type TMeURLTypeSupergroup
- type TMeURLTypeUser
- type TMeURLs
- type TdMessage
- type TdlibParameters
- type TemporaryPasswordState
- type TestBytes
- type TestInt
- type TestString
- type TestVectorInt
- type TestVectorIntObject
- type TestVectorString
- type TestVectorStringObject
- type Text
- type TextEntities
- type TextEntity
- type TextEntityType
- type TextEntityTypeBold
- type TextEntityTypeBotCommand
- type TextEntityTypeCashtag
- type TextEntityTypeCode
- type TextEntityTypeEmailAddress
- type TextEntityTypeEnum
- type TextEntityTypeHashtag
- type TextEntityTypeItalic
- type TextEntityTypeMention
- type TextEntityTypeMentionName
- type TextEntityTypePhoneNumber
- type TextEntityTypePre
- type TextEntityTypePreCode
- type TextEntityTypeTextURL
- type TextEntityTypeURL
- type TextParseMode
- type TextParseModeEnum
- type TextParseModeHTML
- type TextParseModeMarkdown
- type TopChatCategory
- type TopChatCategoryBots
- type TopChatCategoryCalls
- type TopChatCategoryChannels
- type TopChatCategoryEnum
- type TopChatCategoryGroups
- type TopChatCategoryInlineBots
- type TopChatCategoryUsers
- type Update
- type UpdateAuthorizationState
- type UpdateBasicGroup
- type UpdateBasicGroupFullInfo
- type UpdateCall
- type UpdateChatDraftMessage
- type UpdateChatIsPinned
- type UpdateChatLastMessage
- type UpdateChatOrder
- type UpdateChatPhoto
- type UpdateChatReadInbox
- type UpdateChatReadOutbox
- type UpdateChatReplyMarkup
- type UpdateChatTitle
- type UpdateChatUnreadMentionCount
- type UpdateConnectionState
- type UpdateData
- type UpdateDeleteMessages
- type UpdateEnum
- type UpdateFavoriteStickers
- type UpdateFile
- type UpdateFileGenerationStart
- type UpdateFileGenerationStop
- type UpdateInstalledStickerSets
- type UpdateMessageContent
- type UpdateMessageContentOpened
- type UpdateMessageEdited
- type UpdateMessageMentionRead
- type UpdateMessageSendAcknowledged
- type UpdateMessageSendFailed
- type UpdateMessageSendSucceeded
- type UpdateMessageViews
- type UpdateMsg
- type UpdateNewCallbackQuery
- type UpdateNewChat
- type UpdateNewChosenInlineResult
- type UpdateNewCustomEvent
- type UpdateNewCustomQuery
- type UpdateNewInlineCallbackQuery
- type UpdateNewInlineQuery
- type UpdateNewMessage
- type UpdateNewPreCheckoutQuery
- type UpdateNewShippingQuery
- type UpdateNotificationSettings
- type UpdateOption
- type UpdateRecentStickers
- type UpdateSavedAnimations
- type UpdateSecretChat
- type UpdateServiceNotification
- type UpdateSupergroup
- type UpdateSupergroupFullInfo
- type UpdateTrendingStickerSets
- type UpdateUnreadMessageCount
- type UpdateUser
- type UpdateUserChatAction
- type UpdateUserFullInfo
- type UpdateUserPrivacySettingRules
- type UpdateUserStatus
- type User
- type UserFullInfo
- type UserPrivacySetting
- type UserPrivacySettingAllowCalls
- type UserPrivacySettingAllowChatInvites
- type UserPrivacySettingEnum
- type UserPrivacySettingRule
- type UserPrivacySettingRuleAllowAll
- type UserPrivacySettingRuleAllowContacts
- type UserPrivacySettingRuleAllowUsers
- type UserPrivacySettingRuleEnum
- type UserPrivacySettingRuleRestrictAll
- type UserPrivacySettingRuleRestrictContacts
- type UserPrivacySettingRuleRestrictUsers
- type UserPrivacySettingRules
- type UserPrivacySettingShowStatus
- type UserProfilePhotos
- type UserStatus
- type UserStatusEmpty
- type UserStatusEnum
- type UserStatusLastMonth
- type UserStatusLastWeek
- type UserStatusOffline
- type UserStatusOnline
- type UserStatusRecently
- type UserType
- type UserTypeBot
- type UserTypeDeleted
- type UserTypeEnum
- type UserTypeRegular
- type UserTypeUnknown
- type Users
- type ValidatedOrderInfo
- type Venue
- type Video
- type VideoNote
- type VoiceNote
- type Wallpaper
- type Wallpapers
- type WebPage
- type WebPageInstantView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFilePath ¶
func SetFilePath(path string)
SetFilePath Sets the path to the file to where the internal TDLib log will be written. By default TDLib writes logs to stderr or an OS specific log. Use this method to write the log to a file instead.
func SetLogVerbosityLevel ¶
func SetLogVerbosityLevel(level int)
SetLogVerbosityLevel Sets the verbosity level of the internal logging of TDLib. By default the TDLib uses a verbosity level of 5 for logging.
Types ¶
type AccountTTL ¶
type AccountTTL struct { Days int32 `json:"days"` // Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days // contains filtered or unexported fields }
AccountTTL Contains information about the period of inactivity after which the current user's account will automatically be deleted
func NewAccountTTL ¶
func NewAccountTTL(days int32) *AccountTTL
NewAccountTTL creates a new AccountTTL
@param days Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days
func (*AccountTTL) MessageType ¶
func (accountTTL *AccountTTL) MessageType() string
MessageType return the string telegram-type of AccountTTL
type Animation ¶
type Animation struct { Duration int32 `json:"duration"` // Duration of the animation, in seconds; as defined by the sender Width int32 `json:"width"` // Width of the animation Height int32 `json:"height"` // Height of the animation FileName string `json:"file_name"` // Original name of the file; as defined by the sender MimeType string `json:"mime_type"` // MIME type of the file, usually "image/gif" or "video/mp4" Thumbnail *PhotoSize `json:"thumbnail"` // Animation thumbnail; may be null Animation *File `json:"animation"` // File containing the animation // contains filtered or unexported fields }
Animation Describes an animation file. The animation must be encoded in GIF or MPEG4 format
func NewAnimation ¶
func NewAnimation(duration int32, width int32, height int32, fileName string, mimeType string, thumbnail *PhotoSize, animation *File) *Animation
NewAnimation creates a new Animation
@param duration Duration of the animation, in seconds; as defined by the sender @param width Width of the animation @param height Height of the animation @param fileName Original name of the file; as defined by the sender @param mimeType MIME type of the file, usually "image/gif" or "video/mp4" @param thumbnail Animation thumbnail; may be null @param animation File containing the animation
func (*Animation) MessageType ¶
MessageType return the string telegram-type of Animation
type Animations ¶
type Animations struct { Animations []Animation `json:"animations"` // List of animations // contains filtered or unexported fields }
Animations Represents a list of animations
func NewAnimations ¶
func NewAnimations(animations []Animation) *Animations
NewAnimations creates a new Animations
@param animations List of animations
func (*Animations) MessageType ¶
func (animations *Animations) MessageType() string
MessageType return the string telegram-type of Animations
type Audio ¶
type Audio struct { Duration int32 `json:"duration"` // Duration of the audio, in seconds; as defined by the sender Title string `json:"title"` // Title of the audio; as defined by the sender Performer string `json:"performer"` // Performer of the audio; as defined by the sender FileName string `json:"file_name"` // Original name of the file; as defined by the sender MimeType string `json:"mime_type"` // The MIME type of the file; as defined by the sender AlbumCoverThumbnail *PhotoSize `json:"album_cover_thumbnail"` // The thumbnail of the album cover; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null Audio *File `json:"audio"` // File containing the audio // contains filtered or unexported fields }
Audio Describes an audio file. Audio is usually in MP3 format
func NewAudio ¶
func NewAudio(duration int32, title string, performer string, fileName string, mimeType string, albumCoverThumbnail *PhotoSize, audio *File) *Audio
NewAudio creates a new Audio
@param duration Duration of the audio, in seconds; as defined by the sender @param title Title of the audio; as defined by the sender @param performer Performer of the audio; as defined by the sender @param fileName Original name of the file; as defined by the sender @param mimeType The MIME type of the file; as defined by the sender @param albumCoverThumbnail The thumbnail of the album cover; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null @param audio File containing the audio
func (*Audio) MessageType ¶
MessageType return the string telegram-type of Audio
type AuthenticationCodeInfo ¶
type AuthenticationCodeInfo struct { PhoneNumber string `json:"phone_number"` // A phone number that is being authenticated Type AuthenticationCodeType `json:"type"` // Describes the way the code was sent to the user NextType AuthenticationCodeType `json:"next_type"` // Describes the way the next code will be sent to the user; may be null Timeout int32 `json:"timeout"` // Timeout before the code should be re-sent, in seconds // contains filtered or unexported fields }
AuthenticationCodeInfo Information about the authentication code that was sent
func NewAuthenticationCodeInfo ¶
func NewAuthenticationCodeInfo(phoneNumber string, typeParam AuthenticationCodeType, nextType AuthenticationCodeType, timeout int32) *AuthenticationCodeInfo
NewAuthenticationCodeInfo creates a new AuthenticationCodeInfo
@param phoneNumber A phone number that is being authenticated @param typeParam Describes the way the code was sent to the user @param nextType Describes the way the next code will be sent to the user; may be null @param timeout Timeout before the code should be re-sent, in seconds
func (*AuthenticationCodeInfo) MessageType ¶
func (authenticationCodeInfo *AuthenticationCodeInfo) MessageType() string
MessageType return the string telegram-type of AuthenticationCodeInfo
func (*AuthenticationCodeInfo) UnmarshalJSON ¶
func (authenticationCodeInfo *AuthenticationCodeInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type AuthenticationCodeType ¶
type AuthenticationCodeType interface {
GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
}
type AuthenticationCodeTypeCall ¶
type AuthenticationCodeTypeCall struct { Length int32 `json:"length"` // Length of the code // contains filtered or unexported fields }
AuthenticationCodeTypeCall An authentication code is delivered via a phone call to the specified phone number
func NewAuthenticationCodeTypeCall ¶
func NewAuthenticationCodeTypeCall(length int32) *AuthenticationCodeTypeCall
NewAuthenticationCodeTypeCall creates a new AuthenticationCodeTypeCall
@param length Length of the code
func (*AuthenticationCodeTypeCall) GetAuthenticationCodeTypeEnum ¶
func (authenticationCodeTypeCall *AuthenticationCodeTypeCall) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
GetAuthenticationCodeTypeEnum return the enum type of this object
func (*AuthenticationCodeTypeCall) MessageType ¶
func (authenticationCodeTypeCall *AuthenticationCodeTypeCall) MessageType() string
MessageType return the string telegram-type of AuthenticationCodeTypeCall
type AuthenticationCodeTypeEnum ¶
type AuthenticationCodeTypeEnum string
AuthenticationCodeTypeEnum Alias for abstract AuthenticationCodeType 'Sub-Classes', used as constant-enum here
const ( AuthenticationCodeTypeTelegramMessageType AuthenticationCodeTypeEnum = "authenticationCodeTypeTelegramMessage" AuthenticationCodeTypeSmsType AuthenticationCodeTypeEnum = "authenticationCodeTypeSms" AuthenticationCodeTypeCallType AuthenticationCodeTypeEnum = "authenticationCodeTypeCall" AuthenticationCodeTypeFlashCallType AuthenticationCodeTypeEnum = "authenticationCodeTypeFlashCall" )
AuthenticationCodeType enums
type AuthenticationCodeTypeFlashCall ¶
type AuthenticationCodeTypeFlashCall struct { Pattern string `json:"pattern"` // Pattern of the phone number from which the call will be made // contains filtered or unexported fields }
AuthenticationCodeTypeFlashCall An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code
func NewAuthenticationCodeTypeFlashCall ¶
func NewAuthenticationCodeTypeFlashCall(pattern string) *AuthenticationCodeTypeFlashCall
NewAuthenticationCodeTypeFlashCall creates a new AuthenticationCodeTypeFlashCall
@param pattern Pattern of the phone number from which the call will be made
func (*AuthenticationCodeTypeFlashCall) GetAuthenticationCodeTypeEnum ¶
func (authenticationCodeTypeFlashCall *AuthenticationCodeTypeFlashCall) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
GetAuthenticationCodeTypeEnum return the enum type of this object
func (*AuthenticationCodeTypeFlashCall) MessageType ¶
func (authenticationCodeTypeFlashCall *AuthenticationCodeTypeFlashCall) MessageType() string
MessageType return the string telegram-type of AuthenticationCodeTypeFlashCall
type AuthenticationCodeTypeSms ¶
type AuthenticationCodeTypeSms struct { Length int32 `json:"length"` // Length of the code // contains filtered or unexported fields }
AuthenticationCodeTypeSms An authentication code is delivered via an SMS message to the specified phone number
func NewAuthenticationCodeTypeSms ¶
func NewAuthenticationCodeTypeSms(length int32) *AuthenticationCodeTypeSms
NewAuthenticationCodeTypeSms creates a new AuthenticationCodeTypeSms
@param length Length of the code
func (*AuthenticationCodeTypeSms) GetAuthenticationCodeTypeEnum ¶
func (authenticationCodeTypeSms *AuthenticationCodeTypeSms) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
GetAuthenticationCodeTypeEnum return the enum type of this object
func (*AuthenticationCodeTypeSms) MessageType ¶
func (authenticationCodeTypeSms *AuthenticationCodeTypeSms) MessageType() string
MessageType return the string telegram-type of AuthenticationCodeTypeSms
type AuthenticationCodeTypeTelegramMessage ¶
type AuthenticationCodeTypeTelegramMessage struct { Length int32 `json:"length"` // Length of the code // contains filtered or unexported fields }
AuthenticationCodeTypeTelegramMessage An authentication code is delivered via a private Telegram message, which can be viewed in another client
func NewAuthenticationCodeTypeTelegramMessage ¶
func NewAuthenticationCodeTypeTelegramMessage(length int32) *AuthenticationCodeTypeTelegramMessage
NewAuthenticationCodeTypeTelegramMessage creates a new AuthenticationCodeTypeTelegramMessage
@param length Length of the code
func (*AuthenticationCodeTypeTelegramMessage) GetAuthenticationCodeTypeEnum ¶
func (authenticationCodeTypeTelegramMessage *AuthenticationCodeTypeTelegramMessage) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
GetAuthenticationCodeTypeEnum return the enum type of this object
func (*AuthenticationCodeTypeTelegramMessage) MessageType ¶
func (authenticationCodeTypeTelegramMessage *AuthenticationCodeTypeTelegramMessage) MessageType() string
MessageType return the string telegram-type of AuthenticationCodeTypeTelegramMessage
type AuthorizationState ¶
type AuthorizationState interface {
GetAuthorizationStateEnum() AuthorizationStateEnum
}
AuthorizationState Represents the current authorization state of the client
type AuthorizationStateClosed ¶
type AuthorizationStateClosed struct {
// contains filtered or unexported fields
}
AuthorizationStateClosed TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to
func NewAuthorizationStateClosed ¶
func NewAuthorizationStateClosed() *AuthorizationStateClosed
NewAuthorizationStateClosed creates a new AuthorizationStateClosed
func (*AuthorizationStateClosed) GetAuthorizationStateEnum ¶
func (authorizationStateClosed *AuthorizationStateClosed) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateClosed) MessageType ¶
func (authorizationStateClosed *AuthorizationStateClosed) MessageType() string
MessageType return the string telegram-type of AuthorizationStateClosed
type AuthorizationStateClosing ¶
type AuthorizationStateClosing struct {
// contains filtered or unexported fields
}
AuthorizationStateClosing TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received
func NewAuthorizationStateClosing ¶
func NewAuthorizationStateClosing() *AuthorizationStateClosing
NewAuthorizationStateClosing creates a new AuthorizationStateClosing
func (*AuthorizationStateClosing) GetAuthorizationStateEnum ¶
func (authorizationStateClosing *AuthorizationStateClosing) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateClosing) MessageType ¶
func (authorizationStateClosing *AuthorizationStateClosing) MessageType() string
MessageType return the string telegram-type of AuthorizationStateClosing
type AuthorizationStateEnum ¶
type AuthorizationStateEnum string
AuthorizationStateEnum Alias for abstract AuthorizationState 'Sub-Classes', used as constant-enum here
const ( AuthorizationStateWaitTdlibParametersType AuthorizationStateEnum = "authorizationStateWaitTdlibParameters" AuthorizationStateWaitEncryptionKeyType AuthorizationStateEnum = "authorizationStateWaitEncryptionKey" AuthorizationStateWaitPhoneNumberType AuthorizationStateEnum = "authorizationStateWaitPhoneNumber" AuthorizationStateWaitCodeType AuthorizationStateEnum = "authorizationStateWaitCode" AuthorizationStateWaitPasswordType AuthorizationStateEnum = "authorizationStateWaitPassword" AuthorizationStateReadyType AuthorizationStateEnum = "authorizationStateReady" AuthorizationStateLoggingOutType AuthorizationStateEnum = "authorizationStateLoggingOut" AuthorizationStateClosingType AuthorizationStateEnum = "authorizationStateClosing" AuthorizationStateClosedType AuthorizationStateEnum = "authorizationStateClosed" )
AuthorizationState enums
type AuthorizationStateLoggingOut ¶
type AuthorizationStateLoggingOut struct {
// contains filtered or unexported fields
}
AuthorizationStateLoggingOut The user is currently logging out
func NewAuthorizationStateLoggingOut ¶
func NewAuthorizationStateLoggingOut() *AuthorizationStateLoggingOut
NewAuthorizationStateLoggingOut creates a new AuthorizationStateLoggingOut
func (*AuthorizationStateLoggingOut) GetAuthorizationStateEnum ¶
func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateLoggingOut) MessageType ¶
func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) MessageType() string
MessageType return the string telegram-type of AuthorizationStateLoggingOut
type AuthorizationStateReady ¶
type AuthorizationStateReady struct {
// contains filtered or unexported fields
}
AuthorizationStateReady The user has been successfully authorized. TDLib is now ready to answer queries
func NewAuthorizationStateReady ¶
func NewAuthorizationStateReady() *AuthorizationStateReady
NewAuthorizationStateReady creates a new AuthorizationStateReady
func (*AuthorizationStateReady) GetAuthorizationStateEnum ¶
func (authorizationStateReady *AuthorizationStateReady) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateReady) MessageType ¶
func (authorizationStateReady *AuthorizationStateReady) MessageType() string
MessageType return the string telegram-type of AuthorizationStateReady
type AuthorizationStateWaitCode ¶
type AuthorizationStateWaitCode struct { IsRegistered bool `json:"is_registered"` // True, if the user is already registered CodeInfo *AuthenticationCodeInfo `json:"code_info"` // Information about the authorization code that was sent // contains filtered or unexported fields }
AuthorizationStateWaitCode TDLib needs the user's authentication code to finalize authorization
func NewAuthorizationStateWaitCode ¶
func NewAuthorizationStateWaitCode(isRegistered bool, codeInfo *AuthenticationCodeInfo) *AuthorizationStateWaitCode
NewAuthorizationStateWaitCode creates a new AuthorizationStateWaitCode
@param isRegistered True, if the user is already registered @param codeInfo Information about the authorization code that was sent
func (*AuthorizationStateWaitCode) GetAuthorizationStateEnum ¶
func (authorizationStateWaitCode *AuthorizationStateWaitCode) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateWaitCode) MessageType ¶
func (authorizationStateWaitCode *AuthorizationStateWaitCode) MessageType() string
MessageType return the string telegram-type of AuthorizationStateWaitCode
type AuthorizationStateWaitEncryptionKey ¶
type AuthorizationStateWaitEncryptionKey struct { IsEncrypted bool `json:"is_encrypted"` // True, if the database is currently encrypted // contains filtered or unexported fields }
AuthorizationStateWaitEncryptionKey TDLib needs an encryption key to decrypt the local database
func NewAuthorizationStateWaitEncryptionKey ¶
func NewAuthorizationStateWaitEncryptionKey(isEncrypted bool) *AuthorizationStateWaitEncryptionKey
NewAuthorizationStateWaitEncryptionKey creates a new AuthorizationStateWaitEncryptionKey
@param isEncrypted True, if the database is currently encrypted
func (*AuthorizationStateWaitEncryptionKey) GetAuthorizationStateEnum ¶
func (authorizationStateWaitEncryptionKey *AuthorizationStateWaitEncryptionKey) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateWaitEncryptionKey) MessageType ¶
func (authorizationStateWaitEncryptionKey *AuthorizationStateWaitEncryptionKey) MessageType() string
MessageType return the string telegram-type of AuthorizationStateWaitEncryptionKey
type AuthorizationStateWaitPassword ¶
type AuthorizationStateWaitPassword struct { PasswordHint string `json:"password_hint"` // Hint for the password; can be empty HasRecoveryEmailAddress bool `json:"has_recovery_email_address"` // True if a recovery email address has been set up RecoveryEmailAddressPattern string `json:"recovery_email_address_pattern"` // Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent // contains filtered or unexported fields }
AuthorizationStateWaitPassword The user has been authorized, but needs to enter a password to start using the application
func NewAuthorizationStateWaitPassword ¶
func NewAuthorizationStateWaitPassword(passwordHint string, hasRecoveryEmailAddress bool, recoveryEmailAddressPattern string) *AuthorizationStateWaitPassword
NewAuthorizationStateWaitPassword creates a new AuthorizationStateWaitPassword
@param passwordHint Hint for the password; can be empty @param hasRecoveryEmailAddress True if a recovery email address has been set up @param recoveryEmailAddressPattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
func (*AuthorizationStateWaitPassword) GetAuthorizationStateEnum ¶
func (authorizationStateWaitPassword *AuthorizationStateWaitPassword) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateWaitPassword) MessageType ¶
func (authorizationStateWaitPassword *AuthorizationStateWaitPassword) MessageType() string
MessageType return the string telegram-type of AuthorizationStateWaitPassword
type AuthorizationStateWaitPhoneNumber ¶
type AuthorizationStateWaitPhoneNumber struct {
// contains filtered or unexported fields
}
AuthorizationStateWaitPhoneNumber TDLib needs the user's phone number to authorize
func NewAuthorizationStateWaitPhoneNumber ¶
func NewAuthorizationStateWaitPhoneNumber() *AuthorizationStateWaitPhoneNumber
NewAuthorizationStateWaitPhoneNumber creates a new AuthorizationStateWaitPhoneNumber
func (*AuthorizationStateWaitPhoneNumber) GetAuthorizationStateEnum ¶
func (authorizationStateWaitPhoneNumber *AuthorizationStateWaitPhoneNumber) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateWaitPhoneNumber) MessageType ¶
func (authorizationStateWaitPhoneNumber *AuthorizationStateWaitPhoneNumber) MessageType() string
MessageType return the string telegram-type of AuthorizationStateWaitPhoneNumber
type AuthorizationStateWaitTdlibParameters ¶
type AuthorizationStateWaitTdlibParameters struct {
// contains filtered or unexported fields
}
AuthorizationStateWaitTdlibParameters TDLib needs TdlibParameters for initialization
func NewAuthorizationStateWaitTdlibParameters ¶
func NewAuthorizationStateWaitTdlibParameters() *AuthorizationStateWaitTdlibParameters
NewAuthorizationStateWaitTdlibParameters creates a new AuthorizationStateWaitTdlibParameters
func (*AuthorizationStateWaitTdlibParameters) GetAuthorizationStateEnum ¶
func (authorizationStateWaitTdlibParameters *AuthorizationStateWaitTdlibParameters) GetAuthorizationStateEnum() AuthorizationStateEnum
GetAuthorizationStateEnum return the enum type of this object
func (*AuthorizationStateWaitTdlibParameters) MessageType ¶
func (authorizationStateWaitTdlibParameters *AuthorizationStateWaitTdlibParameters) MessageType() string
MessageType return the string telegram-type of AuthorizationStateWaitTdlibParameters
type BasicGroup ¶
type BasicGroup struct { ID int32 `json:"id"` // Group identifier MemberCount int32 `json:"member_count"` // Number of members in the group Status ChatMemberStatus `json:"status"` // Status of the current user in the group EveryoneIsAdministrator bool `json:"everyone_is_administrator"` // True, if all members have been granted administrator rights in the group IsActive bool `json:"is_active"` // True, if the group is active UpgradedToSupergroupID int32 `json:"upgraded_to_supergroup_id"` // Identifier of the supergroup to which this group was upgraded; 0 if none // contains filtered or unexported fields }
BasicGroup Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
func NewBasicGroup ¶
func NewBasicGroup(iD int32, memberCount int32, status ChatMemberStatus, everyoneIsAdministrator bool, isActive bool, upgradedToSupergroupID int32) *BasicGroup
NewBasicGroup creates a new BasicGroup
@param iD Group identifier @param memberCount Number of members in the group @param status Status of the current user in the group @param everyoneIsAdministrator True, if all members have been granted administrator rights in the group @param isActive True, if the group is active @param upgradedToSupergroupID Identifier of the supergroup to which this group was upgraded; 0 if none
func (*BasicGroup) MessageType ¶
func (basicGroup *BasicGroup) MessageType() string
MessageType return the string telegram-type of BasicGroup
func (*BasicGroup) UnmarshalJSON ¶
func (basicGroup *BasicGroup) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type BasicGroupFullInfo ¶
type BasicGroupFullInfo struct { CreatorUserID int32 `json:"creator_user_id"` // User identifier of the creator of the group; 0 if unknown Members []ChatMember `json:"members"` // Group members InviteLink string `json:"invite_link"` // Invite link for this group; available only for the group creator and only after it has been generated at least once // contains filtered or unexported fields }
BasicGroupFullInfo Contains full information about a basic group
func NewBasicGroupFullInfo ¶
func NewBasicGroupFullInfo(creatorUserID int32, members []ChatMember, inviteLink string) *BasicGroupFullInfo
NewBasicGroupFullInfo creates a new BasicGroupFullInfo
@param creatorUserID User identifier of the creator of the group; 0 if unknown @param members Group members @param inviteLink Invite link for this group; available only for the group creator and only after it has been generated at least once
func (*BasicGroupFullInfo) MessageType ¶
func (basicGroupFullInfo *BasicGroupFullInfo) MessageType() string
MessageType return the string telegram-type of BasicGroupFullInfo
type BotCommand ¶
type BotCommand struct { Command string `json:"command"` // Text of the bot command Description string `json:"description"` // // contains filtered or unexported fields }
BotCommand Represents commands supported by a bot
func NewBotCommand ¶
func NewBotCommand(command string, description string) *BotCommand
NewBotCommand creates a new BotCommand
@param command Text of the bot command @param description
func (*BotCommand) MessageType ¶
func (botCommand *BotCommand) MessageType() string
MessageType return the string telegram-type of BotCommand
type BotInfo ¶
type BotInfo struct { Description string `json:"description"` // Commands []BotCommand `json:"commands"` // A list of commands supported by the bot // contains filtered or unexported fields }
BotInfo Provides information about a bot and its supported commands
func NewBotInfo ¶
func NewBotInfo(description string, commands []BotCommand) *BotInfo
NewBotInfo creates a new BotInfo
@param description @param commands A list of commands supported by the bot
func (*BotInfo) MessageType ¶
MessageType return the string telegram-type of BotInfo
type Call ¶
type Call struct { ID int32 `json:"id"` // Call identifier, not persistent UserID int32 `json:"user_id"` // Peer user identifier IsOutgoing bool `json:"is_outgoing"` // True, if the call is outgoing State CallState `json:"state"` // Call state // contains filtered or unexported fields }
Call Describes a call
func NewCall ¶
NewCall creates a new Call
@param iD Call identifier, not persistent @param userID Peer user identifier @param isOutgoing True, if the call is outgoing @param state Call state
func (*Call) MessageType ¶
MessageType return the string telegram-type of Call
func (*Call) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type CallConnection ¶
type CallConnection struct { ID JSONInt64 `json:"id"` // Reflector identifier IP string `json:"ip"` // IPv4 reflector address IPv6 string `json:"ipv6"` // IPv6 reflector address Port int32 `json:"port"` // Reflector port number PeerTag []byte `json:"peer_tag"` // Connection peer tag // contains filtered or unexported fields }
CallConnection Describes the address of UDP reflectors
func NewCallConnection ¶
func NewCallConnection(iD JSONInt64, iP string, iPv6 string, port int32, peerTag []byte) *CallConnection
NewCallConnection creates a new CallConnection
@param iD Reflector identifier @param iP IPv4 reflector address @param iPv6 IPv6 reflector address @param port Reflector port number @param peerTag Connection peer tag
func (*CallConnection) MessageType ¶
func (callConnection *CallConnection) MessageType() string
MessageType return the string telegram-type of CallConnection
type CallDiscardReason ¶
type CallDiscardReason interface {
GetCallDiscardReasonEnum() CallDiscardReasonEnum
}
CallDiscardReason Describes the reason why a call was discarded
type CallDiscardReasonDeclined ¶
type CallDiscardReasonDeclined struct {
// contains filtered or unexported fields
}
CallDiscardReasonDeclined The call was ended before the conversation started. It was declined by the other party
func NewCallDiscardReasonDeclined ¶
func NewCallDiscardReasonDeclined() *CallDiscardReasonDeclined
NewCallDiscardReasonDeclined creates a new CallDiscardReasonDeclined
func (*CallDiscardReasonDeclined) GetCallDiscardReasonEnum ¶
func (callDiscardReasonDeclined *CallDiscardReasonDeclined) GetCallDiscardReasonEnum() CallDiscardReasonEnum
GetCallDiscardReasonEnum return the enum type of this object
func (*CallDiscardReasonDeclined) MessageType ¶
func (callDiscardReasonDeclined *CallDiscardReasonDeclined) MessageType() string
MessageType return the string telegram-type of CallDiscardReasonDeclined
type CallDiscardReasonDisconnected ¶
type CallDiscardReasonDisconnected struct {
// contains filtered or unexported fields
}
CallDiscardReasonDisconnected The call was ended during the conversation because the users were disconnected
func NewCallDiscardReasonDisconnected ¶
func NewCallDiscardReasonDisconnected() *CallDiscardReasonDisconnected
NewCallDiscardReasonDisconnected creates a new CallDiscardReasonDisconnected
func (*CallDiscardReasonDisconnected) GetCallDiscardReasonEnum ¶
func (callDiscardReasonDisconnected *CallDiscardReasonDisconnected) GetCallDiscardReasonEnum() CallDiscardReasonEnum
GetCallDiscardReasonEnum return the enum type of this object
func (*CallDiscardReasonDisconnected) MessageType ¶
func (callDiscardReasonDisconnected *CallDiscardReasonDisconnected) MessageType() string
MessageType return the string telegram-type of CallDiscardReasonDisconnected
type CallDiscardReasonEmpty ¶
type CallDiscardReasonEmpty struct {
// contains filtered or unexported fields
}
CallDiscardReasonEmpty The call wasn't discarded, or the reason is unknown
func NewCallDiscardReasonEmpty ¶
func NewCallDiscardReasonEmpty() *CallDiscardReasonEmpty
NewCallDiscardReasonEmpty creates a new CallDiscardReasonEmpty
func (*CallDiscardReasonEmpty) GetCallDiscardReasonEnum ¶
func (callDiscardReasonEmpty *CallDiscardReasonEmpty) GetCallDiscardReasonEnum() CallDiscardReasonEnum
GetCallDiscardReasonEnum return the enum type of this object
func (*CallDiscardReasonEmpty) MessageType ¶
func (callDiscardReasonEmpty *CallDiscardReasonEmpty) MessageType() string
MessageType return the string telegram-type of CallDiscardReasonEmpty
type CallDiscardReasonEnum ¶
type CallDiscardReasonEnum string
CallDiscardReasonEnum Alias for abstract CallDiscardReason 'Sub-Classes', used as constant-enum here
const ( CallDiscardReasonEmptyType CallDiscardReasonEnum = "callDiscardReasonEmpty" CallDiscardReasonMissedType CallDiscardReasonEnum = "callDiscardReasonMissed" CallDiscardReasonDeclinedType CallDiscardReasonEnum = "callDiscardReasonDeclined" CallDiscardReasonDisconnectedType CallDiscardReasonEnum = "callDiscardReasonDisconnected" CallDiscardReasonHungUpType CallDiscardReasonEnum = "callDiscardReasonHungUp" )
CallDiscardReason enums
type CallDiscardReasonHungUp ¶
type CallDiscardReasonHungUp struct {
// contains filtered or unexported fields
}
CallDiscardReasonHungUp The call was ended because one of the parties hung up
func NewCallDiscardReasonHungUp ¶
func NewCallDiscardReasonHungUp() *CallDiscardReasonHungUp
NewCallDiscardReasonHungUp creates a new CallDiscardReasonHungUp
func (*CallDiscardReasonHungUp) GetCallDiscardReasonEnum ¶
func (callDiscardReasonHungUp *CallDiscardReasonHungUp) GetCallDiscardReasonEnum() CallDiscardReasonEnum
GetCallDiscardReasonEnum return the enum type of this object
func (*CallDiscardReasonHungUp) MessageType ¶
func (callDiscardReasonHungUp *CallDiscardReasonHungUp) MessageType() string
MessageType return the string telegram-type of CallDiscardReasonHungUp
type CallDiscardReasonMissed ¶
type CallDiscardReasonMissed struct {
// contains filtered or unexported fields
}
CallDiscardReasonMissed The call was ended before the conversation started. It was cancelled by the caller or missed by the other party
func NewCallDiscardReasonMissed ¶
func NewCallDiscardReasonMissed() *CallDiscardReasonMissed
NewCallDiscardReasonMissed creates a new CallDiscardReasonMissed
func (*CallDiscardReasonMissed) GetCallDiscardReasonEnum ¶
func (callDiscardReasonMissed *CallDiscardReasonMissed) GetCallDiscardReasonEnum() CallDiscardReasonEnum
GetCallDiscardReasonEnum return the enum type of this object
func (*CallDiscardReasonMissed) MessageType ¶
func (callDiscardReasonMissed *CallDiscardReasonMissed) MessageType() string
MessageType return the string telegram-type of CallDiscardReasonMissed
type CallID ¶
type CallID struct { ID int32 `json:"id"` // Call identifier // contains filtered or unexported fields }
CallID Contains the call identifier
func (*CallID) MessageType ¶
MessageType return the string telegram-type of CallID
type CallProtocol ¶
type CallProtocol struct { UDPP2p bool `json:"udp_p2p"` // True, if UDP peer-to-peer connections are supported UDPReflector bool `json:"udp_reflector"` // True, if connection through UDP reflectors is supported MinLayer int32 `json:"min_layer"` // Minimum supported API layer; use 65 MaxLayer int32 `json:"max_layer"` // Maximum supported API layer; use 65 // contains filtered or unexported fields }
CallProtocol Specifies the supported call protocols
func NewCallProtocol ¶
func NewCallProtocol(uDPP2p bool, uDPReflector bool, minLayer int32, maxLayer int32) *CallProtocol
NewCallProtocol creates a new CallProtocol
@param uDPP2p True, if UDP peer-to-peer connections are supported @param uDPReflector True, if connection through UDP reflectors is supported @param minLayer Minimum supported API layer; use 65 @param maxLayer Maximum supported API layer; use 65
func (*CallProtocol) MessageType ¶
func (callProtocol *CallProtocol) MessageType() string
MessageType return the string telegram-type of CallProtocol
type CallState ¶
type CallState interface {
GetCallStateEnum() CallStateEnum
}
CallState Describes the current call state
type CallStateDiscarded ¶
type CallStateDiscarded struct { Reason CallDiscardReason `json:"reason"` // The reason, why the call has ended NeedRating bool `json:"need_rating"` // True, if the call rating should be sent to the server NeedDebugInformation bool `json:"need_debug_information"` // True, if the call debug information should be sent to the server // contains filtered or unexported fields }
CallStateDiscarded The call has ended successfully
func NewCallStateDiscarded ¶
func NewCallStateDiscarded(reason CallDiscardReason, needRating bool, needDebugInformation bool) *CallStateDiscarded
NewCallStateDiscarded creates a new CallStateDiscarded
@param reason The reason, why the call has ended @param needRating True, if the call rating should be sent to the server @param needDebugInformation True, if the call debug information should be sent to the server
func (*CallStateDiscarded) GetCallStateEnum ¶
func (callStateDiscarded *CallStateDiscarded) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStateDiscarded) MessageType ¶
func (callStateDiscarded *CallStateDiscarded) MessageType() string
MessageType return the string telegram-type of CallStateDiscarded
func (*CallStateDiscarded) UnmarshalJSON ¶
func (callStateDiscarded *CallStateDiscarded) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type CallStateEnum ¶
type CallStateEnum string
CallStateEnum Alias for abstract CallState 'Sub-Classes', used as constant-enum here
const ( CallStatePendingType CallStateEnum = "callStatePending" CallStateExchangingKeysType CallStateEnum = "callStateExchangingKeys" CallStateReadyType CallStateEnum = "callStateReady" CallStateHangingUpType CallStateEnum = "callStateHangingUp" CallStateDiscardedType CallStateEnum = "callStateDiscarded" CallStateErrorType CallStateEnum = "callStateError" )
CallState enums
type CallStateError ¶
type CallStateError struct { Error *Error `json:"error"` // Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout // contains filtered or unexported fields }
CallStateError The call has ended with an error
func NewCallStateError ¶
func NewCallStateError(error *Error) *CallStateError
NewCallStateError creates a new CallStateError
@param error Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout
func (*CallStateError) GetCallStateEnum ¶
func (callStateError *CallStateError) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStateError) MessageType ¶
func (callStateError *CallStateError) MessageType() string
MessageType return the string telegram-type of CallStateError
type CallStateExchangingKeys ¶
type CallStateExchangingKeys struct {
// contains filtered or unexported fields
}
CallStateExchangingKeys The call has been answered and encryption keys are being exchanged
func NewCallStateExchangingKeys ¶
func NewCallStateExchangingKeys() *CallStateExchangingKeys
NewCallStateExchangingKeys creates a new CallStateExchangingKeys
func (*CallStateExchangingKeys) GetCallStateEnum ¶
func (callStateExchangingKeys *CallStateExchangingKeys) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStateExchangingKeys) MessageType ¶
func (callStateExchangingKeys *CallStateExchangingKeys) MessageType() string
MessageType return the string telegram-type of CallStateExchangingKeys
type CallStateHangingUp ¶
type CallStateHangingUp struct {
// contains filtered or unexported fields
}
CallStateHangingUp The call is hanging up after discardCall has been called
func NewCallStateHangingUp ¶
func NewCallStateHangingUp() *CallStateHangingUp
NewCallStateHangingUp creates a new CallStateHangingUp
func (*CallStateHangingUp) GetCallStateEnum ¶
func (callStateHangingUp *CallStateHangingUp) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStateHangingUp) MessageType ¶
func (callStateHangingUp *CallStateHangingUp) MessageType() string
MessageType return the string telegram-type of CallStateHangingUp
type CallStatePending ¶
type CallStatePending struct { IsCreated bool `json:"is_created"` // True, if the call has already been created by the server IsReceived bool `json:"is_received"` // True, if the call has already been received by the other party // contains filtered or unexported fields }
CallStatePending The call is pending, waiting to be accepted by a user
func NewCallStatePending ¶
func NewCallStatePending(isCreated bool, isReceived bool) *CallStatePending
NewCallStatePending creates a new CallStatePending
@param isCreated True, if the call has already been created by the server @param isReceived True, if the call has already been received by the other party
func (*CallStatePending) GetCallStateEnum ¶
func (callStatePending *CallStatePending) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStatePending) MessageType ¶
func (callStatePending *CallStatePending) MessageType() string
MessageType return the string telegram-type of CallStatePending
type CallStateReady ¶
type CallStateReady struct { Protocol *CallProtocol `json:"protocol"` // Call protocols supported by the peer Connections []CallConnection `json:"connections"` // Available UDP reflectors Config string `json:"config"` // A JSON-encoded call config EncryptionKey []byte `json:"encryption_key"` // Call encryption key Emojis []string `json:"emojis"` // Encryption key emojis fingerprint // contains filtered or unexported fields }
CallStateReady The call is ready to use
func NewCallStateReady ¶
func NewCallStateReady(protocol *CallProtocol, connections []CallConnection, config string, encryptionKey []byte, emojis []string) *CallStateReady
NewCallStateReady creates a new CallStateReady
@param protocol Call protocols supported by the peer @param connections Available UDP reflectors @param config A JSON-encoded call config @param encryptionKey Call encryption key @param emojis Encryption key emojis fingerprint
func (*CallStateReady) GetCallStateEnum ¶
func (callStateReady *CallStateReady) GetCallStateEnum() CallStateEnum
GetCallStateEnum return the enum type of this object
func (*CallStateReady) MessageType ¶
func (callStateReady *CallStateReady) MessageType() string
MessageType return the string telegram-type of CallStateReady
type CallbackQueryAnswer ¶
type CallbackQueryAnswer struct { Text string `json:"text"` // Text of the answer ShowAlert bool `json:"show_alert"` // True, if an alert should be shown to the user instead of a toast notification URL string `json:"url"` // URL to be opened // contains filtered or unexported fields }
CallbackQueryAnswer Contains a bot's answer to a callback query
func NewCallbackQueryAnswer ¶
func NewCallbackQueryAnswer(text string, showAlert bool, uRL string) *CallbackQueryAnswer
NewCallbackQueryAnswer creates a new CallbackQueryAnswer
@param text Text of the answer @param showAlert True, if an alert should be shown to the user instead of a toast notification @param uRL URL to be opened
func (*CallbackQueryAnswer) MessageType ¶
func (callbackQueryAnswer *CallbackQueryAnswer) MessageType() string
MessageType return the string telegram-type of CallbackQueryAnswer
type CallbackQueryPayload ¶
type CallbackQueryPayload interface {
GetCallbackQueryPayloadEnum() CallbackQueryPayloadEnum
}
CallbackQueryPayload Represents a payload of a callback query
type CallbackQueryPayloadData ¶
type CallbackQueryPayloadData struct { Data []byte `json:"data"` // Data that was attached to the callback button // contains filtered or unexported fields }
CallbackQueryPayloadData The payload from a general callback button
func NewCallbackQueryPayloadData ¶
func NewCallbackQueryPayloadData(data []byte) *CallbackQueryPayloadData
NewCallbackQueryPayloadData creates a new CallbackQueryPayloadData
@param data Data that was attached to the callback button
func (*CallbackQueryPayloadData) GetCallbackQueryPayloadEnum ¶
func (callbackQueryPayloadData *CallbackQueryPayloadData) GetCallbackQueryPayloadEnum() CallbackQueryPayloadEnum
GetCallbackQueryPayloadEnum return the enum type of this object
func (*CallbackQueryPayloadData) MessageType ¶
func (callbackQueryPayloadData *CallbackQueryPayloadData) MessageType() string
MessageType return the string telegram-type of CallbackQueryPayloadData
type CallbackQueryPayloadEnum ¶
type CallbackQueryPayloadEnum string
CallbackQueryPayloadEnum Alias for abstract CallbackQueryPayload 'Sub-Classes', used as constant-enum here
const ( CallbackQueryPayloadDataType CallbackQueryPayloadEnum = "callbackQueryPayloadData" CallbackQueryPayloadGameType CallbackQueryPayloadEnum = "callbackQueryPayloadGame" )
CallbackQueryPayload enums
type CallbackQueryPayloadGame ¶
type CallbackQueryPayloadGame struct { GameShortName string `json:"game_short_name"` // A short name of the game that was attached to the callback button // contains filtered or unexported fields }
CallbackQueryPayloadGame The payload from a game callback button
func NewCallbackQueryPayloadGame ¶
func NewCallbackQueryPayloadGame(gameShortName string) *CallbackQueryPayloadGame
NewCallbackQueryPayloadGame creates a new CallbackQueryPayloadGame
@param gameShortName A short name of the game that was attached to the callback button
func (*CallbackQueryPayloadGame) GetCallbackQueryPayloadEnum ¶
func (callbackQueryPayloadGame *CallbackQueryPayloadGame) GetCallbackQueryPayloadEnum() CallbackQueryPayloadEnum
GetCallbackQueryPayloadEnum return the enum type of this object
func (*CallbackQueryPayloadGame) MessageType ¶
func (callbackQueryPayloadGame *CallbackQueryPayloadGame) MessageType() string
MessageType return the string telegram-type of CallbackQueryPayloadGame
type Chat ¶
type Chat struct { ID int64 `json:"id"` // Chat unique identifier Type ChatType `json:"type"` // Type of the chat Title string `json:"title"` // Chat title Photo *ChatPhoto `json:"photo"` // Chat photo; may be null LastMessage *Message `json:"last_message"` // Last message in the chat; may be null Order JSONInt64 `json:"order"` // Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined IsPinned bool `json:"is_pinned"` // True, if the chat is pinned CanBeReported bool `json:"can_be_reported"` // True, if the chat can be reported to Telegram moderators through reportChat UnreadCount int32 `json:"unread_count"` // Number of unread messages in the chat LastReadInboxMessageID int64 `json:"last_read_inbox_message_id"` // Identifier of the last read incoming message LastReadOutboxMessageID int64 `json:"last_read_outbox_message_id"` // Identifier of the last read outgoing message UnreadMentionCount int32 `json:"unread_mention_count"` // Number of unread messages with a mention/reply in the chat NotificationSettings *NotificationSettings `json:"notification_settings"` // Notification settings for this chat ReplyMarkupMessageID int64 `json:"reply_markup_message_id"` // Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat DraftMessage *DraftMessage `json:"draft_message"` // A draft of a message in the chat; may be null ClientData string `json:"client_data"` // Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used // contains filtered or unexported fields }
Chat A chat. (Can be a private chat, basic group, supergroup, or secret chat)
func NewChat ¶
func NewChat(iD int64, typeParam ChatType, title string, photo *ChatPhoto, lastMessage *Message, order JSONInt64, isPinned bool, canBeReported bool, unreadCount int32, lastReadInboxMessageID int64, lastReadOutboxMessageID int64, unreadMentionCount int32, notificationSettings *NotificationSettings, replyMarkupMessageID int64, draftMessage *DraftMessage, clientData string) *Chat
NewChat creates a new Chat
@param iD Chat unique identifier @param typeParam Type of the chat @param title Chat title @param photo Chat photo; may be null @param lastMessage Last message in the chat; may be null @param order Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined @param isPinned True, if the chat is pinned @param canBeReported True, if the chat can be reported to Telegram moderators through reportChat @param unreadCount Number of unread messages in the chat @param lastReadInboxMessageID Identifier of the last read incoming message @param lastReadOutboxMessageID Identifier of the last read outgoing message @param unreadMentionCount Number of unread messages with a mention/reply in the chat @param notificationSettings Notification settings for this chat @param replyMarkupMessageID Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat @param draftMessage A draft of a message in the chat; may be null @param clientData Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used
func (*Chat) MessageType ¶
MessageType return the string telegram-type of Chat
func (*Chat) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type ChatAction ¶
type ChatAction interface {
GetChatActionEnum() ChatActionEnum
}
ChatAction Describes the different types of activity in a chat
type ChatActionCancel ¶
type ChatActionCancel struct {
// contains filtered or unexported fields
}
ChatActionCancel The user has cancelled the previous action
func NewChatActionCancel ¶
func NewChatActionCancel() *ChatActionCancel
NewChatActionCancel creates a new ChatActionCancel
func (*ChatActionCancel) GetChatActionEnum ¶
func (chatActionCancel *ChatActionCancel) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionCancel) MessageType ¶
func (chatActionCancel *ChatActionCancel) MessageType() string
MessageType return the string telegram-type of ChatActionCancel
type ChatActionChoosingContact ¶
type ChatActionChoosingContact struct {
// contains filtered or unexported fields
}
ChatActionChoosingContact The user is picking a contact to send
func NewChatActionChoosingContact ¶
func NewChatActionChoosingContact() *ChatActionChoosingContact
NewChatActionChoosingContact creates a new ChatActionChoosingContact
func (*ChatActionChoosingContact) GetChatActionEnum ¶
func (chatActionChoosingContact *ChatActionChoosingContact) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionChoosingContact) MessageType ¶
func (chatActionChoosingContact *ChatActionChoosingContact) MessageType() string
MessageType return the string telegram-type of ChatActionChoosingContact
type ChatActionChoosingLocation ¶
type ChatActionChoosingLocation struct {
// contains filtered or unexported fields
}
ChatActionChoosingLocation The user is picking a location or venue to send
func NewChatActionChoosingLocation ¶
func NewChatActionChoosingLocation() *ChatActionChoosingLocation
NewChatActionChoosingLocation creates a new ChatActionChoosingLocation
func (*ChatActionChoosingLocation) GetChatActionEnum ¶
func (chatActionChoosingLocation *ChatActionChoosingLocation) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionChoosingLocation) MessageType ¶
func (chatActionChoosingLocation *ChatActionChoosingLocation) MessageType() string
MessageType return the string telegram-type of ChatActionChoosingLocation
type ChatActionEnum ¶
type ChatActionEnum string
ChatActionEnum Alias for abstract ChatAction 'Sub-Classes', used as constant-enum here
const ( ChatActionTypingType ChatActionEnum = "chatActionTyping" ChatActionRecordingVideoType ChatActionEnum = "chatActionRecordingVideo" ChatActionUploadingVideoType ChatActionEnum = "chatActionUploadingVideo" ChatActionRecordingVoiceNoteType ChatActionEnum = "chatActionRecordingVoiceNote" ChatActionUploadingVoiceNoteType ChatActionEnum = "chatActionUploadingVoiceNote" ChatActionUploadingPhotoType ChatActionEnum = "chatActionUploadingPhoto" ChatActionUploadingDocumentType ChatActionEnum = "chatActionUploadingDocument" ChatActionChoosingLocationType ChatActionEnum = "chatActionChoosingLocation" ChatActionChoosingContactType ChatActionEnum = "chatActionChoosingContact" ChatActionStartPlayingGameType ChatActionEnum = "chatActionStartPlayingGame" ChatActionRecordingVideoNoteType ChatActionEnum = "chatActionRecordingVideoNote" ChatActionUploadingVideoNoteType ChatActionEnum = "chatActionUploadingVideoNote" ChatActionCancelType ChatActionEnum = "chatActionCancel" )
ChatAction enums
type ChatActionRecordingVideo ¶
type ChatActionRecordingVideo struct {
// contains filtered or unexported fields
}
ChatActionRecordingVideo The user is recording a video
func NewChatActionRecordingVideo ¶
func NewChatActionRecordingVideo() *ChatActionRecordingVideo
NewChatActionRecordingVideo creates a new ChatActionRecordingVideo
func (*ChatActionRecordingVideo) GetChatActionEnum ¶
func (chatActionRecordingVideo *ChatActionRecordingVideo) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionRecordingVideo) MessageType ¶
func (chatActionRecordingVideo *ChatActionRecordingVideo) MessageType() string
MessageType return the string telegram-type of ChatActionRecordingVideo
type ChatActionRecordingVideoNote ¶
type ChatActionRecordingVideoNote struct {
// contains filtered or unexported fields
}
ChatActionRecordingVideoNote The user is recording a video note
func NewChatActionRecordingVideoNote ¶
func NewChatActionRecordingVideoNote() *ChatActionRecordingVideoNote
NewChatActionRecordingVideoNote creates a new ChatActionRecordingVideoNote
func (*ChatActionRecordingVideoNote) GetChatActionEnum ¶
func (chatActionRecordingVideoNote *ChatActionRecordingVideoNote) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionRecordingVideoNote) MessageType ¶
func (chatActionRecordingVideoNote *ChatActionRecordingVideoNote) MessageType() string
MessageType return the string telegram-type of ChatActionRecordingVideoNote
type ChatActionRecordingVoiceNote ¶
type ChatActionRecordingVoiceNote struct {
// contains filtered or unexported fields
}
ChatActionRecordingVoiceNote The user is recording a voice note
func NewChatActionRecordingVoiceNote ¶
func NewChatActionRecordingVoiceNote() *ChatActionRecordingVoiceNote
NewChatActionRecordingVoiceNote creates a new ChatActionRecordingVoiceNote
func (*ChatActionRecordingVoiceNote) GetChatActionEnum ¶
func (chatActionRecordingVoiceNote *ChatActionRecordingVoiceNote) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionRecordingVoiceNote) MessageType ¶
func (chatActionRecordingVoiceNote *ChatActionRecordingVoiceNote) MessageType() string
MessageType return the string telegram-type of ChatActionRecordingVoiceNote
type ChatActionStartPlayingGame ¶
type ChatActionStartPlayingGame struct {
// contains filtered or unexported fields
}
ChatActionStartPlayingGame The user has started to play a game
func NewChatActionStartPlayingGame ¶
func NewChatActionStartPlayingGame() *ChatActionStartPlayingGame
NewChatActionStartPlayingGame creates a new ChatActionStartPlayingGame
func (*ChatActionStartPlayingGame) GetChatActionEnum ¶
func (chatActionStartPlayingGame *ChatActionStartPlayingGame) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionStartPlayingGame) MessageType ¶
func (chatActionStartPlayingGame *ChatActionStartPlayingGame) MessageType() string
MessageType return the string telegram-type of ChatActionStartPlayingGame
type ChatActionTyping ¶
type ChatActionTyping struct {
// contains filtered or unexported fields
}
ChatActionTyping The user is typing a message
func NewChatActionTyping ¶
func NewChatActionTyping() *ChatActionTyping
NewChatActionTyping creates a new ChatActionTyping
func (*ChatActionTyping) GetChatActionEnum ¶
func (chatActionTyping *ChatActionTyping) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionTyping) MessageType ¶
func (chatActionTyping *ChatActionTyping) MessageType() string
MessageType return the string telegram-type of ChatActionTyping
type ChatActionUploadingDocument ¶
type ChatActionUploadingDocument struct { Progress int32 `json:"progress"` // Upload progress, as a percentage // contains filtered or unexported fields }
ChatActionUploadingDocument The user is uploading a document
func NewChatActionUploadingDocument ¶
func NewChatActionUploadingDocument(progress int32) *ChatActionUploadingDocument
NewChatActionUploadingDocument creates a new ChatActionUploadingDocument
@param progress Upload progress, as a percentage
func (*ChatActionUploadingDocument) GetChatActionEnum ¶
func (chatActionUploadingDocument *ChatActionUploadingDocument) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionUploadingDocument) MessageType ¶
func (chatActionUploadingDocument *ChatActionUploadingDocument) MessageType() string
MessageType return the string telegram-type of ChatActionUploadingDocument
type ChatActionUploadingPhoto ¶
type ChatActionUploadingPhoto struct { Progress int32 `json:"progress"` // Upload progress, as a percentage // contains filtered or unexported fields }
ChatActionUploadingPhoto The user is uploading a photo
func NewChatActionUploadingPhoto ¶
func NewChatActionUploadingPhoto(progress int32) *ChatActionUploadingPhoto
NewChatActionUploadingPhoto creates a new ChatActionUploadingPhoto
@param progress Upload progress, as a percentage
func (*ChatActionUploadingPhoto) GetChatActionEnum ¶
func (chatActionUploadingPhoto *ChatActionUploadingPhoto) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionUploadingPhoto) MessageType ¶
func (chatActionUploadingPhoto *ChatActionUploadingPhoto) MessageType() string
MessageType return the string telegram-type of ChatActionUploadingPhoto
type ChatActionUploadingVideo ¶
type ChatActionUploadingVideo struct { Progress int32 `json:"progress"` // Upload progress, as a percentage // contains filtered or unexported fields }
ChatActionUploadingVideo The user is uploading a video
func NewChatActionUploadingVideo ¶
func NewChatActionUploadingVideo(progress int32) *ChatActionUploadingVideo
NewChatActionUploadingVideo creates a new ChatActionUploadingVideo
@param progress Upload progress, as a percentage
func (*ChatActionUploadingVideo) GetChatActionEnum ¶
func (chatActionUploadingVideo *ChatActionUploadingVideo) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionUploadingVideo) MessageType ¶
func (chatActionUploadingVideo *ChatActionUploadingVideo) MessageType() string
MessageType return the string telegram-type of ChatActionUploadingVideo
type ChatActionUploadingVideoNote ¶
type ChatActionUploadingVideoNote struct { Progress int32 `json:"progress"` // Upload progress, as a percentage // contains filtered or unexported fields }
ChatActionUploadingVideoNote The user is uploading a video note
func NewChatActionUploadingVideoNote ¶
func NewChatActionUploadingVideoNote(progress int32) *ChatActionUploadingVideoNote
NewChatActionUploadingVideoNote creates a new ChatActionUploadingVideoNote
@param progress Upload progress, as a percentage
func (*ChatActionUploadingVideoNote) GetChatActionEnum ¶
func (chatActionUploadingVideoNote *ChatActionUploadingVideoNote) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionUploadingVideoNote) MessageType ¶
func (chatActionUploadingVideoNote *ChatActionUploadingVideoNote) MessageType() string
MessageType return the string telegram-type of ChatActionUploadingVideoNote
type ChatActionUploadingVoiceNote ¶
type ChatActionUploadingVoiceNote struct { Progress int32 `json:"progress"` // Upload progress, as a percentage // contains filtered or unexported fields }
ChatActionUploadingVoiceNote The user is uploading a voice note
func NewChatActionUploadingVoiceNote ¶
func NewChatActionUploadingVoiceNote(progress int32) *ChatActionUploadingVoiceNote
NewChatActionUploadingVoiceNote creates a new ChatActionUploadingVoiceNote
@param progress Upload progress, as a percentage
func (*ChatActionUploadingVoiceNote) GetChatActionEnum ¶
func (chatActionUploadingVoiceNote *ChatActionUploadingVoiceNote) GetChatActionEnum() ChatActionEnum
GetChatActionEnum return the enum type of this object
func (*ChatActionUploadingVoiceNote) MessageType ¶
func (chatActionUploadingVoiceNote *ChatActionUploadingVoiceNote) MessageType() string
MessageType return the string telegram-type of ChatActionUploadingVoiceNote
type ChatEvent ¶
type ChatEvent struct { ID JSONInt64 `json:"id"` // Chat event identifier Date int32 `json:"date"` // Point in time (Unix timestamp) when the event happened UserID int32 `json:"user_id"` // Identifier of the user who performed the action that triggered the event Action ChatEventAction `json:"action"` // Action performed by the user // contains filtered or unexported fields }
ChatEvent Represents a chat event
func NewChatEvent ¶
func NewChatEvent(iD JSONInt64, date int32, userID int32, action ChatEventAction) *ChatEvent
NewChatEvent creates a new ChatEvent
@param iD Chat event identifier @param date Point in time (Unix timestamp) when the event happened @param userID Identifier of the user who performed the action that triggered the event @param action Action performed by the user
func (*ChatEvent) MessageType ¶
MessageType return the string telegram-type of ChatEvent
func (*ChatEvent) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type ChatEventAction ¶
type ChatEventAction interface {
GetChatEventActionEnum() ChatEventActionEnum
}
ChatEventAction Represents a chat event
type ChatEventActionEnum ¶
type ChatEventActionEnum string
ChatEventActionEnum Alias for abstract ChatEventAction 'Sub-Classes', used as constant-enum here
const ( ChatEventMessageEditedType ChatEventActionEnum = "chatEventMessageEdited" ChatEventMessageDeletedType ChatEventActionEnum = "chatEventMessageDeleted" ChatEventMessagePinnedType ChatEventActionEnum = "chatEventMessagePinned" ChatEventMessageUnpinnedType ChatEventActionEnum = "chatEventMessageUnpinned" ChatEventMemberJoinedType ChatEventActionEnum = "chatEventMemberJoined" ChatEventMemberLeftType ChatEventActionEnum = "chatEventMemberLeft" ChatEventMemberInvitedType ChatEventActionEnum = "chatEventMemberInvited" ChatEventMemberPromotedType ChatEventActionEnum = "chatEventMemberPromoted" ChatEventMemberRestrictedType ChatEventActionEnum = "chatEventMemberRestricted" ChatEventTitleChangedType ChatEventActionEnum = "chatEventTitleChanged" ChatEventDescriptionChangedType ChatEventActionEnum = "chatEventDescriptionChanged" ChatEventUsernameChangedType ChatEventActionEnum = "chatEventUsernameChanged" ChatEventPhotoChangedType ChatEventActionEnum = "chatEventPhotoChanged" ChatEventInvitesToggledType ChatEventActionEnum = "chatEventInvitesToggled" ChatEventSignMessagesToggledType ChatEventActionEnum = "chatEventSignMessagesToggled" ChatEventStickerSetChangedType ChatEventActionEnum = "chatEventStickerSetChanged" ChatEventIsAllHistoryAvailableToggledType ChatEventActionEnum = "chatEventIsAllHistoryAvailableToggled" )
ChatEventAction enums
type ChatEventDescriptionChanged ¶
type ChatEventDescriptionChanged struct { OldDescription string `json:"old_description"` // Previous chat description NewDescription string `json:"new_description"` // New chat description // contains filtered or unexported fields }
ChatEventDescriptionChanged The chat description was changed
func NewChatEventDescriptionChanged ¶
func NewChatEventDescriptionChanged(oldDescription string, newDescription string) *ChatEventDescriptionChanged
NewChatEventDescriptionChanged creates a new ChatEventDescriptionChanged
@param oldDescription Previous chat description @param newDescription New chat description
func (*ChatEventDescriptionChanged) GetChatEventActionEnum ¶
func (chatEventDescriptionChanged *ChatEventDescriptionChanged) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventDescriptionChanged) MessageType ¶
func (chatEventDescriptionChanged *ChatEventDescriptionChanged) MessageType() string
MessageType return the string telegram-type of ChatEventDescriptionChanged
type ChatEventInvitesToggled ¶
type ChatEventInvitesToggled struct { AnyoneCanInvite bool `json:"anyone_can_invite"` // New value of anyone_can_invite // contains filtered or unexported fields }
ChatEventInvitesToggled The anyone_can_invite setting of a supergroup chat was toggled
func NewChatEventInvitesToggled ¶
func NewChatEventInvitesToggled(anyoneCanInvite bool) *ChatEventInvitesToggled
NewChatEventInvitesToggled creates a new ChatEventInvitesToggled
@param anyoneCanInvite New value of anyone_can_invite
func (*ChatEventInvitesToggled) GetChatEventActionEnum ¶
func (chatEventInvitesToggled *ChatEventInvitesToggled) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventInvitesToggled) MessageType ¶
func (chatEventInvitesToggled *ChatEventInvitesToggled) MessageType() string
MessageType return the string telegram-type of ChatEventInvitesToggled
type ChatEventIsAllHistoryAvailableToggled ¶
type ChatEventIsAllHistoryAvailableToggled struct { IsAllHistoryAvailable bool `json:"is_all_history_available"` // New value of is_all_history_available // contains filtered or unexported fields }
ChatEventIsAllHistoryAvailableToggled The is_all_history_available setting of a supergroup was toggled
func NewChatEventIsAllHistoryAvailableToggled ¶
func NewChatEventIsAllHistoryAvailableToggled(isAllHistoryAvailable bool) *ChatEventIsAllHistoryAvailableToggled
NewChatEventIsAllHistoryAvailableToggled creates a new ChatEventIsAllHistoryAvailableToggled
@param isAllHistoryAvailable New value of is_all_history_available
func (*ChatEventIsAllHistoryAvailableToggled) GetChatEventActionEnum ¶
func (chatEventIsAllHistoryAvailableToggled *ChatEventIsAllHistoryAvailableToggled) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventIsAllHistoryAvailableToggled) MessageType ¶
func (chatEventIsAllHistoryAvailableToggled *ChatEventIsAllHistoryAvailableToggled) MessageType() string
MessageType return the string telegram-type of ChatEventIsAllHistoryAvailableToggled
type ChatEventLogFilters ¶
type ChatEventLogFilters struct { MessageEdits bool `json:"message_edits"` // True, if message edits should be returned MessageDeletions bool `json:"message_deletions"` // True, if message deletions should be returned MessagePins bool `json:"message_pins"` // True, if pin/unpin events should be returned MemberJoins bool `json:"member_joins"` // True, if members joining events should be returned MemberLeaves bool `json:"member_leaves"` // True, if members leaving events should be returned MemberInvites bool `json:"member_invites"` // True, if invited member events should be returned MemberPromotions bool `json:"member_promotions"` // True, if member promotion/demotion events should be returned MemberRestrictions bool `json:"member_restrictions"` // True, if member restricted/unrestricted/banned/unbanned events should be returned InfoChanges bool `json:"info_changes"` // True, if changes in chat information should be returned SettingChanges bool `json:"setting_changes"` // True, if changes in chat settings should be returned // contains filtered or unexported fields }
ChatEventLogFilters Represents a set of filters used to obtain a chat event log
func NewChatEventLogFilters ¶
func NewChatEventLogFilters(messageEdits bool, messageDeletions bool, messagePins bool, memberJoins bool, memberLeaves bool, memberInvites bool, memberPromotions bool, memberRestrictions bool, infoChanges bool, settingChanges bool) *ChatEventLogFilters
NewChatEventLogFilters creates a new ChatEventLogFilters
@param messageEdits True, if message edits should be returned @param messageDeletions True, if message deletions should be returned @param messagePins True, if pin/unpin events should be returned @param memberJoins True, if members joining events should be returned @param memberLeaves True, if members leaving events should be returned @param memberInvites True, if invited member events should be returned @param memberPromotions True, if member promotion/demotion events should be returned @param memberRestrictions True, if member restricted/unrestricted/banned/unbanned events should be returned @param infoChanges True, if changes in chat information should be returned @param settingChanges True, if changes in chat settings should be returned
func (*ChatEventLogFilters) MessageType ¶
func (chatEventLogFilters *ChatEventLogFilters) MessageType() string
MessageType return the string telegram-type of ChatEventLogFilters
type ChatEventMemberInvited ¶
type ChatEventMemberInvited struct { UserID int32 `json:"user_id"` // New member user identifier Status ChatMemberStatus `json:"status"` // New member status // contains filtered or unexported fields }
ChatEventMemberInvited A new chat member was invited
func NewChatEventMemberInvited ¶
func NewChatEventMemberInvited(userID int32, status ChatMemberStatus) *ChatEventMemberInvited
NewChatEventMemberInvited creates a new ChatEventMemberInvited
@param userID New member user identifier @param status New member status
func (*ChatEventMemberInvited) GetChatEventActionEnum ¶
func (chatEventMemberInvited *ChatEventMemberInvited) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMemberInvited) MessageType ¶
func (chatEventMemberInvited *ChatEventMemberInvited) MessageType() string
MessageType return the string telegram-type of ChatEventMemberInvited
func (*ChatEventMemberInvited) UnmarshalJSON ¶
func (chatEventMemberInvited *ChatEventMemberInvited) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type ChatEventMemberJoined ¶
type ChatEventMemberJoined struct {
// contains filtered or unexported fields
}
ChatEventMemberJoined A new member joined the chat
func NewChatEventMemberJoined ¶
func NewChatEventMemberJoined() *ChatEventMemberJoined
NewChatEventMemberJoined creates a new ChatEventMemberJoined
func (*ChatEventMemberJoined) GetChatEventActionEnum ¶
func (chatEventMemberJoined *ChatEventMemberJoined) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMemberJoined) MessageType ¶
func (chatEventMemberJoined *ChatEventMemberJoined) MessageType() string
MessageType return the string telegram-type of ChatEventMemberJoined
type ChatEventMemberLeft ¶
type ChatEventMemberLeft struct {
// contains filtered or unexported fields
}
ChatEventMemberLeft A member left the chat
func NewChatEventMemberLeft ¶
func NewChatEventMemberLeft() *ChatEventMemberLeft
NewChatEventMemberLeft creates a new ChatEventMemberLeft
func (*ChatEventMemberLeft) GetChatEventActionEnum ¶
func (chatEventMemberLeft *ChatEventMemberLeft) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMemberLeft) MessageType ¶
func (chatEventMemberLeft *ChatEventMemberLeft) MessageType() string
MessageType return the string telegram-type of ChatEventMemberLeft
type ChatEventMemberPromoted ¶
type ChatEventMemberPromoted struct { UserID int32 `json:"user_id"` // Chat member user identifier OldStatus ChatMemberStatus `json:"old_status"` // Previous status of the chat member NewStatus ChatMemberStatus `json:"new_status"` // New status of the chat member // contains filtered or unexported fields }
ChatEventMemberPromoted A chat member has gained/lost administrator status, or the list of their administrator privileges has changed
func NewChatEventMemberPromoted ¶
func NewChatEventMemberPromoted(userID int32, oldStatus ChatMemberStatus, newStatus ChatMemberStatus) *ChatEventMemberPromoted
NewChatEventMemberPromoted creates a new ChatEventMemberPromoted
@param userID Chat member user identifier @param oldStatus Previous status of the chat member @param newStatus New status of the chat member
func (*ChatEventMemberPromoted) GetChatEventActionEnum ¶
func (chatEventMemberPromoted *ChatEventMemberPromoted) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMemberPromoted) MessageType ¶
func (chatEventMemberPromoted *ChatEventMemberPromoted) MessageType() string
MessageType return the string telegram-type of ChatEventMemberPromoted
func (*ChatEventMemberPromoted) UnmarshalJSON ¶
func (chatEventMemberPromoted *ChatEventMemberPromoted) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type ChatEventMemberRestricted ¶
type ChatEventMemberRestricted struct { UserID int32 `json:"user_id"` // Chat member user identifier OldStatus ChatMemberStatus `json:"old_status"` // Previous status of the chat member NewStatus ChatMemberStatus `json:"new_status"` // New status of the chat member // contains filtered or unexported fields }
ChatEventMemberRestricted A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed
func NewChatEventMemberRestricted ¶
func NewChatEventMemberRestricted(userID int32, oldStatus ChatMemberStatus, newStatus ChatMemberStatus) *ChatEventMemberRestricted
NewChatEventMemberRestricted creates a new ChatEventMemberRestricted
@param userID Chat member user identifier @param oldStatus Previous status of the chat member @param newStatus New status of the chat member
func (*ChatEventMemberRestricted) GetChatEventActionEnum ¶
func (chatEventMemberRestricted *ChatEventMemberRestricted) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMemberRestricted) MessageType ¶
func (chatEventMemberRestricted *ChatEventMemberRestricted) MessageType() string
MessageType return the string telegram-type of ChatEventMemberRestricted
func (*ChatEventMemberRestricted) UnmarshalJSON ¶
func (chatEventMemberRestricted *ChatEventMemberRestricted) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type ChatEventMessageDeleted ¶
type ChatEventMessageDeleted struct { Message *Message `json:"message"` // Deleted message // contains filtered or unexported fields }
ChatEventMessageDeleted A message was deleted
func NewChatEventMessageDeleted ¶
func NewChatEventMessageDeleted(message *Message) *ChatEventMessageDeleted
NewChatEventMessageDeleted creates a new ChatEventMessageDeleted
@param message Deleted message
func (*ChatEventMessageDeleted) GetChatEventActionEnum ¶
func (chatEventMessageDeleted *ChatEventMessageDeleted) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMessageDeleted) MessageType ¶
func (chatEventMessageDeleted *ChatEventMessageDeleted) MessageType() string
MessageType return the string telegram-type of ChatEventMessageDeleted
type ChatEventMessageEdited ¶
type ChatEventMessageEdited struct { OldMessage *Message `json:"old_message"` // The original message before the edit NewMessage *Message `json:"new_message"` // The message after it was edited // contains filtered or unexported fields }
ChatEventMessageEdited A message was edited
func NewChatEventMessageEdited ¶
func NewChatEventMessageEdited(oldMessage *Message, newMessage *Message) *ChatEventMessageEdited
NewChatEventMessageEdited creates a new ChatEventMessageEdited
@param oldMessage The original message before the edit @param newMessage The message after it was edited
func (*ChatEventMessageEdited) GetChatEventActionEnum ¶
func (chatEventMessageEdited *ChatEventMessageEdited) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMessageEdited) MessageType ¶
func (chatEventMessageEdited *ChatEventMessageEdited) MessageType() string
MessageType return the string telegram-type of ChatEventMessageEdited
type ChatEventMessagePinned ¶
type ChatEventMessagePinned struct { Message *Message `json:"message"` // Pinned message // contains filtered or unexported fields }
ChatEventMessagePinned A message was pinned
func NewChatEventMessagePinned ¶
func NewChatEventMessagePinned(message *Message) *ChatEventMessagePinned
NewChatEventMessagePinned creates a new ChatEventMessagePinned
@param message Pinned message
func (*ChatEventMessagePinned) GetChatEventActionEnum ¶
func (chatEventMessagePinned *ChatEventMessagePinned) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMessagePinned) MessageType ¶
func (chatEventMessagePinned *ChatEventMessagePinned) MessageType() string
MessageType return the string telegram-type of ChatEventMessagePinned
type ChatEventMessageUnpinned ¶
type ChatEventMessageUnpinned struct {
// contains filtered or unexported fields
}
ChatEventMessageUnpinned A message was unpinned
func NewChatEventMessageUnpinned ¶
func NewChatEventMessageUnpinned() *ChatEventMessageUnpinned
NewChatEventMessageUnpinned creates a new ChatEventMessageUnpinned
func (*ChatEventMessageUnpinned) GetChatEventActionEnum ¶
func (chatEventMessageUnpinned *ChatEventMessageUnpinned) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventMessageUnpinned) MessageType ¶
func (chatEventMessageUnpinned *ChatEventMessageUnpinned) MessageType() string
MessageType return the string telegram-type of ChatEventMessageUnpinned
type ChatEventPhotoChanged ¶
type ChatEventPhotoChanged struct { OldPhoto *ChatPhoto `json:"old_photo"` // Previous chat photo value; may be null NewPhoto *ChatPhoto `json:"new_photo"` // New chat photo value; may be null // contains filtered or unexported fields }
ChatEventPhotoChanged The chat photo was changed
func NewChatEventPhotoChanged ¶
func NewChatEventPhotoChanged(oldPhoto *ChatPhoto, newPhoto *ChatPhoto) *ChatEventPhotoChanged
NewChatEventPhotoChanged creates a new ChatEventPhotoChanged
@param oldPhoto Previous chat photo value; may be null @param newPhoto New chat photo value; may be null
func (*ChatEventPhotoChanged) GetChatEventActionEnum ¶
func (chatEventPhotoChanged *ChatEventPhotoChanged) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventPhotoChanged) MessageType ¶
func (chatEventPhotoChanged *ChatEventPhotoChanged) MessageType() string
MessageType return the string telegram-type of ChatEventPhotoChanged
type ChatEventSignMessagesToggled ¶
type ChatEventSignMessagesToggled struct { SignMessages bool `json:"sign_messages"` // New value of sign_messages // contains filtered or unexported fields }
ChatEventSignMessagesToggled The sign_messages setting of a channel was toggled
func NewChatEventSignMessagesToggled ¶
func NewChatEventSignMessagesToggled(signMessages bool) *ChatEventSignMessagesToggled
NewChatEventSignMessagesToggled creates a new ChatEventSignMessagesToggled
@param signMessages New value of sign_messages
func (*ChatEventSignMessagesToggled) GetChatEventActionEnum ¶
func (chatEventSignMessagesToggled *ChatEventSignMessagesToggled) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventSignMessagesToggled) MessageType ¶
func (chatEventSignMessagesToggled *ChatEventSignMessagesToggled) MessageType() string
MessageType return the string telegram-type of ChatEventSignMessagesToggled
type ChatEventStickerSetChanged ¶
type ChatEventStickerSetChanged struct { OldStickerSetID JSONInt64 `json:"old_sticker_set_id"` // Previous identifier of the chat sticker set; 0 if none NewStickerSetID JSONInt64 `json:"new_sticker_set_id"` // New identifier of the chat sticker set; 0 if none // contains filtered or unexported fields }
ChatEventStickerSetChanged The supergroup sticker set was changed
func NewChatEventStickerSetChanged ¶
func NewChatEventStickerSetChanged(oldStickerSetID JSONInt64, newStickerSetID JSONInt64) *ChatEventStickerSetChanged
NewChatEventStickerSetChanged creates a new ChatEventStickerSetChanged
@param oldStickerSetID Previous identifier of the chat sticker set; 0 if none @param newStickerSetID New identifier of the chat sticker set; 0 if none
func (*ChatEventStickerSetChanged) GetChatEventActionEnum ¶
func (chatEventStickerSetChanged *ChatEventStickerSetChanged) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventStickerSetChanged) MessageType ¶
func (chatEventStickerSetChanged *ChatEventStickerSetChanged) MessageType() string
MessageType return the string telegram-type of ChatEventStickerSetChanged
type ChatEventTitleChanged ¶
type ChatEventTitleChanged struct { OldTitle string `json:"old_title"` // Previous chat title NewTitle string `json:"new_title"` // New chat title // contains filtered or unexported fields }
ChatEventTitleChanged The chat title was changed
func NewChatEventTitleChanged ¶
func NewChatEventTitleChanged(oldTitle string, newTitle string) *ChatEventTitleChanged
NewChatEventTitleChanged creates a new ChatEventTitleChanged
@param oldTitle Previous chat title @param newTitle New chat title
func (*ChatEventTitleChanged) GetChatEventActionEnum ¶
func (chatEventTitleChanged *ChatEventTitleChanged) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventTitleChanged) MessageType ¶
func (chatEventTitleChanged *ChatEventTitleChanged) MessageType() string
MessageType return the string telegram-type of ChatEventTitleChanged
type ChatEventUsernameChanged ¶
type ChatEventUsernameChanged struct { OldUsername string `json:"old_username"` // Previous chat username NewUsername string `json:"new_username"` // New chat username // contains filtered or unexported fields }
ChatEventUsernameChanged The chat username was changed
func NewChatEventUsernameChanged ¶
func NewChatEventUsernameChanged(oldUsername string, newUsername string) *ChatEventUsernameChanged
NewChatEventUsernameChanged creates a new ChatEventUsernameChanged
@param oldUsername Previous chat username @param newUsername New chat username
func (*ChatEventUsernameChanged) GetChatEventActionEnum ¶
func (chatEventUsernameChanged *ChatEventUsernameChanged) GetChatEventActionEnum() ChatEventActionEnum
GetChatEventActionEnum return the enum type of this object
func (*ChatEventUsernameChanged) MessageType ¶
func (chatEventUsernameChanged *ChatEventUsernameChanged) MessageType() string
MessageType return the string telegram-type of ChatEventUsernameChanged
type ChatEvents ¶
type ChatEvents struct { Events []ChatEvent `json:"events"` // List of events // contains filtered or unexported fields }
ChatEvents Contains a list of chat events
func NewChatEvents ¶
func NewChatEvents(events []ChatEvent) *ChatEvents
NewChatEvents creates a new ChatEvents
@param events List of events
func (*ChatEvents) MessageType ¶
func (chatEvents *ChatEvents) MessageType() string
MessageType return the string telegram-type of ChatEvents
type ChatInviteLink ¶
type ChatInviteLink struct { InviteLink string `json:"invite_link"` // Chat invite link // contains filtered or unexported fields }
ChatInviteLink Contains a chat invite link
func NewChatInviteLink ¶
func NewChatInviteLink(inviteLink string) *ChatInviteLink
NewChatInviteLink creates a new ChatInviteLink
@param inviteLink Chat invite link
func (*ChatInviteLink) MessageType ¶
func (chatInviteLink *ChatInviteLink) MessageType() string
MessageType return the string telegram-type of ChatInviteLink
type ChatInviteLinkInfo ¶
type ChatInviteLinkInfo struct { ChatID int64 `json:"chat_id"` // Chat identifier of the invite link; 0 if the user is not a member of this chat Type ChatType `json:"type"` // Contains information about the type of the chat Title string `json:"title"` // Title of the chat Photo *ChatPhoto `json:"photo"` // Chat photo; may be null MemberCount int32 `json:"member_count"` // Number of members MemberUserIDs []int32 `json:"member_user_ids"` // User identifiers of some chat members that may be known to the current user IsPublic bool `json:"is_public"` // True, if the chat is a public supergroup or channel with a username // contains filtered or unexported fields }
ChatInviteLinkInfo Contains information about a chat invite link
func NewChatInviteLinkInfo ¶
func NewChatInviteLinkInfo(chatID int64, typeParam ChatType, title string, photo *ChatPhoto, memberCount int32, memberUserIDs []int32, isPublic bool) *ChatInviteLinkInfo
NewChatInviteLinkInfo creates a new ChatInviteLinkInfo
@param chatID Chat identifier of the invite link; 0 if the user is not a member of this chat @param typeParam Contains information about the type of the chat @param title Title of the chat @param photo Chat photo; may be null @param memberCount Number of members @param memberUserIDs User identifiers of some chat members that may be known to the current user @param isPublic True, if the chat is a public supergroup or channel with a username
func (*ChatInviteLinkInfo) MessageType ¶
func (chatInviteLinkInfo *ChatInviteLinkInfo) MessageType() string
MessageType return the string telegram-type of ChatInviteLinkInfo
func (*ChatInviteLinkInfo) UnmarshalJSON ¶
func (chatInviteLinkInfo *ChatInviteLinkInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type ChatMember ¶
type ChatMember struct { UserID int32 `json:"user_id"` // User identifier of the chat member InviterUserID int32 `json:"inviter_user_id"` // Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown JoinedChatDate int32 `json:"joined_chat_date"` // Point in time (Unix timestamp) when the user joined a chat Status ChatMemberStatus `json:"status"` // Status of the member in the chat BotInfo *BotInfo `json:"bot_info"` // If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not a chat member // contains filtered or unexported fields }
ChatMember A user with information about joining/leaving a chat
func NewChatMember ¶
func NewChatMember(userID int32, inviterUserID int32, joinedChatDate int32, status ChatMemberStatus, botInfo *BotInfo) *ChatMember
NewChatMember creates a new ChatMember
@param userID User identifier of the chat member @param inviterUserID Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown @param joinedChatDate Point in time (Unix timestamp) when the user joined a chat @param status Status of the member in the chat @param botInfo If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not a chat member
func (*ChatMember) MessageType ¶
func (chatMember *ChatMember) MessageType() string
MessageType return the string telegram-type of ChatMember
func (*ChatMember) UnmarshalJSON ¶
func (chatMember *ChatMember) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type ChatMemberStatus ¶
type ChatMemberStatus interface {
GetChatMemberStatusEnum() ChatMemberStatusEnum
}
ChatMemberStatus Provides information about the status of a member in a chat
type ChatMemberStatusAdministrator ¶
type ChatMemberStatusAdministrator struct { CanBeEdited bool `json:"can_be_edited"` // True, if the current user can edit the administrator privileges for the called user CanChangeInfo bool `json:"can_change_info"` // True, if the administrator can change the chat title, photo, and other settings CanPostMessages bool `json:"can_post_messages"` // True, if the administrator can create channel posts; applicable to channels only CanEditMessages bool `json:"can_edit_messages"` // True, if the administrator can edit messages of other users and pin messages; applicable to channels only CanDeleteMessages bool `json:"can_delete_messages"` // True, if the administrator can delete messages of other users CanInviteUsers bool `json:"can_invite_users"` // True, if the administrator can invite new users to the chat CanRestrictMembers bool `json:"can_restrict_members"` // True, if the administrator can restrict, ban, or unban chat members CanPinMessages bool `json:"can_pin_messages"` // True, if the administrator can pin messages; applicable to supergroups only CanPromoteMembers bool `json:"can_promote_members"` // True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that were directly or indirectly promoted by him // contains filtered or unexported fields }
ChatMemberStatusAdministrator The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges
func NewChatMemberStatusAdministrator ¶
func NewChatMemberStatusAdministrator(canBeEdited bool, canChangeInfo bool, canPostMessages bool, canEditMessages bool, canDeleteMessages bool, canInviteUsers bool, canRestrictMembers bool, canPinMessages bool, canPromoteMembers bool) *ChatMemberStatusAdministrator
NewChatMemberStatusAdministrator creates a new ChatMemberStatusAdministrator
@param canBeEdited True, if the current user can edit the administrator privileges for the called user @param canChangeInfo True, if the administrator can change the chat title, photo, and other settings @param canPostMessages True, if the administrator can create channel posts; applicable to channels only @param canEditMessages True, if the administrator can edit messages of other users and pin messages; applicable to channels only @param canDeleteMessages True, if the administrator can delete messages of other users @param canInviteUsers True, if the administrator can invite new users to the chat @param canRestrictMembers True, if the administrator can restrict, ban, or unban chat members @param canPinMessages True, if the administrator can pin messages; applicable to supergroups only @param canPromoteMembers True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that were directly or indirectly promoted by him
func (*ChatMemberStatusAdministrator) GetChatMemberStatusEnum ¶
func (chatMemberStatusAdministrator *ChatMemberStatusAdministrator) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusAdministrator) MessageType ¶
func (chatMemberStatusAdministrator *ChatMemberStatusAdministrator) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusAdministrator
type ChatMemberStatusBanned ¶
type ChatMemberStatusBanned struct { BannedUntilDate int32 `json:"banned_until_date"` // Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever // contains filtered or unexported fields }
ChatMemberStatusBanned The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages
func NewChatMemberStatusBanned ¶
func NewChatMemberStatusBanned(bannedUntilDate int32) *ChatMemberStatusBanned
NewChatMemberStatusBanned creates a new ChatMemberStatusBanned
@param bannedUntilDate Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever
func (*ChatMemberStatusBanned) GetChatMemberStatusEnum ¶
func (chatMemberStatusBanned *ChatMemberStatusBanned) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusBanned) MessageType ¶
func (chatMemberStatusBanned *ChatMemberStatusBanned) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusBanned
type ChatMemberStatusCreator ¶
type ChatMemberStatusCreator struct { IsMember bool `json:"is_member"` // True, if the user is a member of the chat // contains filtered or unexported fields }
ChatMemberStatusCreator The user is the creator of a chat and has all the administrator privileges
func NewChatMemberStatusCreator ¶
func NewChatMemberStatusCreator(isMember bool) *ChatMemberStatusCreator
NewChatMemberStatusCreator creates a new ChatMemberStatusCreator
@param isMember True, if the user is a member of the chat
func (*ChatMemberStatusCreator) GetChatMemberStatusEnum ¶
func (chatMemberStatusCreator *ChatMemberStatusCreator) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusCreator) MessageType ¶
func (chatMemberStatusCreator *ChatMemberStatusCreator) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusCreator
type ChatMemberStatusEnum ¶
type ChatMemberStatusEnum string
ChatMemberStatusEnum Alias for abstract ChatMemberStatus 'Sub-Classes', used as constant-enum here
const ( ChatMemberStatusCreatorType ChatMemberStatusEnum = "chatMemberStatusCreator" ChatMemberStatusAdministratorType ChatMemberStatusEnum = "chatMemberStatusAdministrator" ChatMemberStatusMemberType ChatMemberStatusEnum = "chatMemberStatusMember" ChatMemberStatusRestrictedType ChatMemberStatusEnum = "chatMemberStatusRestricted" ChatMemberStatusLeftType ChatMemberStatusEnum = "chatMemberStatusLeft" ChatMemberStatusBannedType ChatMemberStatusEnum = "chatMemberStatusBanned" )
ChatMemberStatus enums
type ChatMemberStatusLeft ¶
type ChatMemberStatusLeft struct {
// contains filtered or unexported fields
}
ChatMemberStatusLeft The user is not a chat member
func NewChatMemberStatusLeft ¶
func NewChatMemberStatusLeft() *ChatMemberStatusLeft
NewChatMemberStatusLeft creates a new ChatMemberStatusLeft
func (*ChatMemberStatusLeft) GetChatMemberStatusEnum ¶
func (chatMemberStatusLeft *ChatMemberStatusLeft) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusLeft) MessageType ¶
func (chatMemberStatusLeft *ChatMemberStatusLeft) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusLeft
type ChatMemberStatusMember ¶
type ChatMemberStatusMember struct {
// contains filtered or unexported fields
}
ChatMemberStatusMember The user is a member of a chat, without any additional privileges or restrictions
func NewChatMemberStatusMember ¶
func NewChatMemberStatusMember() *ChatMemberStatusMember
NewChatMemberStatusMember creates a new ChatMemberStatusMember
func (*ChatMemberStatusMember) GetChatMemberStatusEnum ¶
func (chatMemberStatusMember *ChatMemberStatusMember) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusMember) MessageType ¶
func (chatMemberStatusMember *ChatMemberStatusMember) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusMember
type ChatMemberStatusRestricted ¶
type ChatMemberStatusRestricted struct { IsMember bool `json:"is_member"` // True, if the user is a member of the chat RestrictedUntilDate int32 `json:"restricted_until_date"` // Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever CanSendMessages bool `json:"can_send_messages"` // True, if the user can send text messages, contacts, locations, and venues CanSendMediaMessages bool `json:"can_send_media_messages"` // True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions CanSendOtherMessages bool `json:"can_send_other_messages"` // True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_media_messages permissions CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` // True, if the user may add a web page preview to his messages. Implies can_send_messages permissions // contains filtered or unexported fields }
ChatMemberStatusRestricted The user is under certain restrictions in the chat. Not supported in basic groups and channels
func NewChatMemberStatusRestricted ¶
func NewChatMemberStatusRestricted(isMember bool, restrictedUntilDate int32, canSendMessages bool, canSendMediaMessages bool, canSendOtherMessages bool, canAddWebPagePreviews bool) *ChatMemberStatusRestricted
NewChatMemberStatusRestricted creates a new ChatMemberStatusRestricted
@param isMember True, if the user is a member of the chat @param restrictedUntilDate Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever @param canSendMessages True, if the user can send text messages, contacts, locations, and venues @param canSendMediaMessages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions @param canSendOtherMessages True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_media_messages permissions @param canAddWebPagePreviews True, if the user may add a web page preview to his messages. Implies can_send_messages permissions
func (*ChatMemberStatusRestricted) GetChatMemberStatusEnum ¶
func (chatMemberStatusRestricted *ChatMemberStatusRestricted) GetChatMemberStatusEnum() ChatMemberStatusEnum
GetChatMemberStatusEnum return the enum type of this object
func (*ChatMemberStatusRestricted) MessageType ¶
func (chatMemberStatusRestricted *ChatMemberStatusRestricted) MessageType() string
MessageType return the string telegram-type of ChatMemberStatusRestricted
type ChatMembers ¶
type ChatMembers struct { TotalCount int32 `json:"total_count"` // Approximate total count of chat members found Members []ChatMember `json:"members"` // A list of chat members // contains filtered or unexported fields }
ChatMembers Contains a list of chat members
func NewChatMembers ¶
func NewChatMembers(totalCount int32, members []ChatMember) *ChatMembers
NewChatMembers creates a new ChatMembers
@param totalCount Approximate total count of chat members found @param members A list of chat members
func (*ChatMembers) MessageType ¶
func (chatMembers *ChatMembers) MessageType() string
MessageType return the string telegram-type of ChatMembers
type ChatPhoto ¶
type ChatPhoto struct { Small *File `json:"small"` // A small (160x160) chat photo Big *File `json:"big"` // A big (640x640) chat photo // contains filtered or unexported fields }
ChatPhoto Describes the photo of a chat
func NewChatPhoto ¶
NewChatPhoto creates a new ChatPhoto
@param small A small (160x160) chat photo @param big A big (640x640) chat photo
func (*ChatPhoto) MessageType ¶
MessageType return the string telegram-type of ChatPhoto
type ChatReportReason ¶
type ChatReportReason interface {
GetChatReportReasonEnum() ChatReportReasonEnum
}
ChatReportReason Describes the reason why a chat is reported
type ChatReportReasonCustom ¶
type ChatReportReasonCustom struct { Text string `json:"text"` // Report text // contains filtered or unexported fields }
ChatReportReasonCustom A custom reason provided by the user
func NewChatReportReasonCustom ¶
func NewChatReportReasonCustom(text string) *ChatReportReasonCustom
NewChatReportReasonCustom creates a new ChatReportReasonCustom
@param text Report text
func (*ChatReportReasonCustom) GetChatReportReasonEnum ¶
func (chatReportReasonCustom *ChatReportReasonCustom) GetChatReportReasonEnum() ChatReportReasonEnum
GetChatReportReasonEnum return the enum type of this object
func (*ChatReportReasonCustom) MessageType ¶
func (chatReportReasonCustom *ChatReportReasonCustom) MessageType() string
MessageType return the string telegram-type of ChatReportReasonCustom
type ChatReportReasonEnum ¶
type ChatReportReasonEnum string
ChatReportReasonEnum Alias for abstract ChatReportReason 'Sub-Classes', used as constant-enum here
const ( ChatReportReasonSpamType ChatReportReasonEnum = "chatReportReasonSpam" ChatReportReasonViolenceType ChatReportReasonEnum = "chatReportReasonViolence" ChatReportReasonPornographyType ChatReportReasonEnum = "chatReportReasonPornography" ChatReportReasonCustomType ChatReportReasonEnum = "chatReportReasonCustom" )
ChatReportReason enums
type ChatReportReasonPornography ¶
type ChatReportReasonPornography struct {
// contains filtered or unexported fields
}
ChatReportReasonPornography The chat contains pornographic messages
func NewChatReportReasonPornography ¶
func NewChatReportReasonPornography() *ChatReportReasonPornography
NewChatReportReasonPornography creates a new ChatReportReasonPornography
func (*ChatReportReasonPornography) GetChatReportReasonEnum ¶
func (chatReportReasonPornography *ChatReportReasonPornography) GetChatReportReasonEnum() ChatReportReasonEnum
GetChatReportReasonEnum return the enum type of this object
func (*ChatReportReasonPornography) MessageType ¶
func (chatReportReasonPornography *ChatReportReasonPornography) MessageType() string
MessageType return the string telegram-type of ChatReportReasonPornography
type ChatReportReasonSpam ¶
type ChatReportReasonSpam struct {
// contains filtered or unexported fields
}
ChatReportReasonSpam The chat contains spam messages
func NewChatReportReasonSpam ¶
func NewChatReportReasonSpam() *ChatReportReasonSpam
NewChatReportReasonSpam creates a new ChatReportReasonSpam
func (*ChatReportReasonSpam) GetChatReportReasonEnum ¶
func (chatReportReasonSpam *ChatReportReasonSpam) GetChatReportReasonEnum() ChatReportReasonEnum
GetChatReportReasonEnum return the enum type of this object
func (*ChatReportReasonSpam) MessageType ¶
func (chatReportReasonSpam *ChatReportReasonSpam) MessageType() string
MessageType return the string telegram-type of ChatReportReasonSpam
type ChatReportReasonViolence ¶
type ChatReportReasonViolence struct {
// contains filtered or unexported fields
}
ChatReportReasonViolence The chat promotes violence
func NewChatReportReasonViolence ¶
func NewChatReportReasonViolence() *ChatReportReasonViolence
NewChatReportReasonViolence creates a new ChatReportReasonViolence
func (*ChatReportReasonViolence) GetChatReportReasonEnum ¶
func (chatReportReasonViolence *ChatReportReasonViolence) GetChatReportReasonEnum() ChatReportReasonEnum
GetChatReportReasonEnum return the enum type of this object
func (*ChatReportReasonViolence) MessageType ¶
func (chatReportReasonViolence *ChatReportReasonViolence) MessageType() string
MessageType return the string telegram-type of ChatReportReasonViolence
type ChatReportSpamState ¶
type ChatReportSpamState struct { CanReportSpam bool `json:"can_report_spam"` // True, if a prompt with the "Report spam" action should be shown to the user // contains filtered or unexported fields }
ChatReportSpamState Contains information about the availability of the "Report spam" action for a chat
func NewChatReportSpamState ¶
func NewChatReportSpamState(canReportSpam bool) *ChatReportSpamState
NewChatReportSpamState creates a new ChatReportSpamState
@param canReportSpam True, if a prompt with the "Report spam" action should be shown to the user
func (*ChatReportSpamState) MessageType ¶
func (chatReportSpamState *ChatReportSpamState) MessageType() string
MessageType return the string telegram-type of ChatReportSpamState
type ChatType ¶
type ChatType interface {
GetChatTypeEnum() ChatTypeEnum
}
ChatType Describes the type of a chat
type ChatTypeBasicGroup ¶
type ChatTypeBasicGroup struct { BasicGroupID int32 `json:"basic_group_id"` // Basic group identifier // contains filtered or unexported fields }
ChatTypeBasicGroup A basic group (i.e., a chat with 0-200 other users)
func NewChatTypeBasicGroup ¶
func NewChatTypeBasicGroup(basicGroupID int32) *ChatTypeBasicGroup
NewChatTypeBasicGroup creates a new ChatTypeBasicGroup
@param basicGroupID Basic group identifier
func (*ChatTypeBasicGroup) GetChatTypeEnum ¶
func (chatTypeBasicGroup *ChatTypeBasicGroup) GetChatTypeEnum() ChatTypeEnum
GetChatTypeEnum return the enum type of this object
func (*ChatTypeBasicGroup) MessageType ¶
func (chatTypeBasicGroup *ChatTypeBasicGroup) MessageType() string
MessageType return the string telegram-type of ChatTypeBasicGroup
type ChatTypeEnum ¶
type ChatTypeEnum string
ChatTypeEnum Alias for abstract ChatType 'Sub-Classes', used as constant-enum here
const ( ChatTypePrivateType ChatTypeEnum = "chatTypePrivate" ChatTypeBasicGroupType ChatTypeEnum = "chatTypeBasicGroup" ChatTypeSupergroupType ChatTypeEnum = "chatTypeSupergroup" ChatTypeSecretType ChatTypeEnum = "chatTypeSecret" )
ChatType enums
type ChatTypePrivate ¶
type ChatTypePrivate struct { UserID int32 `json:"user_id"` // User identifier // contains filtered or unexported fields }
ChatTypePrivate An ordinary chat with a user
func NewChatTypePrivate ¶
func NewChatTypePrivate(userID int32) *ChatTypePrivate
NewChatTypePrivate creates a new ChatTypePrivate
@param userID User identifier
func (*ChatTypePrivate) GetChatTypeEnum ¶
func (chatTypePrivate *ChatTypePrivate) GetChatTypeEnum() ChatTypeEnum
GetChatTypeEnum return the enum type of this object
func (*ChatTypePrivate) MessageType ¶
func (chatTypePrivate *ChatTypePrivate) MessageType() string
MessageType return the string telegram-type of ChatTypePrivate
type ChatTypeSecret ¶
type ChatTypeSecret struct { SecretChatID int32 `json:"secret_chat_id"` // Secret chat identifier UserID int32 `json:"user_id"` // User identifier of the secret chat peer // contains filtered or unexported fields }
ChatTypeSecret A secret chat with a user
func NewChatTypeSecret ¶
func NewChatTypeSecret(secretChatID int32, userID int32) *ChatTypeSecret
NewChatTypeSecret creates a new ChatTypeSecret
@param secretChatID Secret chat identifier @param userID User identifier of the secret chat peer
func (*ChatTypeSecret) GetChatTypeEnum ¶
func (chatTypeSecret *ChatTypeSecret) GetChatTypeEnum() ChatTypeEnum
GetChatTypeEnum return the enum type of this object
func (*ChatTypeSecret) MessageType ¶
func (chatTypeSecret *ChatTypeSecret) MessageType() string
MessageType return the string telegram-type of ChatTypeSecret
type ChatTypeSupergroup ¶
type ChatTypeSupergroup struct { SupergroupID int32 `json:"supergroup_id"` // Supergroup or channel identifier IsChannel bool `json:"is_channel"` // True, if the supergroup is a channel // contains filtered or unexported fields }
ChatTypeSupergroup A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members)
func NewChatTypeSupergroup ¶
func NewChatTypeSupergroup(supergroupID int32, isChannel bool) *ChatTypeSupergroup
NewChatTypeSupergroup creates a new ChatTypeSupergroup
@param supergroupID Supergroup or channel identifier @param isChannel True, if the supergroup is a channel
func (*ChatTypeSupergroup) GetChatTypeEnum ¶
func (chatTypeSupergroup *ChatTypeSupergroup) GetChatTypeEnum() ChatTypeEnum
GetChatTypeEnum return the enum type of this object
func (*ChatTypeSupergroup) MessageType ¶
func (chatTypeSupergroup *ChatTypeSupergroup) MessageType() string
MessageType return the string telegram-type of ChatTypeSupergroup
type Chats ¶
type Chats struct { ChatIDs []int64 `json:"chat_ids"` // List of chat identifiers // contains filtered or unexported fields }
Chats Represents a list of chats
func (*Chats) MessageType ¶
MessageType return the string telegram-type of Chats
type CheckChatUsernameResult ¶
type CheckChatUsernameResult interface {
GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
}
CheckChatUsernameResult Represents result of checking whether a username can be set for a chat
type CheckChatUsernameResultEnum ¶
type CheckChatUsernameResultEnum string
CheckChatUsernameResultEnum Alias for abstract CheckChatUsernameResult 'Sub-Classes', used as constant-enum here
const ( CheckChatUsernameResultOkType CheckChatUsernameResultEnum = "checkChatUsernameResultOk" CheckChatUsernameResultUsernameInvalidType CheckChatUsernameResultEnum = "checkChatUsernameResultUsernameInvalid" CheckChatUsernameResultUsernameOccupiedType CheckChatUsernameResultEnum = "checkChatUsernameResultUsernameOccupied" CheckChatUsernameResultPublicChatsTooMuchType CheckChatUsernameResultEnum = "checkChatUsernameResultPublicChatsTooMuch" )
CheckChatUsernameResult enums
type CheckChatUsernameResultOk ¶
type CheckChatUsernameResultOk struct {
// contains filtered or unexported fields
}
CheckChatUsernameResultOk The username can be set
func NewCheckChatUsernameResultOk ¶
func NewCheckChatUsernameResultOk() *CheckChatUsernameResultOk
NewCheckChatUsernameResultOk creates a new CheckChatUsernameResultOk
func (*CheckChatUsernameResultOk) GetCheckChatUsernameResultEnum ¶
func (checkChatUsernameResultOk *CheckChatUsernameResultOk) GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
GetCheckChatUsernameResultEnum return the enum type of this object
func (*CheckChatUsernameResultOk) MessageType ¶
func (checkChatUsernameResultOk *CheckChatUsernameResultOk) MessageType() string
MessageType return the string telegram-type of CheckChatUsernameResultOk
type CheckChatUsernameResultPublicChatsTooMuch ¶
type CheckChatUsernameResultPublicChatsTooMuch struct {
// contains filtered or unexported fields
}
CheckChatUsernameResultPublicChatsTooMuch The user has too much public chats, one of them should be made private first
func NewCheckChatUsernameResultPublicChatsTooMuch ¶
func NewCheckChatUsernameResultPublicChatsTooMuch() *CheckChatUsernameResultPublicChatsTooMuch
NewCheckChatUsernameResultPublicChatsTooMuch creates a new CheckChatUsernameResultPublicChatsTooMuch
func (*CheckChatUsernameResultPublicChatsTooMuch) GetCheckChatUsernameResultEnum ¶
func (checkChatUsernameResultPublicChatsTooMuch *CheckChatUsernameResultPublicChatsTooMuch) GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
GetCheckChatUsernameResultEnum return the enum type of this object
func (*CheckChatUsernameResultPublicChatsTooMuch) MessageType ¶
func (checkChatUsernameResultPublicChatsTooMuch *CheckChatUsernameResultPublicChatsTooMuch) MessageType() string
MessageType return the string telegram-type of CheckChatUsernameResultPublicChatsTooMuch
type CheckChatUsernameResultPublicGroupsUnavailable ¶
type CheckChatUsernameResultPublicGroupsUnavailable struct {
// contains filtered or unexported fields
}
CheckChatUsernameResultPublicGroupsUnavailable The user can't be a member of a public supergroup
func NewCheckChatUsernameResultPublicGroupsUnavailable ¶
func NewCheckChatUsernameResultPublicGroupsUnavailable() *CheckChatUsernameResultPublicGroupsUnavailable
NewCheckChatUsernameResultPublicGroupsUnavailable creates a new CheckChatUsernameResultPublicGroupsUnavailable
func (*CheckChatUsernameResultPublicGroupsUnavailable) GetCheckChatUsernameResultEnum ¶
func (checkChatUsernameResultPublicGroupsUnavailable *CheckChatUsernameResultPublicGroupsUnavailable) GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
GetCheckChatUsernameResultEnum return the enum type of this object
func (*CheckChatUsernameResultPublicGroupsUnavailable) MessageType ¶
func (checkChatUsernameResultPublicGroupsUnavailable *CheckChatUsernameResultPublicGroupsUnavailable) MessageType() string
MessageType return the string telegram-type of CheckChatUsernameResultPublicGroupsUnavailable
type CheckChatUsernameResultUsernameInvalid ¶
type CheckChatUsernameResultUsernameInvalid struct {
// contains filtered or unexported fields
}
CheckChatUsernameResultUsernameInvalid The username is invalid
func NewCheckChatUsernameResultUsernameInvalid ¶
func NewCheckChatUsernameResultUsernameInvalid() *CheckChatUsernameResultUsernameInvalid
NewCheckChatUsernameResultUsernameInvalid creates a new CheckChatUsernameResultUsernameInvalid
func (*CheckChatUsernameResultUsernameInvalid) GetCheckChatUsernameResultEnum ¶
func (checkChatUsernameResultUsernameInvalid *CheckChatUsernameResultUsernameInvalid) GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
GetCheckChatUsernameResultEnum return the enum type of this object
func (*CheckChatUsernameResultUsernameInvalid) MessageType ¶
func (checkChatUsernameResultUsernameInvalid *CheckChatUsernameResultUsernameInvalid) MessageType() string
MessageType return the string telegram-type of CheckChatUsernameResultUsernameInvalid
type CheckChatUsernameResultUsernameOccupied ¶
type CheckChatUsernameResultUsernameOccupied struct {
// contains filtered or unexported fields
}
CheckChatUsernameResultUsernameOccupied The username is occupied
func NewCheckChatUsernameResultUsernameOccupied ¶
func NewCheckChatUsernameResultUsernameOccupied() *CheckChatUsernameResultUsernameOccupied
NewCheckChatUsernameResultUsernameOccupied creates a new CheckChatUsernameResultUsernameOccupied
func (*CheckChatUsernameResultUsernameOccupied) GetCheckChatUsernameResultEnum ¶
func (checkChatUsernameResultUsernameOccupied *CheckChatUsernameResultUsernameOccupied) GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
GetCheckChatUsernameResultEnum return the enum type of this object
func (*CheckChatUsernameResultUsernameOccupied) MessageType ¶
func (checkChatUsernameResultUsernameOccupied *CheckChatUsernameResultUsernameOccupied) MessageType() string
MessageType return the string telegram-type of CheckChatUsernameResultUsernameOccupied
type Client ¶
type Client struct { Client unsafe.Pointer Config Config // contains filtered or unexported fields }
Client is the Telegram TdLib client
func NewClient ¶
NewClient Creates a new instance of TDLib. Has two public fields: Client itself and RawUpdates channel
func (*Client) AcceptCall ¶
func (client *Client) AcceptCall(callID int32, protocol *CallProtocol) (*Ok, error)
AcceptCall Accepts an incoming call @param callID Call identifier @param protocol Description of the call protocols supported by the client
func (*Client) AddChatMember ¶
AddChatMember Adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server @param chatID Chat identifier @param userID Identifier of the user @param forwardLimit The number of earlier messages from the chat to be forwarded to the new member; up to 300. Ignored for supergroups and channels
func (*Client) AddChatMembers ¶
AddChatMembers Adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server @param chatID Chat identifier @param userIDs Identifiers of the users to be added to the chat
func (*Client) AddEventReceiver ¶
func (client *Client) AddEventReceiver(msgInstance TdMessage, filterFunc EventFilterFunc, channelCapacity int) EventReceiver
AddEventReceiver adds a new receiver to be subscribed in receiver channels
func (*Client) AddFavoriteSticker ¶
AddFavoriteSticker Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list @param sticker Sticker file to add
func (*Client) AddNetworkStatistics ¶
func (client *Client) AddNetworkStatistics(entry NetworkStatisticsEntry) (*Ok, error)
AddNetworkStatistics Adds the specified data to data usage statistics. Can be called before authorization @param entry The network statistics entry with the data to be added to statistics
func (*Client) AddRecentSticker ¶
AddRecentSticker Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list @param isAttached Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers @param sticker Sticker file to add
func (*Client) AddRecentlyFoundChat ¶
AddRecentlyFoundChat Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first @param chatID Identifier of the chat to add
func (*Client) AddSavedAnimation ¶
AddSavedAnimation Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list @param animation The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list
func (*Client) AddStickerToSet ¶
func (client *Client) AddStickerToSet(userID int32, name string, sticker *InputSticker) (*StickerSet, error)
AddStickerToSet Adds a new sticker to a set; for bots only. Returns the sticker set @param userID Sticker set owner @param name Sticker set name @param sticker Sticker to add to the set
func (*Client) AnswerCallbackQuery ¶
func (client *Client) AnswerCallbackQuery(callbackQueryID JSONInt64, text string, showAlert bool, uRL string, cacheTime int32) (*Ok, error)
AnswerCallbackQuery Sets the result of a callback query; for bots only @param callbackQueryID Identifier of the callback query @param text Text of the answer @param showAlert If true, an alert should be shown to the user instead of a toast notification @param uRL URL to be opened @param cacheTime Time during which the result of the query can be cached, in seconds
func (*Client) AnswerCustomQuery ¶
AnswerCustomQuery Answers a custom query; for bots only @param customQueryID Identifier of a custom query @param data JSON-serialized answer to the query
func (*Client) AnswerInlineQuery ¶
func (client *Client) AnswerInlineQuery(inlineQueryID JSONInt64, isPersonal bool, results []InputInlineQueryResult, cacheTime int32, nextOffset string, switchPmText string, switchPmParameter string) (*Ok, error)
AnswerInlineQuery Sets the result of an inline query; for bots only @param inlineQueryID Identifier of the inline query @param isPersonal True, if the result of the query can be cached for the specified user @param results The results of the query @param cacheTime Allowed time to cache the results of the query, in seconds @param nextOffset Offset for the next inline query; pass an empty string if there are no more results @param switchPmText If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter @param switchPmParameter The parameter for the bot start message
func (*Client) AnswerPreCheckoutQuery ¶
func (client *Client) AnswerPreCheckoutQuery(preCheckoutQueryID JSONInt64, errorMessage string) (*Ok, error)
AnswerPreCheckoutQuery Sets the result of a pre-checkout query; for bots only @param preCheckoutQueryID Identifier of the pre-checkout query @param errorMessage An error message, empty on success
func (*Client) AnswerShippingQuery ¶
func (client *Client) AnswerShippingQuery(shippingQueryID JSONInt64, shippingOptions []ShippingOption, errorMessage string) (*Ok, error)
AnswerShippingQuery Sets the result of a shipping query; for bots only @param shippingQueryID Identifier of the shipping query @param shippingOptions Available shipping options @param errorMessage An error message, empty on success
func (*Client) Authorize ¶
func (client *Client) Authorize() (AuthorizationState, error)
Authorize is used to authorize the users
func (*Client) CancelDownloadFile ¶
CancelDownloadFile Stops the downloading of a file. If a file has already been downloaded, does nothing @param fileID Identifier of a file to stop downloading @param onlyIfPending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
func (*Client) CancelUploadFile ¶
CancelUploadFile Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined @param fileID Identifier of the file to stop uploading
func (*Client) ChangeChatReportSpamState ¶
ChangeChatReportSpamState Used to let the server know whether a chat is spam or not. Can be used only if ChatReportSpamState.can_report_spam is true. After this request, ChatReportSpamState.can_report_spam becomes false forever @param chatID Chat identifier @param isSpamChat If true, the chat will be reported as spam; otherwise it will be marked as not spam
func (*Client) ChangeImportedContacts ¶
func (client *Client) ChangeImportedContacts(contacts []Contact) (*ImportedContacts, error)
ChangeImportedContacts Changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. @param contacts
func (*Client) ChangePhoneNumber ¶
func (client *Client) ChangePhoneNumber(phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*AuthenticationCodeInfo, error)
ChangePhoneNumber Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code @param phoneNumber The new phone number of the user in international format @param allowFlashCall Pass true if the code can be sent via flash call to the specified phone number @param isCurrentPhoneNumber Pass true if the phone number is used on the current device. Ignored if allow_flash_call is false
func (*Client) ChangeStickerSet ¶
func (client *Client) ChangeStickerSet(setID JSONInt64, isInstalled bool, isArchived bool) (*Ok, error)
ChangeStickerSet Installs/uninstalls or activates/archives a sticker set @param setID Identifier of the sticker set @param isInstalled The new value of is_installed @param isArchived The new value of is_archived. A sticker set can't be installed and archived simultaneously
func (*Client) CheckAuthenticationBotToken ¶
CheckAuthenticationBotToken Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @param token The bot token
func (*Client) CheckAuthenticationCode ¶
func (client *Client) CheckAuthenticationCode(code string, firstName string, lastName string) (*Ok, error)
CheckAuthenticationCode Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @param code The verification code received via SMS, Telegram message, phone call, or flash call @param firstName If the user is not yet registered, the first name of the user; 1-255 characters @param lastName If the user is not yet registered; the last name of the user; optional; 0-255 characters
func (*Client) CheckAuthenticationPassword ¶
CheckAuthenticationPassword Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword @param password The password to check
func (*Client) CheckChangePhoneNumberCode ¶
CheckChangePhoneNumberCode Checks the authentication code sent to confirm a new phone number of the user @param code Verification code received by SMS, phone call or flash call
func (*Client) CheckChatInviteLink ¶
func (client *Client) CheckChatInviteLink(inviteLink string) (*ChatInviteLinkInfo, error)
CheckChatInviteLink Checks the validity of an invite link for a chat and returns information about the corresponding chat @param inviteLink Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
func (*Client) CheckChatUsername ¶
func (client *Client) CheckChatUsername(chatID JSONInt64, username string) (CheckChatUsernameResult, error)
CheckChatUsername Checks whether a username can be set for a chat @param chatID Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created @param username Username to be checked
func (*Client) CheckDatabaseEncryptionKey ¶
CheckDatabaseEncryptionKey Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey @param encryptionKey Encryption key to check or set up
func (*Client) ClearImportedContacts ¶
ClearImportedContacts Clears all imported contacts
func (*Client) ClearRecentStickers ¶
ClearRecentStickers Clears the list of recently used stickers @param isAttached Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers
func (*Client) ClearRecentlyFoundChats ¶
ClearRecentlyFoundChats Clears the list of recently found chats
func (*Client) Close ¶
Close Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent
func (*Client) CloseChat ¶
CloseChat This method should be called if the chat is closed by the user. Many useful activities depend on the chat being opened or closed @param chatID Chat identifier
func (*Client) CloseSecretChat ¶
CloseSecretChat Closes a secret chat, effectively transfering its state to secretChatStateClosed @param secretChatID Secret chat identifier
func (*Client) CreateBasicGroupChat ¶
CreateBasicGroupChat Returns an existing chat corresponding to a known basic group @param basicGroupID Basic group identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateCall ¶
func (client *Client) CreateCall(userID int32, protocol *CallProtocol) (*CallID, error)
CreateCall Creates a new call @param userID Identifier of the user to be called @param protocol Description of the call protocols supported by the client
func (*Client) CreateNewBasicGroupChat ¶
CreateNewBasicGroupChat Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat @param userIDs Identifiers of users to be added to the basic group @param title Title of the new basic group; 1-255 characters
func (*Client) CreateNewSecretChat ¶
CreateNewSecretChat Creates a new secret chat. Returns the newly created chat @param userID Identifier of the target user
func (*Client) CreateNewStickerSet ¶
func (client *Client) CreateNewStickerSet(userID int32, title string, name string, isMasks bool, stickers []InputSticker) (*StickerSet, error)
CreateNewStickerSet Creates a new sticker set; for bots only. Returns the newly created sticker set @param userID Sticker set owner @param title Sticker set title; 1-64 characters @param name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive); 1-64 characters @param isMasks True, if stickers are masks @param stickers List of stickers to be added to the set
func (*Client) CreateNewSupergroupChat ¶
func (client *Client) CreateNewSupergroupChat(title string, isChannel bool, description string) (*Chat, error)
CreateNewSupergroupChat Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat @param title Title of the new chat; 1-255 characters @param isChannel True, if a channel chat should be created @param description
func (*Client) CreatePrivateChat ¶
CreatePrivateChat Returns an existing chat corresponding to a given user @param userID User identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateSecretChat ¶
CreateSecretChat Returns an existing chat corresponding to a known secret chat @param secretChatID Secret chat identifier
func (*Client) CreateSupergroupChat ¶
CreateSupergroupChat Returns an existing chat corresponding to a known supergroup or channel @param supergroupID Supergroup or channel identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateTemporaryPassword ¶
func (client *Client) CreateTemporaryPassword(password string, validFor int32) (*TemporaryPasswordState, error)
CreateTemporaryPassword Creates a new temporary password for processing payments @param password Persistent user password @param validFor Time during which the temporary password will be valid, in seconds; should be between 60 and 86400
func (*Client) DeleteAccount ¶
DeleteAccount Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account @param reason The reason why the account was deleted; optional
func (*Client) DeleteChatHistory ¶
DeleteChatHistory Deletes all messages in the chat only for the user. Cannot be used in channels and public supergroups @param chatID Chat identifier @param removeFromChatList Pass true if the chat should be removed from the chats list
func (*Client) DeleteChatMessagesFromUser ¶
DeleteChatMessagesFromUser Deletes all messages sent by the specified user to a chat. Supported only in supergroups; requires can_delete_messages administrator privileges @param chatID Chat identifier @param userID User identifier
func (*Client) DeleteChatReplyMarkup ¶
DeleteChatReplyMarkup Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed @param chatID Chat identifier @param messageID The message identifier of the used keyboard
func (*Client) DeleteFile ¶
DeleteFile Deletes a file from the TDLib file cache @param fileID Identifier of the file to delete
func (*Client) DeleteMessages ¶
DeleteMessages Deletes messages @param chatID Chat identifier @param messageIDs Identifiers of the messages to be deleted @param revoke Pass true to try to delete outgoing messages for all chat members (may fail if messages are too old). Always true for supergroups, channels and secret chats
func (*Client) DeleteProfilePhoto ¶
DeleteProfilePhoto Deletes a profile photo. If something changes, updateUser will be sent @param profilePhotoID Identifier of the profile photo to delete
func (*Client) DeleteSavedCredentials ¶
DeleteSavedCredentials Deletes saved credentials for all payment provider bots
func (*Client) DeleteSavedOrderInfo ¶
DeleteSavedOrderInfo Deletes saved order info
func (*Client) DeleteSupergroup ¶
DeleteSupergroup Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires creator privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method @param supergroupID Identifier of the supergroup or channel
func (*Client) Destroy ¶
Destroy Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent
func (*Client) DestroyInstance ¶
func (client *Client) DestroyInstance()
DestroyInstance Destroys the TDLib client instance. After this is called the client instance shouldn't be used anymore.
func (*Client) DiscardCall ¶
func (client *Client) DiscardCall(callID int32, isDisconnected bool, duration int32, connectionID JSONInt64) (*Ok, error)
DiscardCall Discards a call @param callID Call identifier @param isDisconnected True, if the user was disconnected @param duration The call duration, in seconds @param connectionID Identifier of the connection used during the call
func (*Client) DisconnectAllWebsites ¶
DisconnectAllWebsites Disconnects all websites from the current user's Telegram account
func (*Client) DisconnectWebsite ¶
DisconnectWebsite Disconnects website from the current user's Telegram account @param websiteID Website identifier
func (*Client) DownloadFile ¶
DownloadFile Asynchronously downloads a file from the cloud. updateFile will be used to notify about the download progress and successful completion of the download. Returns file state just after the download has been started @param fileID Identifier of the file to download @param priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first
func (*Client) EditInlineMessageCaption ¶
func (client *Client) EditInlineMessageCaption(inlineMessageID string, replyMarkup ReplyMarkup, caption *FormattedText) (*Ok, error)
EditInlineMessageCaption Edits the caption of an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup New message reply markup @param caption New message content caption; 0-200 characters
func (*Client) EditInlineMessageLiveLocation ¶
func (client *Client) EditInlineMessageLiveLocation(inlineMessageID string, replyMarkup ReplyMarkup, location *Location) (*Ok, error)
EditInlineMessageLiveLocation Edits the content of a live location in an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup New message reply markup @param location New location content of the message; may be null. Pass null to stop sharing the live location
func (*Client) EditInlineMessageReplyMarkup ¶
func (client *Client) EditInlineMessageReplyMarkup(inlineMessageID string, replyMarkup ReplyMarkup) (*Ok, error)
EditInlineMessageReplyMarkup Edits the reply markup of an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup New message reply markup
func (*Client) EditInlineMessageText ¶
func (client *Client) EditInlineMessageText(inlineMessageID string, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Ok, error)
EditInlineMessageText Edits the text of an inline text or game message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup New message reply markup @param inputMessageContent New text content of the message. Should be of type InputMessageText
func (*Client) EditMessageCaption ¶
func (client *Client) EditMessageCaption(chatID int64, messageID int64, replyMarkup ReplyMarkup, caption *FormattedText) (*Message, error)
EditMessageCaption Edits the message content caption. Non-bots can edit messages for a limited period of time. Returns the edited message after the edit is completed server-side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param caption New message content caption; 0-200 characters
func (*Client) EditMessageLiveLocation ¶
func (client *Client) EditMessageLiveLocation(chatID int64, messageID int64, replyMarkup ReplyMarkup, location *Location) (*Message, error)
EditMessageLiveLocation Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed server-side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup Tew message reply markup; for bots only @param location New location content of the message; may be null. Pass null to stop sharing the live location
func (*Client) EditMessageReplyMarkup ¶
func (client *Client) EditMessageReplyMarkup(chatID int64, messageID int64, replyMarkup ReplyMarkup) (*Message, error)
EditMessageReplyMarkup Edits the message reply markup; for bots only. Returns the edited message after the edit is completed server-side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup New message reply markup
func (*Client) EditMessageText ¶
func (client *Client) EditMessageText(chatID int64, messageID int64, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Message, error)
EditMessageText Edits the text of a message (or a text of a game message). Non-bot users can edit messages for a limited period of time. Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param inputMessageContent New text content of the message. Should be of type InputMessageText
func (*Client) Execute ¶
Execute Synchronously executes TDLib request. Only a few requests can be executed synchronously.
func (*Client) FinishFileGeneration ¶
FinishFileGeneration Finishes the file generation @param generationID The identifier of the generation process @param error If set, means that file generation has failed and should be terminated
func (*Client) ForwardMessages ¶
func (client *Client) ForwardMessages(chatID int64, fromChatID int64, messageIDs []int64, disableNotification bool, fromBackground bool, asAlbum bool) (*Messages, error)
ForwardMessages Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message @param chatID Identifier of the chat to which to forward messages @param fromChatID Identifier of the chat from which to forward messages @param messageIDs Identifiers of the messages to forward @param disableNotification Pass true to disable notification for the message, doesn't work if messages are forwarded to a secret chat @param fromBackground Pass true if the message is sent from the background @param asAlbum True, if the messages should be grouped into an album after forwarding. For this to work, no more than 10 messages may be forwarded, and all of them must be photo or video messages
func (*Client) GenerateChatInviteLink ¶
func (client *Client) GenerateChatInviteLink(chatID int64) (*ChatInviteLink, error)
GenerateChatInviteLink Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. In basic groups this can be called only by the group's creator; in supergroups and channels this requires appropriate administrator rights @param chatID Chat identifier
func (*Client) GetAccountTTL ¶
func (client *Client) GetAccountTTL() (*AccountTTL, error)
GetAccountTTL Returns the period of inactivity after which the account of the current user will automatically be deleted
func (*Client) GetActiveLiveLocationMessages ¶
GetActiveLiveLocationMessages Returns all active live locations that should be updated by the client. The list is persistent across application restarts only if the message database is used
func (*Client) GetActiveSessions ¶
GetActiveSessions Returns all active sessions of the current user
func (*Client) GetArchivedStickerSets ¶
func (client *Client) GetArchivedStickerSets(isMasks bool, offsetStickerSetID JSONInt64, limit int32) (*StickerSets, error)
GetArchivedStickerSets Returns a list of archived sticker sets @param isMasks Pass true to return mask stickers sets; pass false to return ordinary sticker sets @param offsetStickerSetID Identifier of the sticker set from which to return the result @param limit Maximum number of sticker sets to return
func (*Client) GetAttachedStickerSets ¶
func (client *Client) GetAttachedStickerSets(fileID int32) (*StickerSets, error)
GetAttachedStickerSets Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets @param fileID File identifier
func (*Client) GetAuthorizationState ¶
func (client *Client) GetAuthorizationState() (AuthorizationState, error)
GetAuthorizationState Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state
func (*Client) GetBasicGroup ¶
func (client *Client) GetBasicGroup(basicGroupID int32) (*BasicGroup, error)
GetBasicGroup Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot @param basicGroupID Basic group identifier
func (*Client) GetBasicGroupFullInfo ¶
func (client *Client) GetBasicGroupFullInfo(basicGroupID int32) (*BasicGroupFullInfo, error)
GetBasicGroupFullInfo Returns full information about a basic group by its identifier @param basicGroupID Basic group identifier
func (*Client) GetBlockedUsers ¶
GetBlockedUsers Returns users that were blocked by the current user @param offset Number of users to skip in the result; must be non-negative @param limit Maximum number of users to return; up to 100
func (*Client) GetCallbackQueryAnswer ¶
func (client *Client) GetCallbackQueryAnswer(chatID int64, messageID int64, payload CallbackQueryPayload) (*CallbackQueryAnswer, error)
GetCallbackQueryAnswer Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @param chatID Identifier of the chat with the message @param messageID Identifier of the message from which the query originated @param payload Query payload
func (*Client) GetChat ¶
GetChat Returns information about a chat by its identifier, this is an offline request if the current user is not a bot @param chatID Chat identifier
func (*Client) GetChatAdministrators ¶
GetChatAdministrators Returns a list of users who are administrators of the chat @param chatID Chat identifier
func (*Client) GetChatEventLog ¶
func (client *Client) GetChatEventLog(chatID int64, query string, fromEventID JSONInt64, limit int32, filters *ChatEventLogFilters, userIDs []int32) (*ChatEvents, error)
GetChatEventLog Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) @param chatID Chat identifier @param query Search query by which to filter events @param fromEventID Identifier of an event from which to return results. Use 0 to get results from the latest events @param limit Maximum number of events to return; up to 100 @param filters The types of events to return. By default, all types will be returned @param userIDs User identifiers by which to filter events. By default, events relating to all users will be returned
func (*Client) GetChatHistory ¶
func (client *Client) GetChatHistory(chatID int64, fromMessageID int64, offset int32, limit int32, onlyLocal bool) (*Messages, error)
GetChatHistory Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). @param chatID Chat identifier @param fromMessageID Identifier of the message starting from which history must be fetched; use 0 to get results from the beginning (i.e., from oldest to newest) @param offset Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached @param onlyLocal If true, returns only messages that are available locally without sending network requests
func (*Client) GetChatMember ¶
func (client *Client) GetChatMember(chatID int64, userID int32) (*ChatMember, error)
GetChatMember Returns information about a single member of a chat @param chatID Chat identifier @param userID User identifier
func (*Client) GetChatMessageByDate ¶
GetChatMessageByDate Returns the last message sent in a chat no later than the specified date @param chatID Chat identifier @param date Point in time (Unix timestamp) relative to which to search for messages
func (*Client) GetChatPinnedMessage ¶
GetChatPinnedMessage Returns information about a pinned chat message @param chatID Identifier of the chat the message belongs to
func (*Client) GetChatReportSpamState ¶
func (client *Client) GetChatReportSpamState(chatID int64) (*ChatReportSpamState, error)
GetChatReportSpamState Returns information on whether the current chat can be reported as spam @param chatID Chat identifier
func (*Client) GetChats ¶
func (client *Client) GetChats(offsetOrder JSONInt64, offsetChatID int64, limit int32) (*Chats, error)
GetChats Returns an ordered list of chats. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to 2^63 - 1). @param offsetOrder @param offsetChatID @param limit The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached
func (*Client) GetConnectedWebsites ¶
func (client *Client) GetConnectedWebsites() (*ConnectedWebsites, error)
GetConnectedWebsites Returns all website where the current user used Telegram to log in
func (*Client) GetCountryCode ¶
GetCountryCode Uses current user IP to found his country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization
func (*Client) GetCreatedPublicChats ¶
GetCreatedPublicChats Returns a list of public chats created by the user
func (*Client) GetFavoriteStickers ¶
GetFavoriteStickers Returns favorite stickers
func (*Client) GetFile ¶
GetFile Returns information about a file; this is an offline request @param fileID Identifier of the file to get
func (*Client) GetFileExtension ¶
GetFileExtension Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously @param mimeType The MIME type of the file
func (*Client) GetFileMimeType ¶
GetFileMimeType Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously @param fileName The name of the file or path to the file
func (*Client) GetGameHighScores ¶
func (client *Client) GetGameHighScores(chatID int64, messageID int64, userID int32) (*GameHighScores, error)
GetGameHighScores Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only @param chatID The chat that contains the message with the game @param messageID Identifier of the message @param userID User identifier
func (*Client) GetGroupsInCommon ¶
func (client *Client) GetGroupsInCommon(userID int32, offsetChatID int64, limit int32) (*Chats, error)
GetGroupsInCommon Returns a list of common chats with a given user. Chats are sorted by their type and creation date @param userID User identifier @param offsetChatID Chat identifier starting from which to return chats; use 0 for the first request @param limit Maximum number of chats to be returned; up to 100
func (*Client) GetImportedContactCount ¶
GetImportedContactCount Returns the total number of imported contacts
func (*Client) GetInlineGameHighScores ¶
func (client *Client) GetInlineGameHighScores(inlineMessageID string, userID int32) (*GameHighScores, error)
GetInlineGameHighScores Returns game high scores and some part of the high score table in the range of the specified user; for bots only @param inlineMessageID Inline message identifier @param userID User identifier
func (*Client) GetInlineQueryResults ¶
func (client *Client) GetInlineQueryResults(botUserID int32, chatID int64, userLocation *Location, query string, offset string) (*InlineQueryResults, error)
GetInlineQueryResults Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @param botUserID The identifier of the target bot @param chatID Identifier of the chat, where the query was sent @param userLocation Location of the user, only if needed @param query Text of the query @param offset Offset of the first entry to return
func (*Client) GetInstalledStickerSets ¶
func (client *Client) GetInstalledStickerSets(isMasks bool) (*StickerSets, error)
GetInstalledStickerSets Returns a list of installed sticker sets @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets
func (*Client) GetInviteText ¶
GetInviteText Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram
func (*Client) GetMessage ¶
GetMessage Returns information about a message @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message to get
func (*Client) GetMessages ¶
GetMessages Returns information about messages. If a message is not found, returns null on the corresponding position of the result @param chatID Identifier of the chat the messages belong to @param messageIDs Identifiers of the messages to get
func (*Client) GetNetworkStatistics ¶
func (client *Client) GetNetworkStatistics(onlyCurrent bool) (*NetworkStatistics, error)
GetNetworkStatistics Returns network data usage statistics. Can be called before authorization @param onlyCurrent If true, returns only data for the current library launch
func (*Client) GetNotificationSettings ¶
func (client *Client) GetNotificationSettings(scope NotificationSettingsScope) (*NotificationSettings, error)
GetNotificationSettings Returns the notification settings for a given scope @param scope Scope for which to return the notification settings information
func (*Client) GetOption ¶
func (client *Client) GetOption(name string) (OptionValue, error)
GetOption Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization @param name The name of the option
func (*Client) GetPasswordState ¶
func (client *Client) GetPasswordState() (*PasswordState, error)
GetPasswordState Returns the current state of 2-step verification
func (*Client) GetPaymentForm ¶
func (client *Client) GetPaymentForm(chatID int64, messageID int64) (*PaymentForm, error)
GetPaymentForm Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy @param chatID Chat identifier of the Invoice message @param messageID Message identifier
func (*Client) GetPaymentReceipt ¶
func (client *Client) GetPaymentReceipt(chatID int64, messageID int64) (*PaymentReceipt, error)
GetPaymentReceipt Returns information about a successful payment @param chatID Chat identifier of the PaymentSuccessful message @param messageID Message identifier
func (*Client) GetProxy ¶
GetProxy Returns the proxy that is currently set up. Can be called before authorization
func (*Client) GetPublicMessageLink ¶
func (client *Client) GetPublicMessageLink(chatID int64, messageID int64, forAlbum bool) (*PublicMessageLink, error)
GetPublicMessageLink Returns a public HTTPS link to a message. Available only for messages in public supergroups and channels @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message @param forAlbum Pass true if a link for a whole media album should be returned
func (*Client) GetRawUpdatesChannel ¶
GetRawUpdatesChannel creates a general channel that fetches every update comming from tdlib
func (*Client) GetRecentInlineBots ¶
GetRecentInlineBots Returns up to 20 recently used inline bots in the order of their last usage
func (*Client) GetRecentStickers ¶
GetRecentStickers Returns a list of recently used stickers @param isAttached Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers
func (*Client) GetRecentlyVisitedTMeURLs ¶
GetRecentlyVisitedTMeURLs Returns t.me URLs recently visited by a newly registered user @param referrer Google Play referrer to identify the user
func (*Client) GetRecoveryEmailAddress ¶
func (client *Client) GetRecoveryEmailAddress(password string) (*RecoveryEmailAddress, error)
GetRecoveryEmailAddress Returns a recovery email address that was previously set up. This method can be used to verify a password provided by the user @param password The password for the current user
func (*Client) GetRemoteFile ¶
GetRemoteFile Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message @param remoteFileID Remote identifier of the file to get @param fileType File type, if known
func (*Client) GetRepliedMessage ¶
GetRepliedMessage Returns information about a message that is replied by given message @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message reply to which get
func (*Client) GetSavedAnimations ¶
func (client *Client) GetSavedAnimations() (*Animations, error)
GetSavedAnimations Returns saved animations
func (*Client) GetSavedOrderInfo ¶
GetSavedOrderInfo Returns saved order info, if any
func (*Client) GetSecretChat ¶
func (client *Client) GetSecretChat(secretChatID int32) (*SecretChat, error)
GetSecretChat Returns information about a secret chat by its identifier. This is an offline request @param secretChatID Secret chat identifier
func (*Client) GetStickerEmojis ¶
func (client *Client) GetStickerEmojis(sticker InputFile) (*StickerEmojis, error)
GetStickerEmojis Returns emoji corresponding to a sticker @param sticker Sticker file identifier
func (*Client) GetStickerSet ¶
func (client *Client) GetStickerSet(setID JSONInt64) (*StickerSet, error)
GetStickerSet Returns information about a sticker set by its identifier @param setID Identifier of the sticker set
func (*Client) GetStickers ¶
GetStickers Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned @param emoji String representation of emoji. If empty, returns all known installed stickers @param limit Maximum number of stickers to be returned
func (*Client) GetStorageStatistics ¶
func (client *Client) GetStorageStatistics(chatLimit int32) (*StorageStatistics, error)
GetStorageStatistics Returns storage usage statistics @param chatLimit Maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0
func (*Client) GetStorageStatisticsFast ¶
func (client *Client) GetStorageStatisticsFast() (*StorageStatisticsFast, error)
GetStorageStatisticsFast Quickly returns approximate storage usage statistics
func (*Client) GetSupergroup ¶
func (client *Client) GetSupergroup(supergroupID int32) (*Supergroup, error)
GetSupergroup Returns information about a supergroup or channel by its identifier. This is an offline request if the current user is not a bot @param supergroupID Supergroup or channel identifier
func (*Client) GetSupergroupFullInfo ¶
func (client *Client) GetSupergroupFullInfo(supergroupID int32) (*SupergroupFullInfo, error)
GetSupergroupFullInfo Returns full information about a supergroup or channel by its identifier, cached for up to 1 minute @param supergroupID Supergroup or channel identifier
func (*Client) GetSupergroupMembers ¶
func (client *Client) GetSupergroupMembers(supergroupID int32, filter SupergroupMembersFilter, offset int32, limit int32) (*ChatMembers, error)
GetSupergroupMembers Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters @param supergroupID Identifier of the supergroup or channel @param filter The type of users to return. By default, supergroupMembersRecent @param offset Number of users to skip @param limit The maximum number of users be returned; up to 200
func (*Client) GetSupportUser ¶
GetSupportUser Returns a user that can be contacted to get support
func (*Client) GetTemporaryPasswordState ¶
func (client *Client) GetTemporaryPasswordState() (*TemporaryPasswordState, error)
GetTemporaryPasswordState Returns information about the current temporary password
func (*Client) GetTermsOfService ¶
GetTermsOfService Returns the terms of service. Can be called before authorization
func (*Client) GetTextEntities ¶
func (client *Client) GetTextEntities(text string) (*TextEntities, error)
GetTextEntities Returns all entities (mentions, hashtags, cashtags, bot commands, URLs, and email addresses) contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously @param text The text in which to look for entites
func (*Client) GetTopChats ¶
func (client *Client) GetTopChats(category TopChatCategory, limit int32) (*Chats, error)
GetTopChats Returns a list of frequently used chats. Supported only if the chat info database is enabled @param category Category of chats to be returned @param limit Maximum number of chats to be returned; up to 30
func (*Client) GetTrendingStickerSets ¶
func (client *Client) GetTrendingStickerSets() (*StickerSets, error)
GetTrendingStickerSets Returns a list of trending sticker sets
func (*Client) GetUser ¶
GetUser Returns information about a user by their identifier. This is an offline request if the current user is not a bot @param userID User identifier
func (*Client) GetUserFullInfo ¶
func (client *Client) GetUserFullInfo(userID int32) (*UserFullInfo, error)
GetUserFullInfo Returns full information about a user by their identifier @param userID User identifier
func (*Client) GetUserPrivacySettingRules ¶
func (client *Client) GetUserPrivacySettingRules(setting UserPrivacySetting) (*UserPrivacySettingRules, error)
GetUserPrivacySettingRules Returns the current privacy settings @param setting The privacy setting
func (*Client) GetUserProfilePhotos ¶
func (client *Client) GetUserProfilePhotos(userID int32, offset int32, limit int32) (*UserProfilePhotos, error)
GetUserProfilePhotos Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already @param userID User identifier @param offset The number of photos to skip; must be non-negative @param limit Maximum number of photos to be returned; up to 100
func (*Client) GetWallpapers ¶
func (client *Client) GetWallpapers() (*Wallpapers, error)
GetWallpapers Returns background wallpapers
func (*Client) GetWebPageInstantView ¶
func (client *Client) GetWebPageInstantView(uRL string, forceFull bool) (*WebPageInstantView, error)
GetWebPageInstantView Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page @param uRL The web page URL @param forceFull If true, the full instant view for the web page will be returned
func (*Client) GetWebPagePreview ¶
func (client *Client) GetWebPagePreview(text *FormattedText) (*WebPage, error)
GetWebPagePreview Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview @param text Message text with formatting
func (*Client) ImportContacts ¶
func (client *Client) ImportContacts(contacts []Contact) (*ImportedContacts, error)
ImportContacts Adds new contacts or edits existing contacts; contacts' user identifiers are ignored @param contacts The list of contacts to import or edit
func (*Client) JoinChatByInviteLink ¶
JoinChatByInviteLink Uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server @param inviteLink Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
func (*Client) LogOut ¶
LogOut Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent
func (*Client) OpenChat ¶
OpenChat This method should be called if the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) @param chatID Chat identifier
func (*Client) OpenMessageContent ¶
OpenMessageContent This method should be called if the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed @param chatID Chat identifier of the message @param messageID Identifier of the message with the opened content
func (*Client) OptimizeStorage ¶
func (client *Client) OptimizeStorage(size int64, tTL int32, count int32, immunityDelay int32, fileTypes []FileType, chatIDs []int64, excludeChatIDs []int64, chatLimit int32) (*StorageStatistics, error)
OptimizeStorage Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted @param size Limit on the total size of files after deletion. Pass -1 to use the default limit @param tTL Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit @param count Limit on the total count of files after deletion. Pass -1 to use the default limit @param immunityDelay The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value @param fileTypes If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted @param chatIDs If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos) @param excludeChatIDs If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos) @param chatLimit Same as in getStorageStatistics. Affects only returned statistics
func (*Client) ParseTextEntities ¶
func (client *Client) ParseTextEntities(text string, parseMode TextParseMode) (*FormattedText, error)
ParseTextEntities Parses Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously @param text The text which should be parsed @param parseMode Text parse mode
func (*Client) PinSupergroupMessage ¶
func (client *Client) PinSupergroupMessage(supergroupID int32, messageID int64, disableNotification bool) (*Ok, error)
PinSupergroupMessage Pins a message in a supergroup or channel; requires appropriate administrator rights in the supergroup or channel @param supergroupID Identifier of the supergroup or channel @param messageID Identifier of the new pinned message @param disableNotification True, if there should be no notification about the pinned message
func (*Client) ProcessDcUpdate ¶
ProcessDcUpdate Handles a DC_UPDATE push service notification. Can be called before authorization @param dc Value of the "dc" parameter of the notification @param addr Value of the "addr" parameter of the notification
func (*Client) ReadAllChatMentions ¶
ReadAllChatMentions Marks all mentions in a chat as read @param chatID Chat identifier
func (*Client) Receive ¶
Receive Receives incoming updates and request responses from the TDLib client. You can provide string or UpdateData.
func (*Client) RecoverAuthenticationPassword ¶
RecoverAuthenticationPassword Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword @param recoveryCode Recovery code to check
func (*Client) RecoverPassword ¶
func (client *Client) RecoverPassword(recoveryCode string) (*PasswordState, error)
RecoverPassword Recovers the password using a recovery code sent to an email address that was previously set up @param recoveryCode Recovery code to check
func (*Client) RegisterDevice ¶
func (client *Client) RegisterDevice(deviceToken DeviceToken, otherUserIDs []int32) (*Ok, error)
RegisterDevice Registers the currently used device for receiving push notifications @param deviceToken Device token @param otherUserIDs List of at most 100 user identifiers of other users currently using the client
func (*Client) RemoveContacts ¶
RemoveContacts Removes users from the contacts list @param userIDs Identifiers of users to be deleted
func (*Client) RemoveFavoriteSticker ¶
RemoveFavoriteSticker Removes a sticker from the list of favorite stickers @param sticker Sticker file to delete from the list
func (*Client) RemoveRecentHashtag ¶
RemoveRecentHashtag Removes a hashtag from the list of recently used hashtags @param hashtag Hashtag to delete
func (*Client) RemoveRecentSticker ¶
RemoveRecentSticker Removes a sticker from the list of recently used stickers @param isAttached Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers @param sticker Sticker file to delete
func (*Client) RemoveRecentlyFoundChat ¶
RemoveRecentlyFoundChat Removes a chat from the list of recently found chats @param chatID Identifier of the chat to be removed
func (*Client) RemoveSavedAnimation ¶
RemoveSavedAnimation Removes an animation from the list of saved animations @param animation Animation file to be removed
func (*Client) RemoveStickerFromSet ¶
RemoveStickerFromSet Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot @param sticker Sticker
func (*Client) RemoveTopChat ¶
func (client *Client) RemoveTopChat(category TopChatCategory, chatID int64) (*Ok, error)
RemoveTopChat Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled @param category Category of frequently used chats @param chatID Chat identifier
func (*Client) ReorderInstalledStickerSets ¶
func (client *Client) ReorderInstalledStickerSets(isMasks bool, stickerSetIDs []JSONInt64) (*Ok, error)
ReorderInstalledStickerSets Changes the order of installed sticker sets @param isMasks Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets @param stickerSetIDs Identifiers of installed sticker sets in the new correct order
func (*Client) ReportChat ¶
func (client *Client) ReportChat(chatID int64, reason ChatReportReason, messageIDs []int64) (*Ok, error)
ReportChat Reports a chat to the Telegram moderators. Supported only for supergroups, channels, or private chats with bots, since other chats can't be checked by moderators @param chatID Chat identifier @param reason The reason for reporting the chat @param messageIDs Identifiers of reported messages, if any
func (*Client) ReportSupergroupSpam ¶
func (client *Client) ReportSupergroupSpam(supergroupID int32, userID int32, messageIDs []int64) (*Ok, error)
ReportSupergroupSpam Reports some messages from a user in a supergroup as spam @param supergroupID Supergroup identifier @param userID User identifier @param messageIDs Identifiers of messages sent in the supergroup by the user. This list must be non-empty
func (*Client) RequestAuthenticationPasswordRecovery ¶
RequestAuthenticationPasswordRecovery Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword
func (*Client) RequestPasswordRecovery ¶
func (client *Client) RequestPasswordRecovery() (*PasswordRecoveryInfo, error)
RequestPasswordRecovery Requests to send a password recovery code to an email address that was previously set up
func (*Client) ResendAuthenticationCode ¶
ResendAuthenticationCode Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the next_code_type of the result is not null
func (*Client) ResendChangePhoneNumberCode ¶
func (client *Client) ResendChangePhoneNumberCode() (*AuthenticationCodeInfo, error)
ResendChangePhoneNumberCode Re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo next_code_type was not null
func (*Client) ResetAllNotificationSettings ¶
ResetAllNotificationSettings Resets all notification settings to their default values. By default, the only muted chats are supergroups, the sound is set to "default" and message previews are shown
func (*Client) ResetNetworkStatistics ¶
ResetNetworkStatistics Resets all network data usage statistics to zero. Can be called before authorization
func (*Client) SearchCallMessages ¶
func (client *Client) SearchCallMessages(fromMessageID int64, limit int32, onlyMissed bool) (*Messages, error)
SearchCallMessages Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library @param fromMessageID Identifier of the message from which to search; use 0 to get results from the beginning @param limit The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached @param onlyMissed If true, returns only messages with missed calls
func (*Client) SearchChatMembers ¶
func (client *Client) SearchChatMembers(chatID int64, query string, limit int32) (*ChatMembers, error)
SearchChatMembers Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels @param chatID Chat identifier @param query Query to search for @param limit The maximum number of users to be returned
func (*Client) SearchChatMessages ¶
func (client *Client) SearchChatMessages(chatID int64, query string, senderUserID int32, fromMessageID int64, offset int32, limit int32, filter SearchMessagesFilter) (*Messages, error)
SearchChatMessages Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query @param chatID Identifier of the chat in which to search messages @param query Query to search for @param senderUserID If not 0, only messages sent by the specified user will be returned. Not supported in secret chats @param fromMessageID Identifier of the message starting from which history must be fetched; use 0 to get results from the beginning @param offset Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached @param filter Filter for message content in the search results
func (*Client) SearchChatRecentLocationMessages ¶
func (client *Client) SearchChatRecentLocationMessages(chatID int64, limit int32) (*Messages, error)
SearchChatRecentLocationMessages Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @param chatID Chat identifier @param limit Maximum number of messages to be returned
func (*Client) SearchChats ¶
SearchChats Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the chat list @param query Query to search for. If the query is empty, returns up to 20 recently found chats @param limit Maximum number of chats to be returned
func (*Client) SearchChatsOnServer ¶
SearchChatsOnServer Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the chat list @param query Query to search for @param limit Maximum number of chats to be returned
func (*Client) SearchContacts ¶
SearchContacts Searches for the specified query in the first names, last names and usernames of the known user contacts @param query Query to search for; can be empty to return all contacts @param limit Maximum number of users to be returned
func (*Client) SearchHashtags ¶
SearchHashtags Searches for recently used hashtags by their prefix @param prefix Hashtag prefix to search for @param limit Maximum number of hashtags to be returned
func (*Client) SearchInstalledStickerSets ¶
func (client *Client) SearchInstalledStickerSets(isMasks bool, query string, limit int32) (*StickerSets, error)
SearchInstalledStickerSets Searches for installed sticker sets by looking for specified query in their title and name @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets @param query Query to search for @param limit Maximum number of sticker sets to return
func (*Client) SearchMessages ¶
func (client *Client) SearchMessages(query string, offsetDate int32, offsetChatID int64, offsetMessageID int64, limit int32) (*Messages, error)
SearchMessages Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). @param query Query to search for @param offsetDate The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the beginning @param offsetChatID The chat identifier of the last found message, or 0 for the first request @param offsetMessageID The message identifier of the last found message, or 0 for the first request @param limit The maximum number of messages to be returned, up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached
func (*Client) SearchPublicChat ¶
SearchPublicChat Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned @param username Username to be resolved
func (*Client) SearchPublicChats ¶
SearchPublicChats Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results @param query Query to search for
func (*Client) SearchSecretMessages ¶
func (client *Client) SearchSecretMessages(chatID int64, query string, fromSearchID JSONInt64, limit int32, filter SearchMessagesFilter) (*FoundMessages, error)
SearchSecretMessages Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library @param chatID Identifier of the chat in which to search. Specify 0 to search in all secret chats @param query Query to search for. If empty, searchChatMessages should be used instead @param fromSearchID The identifier from the result of a previous request, use 0 to get results from the beginning @param limit Maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached @param filter A filter for the content of messages in the search results
func (*Client) SearchStickerSet ¶
func (client *Client) SearchStickerSet(name string) (*StickerSet, error)
SearchStickerSet Searches for a sticker set by its name @param name Name of the sticker set
func (*Client) SearchStickerSets ¶
func (client *Client) SearchStickerSets(query string) (*StickerSets, error)
SearchStickerSets Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results @param query Query to search for
func (*Client) SearchStickers ¶
SearchStickers Searches for stickers from public sticker sets that correspond to a given emoji @param emoji String representation of emoji; must be non-empty @param limit Maximum number of stickers to be returned
func (*Client) Send ¶
func (client *Client) Send(jsonQuery interface{})
Send Sends request to the TDLib client. You can provide string or UpdateData.
func (*Client) SendAndCatch ¶
SendAndCatch Sends request to the TDLib client and catches the result in updates channel. You can provide string or UpdateData.
func (*Client) SendAuthCode ¶
func (client *Client) SendAuthCode(code string) (AuthorizationState, error)
SendAuthCode sends auth code to tdlib
func (*Client) SendAuthPassword ¶
func (client *Client) SendAuthPassword(password string) (AuthorizationState, error)
SendAuthPassword sends two-step verification password (user defined)to tdlib
func (*Client) SendBotStartMessage ¶
func (client *Client) SendBotStartMessage(botUserID int32, chatID int64, parameter string) (*Message, error)
SendBotStartMessage Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message @param botUserID Identifier of the bot @param chatID Identifier of the target chat @param parameter A hidden parameter sent to the bot for deep linking purposes (https://api.telegram.org/bots#deep-linking)
func (*Client) SendCallDebugInformation ¶
SendCallDebugInformation Sends debug information for a call @param callID Call identifier @param debugInformation Debug information in application-specific format
func (*Client) SendCallRating ¶
SendCallRating Sends a call rating @param callID Call identifier @param rating Call rating; 1-5 @param comment An optional user comment if the rating is less than 5
func (*Client) SendChatAction ¶
func (client *Client) SendChatAction(chatID int64, action ChatAction) (*Ok, error)
SendChatAction Sends a notification about user activity in a chat @param chatID Chat identifier @param action The action description
func (*Client) SendChatScreenshotTakenNotification ¶
SendChatScreenshotTakenNotification Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats @param chatID Chat identifier
func (*Client) SendChatSetTTLMessage ¶
SendChatSetTTLMessage Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message @param chatID Chat identifier @param tTL New TTL value, in seconds
func (*Client) SendCustomRequest ¶
func (client *Client) SendCustomRequest(method string, parameters string) (*CustomRequestResult, error)
SendCustomRequest Sends a custom request; for bots only @param method The method name @param parameters JSON-serialized method parameters
func (*Client) SendInlineQueryResultMessage ¶
func (client *Client) SendInlineQueryResultMessage(chatID int64, replyToMessageID int64, disableNotification bool, fromBackground bool, queryID JSONInt64, resultID string) (*Message, error)
SendInlineQueryResultMessage Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message @param chatID Target chat @param replyToMessageID Identifier of a message to reply to or 0 @param disableNotification Pass true to disable notification for the message. Not supported in secret chats @param fromBackground Pass true if the message is sent from background @param queryID Identifier of the inline query @param resultID Identifier of the inline result
func (*Client) SendMessage ¶
func (client *Client) SendMessage(chatID int64, replyToMessageID int64, disableNotification bool, fromBackground bool, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Message, error)
SendMessage Sends a message. Returns the sent message @param chatID Target chat @param replyToMessageID Identifier of the message to reply to or 0 @param disableNotification Pass true to disable notification for the message. Not supported in secret chats @param fromBackground Pass true if the message is sent from the background @param replyMarkup Markup for replying to the message; for bots only @param inputMessageContent The content of the message to be sent
func (*Client) SendMessageAlbum ¶
func (client *Client) SendMessageAlbum(chatID int64, replyToMessageID int64, disableNotification bool, fromBackground bool, inputMessageContents []InputMessageContent) (*Messages, error)
SendMessageAlbum Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages @param chatID Target chat @param replyToMessageID Identifier of a message to reply to or 0 @param disableNotification Pass true to disable notification for the messages. Not supported in secret chats @param fromBackground Pass true if the messages are sent from the background @param inputMessageContents Contents of messages to be sent
func (*Client) SendPaymentForm ¶
func (client *Client) SendPaymentForm(chatID int64, messageID int64, orderInfoID string, shippingOptionID string, credentials InputCredentials) (*PaymentResult, error)
SendPaymentForm Sends a filled-out payment form to the bot for final verification @param chatID Chat identifier of the Invoice message @param messageID Message identifier @param orderInfoID Identifier returned by ValidateOrderInfo, or an empty string @param shippingOptionID Identifier of a chosen shipping option, if applicable @param credentials The credentials chosen by user for payment
func (*Client) SendPhoneNumber ¶
func (client *Client) SendPhoneNumber(phoneNumber string) (AuthorizationState, error)
SendPhoneNumber sends phone number to tdlib
func (*Client) SetAccountTTL ¶
func (client *Client) SetAccountTTL(tTL *AccountTTL) (*Ok, error)
SetAccountTTL Changes the period of inactivity after which the account of the current user will automatically be deleted @param tTL New account TTL
func (*Client) SetAlarm ¶
SetAlarm Succeeds after a specified amount of time has passed. Can be called before authorization @param seconds Number of seconds before the function returns
func (*Client) SetAuthenticationPhoneNumber ¶
func (client *Client) SetAuthenticationPhoneNumber(phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*Ok, error)
SetAuthenticationPhoneNumber Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber @param phoneNumber The phone number of the user, in international format @param allowFlashCall Pass true if the authentication code may be sent via flash call to the specified phone number @param isCurrentPhoneNumber Pass true if the phone number is used on the current device. Ignored if allow_flash_call is false
func (*Client) SetBio ¶
SetBio Changes the bio of the current user @param bio The new value of the user bio; 0-70 characters without line feeds
func (*Client) SetBotUpdatesStatus ¶
func (client *Client) SetBotUpdatesStatus(pendingUpdateCount int32, errorMessage string) (*Ok, error)
SetBotUpdatesStatus Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only @param pendingUpdateCount The number of pending updates @param errorMessage The last error message
func (*Client) SetChatClientData ¶
SetChatClientData Changes client data associated with a chat @param chatID Chat identifier @param clientData New value of client_data
func (*Client) SetChatDraftMessage ¶
func (client *Client) SetChatDraftMessage(chatID int64, draftMessage *DraftMessage) (*Ok, error)
SetChatDraftMessage Changes the draft message in a chat @param chatID Chat identifier @param draftMessage New draft message; may be null
func (*Client) SetChatMemberStatus ¶
func (client *Client) SetChatMemberStatus(chatID int64, userID int32, status ChatMemberStatus) (*Ok, error)
SetChatMemberStatus Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat; instead, use addChatMember. The chat member status will not be changed until it has been synchronized with the server @param chatID Chat identifier @param userID User identifier @param status The new status of the member in the chat
func (*Client) SetChatPhoto ¶
SetChatPhoto Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires administrator rights in basic groups and the appropriate administrator rights in supergroups and channels. The photo will not be changed before request to the server has been completed @param chatID Chat identifier @param photo New chat photo. You can use a zero InputFileId to delete the chat photo. Files that are accessible only by HTTP URL are not acceptable
func (*Client) SetChatTitle ¶
SetChatTitle Changes the chat title. Supported only for basic groups, supergroups and channels. Requires administrator rights in basic groups and the appropriate administrator rights in supergroups and channels. The title will not be changed until the request to the server has been completed @param chatID Chat identifier @param title New title of the chat; 1-255 characters
func (*Client) SetDatabaseEncryptionKey ¶
SetDatabaseEncryptionKey Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain @param newEncryptionKey New encryption key
func (*Client) SetFileGenerationProgress ¶
func (client *Client) SetFileGenerationProgress(generationID JSONInt64, expectedSize int32, localPrefixSize int32) (*Ok, error)
SetFileGenerationProgress The next part of a file was generated @param generationID The identifier of the generation process @param expectedSize Expected size of the generated file, in bytes; 0 if unknown @param localPrefixSize The number of bytes already generated
func (*Client) SetGameScore ¶
func (client *Client) SetGameScore(chatID int64, messageID int64, editMessage bool, userID int32, score int32, force bool) (*Message, error)
SetGameScore Updates the game score of the specified user in the game; for bots only @param chatID The chat to which the message with the game @param messageID Identifier of the message @param editMessage True, if the message should be edited @param userID User identifier @param score The new score @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
func (*Client) SetInlineGameScore ¶
func (client *Client) SetInlineGameScore(inlineMessageID string, editMessage bool, userID int32, score int32, force bool) (*Ok, error)
SetInlineGameScore Updates the game score of the specified user in a game; for bots only @param inlineMessageID Inline message identifier @param editMessage True, if the message should be edited @param userID User identifier @param score The new score @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
func (*Client) SetName ¶
SetName Changes the first and last name of the current user. If something changes, updateUser will be sent @param firstName The new value of the first name for the user; 1-255 characters @param lastName The new value of the optional last name for the user; 0-255 characters
func (*Client) SetNetworkType ¶
func (client *Client) SetNetworkType(typeParam NetworkType) (*Ok, error)
SetNetworkType Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. @param typeParam
func (*Client) SetNotificationSettings ¶
func (client *Client) SetNotificationSettings(scope NotificationSettingsScope, notificationSettings *NotificationSettings) (*Ok, error)
SetNotificationSettings Changes notification settings for a given scope @param scope Scope for which to change the notification settings @param notificationSettings The new notification settings for the given scope
func (*Client) SetOption ¶
func (client *Client) SetOption(name string, value OptionValue) (*Ok, error)
SetOption Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization @param name The name of the option @param value The new value of the option
func (*Client) SetPassword ¶
func (client *Client) SetPassword(oldPassword string, newPassword string, newHint string, setRecoveryEmailAddress bool, newRecoveryEmailAddress string) (*PasswordState, error)
SetPassword Changes the password for the user. If a new recovery email address is specified, then the error EMAIL_UNCONFIRMED is returned and the password change will not be applied until the new recovery email address has been confirmed. The application should periodically call getPasswordState to check whether the new email address has been confirmed @param oldPassword Previous password of the user @param newPassword New password of the user; may be empty to remove the password @param newHint New password hint; may be empty @param setRecoveryEmailAddress Pass true if the recovery email address should be changed @param newRecoveryEmailAddress New recovery email address; may be empty
func (*Client) SetPinnedChats ¶
SetPinnedChats Changes the order of pinned chats @param chatIDs The new list of pinned chats
func (*Client) SetProfilePhoto ¶
SetProfilePhoto Uploads a new profile photo for the current user. If something changes, updateUser will be sent @param photo Profile photo to set. inputFileId and inputFileRemote may still be unsupported
func (*Client) SetProxy ¶
SetProxy Sets the proxy server for network requests. Can be called before authorization @param proxy Proxy server to use. Specify null to remove the proxy server
func (*Client) SetRecoveryEmailAddress ¶
func (client *Client) SetRecoveryEmailAddress(password string, newRecoveryEmailAddress string) (*PasswordState, error)
SetRecoveryEmailAddress Changes the recovery email address of the user. If a new recovery email address is specified, then the error EMAIL_UNCONFIRMED is returned and the email address will not be changed until the new email has been confirmed. The application should periodically call getPasswordState to check whether the email address has been confirmed. @param password @param newRecoveryEmailAddress
func (*Client) SetStickerPositionInSet ¶
SetStickerPositionInSet Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot @param sticker Sticker @param position New position of the sticker in the set, zero-based
func (*Client) SetSupergroupDescription ¶
SetSupergroupDescription Changes information about a supergroup or channel; requires appropriate administrator rights @param supergroupID Identifier of the supergroup or channel @param description
func (*Client) SetSupergroupStickerSet ¶
func (client *Client) SetSupergroupStickerSet(supergroupID int32, stickerSetID JSONInt64) (*Ok, error)
SetSupergroupStickerSet Changes the sticker set of a supergroup; requires appropriate rights in the supergroup @param supergroupID Identifier of the supergroup @param stickerSetID New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set
func (*Client) SetSupergroupUsername ¶
SetSupergroupUsername Changes the username of a supergroup or channel, requires creator privileges in the supergroup or channel @param supergroupID Identifier of the supergroup or channel @param username New value of the username. Use an empty string to remove the username
func (*Client) SetTdlibParameters ¶
func (client *Client) SetTdlibParameters(parameters *TdlibParameters) (*Ok, error)
SetTdlibParameters Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters @param parameters Parameters
func (*Client) SetUserPrivacySettingRules ¶
func (client *Client) SetUserPrivacySettingRules(setting UserPrivacySetting, rules *UserPrivacySettingRules) (*Ok, error)
SetUserPrivacySettingRules Changes user privacy settings @param setting The privacy setting @param rules The new privacy rules
func (*Client) SetUsername ¶
SetUsername Changes the username of the current user. If something changes, updateUser will be sent @param username The new value of the username. Use an empty string to remove the username
func (*Client) TerminateAllOtherSessions ¶
TerminateAllOtherSessions Terminates all other sessions of the current user
func (*Client) TerminateSession ¶
TerminateSession Terminates a session of the current user @param sessionID Session identifier
func (*Client) TestCallBytes ¶
TestCallBytes Returns the received bytes; for testing only @param x Bytes to return
func (*Client) TestCallEmpty ¶
TestCallEmpty Does nothing; for testing only
func (*Client) TestCallString ¶
func (client *Client) TestCallString(x string) (*TestString, error)
TestCallString Returns the received string; for testing only @param x String to return
func (*Client) TestCallVectorInt ¶
func (client *Client) TestCallVectorInt(x []int32) (*TestVectorInt, error)
TestCallVectorInt Returns the received vector of numbers; for testing only @param x Vector of numbers to return
func (*Client) TestCallVectorIntObject ¶
func (client *Client) TestCallVectorIntObject(x []TestInt) (*TestVectorIntObject, error)
TestCallVectorIntObject Returns the received vector of objects containing a number; for testing only @param x Vector of objects to return
func (*Client) TestCallVectorString ¶
func (client *Client) TestCallVectorString(x []string) (*TestVectorString, error)
TestCallVectorString For testing only request. Returns the received vector of strings; for testing only @param x Vector of strings to return
func (*Client) TestCallVectorStringObject ¶
func (client *Client) TestCallVectorStringObject(x []TestString) (*TestVectorStringObject, error)
TestCallVectorStringObject Returns the received vector of objects containing a string; for testing only @param x Vector of objects to return
func (*Client) TestGetDifference ¶
TestGetDifference Forces an updates.getDifference call to the Telegram servers; for testing only
func (*Client) TestNetwork ¶
TestNetwork Sends a simple network request to the Telegram servers; for testing only
func (*Client) TestSquareInt ¶
TestSquareInt Returns the squared received number; for testing only @param x Number to square
func (*Client) TestUseUpdate ¶
TestUseUpdate Does nothing and ensures that the Update object is used; for testing only
func (*Client) ToggleBasicGroupAdministrators ¶
func (client *Client) ToggleBasicGroupAdministrators(basicGroupID int32, everyoneIsAdministrator bool) (*Ok, error)
ToggleBasicGroupAdministrators Toggles the "All members are admins" setting in basic groups; requires creator privileges in the group @param basicGroupID Identifier of the basic group @param everyoneIsAdministrator New value of everyone_is_administrator
func (*Client) ToggleChatIsPinned ¶
ToggleChatIsPinned Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max") non-secret chats and the same number of secret chats @param chatID Chat identifier @param isPinned New value of is_pinned
func (*Client) ToggleSupergroupInvites ¶
func (client *Client) ToggleSupergroupInvites(supergroupID int32, anyoneCanInvite bool) (*Ok, error)
ToggleSupergroupInvites Toggles whether all members of a supergroup can add new members; requires appropriate administrator rights in the supergroup. @param supergroupID Identifier of the supergroup @param anyoneCanInvite New value of anyone_can_invite
func (*Client) ToggleSupergroupIsAllHistoryAvailable ¶
func (client *Client) ToggleSupergroupIsAllHistoryAvailable(supergroupID int32, isAllHistoryAvailable bool) (*Ok, error)
ToggleSupergroupIsAllHistoryAvailable Toggles whether the message history of a supergroup is available to new members; requires appropriate administrator rights in the supergroup. @param supergroupID The identifier of the supergroup @param isAllHistoryAvailable The new value of is_all_history_available
func (*Client) ToggleSupergroupSignMessages ¶
func (client *Client) ToggleSupergroupSignMessages(supergroupID int32, signMessages bool) (*Ok, error)
ToggleSupergroupSignMessages Toggles sender signatures messages sent in a channel; requires appropriate administrator rights in the channel. @param supergroupID Identifier of the channel @param signMessages New value of sign_messages
func (*Client) UnblockUser ¶
UnblockUser Removes a user from the blacklist @param userID User identifier
func (*Client) UnpinSupergroupMessage ¶
UnpinSupergroupMessage Removes the pinned message from a supergroup or channel; requires appropriate administrator rights in the supergroup or channel @param supergroupID Identifier of the supergroup or channel
func (*Client) UpgradeBasicGroupChatToSupergroupChat ¶
UpgradeBasicGroupChatToSupergroupChat Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom. Deactivates the original basic group @param chatID Identifier of the chat to upgrade
func (*Client) UploadFile ¶
UploadFile Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message @param file File to upload @param fileType File type @param priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first
func (*Client) UploadStickerFile ¶
UploadStickerFile Uploads a PNG image with a sticker; for bots only; returns the uploaded file @param userID Sticker file owner @param pngSticker PNG image with the sticker; must be up to 512 kB in size and fit in 512x512 square
func (*Client) ValidateOrderInfo ¶
func (client *Client) ValidateOrderInfo(chatID int64, messageID int64, orderInfo *OrderInfo, allowSave bool) (*ValidatedOrderInfo, error)
ValidateOrderInfo Validates the order information provided by a user and returns the available shipping options for a flexible invoice @param chatID Chat identifier of the Invoice message @param messageID Message identifier @param orderInfo The order information, provided by the user @param allowSave True, if the order information can be saved
func (*Client) ViewMessages ¶
ViewMessages This method should be called if messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels) @param chatID Chat identifier @param messageIDs The identifiers of the messages being viewed @param forceRead True, if messages in closed chats should be marked as read
type Config ¶
type Config struct { APIID string // Application identifier for Telegram API access, which can be obtained at https://my.telegram.org --- must be non-empty.. APIHash string // Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org --- must be non-empty.. SystemLanguageCode string // IETF language tag of the user's operating system language; must be non-empty. DeviceModel string // Model of the device the application is being run on; must be non-empty. SystemVersion string // Version of the operating system the application is being run on; must be non-empty. ApplicationVersion string // Application version; must be non-empty. // Optional fields UseTestDataCenter bool // if set to true, the Telegram test environment will be used instead of the production environment. DatabaseDirectory string // The path to the directory for the persistent database; if empty, the current working directory will be used. FileDirectory string // The path to the directory for storing files; if empty, database_directory will be used. UseFileDatabase bool // If set to true, information about downloaded and uploaded files will be saved between application restarts. UseChatInfoDatabase bool // If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database. UseMessageDatabase bool // If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database. UseSecretChats bool // If set to true, support for secret chats will be enabled. EnableStorageOptimizer bool // If set to true, old files will automatically be deleted. IgnoreFileNames bool // If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name. SocksProxy *ProxySocks5 // Pass a ProxySocks5 if you need socks5 proxy. Username and password can be nil }
Config holds tdlibParameters
type ConnectedWebsite ¶
type ConnectedWebsite struct { ID JSONInt64 `json:"id"` // Website identifier DomainName string `json:"domain_name"` // The domain name of the website BotUserID int32 `json:"bot_user_id"` // User identifier of a bot linked with the website Browser string `json:"browser"` // The version of a browser used to log in Platform string `json:"platform"` // Operating system the browser is running on LogInDate int32 `json:"log_in_date"` // Point in time (Unix timestamp) when the user was logged in LastActiveDate int32 `json:"last_active_date"` // Point in time (Unix timestamp) when obtained authorization was last used IP string `json:"ip"` // IP address from which the user was logged in, in human-readable format Location string `json:"location"` // Human-readable description of a country and a region, from which the user was logged in, based on the IP address // contains filtered or unexported fields }
ConnectedWebsite Contains information about one website the current user is logged in with Telegram
func NewConnectedWebsite ¶
func NewConnectedWebsite(iD JSONInt64, domainName string, botUserID int32, browser string, platform string, logInDate int32, lastActiveDate int32, iP string, location string) *ConnectedWebsite
NewConnectedWebsite creates a new ConnectedWebsite
@param iD Website identifier @param domainName The domain name of the website @param botUserID User identifier of a bot linked with the website @param browser The version of a browser used to log in @param platform Operating system the browser is running on @param logInDate Point in time (Unix timestamp) when the user was logged in @param lastActiveDate Point in time (Unix timestamp) when obtained authorization was last used @param iP IP address from which the user was logged in, in human-readable format @param location Human-readable description of a country and a region, from which the user was logged in, based on the IP address
func (*ConnectedWebsite) MessageType ¶
func (connectedWebsite *ConnectedWebsite) MessageType() string
MessageType return the string telegram-type of ConnectedWebsite
type ConnectedWebsites ¶
type ConnectedWebsites struct { Websites []ConnectedWebsite `json:"websites"` // List of connected websites // contains filtered or unexported fields }
ConnectedWebsites Contains a list of websites the current user is logged in with Telegram
func NewConnectedWebsites ¶
func NewConnectedWebsites(websites []ConnectedWebsite) *ConnectedWebsites
NewConnectedWebsites creates a new ConnectedWebsites
@param websites List of connected websites
func (*ConnectedWebsites) MessageType ¶
func (connectedWebsites *ConnectedWebsites) MessageType() string
MessageType return the string telegram-type of ConnectedWebsites
type ConnectionState ¶
type ConnectionState interface {
GetConnectionStateEnum() ConnectionStateEnum
}
ConnectionState Describes the current state of the connection to Telegram servers
type ConnectionStateConnecting ¶
type ConnectionStateConnecting struct {
// contains filtered or unexported fields
}
ConnectionStateConnecting Currently establishing a connection to the Telegram servers
func NewConnectionStateConnecting ¶
func NewConnectionStateConnecting() *ConnectionStateConnecting
NewConnectionStateConnecting creates a new ConnectionStateConnecting
func (*ConnectionStateConnecting) GetConnectionStateEnum ¶
func (connectionStateConnecting *ConnectionStateConnecting) GetConnectionStateEnum() ConnectionStateEnum
GetConnectionStateEnum return the enum type of this object
func (*ConnectionStateConnecting) MessageType ¶
func (connectionStateConnecting *ConnectionStateConnecting) MessageType() string
MessageType return the string telegram-type of ConnectionStateConnecting
type ConnectionStateConnectingToProxy ¶
type ConnectionStateConnectingToProxy struct {
// contains filtered or unexported fields
}
ConnectionStateConnectingToProxy Currently establishing a connection with a proxy server
func NewConnectionStateConnectingToProxy ¶
func NewConnectionStateConnectingToProxy() *ConnectionStateConnectingToProxy
NewConnectionStateConnectingToProxy creates a new ConnectionStateConnectingToProxy
func (*ConnectionStateConnectingToProxy) GetConnectionStateEnum ¶
func (connectionStateConnectingToProxy *ConnectionStateConnectingToProxy) GetConnectionStateEnum() ConnectionStateEnum
GetConnectionStateEnum return the enum type of this object
func (*ConnectionStateConnectingToProxy) MessageType ¶
func (connectionStateConnectingToProxy *ConnectionStateConnectingToProxy) MessageType() string
MessageType return the string telegram-type of ConnectionStateConnectingToProxy
type ConnectionStateEnum ¶
type ConnectionStateEnum string
ConnectionStateEnum Alias for abstract ConnectionState 'Sub-Classes', used as constant-enum here
const ( ConnectionStateWaitingForNetworkType ConnectionStateEnum = "connectionStateWaitingForNetwork" ConnectionStateConnectingToProxyType ConnectionStateEnum = "connectionStateConnectingToProxy" ConnectionStateConnectingType ConnectionStateEnum = "connectionStateConnecting" ConnectionStateUpdatingType ConnectionStateEnum = "connectionStateUpdating" ConnectionStateReadyType ConnectionStateEnum = "connectionStateReady" )
ConnectionState enums
type ConnectionStateReady ¶
type ConnectionStateReady struct {
// contains filtered or unexported fields
}
ConnectionStateReady There is a working connection to the Telegram servers
func NewConnectionStateReady ¶
func NewConnectionStateReady() *ConnectionStateReady
NewConnectionStateReady creates a new ConnectionStateReady
func (*ConnectionStateReady) GetConnectionStateEnum ¶
func (connectionStateReady *ConnectionStateReady) GetConnectionStateEnum() ConnectionStateEnum
GetConnectionStateEnum return the enum type of this object
func (*ConnectionStateReady) MessageType ¶
func (connectionStateReady *ConnectionStateReady) MessageType() string
MessageType return the string telegram-type of ConnectionStateReady
type ConnectionStateUpdating ¶
type ConnectionStateUpdating struct {
// contains filtered or unexported fields
}
ConnectionStateUpdating Downloading data received while the client was offline
func NewConnectionStateUpdating ¶
func NewConnectionStateUpdating() *ConnectionStateUpdating
NewConnectionStateUpdating creates a new ConnectionStateUpdating
func (*ConnectionStateUpdating) GetConnectionStateEnum ¶
func (connectionStateUpdating *ConnectionStateUpdating) GetConnectionStateEnum() ConnectionStateEnum
GetConnectionStateEnum return the enum type of this object
func (*ConnectionStateUpdating) MessageType ¶
func (connectionStateUpdating *ConnectionStateUpdating) MessageType() string
MessageType return the string telegram-type of ConnectionStateUpdating
type ConnectionStateWaitingForNetwork ¶
type ConnectionStateWaitingForNetwork struct {
// contains filtered or unexported fields
}
ConnectionStateWaitingForNetwork Currently waiting for the network to become available. Use SetNetworkType to change the available network type
func NewConnectionStateWaitingForNetwork ¶
func NewConnectionStateWaitingForNetwork() *ConnectionStateWaitingForNetwork
NewConnectionStateWaitingForNetwork creates a new ConnectionStateWaitingForNetwork
func (*ConnectionStateWaitingForNetwork) GetConnectionStateEnum ¶
func (connectionStateWaitingForNetwork *ConnectionStateWaitingForNetwork) GetConnectionStateEnum() ConnectionStateEnum
GetConnectionStateEnum return the enum type of this object
func (*ConnectionStateWaitingForNetwork) MessageType ¶
func (connectionStateWaitingForNetwork *ConnectionStateWaitingForNetwork) MessageType() string
MessageType return the string telegram-type of ConnectionStateWaitingForNetwork
type Contact ¶
type Contact struct { PhoneNumber string `json:"phone_number"` // Phone number of the user FirstName string `json:"first_name"` // First name of the user; 1-255 characters in length LastName string `json:"last_name"` // Last name of the user UserID int32 `json:"user_id"` // Identifier of the user, if known; otherwise 0 // contains filtered or unexported fields }
Contact Describes a user contact
func NewContact ¶
NewContact creates a new Contact
@param phoneNumber Phone number of the user @param firstName First name of the user; 1-255 characters in length @param lastName Last name of the user @param userID Identifier of the user, if known; otherwise 0
func (*Contact) MessageType ¶
MessageType return the string telegram-type of Contact
type Count ¶
type Count struct { Count int32 `json:"count"` // Count // contains filtered or unexported fields }
Count Contains a counter
func (*Count) MessageType ¶
MessageType return the string telegram-type of Count
type CustomRequestResult ¶
type CustomRequestResult struct { Result string `json:"result"` // A JSON-serialized result // contains filtered or unexported fields }
CustomRequestResult Contains the result of a custom request
func NewCustomRequestResult ¶
func NewCustomRequestResult(result string) *CustomRequestResult
NewCustomRequestResult creates a new CustomRequestResult
@param result A JSON-serialized result
func (*CustomRequestResult) MessageType ¶
func (customRequestResult *CustomRequestResult) MessageType() string
MessageType return the string telegram-type of CustomRequestResult
type DeviceToken ¶
type DeviceToken interface {
GetDeviceTokenEnum() DeviceTokenEnum
}
DeviceToken Represents a data needed to subscribe for push notifications. To use specific push notification service, you must specify the correct application platform and upload valid server authentication data at https://my.telegram.org
type DeviceTokenApplePush ¶
type DeviceTokenApplePush struct { DeviceToken string `json:"device_token"` // Device token, may be empty to de-register a device IsAppSandbox bool `json:"is_app_sandbox"` // True, if App Sandbox is enabled // contains filtered or unexported fields }
DeviceTokenApplePush A token for Apple Push Notification service
func NewDeviceTokenApplePush ¶
func NewDeviceTokenApplePush(deviceToken string, isAppSandbox bool) *DeviceTokenApplePush
NewDeviceTokenApplePush creates a new DeviceTokenApplePush
@param deviceToken Device token, may be empty to de-register a device @param isAppSandbox True, if App Sandbox is enabled
func (*DeviceTokenApplePush) GetDeviceTokenEnum ¶
func (deviceTokenApplePush *DeviceTokenApplePush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenApplePush) MessageType ¶
func (deviceTokenApplePush *DeviceTokenApplePush) MessageType() string
MessageType return the string telegram-type of DeviceTokenApplePush
type DeviceTokenApplePushVoIP ¶
type DeviceTokenApplePushVoIP struct { DeviceToken string `json:"device_token"` // Device token, may be empty to de-register a device IsAppSandbox bool `json:"is_app_sandbox"` // True, if App Sandbox is enabled // contains filtered or unexported fields }
DeviceTokenApplePushVoIP A token for Apple Push Notification service VoIP notifications
func NewDeviceTokenApplePushVoIP ¶
func NewDeviceTokenApplePushVoIP(deviceToken string, isAppSandbox bool) *DeviceTokenApplePushVoIP
NewDeviceTokenApplePushVoIP creates a new DeviceTokenApplePushVoIP
@param deviceToken Device token, may be empty to de-register a device @param isAppSandbox True, if App Sandbox is enabled
func (*DeviceTokenApplePushVoIP) GetDeviceTokenEnum ¶
func (deviceTokenApplePushVoIP *DeviceTokenApplePushVoIP) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenApplePushVoIP) MessageType ¶
func (deviceTokenApplePushVoIP *DeviceTokenApplePushVoIP) MessageType() string
MessageType return the string telegram-type of DeviceTokenApplePushVoIP
type DeviceTokenBlackBerryPush ¶
type DeviceTokenBlackBerryPush struct { Token string `json:"token"` // Token, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenBlackBerryPush A token for BlackBerry Push Service
func NewDeviceTokenBlackBerryPush ¶
func NewDeviceTokenBlackBerryPush(token string) *DeviceTokenBlackBerryPush
NewDeviceTokenBlackBerryPush creates a new DeviceTokenBlackBerryPush
@param token Token, may be empty to de-register a device
func (*DeviceTokenBlackBerryPush) GetDeviceTokenEnum ¶
func (deviceTokenBlackBerryPush *DeviceTokenBlackBerryPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenBlackBerryPush) MessageType ¶
func (deviceTokenBlackBerryPush *DeviceTokenBlackBerryPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenBlackBerryPush
type DeviceTokenEnum ¶
type DeviceTokenEnum string
DeviceTokenEnum Alias for abstract DeviceToken 'Sub-Classes', used as constant-enum here
const ( DeviceTokenGoogleCloudMessagingType DeviceTokenEnum = "deviceTokenGoogleCloudMessaging" DeviceTokenApplePushType DeviceTokenEnum = "deviceTokenApplePush" DeviceTokenApplePushVoIPType DeviceTokenEnum = "deviceTokenApplePushVoIP" DeviceTokenWindowsPushType DeviceTokenEnum = "deviceTokenWindowsPush" DeviceTokenMicrosoftPushType DeviceTokenEnum = "deviceTokenMicrosoftPush" DeviceTokenMicrosoftPushVoIPType DeviceTokenEnum = "deviceTokenMicrosoftPushVoIP" DeviceTokenWebPushType DeviceTokenEnum = "deviceTokenWebPush" DeviceTokenSimplePushType DeviceTokenEnum = "deviceTokenSimplePush" DeviceTokenUbuntuPushType DeviceTokenEnum = "deviceTokenUbuntuPush" DeviceTokenBlackBerryPushType DeviceTokenEnum = "deviceTokenBlackBerryPush" DeviceTokenTizenPushType DeviceTokenEnum = "deviceTokenTizenPush" )
DeviceToken enums
type DeviceTokenGoogleCloudMessaging ¶
type DeviceTokenGoogleCloudMessaging struct { Token string `json:"token"` // Device registration token, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenGoogleCloudMessaging A token for Google Cloud Messaging
func NewDeviceTokenGoogleCloudMessaging ¶
func NewDeviceTokenGoogleCloudMessaging(token string) *DeviceTokenGoogleCloudMessaging
NewDeviceTokenGoogleCloudMessaging creates a new DeviceTokenGoogleCloudMessaging
@param token Device registration token, may be empty to de-register a device
func (*DeviceTokenGoogleCloudMessaging) GetDeviceTokenEnum ¶
func (deviceTokenGoogleCloudMessaging *DeviceTokenGoogleCloudMessaging) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenGoogleCloudMessaging) MessageType ¶
func (deviceTokenGoogleCloudMessaging *DeviceTokenGoogleCloudMessaging) MessageType() string
MessageType return the string telegram-type of DeviceTokenGoogleCloudMessaging
type DeviceTokenMicrosoftPush ¶
type DeviceTokenMicrosoftPush struct { ChannelURI string `json:"channel_uri"` // Push notification channel URI, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenMicrosoftPush A token for Microsoft Push Notification Service
func NewDeviceTokenMicrosoftPush ¶
func NewDeviceTokenMicrosoftPush(channelURI string) *DeviceTokenMicrosoftPush
NewDeviceTokenMicrosoftPush creates a new DeviceTokenMicrosoftPush
@param channelURI Push notification channel URI, may be empty to de-register a device
func (*DeviceTokenMicrosoftPush) GetDeviceTokenEnum ¶
func (deviceTokenMicrosoftPush *DeviceTokenMicrosoftPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenMicrosoftPush) MessageType ¶
func (deviceTokenMicrosoftPush *DeviceTokenMicrosoftPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenMicrosoftPush
type DeviceTokenMicrosoftPushVoIP ¶
type DeviceTokenMicrosoftPushVoIP struct { ChannelURI string `json:"channel_uri"` // Push notification channel URI, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenMicrosoftPushVoIP A token for Microsoft Push Notification Service VoIP channel
func NewDeviceTokenMicrosoftPushVoIP ¶
func NewDeviceTokenMicrosoftPushVoIP(channelURI string) *DeviceTokenMicrosoftPushVoIP
NewDeviceTokenMicrosoftPushVoIP creates a new DeviceTokenMicrosoftPushVoIP
@param channelURI Push notification channel URI, may be empty to de-register a device
func (*DeviceTokenMicrosoftPushVoIP) GetDeviceTokenEnum ¶
func (deviceTokenMicrosoftPushVoIP *DeviceTokenMicrosoftPushVoIP) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenMicrosoftPushVoIP) MessageType ¶
func (deviceTokenMicrosoftPushVoIP *DeviceTokenMicrosoftPushVoIP) MessageType() string
MessageType return the string telegram-type of DeviceTokenMicrosoftPushVoIP
type DeviceTokenSimplePush ¶
type DeviceTokenSimplePush struct { Endpoint string `json:"endpoint"` // Absolute URL exposed by the push service where the application server can send push messages, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenSimplePush A token for Simple Push API for Firefox OS
func NewDeviceTokenSimplePush ¶
func NewDeviceTokenSimplePush(endpoint string) *DeviceTokenSimplePush
NewDeviceTokenSimplePush creates a new DeviceTokenSimplePush
@param endpoint Absolute URL exposed by the push service where the application server can send push messages, may be empty to de-register a device
func (*DeviceTokenSimplePush) GetDeviceTokenEnum ¶
func (deviceTokenSimplePush *DeviceTokenSimplePush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenSimplePush) MessageType ¶
func (deviceTokenSimplePush *DeviceTokenSimplePush) MessageType() string
MessageType return the string telegram-type of DeviceTokenSimplePush
type DeviceTokenTizenPush ¶
type DeviceTokenTizenPush struct { RegID string `json:"reg_id"` // Push service registration identifier, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenTizenPush A token for Tizen Push Service
func NewDeviceTokenTizenPush ¶
func NewDeviceTokenTizenPush(regID string) *DeviceTokenTizenPush
NewDeviceTokenTizenPush creates a new DeviceTokenTizenPush
@param regID Push service registration identifier, may be empty to de-register a device
func (*DeviceTokenTizenPush) GetDeviceTokenEnum ¶
func (deviceTokenTizenPush *DeviceTokenTizenPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenTizenPush) MessageType ¶
func (deviceTokenTizenPush *DeviceTokenTizenPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenTizenPush
type DeviceTokenUbuntuPush ¶
type DeviceTokenUbuntuPush struct { Token string `json:"token"` // Token, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenUbuntuPush A token for Ubuntu Push Client service
func NewDeviceTokenUbuntuPush ¶
func NewDeviceTokenUbuntuPush(token string) *DeviceTokenUbuntuPush
NewDeviceTokenUbuntuPush creates a new DeviceTokenUbuntuPush
@param token Token, may be empty to de-register a device
func (*DeviceTokenUbuntuPush) GetDeviceTokenEnum ¶
func (deviceTokenUbuntuPush *DeviceTokenUbuntuPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenUbuntuPush) MessageType ¶
func (deviceTokenUbuntuPush *DeviceTokenUbuntuPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenUbuntuPush
type DeviceTokenWebPush ¶
type DeviceTokenWebPush struct { Endpoint string `json:"endpoint"` // Absolute URL exposed by the push service where the application server can send push messages, may be empty to de-register a device P256dhBase64url string `json:"p256dh_base64url"` // Base64url-encoded P-256 elliptic curve Diffie-Hellman public key AuthBase64url string `json:"auth_base64url"` // Base64url-encoded authentication secret // contains filtered or unexported fields }
DeviceTokenWebPush A token for web Push API
func NewDeviceTokenWebPush ¶
func NewDeviceTokenWebPush(endpoint string, p256dhBase64url string, authBase64url string) *DeviceTokenWebPush
NewDeviceTokenWebPush creates a new DeviceTokenWebPush
@param endpoint Absolute URL exposed by the push service where the application server can send push messages, may be empty to de-register a device @param p256dhBase64url Base64url-encoded P-256 elliptic curve Diffie-Hellman public key @param authBase64url Base64url-encoded authentication secret
func (*DeviceTokenWebPush) GetDeviceTokenEnum ¶
func (deviceTokenWebPush *DeviceTokenWebPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenWebPush) MessageType ¶
func (deviceTokenWebPush *DeviceTokenWebPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenWebPush
type DeviceTokenWindowsPush ¶
type DeviceTokenWindowsPush struct { AccessToken string `json:"access_token"` // The access token that will be used to send notifications, may be empty to de-register a device // contains filtered or unexported fields }
DeviceTokenWindowsPush A token for Windows Push Notification Services
func NewDeviceTokenWindowsPush ¶
func NewDeviceTokenWindowsPush(accessToken string) *DeviceTokenWindowsPush
NewDeviceTokenWindowsPush creates a new DeviceTokenWindowsPush
@param accessToken The access token that will be used to send notifications, may be empty to de-register a device
func (*DeviceTokenWindowsPush) GetDeviceTokenEnum ¶
func (deviceTokenWindowsPush *DeviceTokenWindowsPush) GetDeviceTokenEnum() DeviceTokenEnum
GetDeviceTokenEnum return the enum type of this object
func (*DeviceTokenWindowsPush) MessageType ¶
func (deviceTokenWindowsPush *DeviceTokenWindowsPush) MessageType() string
MessageType return the string telegram-type of DeviceTokenWindowsPush
type Document ¶
type Document struct { FileName string `json:"file_name"` // Original name of the file; as defined by the sender MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender Thumbnail *PhotoSize `json:"thumbnail"` // Document thumbnail; as defined by the sender; may be null Document *File `json:"document"` // File containing the document // contains filtered or unexported fields }
Document Describes a document of any type
func NewDocument ¶
NewDocument creates a new Document
@param fileName Original name of the file; as defined by the sender @param mimeType MIME type of the file; as defined by the sender @param thumbnail Document thumbnail; as defined by the sender; may be null @param document File containing the document
func (*Document) MessageType ¶
MessageType return the string telegram-type of Document
type DraftMessage ¶
type DraftMessage struct { ReplyToMessageID int64 `json:"reply_to_message_id"` // Identifier of the message to reply to; 0 if none InputMessageText InputMessageContent `json:"input_message_text"` // Content of the message draft; this should always be of type inputMessageText // contains filtered or unexported fields }
DraftMessage Contains information about a message draft
func NewDraftMessage ¶
func NewDraftMessage(replyToMessageID int64, inputMessageText InputMessageContent) *DraftMessage
NewDraftMessage creates a new DraftMessage
@param replyToMessageID Identifier of the message to reply to; 0 if none @param inputMessageText Content of the message draft; this should always be of type inputMessageText
func (*DraftMessage) MessageType ¶
func (draftMessage *DraftMessage) MessageType() string
MessageType return the string telegram-type of DraftMessage
func (*DraftMessage) UnmarshalJSON ¶
func (draftMessage *DraftMessage) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type Error ¶
type Error struct { Code int32 `json:"code"` // Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user Message string `json:"message"` // Error message; subject to future changes // contains filtered or unexported fields }
Error An object of this type can be returned on every function call, in case of an error
func NewError ¶
NewError creates a new Error
@param code Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user @param message Error message; subject to future changes
func (*Error) MessageType ¶
MessageType return the string telegram-type of Error
type EventFilterFunc ¶
EventFilterFunc used to filter out unwanted messages in receiver channels
type EventReceiver ¶
type EventReceiver struct { Instance TdMessage Chan chan TdMessage FilterFunc EventFilterFunc }
EventReceiver used to retreive updates from tdlib to user
type File ¶
type File struct { ID int32 `json:"id"` // Unique file identifier Size int32 `json:"size"` // File size; 0 if unknown ExpectedSize int32 `json:"expected_size"` // Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress Local *LocalFile `json:"local"` // Information about the local copy of the file Remote *RemoteFile `json:"remote"` // Information about the remote copy of the file // contains filtered or unexported fields }
File Represents a file
func NewFile ¶
NewFile creates a new File
@param iD Unique file identifier @param size File size; 0 if unknown @param expectedSize Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress @param local Information about the local copy of the file @param remote Information about the remote copy of the file
func (*File) MessageType ¶
MessageType return the string telegram-type of File
type FileType ¶
type FileType interface {
GetFileTypeEnum() FileTypeEnum
}
FileType Represents the type of a file
type FileTypeAnimation ¶
type FileTypeAnimation struct {
// contains filtered or unexported fields
}
FileTypeAnimation The file is an animation
func NewFileTypeAnimation ¶
func NewFileTypeAnimation() *FileTypeAnimation
NewFileTypeAnimation creates a new FileTypeAnimation
func (*FileTypeAnimation) GetFileTypeEnum ¶
func (fileTypeAnimation *FileTypeAnimation) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeAnimation) MessageType ¶
func (fileTypeAnimation *FileTypeAnimation) MessageType() string
MessageType return the string telegram-type of FileTypeAnimation
type FileTypeAudio ¶
type FileTypeAudio struct {
// contains filtered or unexported fields
}
FileTypeAudio The file is an audio file
func NewFileTypeAudio ¶
func NewFileTypeAudio() *FileTypeAudio
NewFileTypeAudio creates a new FileTypeAudio
func (*FileTypeAudio) GetFileTypeEnum ¶
func (fileTypeAudio *FileTypeAudio) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeAudio) MessageType ¶
func (fileTypeAudio *FileTypeAudio) MessageType() string
MessageType return the string telegram-type of FileTypeAudio
type FileTypeDocument ¶
type FileTypeDocument struct {
// contains filtered or unexported fields
}
FileTypeDocument The file is a document
func NewFileTypeDocument ¶
func NewFileTypeDocument() *FileTypeDocument
NewFileTypeDocument creates a new FileTypeDocument
func (*FileTypeDocument) GetFileTypeEnum ¶
func (fileTypeDocument *FileTypeDocument) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeDocument) MessageType ¶
func (fileTypeDocument *FileTypeDocument) MessageType() string
MessageType return the string telegram-type of FileTypeDocument
type FileTypeEnum ¶
type FileTypeEnum string
FileTypeEnum Alias for abstract FileType 'Sub-Classes', used as constant-enum here
const ( FileTypeNoneType FileTypeEnum = "fileTypeNone" FileTypeAnimationType FileTypeEnum = "fileTypeAnimation" FileTypeAudioType FileTypeEnum = "fileTypeAudio" FileTypeDocumentType FileTypeEnum = "fileTypeDocument" FileTypePhotoType FileTypeEnum = "fileTypePhoto" FileTypeProfilePhotoType FileTypeEnum = "fileTypeProfilePhoto" FileTypeSecretType FileTypeEnum = "fileTypeSecret" FileTypeStickerType FileTypeEnum = "fileTypeSticker" FileTypeThumbnailType FileTypeEnum = "fileTypeThumbnail" FileTypeUnknownType FileTypeEnum = "fileTypeUnknown" FileTypeVideoType FileTypeEnum = "fileTypeVideo" FileTypeVideoNoteType FileTypeEnum = "fileTypeVideoNote" FileTypeVoiceNoteType FileTypeEnum = "fileTypeVoiceNote" FileTypeWallpaperType FileTypeEnum = "fileTypeWallpaper" FileTypeSecretThumbnailType FileTypeEnum = "fileTypeSecretThumbnail" )
FileType enums
type FileTypeNone ¶
type FileTypeNone struct {
// contains filtered or unexported fields
}
FileTypeNone The data is not a file
func NewFileTypeNone ¶
func NewFileTypeNone() *FileTypeNone
NewFileTypeNone creates a new FileTypeNone
func (*FileTypeNone) GetFileTypeEnum ¶
func (fileTypeNone *FileTypeNone) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeNone) MessageType ¶
func (fileTypeNone *FileTypeNone) MessageType() string
MessageType return the string telegram-type of FileTypeNone
type FileTypePhoto ¶
type FileTypePhoto struct {
// contains filtered or unexported fields
}
FileTypePhoto The file is a photo
func NewFileTypePhoto ¶
func NewFileTypePhoto() *FileTypePhoto
NewFileTypePhoto creates a new FileTypePhoto
func (*FileTypePhoto) GetFileTypeEnum ¶
func (fileTypePhoto *FileTypePhoto) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypePhoto) MessageType ¶
func (fileTypePhoto *FileTypePhoto) MessageType() string
MessageType return the string telegram-type of FileTypePhoto
type FileTypeProfilePhoto ¶
type FileTypeProfilePhoto struct {
// contains filtered or unexported fields
}
FileTypeProfilePhoto The file is a profile photo
func NewFileTypeProfilePhoto ¶
func NewFileTypeProfilePhoto() *FileTypeProfilePhoto
NewFileTypeProfilePhoto creates a new FileTypeProfilePhoto
func (*FileTypeProfilePhoto) GetFileTypeEnum ¶
func (fileTypeProfilePhoto *FileTypeProfilePhoto) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeProfilePhoto) MessageType ¶
func (fileTypeProfilePhoto *FileTypeProfilePhoto) MessageType() string
MessageType return the string telegram-type of FileTypeProfilePhoto
type FileTypeSecret ¶
type FileTypeSecret struct {
// contains filtered or unexported fields
}
FileTypeSecret The file was sent to a secret chat (the file type is not known to the server)
func NewFileTypeSecret ¶
func NewFileTypeSecret() *FileTypeSecret
NewFileTypeSecret creates a new FileTypeSecret
func (*FileTypeSecret) GetFileTypeEnum ¶
func (fileTypeSecret *FileTypeSecret) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeSecret) MessageType ¶
func (fileTypeSecret *FileTypeSecret) MessageType() string
MessageType return the string telegram-type of FileTypeSecret
type FileTypeSecretThumbnail ¶
type FileTypeSecretThumbnail struct {
// contains filtered or unexported fields
}
FileTypeSecretThumbnail The file is a thumbnail of a file from a secret chat
func NewFileTypeSecretThumbnail ¶
func NewFileTypeSecretThumbnail() *FileTypeSecretThumbnail
NewFileTypeSecretThumbnail creates a new FileTypeSecretThumbnail
func (*FileTypeSecretThumbnail) GetFileTypeEnum ¶
func (fileTypeSecretThumbnail *FileTypeSecretThumbnail) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeSecretThumbnail) MessageType ¶
func (fileTypeSecretThumbnail *FileTypeSecretThumbnail) MessageType() string
MessageType return the string telegram-type of FileTypeSecretThumbnail
type FileTypeSticker ¶
type FileTypeSticker struct {
// contains filtered or unexported fields
}
FileTypeSticker The file is a sticker
func NewFileTypeSticker ¶
func NewFileTypeSticker() *FileTypeSticker
NewFileTypeSticker creates a new FileTypeSticker
func (*FileTypeSticker) GetFileTypeEnum ¶
func (fileTypeSticker *FileTypeSticker) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeSticker) MessageType ¶
func (fileTypeSticker *FileTypeSticker) MessageType() string
MessageType return the string telegram-type of FileTypeSticker
type FileTypeThumbnail ¶
type FileTypeThumbnail struct {
// contains filtered or unexported fields
}
FileTypeThumbnail The file is a thumbnail of another file
func NewFileTypeThumbnail ¶
func NewFileTypeThumbnail() *FileTypeThumbnail
NewFileTypeThumbnail creates a new FileTypeThumbnail
func (*FileTypeThumbnail) GetFileTypeEnum ¶
func (fileTypeThumbnail *FileTypeThumbnail) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeThumbnail) MessageType ¶
func (fileTypeThumbnail *FileTypeThumbnail) MessageType() string
MessageType return the string telegram-type of FileTypeThumbnail
type FileTypeUnknown ¶
type FileTypeUnknown struct {
// contains filtered or unexported fields
}
FileTypeUnknown The file type is not yet known
func NewFileTypeUnknown ¶
func NewFileTypeUnknown() *FileTypeUnknown
NewFileTypeUnknown creates a new FileTypeUnknown
func (*FileTypeUnknown) GetFileTypeEnum ¶
func (fileTypeUnknown *FileTypeUnknown) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeUnknown) MessageType ¶
func (fileTypeUnknown *FileTypeUnknown) MessageType() string
MessageType return the string telegram-type of FileTypeUnknown
type FileTypeVideo ¶
type FileTypeVideo struct {
// contains filtered or unexported fields
}
FileTypeVideo The file is a video
func NewFileTypeVideo ¶
func NewFileTypeVideo() *FileTypeVideo
NewFileTypeVideo creates a new FileTypeVideo
func (*FileTypeVideo) GetFileTypeEnum ¶
func (fileTypeVideo *FileTypeVideo) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeVideo) MessageType ¶
func (fileTypeVideo *FileTypeVideo) MessageType() string
MessageType return the string telegram-type of FileTypeVideo
type FileTypeVideoNote ¶
type FileTypeVideoNote struct {
// contains filtered or unexported fields
}
FileTypeVideoNote The file is a video note
func NewFileTypeVideoNote ¶
func NewFileTypeVideoNote() *FileTypeVideoNote
NewFileTypeVideoNote creates a new FileTypeVideoNote
func (*FileTypeVideoNote) GetFileTypeEnum ¶
func (fileTypeVideoNote *FileTypeVideoNote) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeVideoNote) MessageType ¶
func (fileTypeVideoNote *FileTypeVideoNote) MessageType() string
MessageType return the string telegram-type of FileTypeVideoNote
type FileTypeVoiceNote ¶
type FileTypeVoiceNote struct {
// contains filtered or unexported fields
}
FileTypeVoiceNote The file is a voice note
func NewFileTypeVoiceNote ¶
func NewFileTypeVoiceNote() *FileTypeVoiceNote
NewFileTypeVoiceNote creates a new FileTypeVoiceNote
func (*FileTypeVoiceNote) GetFileTypeEnum ¶
func (fileTypeVoiceNote *FileTypeVoiceNote) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeVoiceNote) MessageType ¶
func (fileTypeVoiceNote *FileTypeVoiceNote) MessageType() string
MessageType return the string telegram-type of FileTypeVoiceNote
type FileTypeWallpaper ¶
type FileTypeWallpaper struct {
// contains filtered or unexported fields
}
FileTypeWallpaper The file is a wallpaper
func NewFileTypeWallpaper ¶
func NewFileTypeWallpaper() *FileTypeWallpaper
NewFileTypeWallpaper creates a new FileTypeWallpaper
func (*FileTypeWallpaper) GetFileTypeEnum ¶
func (fileTypeWallpaper *FileTypeWallpaper) GetFileTypeEnum() FileTypeEnum
GetFileTypeEnum return the enum type of this object
func (*FileTypeWallpaper) MessageType ¶
func (fileTypeWallpaper *FileTypeWallpaper) MessageType() string
MessageType return the string telegram-type of FileTypeWallpaper
type FormattedText ¶
type FormattedText struct { Text string `json:"text"` // The text Entities []TextEntity `json:"entities"` // Entities contained in the text // contains filtered or unexported fields }
FormattedText A text with some entities
func NewFormattedText ¶
func NewFormattedText(text string, entities []TextEntity) *FormattedText
NewFormattedText creates a new FormattedText
@param text The text @param entities Entities contained in the text
func (*FormattedText) MessageType ¶
func (formattedText *FormattedText) MessageType() string
MessageType return the string telegram-type of FormattedText
type FoundMessages ¶
type FoundMessages struct { Messages []Message `json:"messages"` // List of messages NextFromSearchID JSONInt64 `json:"next_from_search_id"` // Value to pass as from_search_id to get more results // contains filtered or unexported fields }
FoundMessages Contains a list of messages found by a search
func NewFoundMessages ¶
func NewFoundMessages(messages []Message, nextFromSearchID JSONInt64) *FoundMessages
NewFoundMessages creates a new FoundMessages
@param messages List of messages @param nextFromSearchID Value to pass as from_search_id to get more results
func (*FoundMessages) MessageType ¶
func (foundMessages *FoundMessages) MessageType() string
MessageType return the string telegram-type of FoundMessages
type Game ¶
type Game struct { ID JSONInt64 `json:"id"` // Game ID ShortName string `json:"short_name"` // Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} Title string `json:"title"` // Game title Text *FormattedText `json:"text"` // Game text, usually containing scoreboards for a game Description string `json:"description"` // Photo *Photo `json:"photo"` // Game photo Animation *Animation `json:"animation"` // Game animation; may be null // contains filtered or unexported fields }
Game Describes a game
func NewGame ¶
func NewGame(iD JSONInt64, shortName string, title string, text *FormattedText, description string, photo *Photo, animation *Animation) *Game
NewGame creates a new Game
@param iD Game ID @param shortName Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} @param title Game title @param text Game text, usually containing scoreboards for a game @param description @param photo Game photo @param animation Game animation; may be null
func (*Game) MessageType ¶
MessageType return the string telegram-type of Game
type GameHighScore ¶
type GameHighScore struct { Position int32 `json:"position"` // Position in the high score table UserID int32 `json:"user_id"` // User identifier Score int32 `json:"score"` // User score // contains filtered or unexported fields }
GameHighScore Contains one row of the game high score table
func NewGameHighScore ¶
func NewGameHighScore(position int32, userID int32, score int32) *GameHighScore
NewGameHighScore creates a new GameHighScore
@param position Position in the high score table @param userID User identifier @param score User score
func (*GameHighScore) MessageType ¶
func (gameHighScore *GameHighScore) MessageType() string
MessageType return the string telegram-type of GameHighScore
type GameHighScores ¶
type GameHighScores struct { Scores []GameHighScore `json:"scores"` // A list of game high scores // contains filtered or unexported fields }
GameHighScores Contains a list of game high scores
func NewGameHighScores ¶
func NewGameHighScores(scores []GameHighScore) *GameHighScores
NewGameHighScores creates a new GameHighScores
@param scores A list of game high scores
func (*GameHighScores) MessageType ¶
func (gameHighScores *GameHighScores) MessageType() string
MessageType return the string telegram-type of GameHighScores
type Hashtags ¶
type Hashtags struct { // contains filtered or unexported fields }
Hashtags Contains a list of hashtags
func (*Hashtags) MessageType ¶
MessageType return the string telegram-type of Hashtags
type ImportedContacts ¶
type ImportedContacts struct { UserIDs []int32 `json:"user_ids"` // User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user ImporterCount []int32 `json:"importer_count"` // The number of users that imported the corresponding contact; 0 for already registered users or if unavailable // contains filtered or unexported fields }
ImportedContacts Represents the result of an ImportContacts request
func NewImportedContacts ¶
func NewImportedContacts(userIDs []int32, importerCount []int32) *ImportedContacts
NewImportedContacts creates a new ImportedContacts
@param userIDs User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user @param importerCount The number of users that imported the corresponding contact; 0 for already registered users or if unavailable
func (*ImportedContacts) MessageType ¶
func (importedContacts *ImportedContacts) MessageType() string
MessageType return the string telegram-type of ImportedContacts
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { Text string `json:"text"` // Text of the button Type InlineKeyboardButtonType `json:"type"` // Type of the button // contains filtered or unexported fields }
InlineKeyboardButton Represents a single button in an inline keyboard
func NewInlineKeyboardButton ¶
func NewInlineKeyboardButton(text string, typeParam InlineKeyboardButtonType) *InlineKeyboardButton
NewInlineKeyboardButton creates a new InlineKeyboardButton
@param text Text of the button @param typeParam Type of the button
func (*InlineKeyboardButton) MessageType ¶
func (inlineKeyboardButton *InlineKeyboardButton) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButton
func (*InlineKeyboardButton) UnmarshalJSON ¶
func (inlineKeyboardButton *InlineKeyboardButton) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InlineKeyboardButtonType ¶
type InlineKeyboardButtonType interface {
GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
}
InlineKeyboardButtonType Describes the type of an inline keyboard button
type InlineKeyboardButtonTypeBuy ¶
type InlineKeyboardButtonTypeBuy struct {
// contains filtered or unexported fields
}
InlineKeyboardButtonTypeBuy A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice
func NewInlineKeyboardButtonTypeBuy ¶
func NewInlineKeyboardButtonTypeBuy() *InlineKeyboardButtonTypeBuy
NewInlineKeyboardButtonTypeBuy creates a new InlineKeyboardButtonTypeBuy
func (*InlineKeyboardButtonTypeBuy) GetInlineKeyboardButtonTypeEnum ¶
func (inlineKeyboardButtonTypeBuy *InlineKeyboardButtonTypeBuy) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
GetInlineKeyboardButtonTypeEnum return the enum type of this object
func (*InlineKeyboardButtonTypeBuy) MessageType ¶
func (inlineKeyboardButtonTypeBuy *InlineKeyboardButtonTypeBuy) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButtonTypeBuy
type InlineKeyboardButtonTypeCallback ¶
type InlineKeyboardButtonTypeCallback struct { Data []byte `json:"data"` // Data to be sent to the bot via a callback query // contains filtered or unexported fields }
InlineKeyboardButtonTypeCallback A button that sends a special callback query to a bot
func NewInlineKeyboardButtonTypeCallback ¶
func NewInlineKeyboardButtonTypeCallback(data []byte) *InlineKeyboardButtonTypeCallback
NewInlineKeyboardButtonTypeCallback creates a new InlineKeyboardButtonTypeCallback
@param data Data to be sent to the bot via a callback query
func (*InlineKeyboardButtonTypeCallback) GetInlineKeyboardButtonTypeEnum ¶
func (inlineKeyboardButtonTypeCallback *InlineKeyboardButtonTypeCallback) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
GetInlineKeyboardButtonTypeEnum return the enum type of this object
func (*InlineKeyboardButtonTypeCallback) MessageType ¶
func (inlineKeyboardButtonTypeCallback *InlineKeyboardButtonTypeCallback) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButtonTypeCallback
type InlineKeyboardButtonTypeCallbackGame ¶
type InlineKeyboardButtonTypeCallbackGame struct {
// contains filtered or unexported fields
}
InlineKeyboardButtonTypeCallbackGame A button with a game that sends a special callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame
func NewInlineKeyboardButtonTypeCallbackGame ¶
func NewInlineKeyboardButtonTypeCallbackGame() *InlineKeyboardButtonTypeCallbackGame
NewInlineKeyboardButtonTypeCallbackGame creates a new InlineKeyboardButtonTypeCallbackGame
func (*InlineKeyboardButtonTypeCallbackGame) GetInlineKeyboardButtonTypeEnum ¶
func (inlineKeyboardButtonTypeCallbackGame *InlineKeyboardButtonTypeCallbackGame) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
GetInlineKeyboardButtonTypeEnum return the enum type of this object
func (*InlineKeyboardButtonTypeCallbackGame) MessageType ¶
func (inlineKeyboardButtonTypeCallbackGame *InlineKeyboardButtonTypeCallbackGame) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButtonTypeCallbackGame
type InlineKeyboardButtonTypeEnum ¶
type InlineKeyboardButtonTypeEnum string
InlineKeyboardButtonTypeEnum Alias for abstract InlineKeyboardButtonType 'Sub-Classes', used as constant-enum here
const ( InlineKeyboardButtonTypeURLType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeURL" InlineKeyboardButtonTypeCallbackType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallback" InlineKeyboardButtonTypeCallbackGameType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallbackGame" InlineKeyboardButtonTypeSwitchInlineType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeSwitchInline" InlineKeyboardButtonTypeBuyType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeBuy" )
InlineKeyboardButtonType enums
type InlineKeyboardButtonTypeSwitchInline ¶
type InlineKeyboardButtonTypeSwitchInline struct { Query string `json:"query"` // Inline query to be sent to the bot InCurrentChat bool `json:"in_current_chat"` // True, if the inline query should be sent from the current chat // contains filtered or unexported fields }
InlineKeyboardButtonTypeSwitchInline A button that forces an inline query to the bot to be inserted in the input field
func NewInlineKeyboardButtonTypeSwitchInline ¶
func NewInlineKeyboardButtonTypeSwitchInline(query string, inCurrentChat bool) *InlineKeyboardButtonTypeSwitchInline
NewInlineKeyboardButtonTypeSwitchInline creates a new InlineKeyboardButtonTypeSwitchInline
@param query Inline query to be sent to the bot @param inCurrentChat True, if the inline query should be sent from the current chat
func (*InlineKeyboardButtonTypeSwitchInline) GetInlineKeyboardButtonTypeEnum ¶
func (inlineKeyboardButtonTypeSwitchInline *InlineKeyboardButtonTypeSwitchInline) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
GetInlineKeyboardButtonTypeEnum return the enum type of this object
func (*InlineKeyboardButtonTypeSwitchInline) MessageType ¶
func (inlineKeyboardButtonTypeSwitchInline *InlineKeyboardButtonTypeSwitchInline) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButtonTypeSwitchInline
type InlineKeyboardButtonTypeURL ¶
type InlineKeyboardButtonTypeURL struct { URL string `json:"url"` // URL to open // contains filtered or unexported fields }
InlineKeyboardButtonTypeURL A button that opens a specified URL
func NewInlineKeyboardButtonTypeURL ¶
func NewInlineKeyboardButtonTypeURL(uRL string) *InlineKeyboardButtonTypeURL
NewInlineKeyboardButtonTypeURL creates a new InlineKeyboardButtonTypeURL
@param uRL URL to open
func (*InlineKeyboardButtonTypeURL) GetInlineKeyboardButtonTypeEnum ¶
func (inlineKeyboardButtonTypeURL *InlineKeyboardButtonTypeURL) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
GetInlineKeyboardButtonTypeEnum return the enum type of this object
func (*InlineKeyboardButtonTypeURL) MessageType ¶
func (inlineKeyboardButtonTypeURL *InlineKeyboardButtonTypeURL) MessageType() string
MessageType return the string telegram-type of InlineKeyboardButtonTypeURL
type InlineQueryResult ¶
type InlineQueryResult interface {
GetInlineQueryResultEnum() InlineQueryResultEnum
}
InlineQueryResult Represents a single result of an inline query
type InlineQueryResultAnimation ¶
type InlineQueryResultAnimation struct { ID string `json:"id"` // Unique identifier of the query result Animation *Animation `json:"animation"` // Animation file Title string `json:"title"` // Animation title // contains filtered or unexported fields }
InlineQueryResultAnimation Represents an animation file
func NewInlineQueryResultAnimation ¶
func NewInlineQueryResultAnimation(iD string, animation *Animation, title string) *InlineQueryResultAnimation
NewInlineQueryResultAnimation creates a new InlineQueryResultAnimation
@param iD Unique identifier of the query result @param animation Animation file @param title Animation title
func (*InlineQueryResultAnimation) GetInlineQueryResultEnum ¶
func (inlineQueryResultAnimation *InlineQueryResultAnimation) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultAnimation) MessageType ¶
func (inlineQueryResultAnimation *InlineQueryResultAnimation) MessageType() string
MessageType return the string telegram-type of InlineQueryResultAnimation
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct { ID string `json:"id"` // Unique identifier of the query result URL string `json:"url"` // URL of the result, if it exists HideURL bool `json:"hide_url"` // True, if the URL must be not shown Title string `json:"title"` // Title of the result Description string `json:"description"` // Thumbnail *PhotoSize `json:"thumbnail"` // Result thumbnail; may be null // contains filtered or unexported fields }
InlineQueryResultArticle Represents a link to an article or web page
func NewInlineQueryResultArticle ¶
func NewInlineQueryResultArticle(iD string, uRL string, hideURL bool, title string, description string, thumbnail *PhotoSize) *InlineQueryResultArticle
NewInlineQueryResultArticle creates a new InlineQueryResultArticle
@param iD Unique identifier of the query result @param uRL URL of the result, if it exists @param hideURL True, if the URL must be not shown @param title Title of the result @param description @param thumbnail Result thumbnail; may be null
func (*InlineQueryResultArticle) GetInlineQueryResultEnum ¶
func (inlineQueryResultArticle *InlineQueryResultArticle) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultArticle) MessageType ¶
func (inlineQueryResultArticle *InlineQueryResultArticle) MessageType() string
MessageType return the string telegram-type of InlineQueryResultArticle
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct { ID string `json:"id"` // Unique identifier of the query result Audio *Audio `json:"audio"` // Audio file // contains filtered or unexported fields }
InlineQueryResultAudio Represents an audio file
func NewInlineQueryResultAudio ¶
func NewInlineQueryResultAudio(iD string, audio *Audio) *InlineQueryResultAudio
NewInlineQueryResultAudio creates a new InlineQueryResultAudio
@param iD Unique identifier of the query result @param audio Audio file
func (*InlineQueryResultAudio) GetInlineQueryResultEnum ¶
func (inlineQueryResultAudio *InlineQueryResultAudio) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultAudio) MessageType ¶
func (inlineQueryResultAudio *InlineQueryResultAudio) MessageType() string
MessageType return the string telegram-type of InlineQueryResultAudio
type InlineQueryResultContact ¶
type InlineQueryResultContact struct { ID string `json:"id"` // Unique identifier of the query result Contact *Contact `json:"contact"` // A user contact Thumbnail *PhotoSize `json:"thumbnail"` // Result thumbnail; may be null // contains filtered or unexported fields }
InlineQueryResultContact Represents a user contact
func NewInlineQueryResultContact ¶
func NewInlineQueryResultContact(iD string, contact *Contact, thumbnail *PhotoSize) *InlineQueryResultContact
NewInlineQueryResultContact creates a new InlineQueryResultContact
@param iD Unique identifier of the query result @param contact A user contact @param thumbnail Result thumbnail; may be null
func (*InlineQueryResultContact) GetInlineQueryResultEnum ¶
func (inlineQueryResultContact *InlineQueryResultContact) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultContact) MessageType ¶
func (inlineQueryResultContact *InlineQueryResultContact) MessageType() string
MessageType return the string telegram-type of InlineQueryResultContact
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct { ID string `json:"id"` // Unique identifier of the query result Document *Document `json:"document"` // Document Title string `json:"title"` // Document title Description string `json:"description"` // // contains filtered or unexported fields }
InlineQueryResultDocument Represents a document
func NewInlineQueryResultDocument ¶
func NewInlineQueryResultDocument(iD string, document *Document, title string, description string) *InlineQueryResultDocument
NewInlineQueryResultDocument creates a new InlineQueryResultDocument
@param iD Unique identifier of the query result @param document Document @param title Document title @param description
func (*InlineQueryResultDocument) GetInlineQueryResultEnum ¶
func (inlineQueryResultDocument *InlineQueryResultDocument) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultDocument) MessageType ¶
func (inlineQueryResultDocument *InlineQueryResultDocument) MessageType() string
MessageType return the string telegram-type of InlineQueryResultDocument
type InlineQueryResultEnum ¶
type InlineQueryResultEnum string
InlineQueryResultEnum Alias for abstract InlineQueryResult 'Sub-Classes', used as constant-enum here
const ( InlineQueryResultArticleType InlineQueryResultEnum = "inlineQueryResultArticle" InlineQueryResultContactType InlineQueryResultEnum = "inlineQueryResultContact" InlineQueryResultLocationType InlineQueryResultEnum = "inlineQueryResultLocation" InlineQueryResultVenueType InlineQueryResultEnum = "inlineQueryResultVenue" InlineQueryResultGameType InlineQueryResultEnum = "inlineQueryResultGame" InlineQueryResultAnimationType InlineQueryResultEnum = "inlineQueryResultAnimation" InlineQueryResultAudioType InlineQueryResultEnum = "inlineQueryResultAudio" InlineQueryResultDocumentType InlineQueryResultEnum = "inlineQueryResultDocument" InlineQueryResultPhotoType InlineQueryResultEnum = "inlineQueryResultPhoto" InlineQueryResultStickerType InlineQueryResultEnum = "inlineQueryResultSticker" InlineQueryResultVideoType InlineQueryResultEnum = "inlineQueryResultVideo" InlineQueryResultVoiceNoteType InlineQueryResultEnum = "inlineQueryResultVoiceNote" )
InlineQueryResult enums
type InlineQueryResultGame ¶
type InlineQueryResultGame struct { ID string `json:"id"` // Unique identifier of the query result Game *Game `json:"game"` // Game result // contains filtered or unexported fields }
InlineQueryResultGame Represents information about a game
func NewInlineQueryResultGame ¶
func NewInlineQueryResultGame(iD string, game *Game) *InlineQueryResultGame
NewInlineQueryResultGame creates a new InlineQueryResultGame
@param iD Unique identifier of the query result @param game Game result
func (*InlineQueryResultGame) GetInlineQueryResultEnum ¶
func (inlineQueryResultGame *InlineQueryResultGame) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultGame) MessageType ¶
func (inlineQueryResultGame *InlineQueryResultGame) MessageType() string
MessageType return the string telegram-type of InlineQueryResultGame
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct { ID string `json:"id"` // Unique identifier of the query result Location *Location `json:"location"` // Location result Title string `json:"title"` // Title of the result Thumbnail *PhotoSize `json:"thumbnail"` // Result thumbnail; may be null // contains filtered or unexported fields }
InlineQueryResultLocation Represents a point on the map
func NewInlineQueryResultLocation ¶
func NewInlineQueryResultLocation(iD string, location *Location, title string, thumbnail *PhotoSize) *InlineQueryResultLocation
NewInlineQueryResultLocation creates a new InlineQueryResultLocation
@param iD Unique identifier of the query result @param location Location result @param title Title of the result @param thumbnail Result thumbnail; may be null
func (*InlineQueryResultLocation) GetInlineQueryResultEnum ¶
func (inlineQueryResultLocation *InlineQueryResultLocation) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultLocation) MessageType ¶
func (inlineQueryResultLocation *InlineQueryResultLocation) MessageType() string
MessageType return the string telegram-type of InlineQueryResultLocation
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { ID string `json:"id"` // Unique identifier of the query result Photo *Photo `json:"photo"` // Photo Title string `json:"title"` // Title of the result, if known Description string `json:"description"` // // contains filtered or unexported fields }
InlineQueryResultPhoto Represents a photo
func NewInlineQueryResultPhoto ¶
func NewInlineQueryResultPhoto(iD string, photo *Photo, title string, description string) *InlineQueryResultPhoto
NewInlineQueryResultPhoto creates a new InlineQueryResultPhoto
@param iD Unique identifier of the query result @param photo Photo @param title Title of the result, if known @param description
func (*InlineQueryResultPhoto) GetInlineQueryResultEnum ¶
func (inlineQueryResultPhoto *InlineQueryResultPhoto) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultPhoto) MessageType ¶
func (inlineQueryResultPhoto *InlineQueryResultPhoto) MessageType() string
MessageType return the string telegram-type of InlineQueryResultPhoto
type InlineQueryResultSticker ¶
type InlineQueryResultSticker struct { ID string `json:"id"` // Unique identifier of the query result Sticker *Sticker `json:"sticker"` // Sticker // contains filtered or unexported fields }
InlineQueryResultSticker Represents a sticker
func NewInlineQueryResultSticker ¶
func NewInlineQueryResultSticker(iD string, sticker *Sticker) *InlineQueryResultSticker
NewInlineQueryResultSticker creates a new InlineQueryResultSticker
@param iD Unique identifier of the query result @param sticker Sticker
func (*InlineQueryResultSticker) GetInlineQueryResultEnum ¶
func (inlineQueryResultSticker *InlineQueryResultSticker) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultSticker) MessageType ¶
func (inlineQueryResultSticker *InlineQueryResultSticker) MessageType() string
MessageType return the string telegram-type of InlineQueryResultSticker
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct { ID string `json:"id"` // Unique identifier of the query result Venue *Venue `json:"venue"` // Venue result Thumbnail *PhotoSize `json:"thumbnail"` // Result thumbnail; may be null // contains filtered or unexported fields }
InlineQueryResultVenue Represents information about a venue
func NewInlineQueryResultVenue ¶
func NewInlineQueryResultVenue(iD string, venue *Venue, thumbnail *PhotoSize) *InlineQueryResultVenue
NewInlineQueryResultVenue creates a new InlineQueryResultVenue
@param iD Unique identifier of the query result @param venue Venue result @param thumbnail Result thumbnail; may be null
func (*InlineQueryResultVenue) GetInlineQueryResultEnum ¶
func (inlineQueryResultVenue *InlineQueryResultVenue) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultVenue) MessageType ¶
func (inlineQueryResultVenue *InlineQueryResultVenue) MessageType() string
MessageType return the string telegram-type of InlineQueryResultVenue
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { ID string `json:"id"` // Unique identifier of the query result Video *Video `json:"video"` // Video Title string `json:"title"` // Title of the video Description string `json:"description"` // // contains filtered or unexported fields }
InlineQueryResultVideo Represents a video
func NewInlineQueryResultVideo ¶
func NewInlineQueryResultVideo(iD string, video *Video, title string, description string) *InlineQueryResultVideo
NewInlineQueryResultVideo creates a new InlineQueryResultVideo
@param iD Unique identifier of the query result @param video Video @param title Title of the video @param description
func (*InlineQueryResultVideo) GetInlineQueryResultEnum ¶
func (inlineQueryResultVideo *InlineQueryResultVideo) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultVideo) MessageType ¶
func (inlineQueryResultVideo *InlineQueryResultVideo) MessageType() string
MessageType return the string telegram-type of InlineQueryResultVideo
type InlineQueryResultVoiceNote ¶
type InlineQueryResultVoiceNote struct { ID string `json:"id"` // Unique identifier of the query result VoiceNote *VoiceNote `json:"voice_note"` // Voice note Title string `json:"title"` // Title of the voice note // contains filtered or unexported fields }
InlineQueryResultVoiceNote Represents a voice note
func NewInlineQueryResultVoiceNote ¶
func NewInlineQueryResultVoiceNote(iD string, voiceNote *VoiceNote, title string) *InlineQueryResultVoiceNote
NewInlineQueryResultVoiceNote creates a new InlineQueryResultVoiceNote
@param iD Unique identifier of the query result @param voiceNote Voice note @param title Title of the voice note
func (*InlineQueryResultVoiceNote) GetInlineQueryResultEnum ¶
func (inlineQueryResultVoiceNote *InlineQueryResultVoiceNote) GetInlineQueryResultEnum() InlineQueryResultEnum
GetInlineQueryResultEnum return the enum type of this object
func (*InlineQueryResultVoiceNote) MessageType ¶
func (inlineQueryResultVoiceNote *InlineQueryResultVoiceNote) MessageType() string
MessageType return the string telegram-type of InlineQueryResultVoiceNote
type InlineQueryResults ¶
type InlineQueryResults struct { InlineQueryID JSONInt64 `json:"inline_query_id"` // Unique identifier of the inline query NextOffset string `json:"next_offset"` // The offset for the next request. If empty, there are no more results Results []InlineQueryResult `json:"results"` // Results of the query SwitchPmText string `json:"switch_pm_text"` // If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter SwitchPmParameter string `json:"switch_pm_parameter"` // Parameter for the bot start message // contains filtered or unexported fields }
InlineQueryResults Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
func NewInlineQueryResults ¶
func NewInlineQueryResults(inlineQueryID JSONInt64, nextOffset string, results []InlineQueryResult, switchPmText string, switchPmParameter string) *InlineQueryResults
NewInlineQueryResults creates a new InlineQueryResults
@param inlineQueryID Unique identifier of the inline query @param nextOffset The offset for the next request. If empty, there are no more results @param results Results of the query @param switchPmText If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter @param switchPmParameter Parameter for the bot start message
func (*InlineQueryResults) MessageType ¶
func (inlineQueryResults *InlineQueryResults) MessageType() string
MessageType return the string telegram-type of InlineQueryResults
type InputCredentials ¶
type InputCredentials interface {
GetInputCredentialsEnum() InputCredentialsEnum
}
InputCredentials Contains information about the payment method chosen by the user
type InputCredentialsAndroidPay ¶
type InputCredentialsAndroidPay struct { Data string `json:"data"` // JSON-encoded data with the credential identifier // contains filtered or unexported fields }
InputCredentialsAndroidPay Applies if a user enters new credentials using Android Pay
func NewInputCredentialsAndroidPay ¶
func NewInputCredentialsAndroidPay(data string) *InputCredentialsAndroidPay
NewInputCredentialsAndroidPay creates a new InputCredentialsAndroidPay
@param data JSON-encoded data with the credential identifier
func (*InputCredentialsAndroidPay) GetInputCredentialsEnum ¶
func (inputCredentialsAndroidPay *InputCredentialsAndroidPay) GetInputCredentialsEnum() InputCredentialsEnum
GetInputCredentialsEnum return the enum type of this object
func (*InputCredentialsAndroidPay) MessageType ¶
func (inputCredentialsAndroidPay *InputCredentialsAndroidPay) MessageType() string
MessageType return the string telegram-type of InputCredentialsAndroidPay
type InputCredentialsApplePay ¶
type InputCredentialsApplePay struct { Data string `json:"data"` // JSON-encoded data with the credential identifier // contains filtered or unexported fields }
InputCredentialsApplePay Applies if a user enters new credentials using Apple Pay
func NewInputCredentialsApplePay ¶
func NewInputCredentialsApplePay(data string) *InputCredentialsApplePay
NewInputCredentialsApplePay creates a new InputCredentialsApplePay
@param data JSON-encoded data with the credential identifier
func (*InputCredentialsApplePay) GetInputCredentialsEnum ¶
func (inputCredentialsApplePay *InputCredentialsApplePay) GetInputCredentialsEnum() InputCredentialsEnum
GetInputCredentialsEnum return the enum type of this object
func (*InputCredentialsApplePay) MessageType ¶
func (inputCredentialsApplePay *InputCredentialsApplePay) MessageType() string
MessageType return the string telegram-type of InputCredentialsApplePay
type InputCredentialsEnum ¶
type InputCredentialsEnum string
InputCredentialsEnum Alias for abstract InputCredentials 'Sub-Classes', used as constant-enum here
const ( InputCredentialsSavedType InputCredentialsEnum = "inputCredentialsSaved" InputCredentialsNewType InputCredentialsEnum = "inputCredentialsNew" InputCredentialsAndroidPayType InputCredentialsEnum = "inputCredentialsAndroidPay" InputCredentialsApplePayType InputCredentialsEnum = "inputCredentialsApplePay" )
InputCredentials enums
type InputCredentialsNew ¶
type InputCredentialsNew struct { Data string `json:"data"` // Contains JSON-encoded data with a credential identifier from the payment provider AllowSave bool `json:"allow_save"` // True, if the credential identifier can be saved on the server side // contains filtered or unexported fields }
InputCredentialsNew Applies if a user enters new credentials on a payment provider website
func NewInputCredentialsNew ¶
func NewInputCredentialsNew(data string, allowSave bool) *InputCredentialsNew
NewInputCredentialsNew creates a new InputCredentialsNew
@param data Contains JSON-encoded data with a credential identifier from the payment provider @param allowSave True, if the credential identifier can be saved on the server side
func (*InputCredentialsNew) GetInputCredentialsEnum ¶
func (inputCredentialsNew *InputCredentialsNew) GetInputCredentialsEnum() InputCredentialsEnum
GetInputCredentialsEnum return the enum type of this object
func (*InputCredentialsNew) MessageType ¶
func (inputCredentialsNew *InputCredentialsNew) MessageType() string
MessageType return the string telegram-type of InputCredentialsNew
type InputCredentialsSaved ¶
type InputCredentialsSaved struct { SavedCredentialsID string `json:"saved_credentials_id"` // Identifier of the saved credentials // contains filtered or unexported fields }
InputCredentialsSaved Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password
func NewInputCredentialsSaved ¶
func NewInputCredentialsSaved(savedCredentialsID string) *InputCredentialsSaved
NewInputCredentialsSaved creates a new InputCredentialsSaved
@param savedCredentialsID Identifier of the saved credentials
func (*InputCredentialsSaved) GetInputCredentialsEnum ¶
func (inputCredentialsSaved *InputCredentialsSaved) GetInputCredentialsEnum() InputCredentialsEnum
GetInputCredentialsEnum return the enum type of this object
func (*InputCredentialsSaved) MessageType ¶
func (inputCredentialsSaved *InputCredentialsSaved) MessageType() string
MessageType return the string telegram-type of InputCredentialsSaved
type InputFile ¶
type InputFile interface {
GetInputFileEnum() InputFileEnum
}
InputFile Points to a file
type InputFileEnum ¶
type InputFileEnum string
InputFileEnum Alias for abstract InputFile 'Sub-Classes', used as constant-enum here
const ( InputFileIDType InputFileEnum = "inputFileID" InputFileRemoteType InputFileEnum = "inputFileRemote" InputFileLocalType InputFileEnum = "inputFileLocal" InputFileGeneratedType InputFileEnum = "inputFileGenerated" )
InputFile enums
type InputFileGenerated ¶
type InputFileGenerated struct { OriginalPath string `json:"original_path"` // Local path to a file from which the file is generated, may be empty if there is no such file Conversion string `json:"conversion"` // String specifying the conversion applied to the original file; should be persistent across application restarts ExpectedSize int32 `json:"expected_size"` // Expected size of the generated file; 0 if unknown // contains filtered or unexported fields }
InputFileGenerated A file generated by the client
func NewInputFileGenerated ¶
func NewInputFileGenerated(originalPath string, conversion string, expectedSize int32) *InputFileGenerated
NewInputFileGenerated creates a new InputFileGenerated
@param originalPath Local path to a file from which the file is generated, may be empty if there is no such file @param conversion String specifying the conversion applied to the original file; should be persistent across application restarts @param expectedSize Expected size of the generated file; 0 if unknown
func (*InputFileGenerated) GetInputFileEnum ¶
func (inputFileGenerated *InputFileGenerated) GetInputFileEnum() InputFileEnum
GetInputFileEnum return the enum type of this object
func (*InputFileGenerated) MessageType ¶
func (inputFileGenerated *InputFileGenerated) MessageType() string
MessageType return the string telegram-type of InputFileGenerated
type InputFileID ¶
type InputFileID struct { ID int32 `json:"id"` // Unique file identifier // contains filtered or unexported fields }
InputFileID A file defined by its unique ID
func NewInputFileID ¶
func NewInputFileID(iD int32) *InputFileID
NewInputFileID creates a new InputFileID
@param iD Unique file identifier
func (*InputFileID) GetInputFileEnum ¶
func (inputFileID *InputFileID) GetInputFileEnum() InputFileEnum
GetInputFileEnum return the enum type of this object
func (*InputFileID) MessageType ¶
func (inputFileID *InputFileID) MessageType() string
MessageType return the string telegram-type of InputFileID
type InputFileLocal ¶
type InputFileLocal struct { Path string `json:"path"` // Local path to the file // contains filtered or unexported fields }
InputFileLocal A file defined by a local path
func NewInputFileLocal ¶
func NewInputFileLocal(path string) *InputFileLocal
NewInputFileLocal creates a new InputFileLocal
@param path Local path to the file
func (*InputFileLocal) GetInputFileEnum ¶
func (inputFileLocal *InputFileLocal) GetInputFileEnum() InputFileEnum
GetInputFileEnum return the enum type of this object
func (*InputFileLocal) MessageType ¶
func (inputFileLocal *InputFileLocal) MessageType() string
MessageType return the string telegram-type of InputFileLocal
type InputFileRemote ¶
type InputFileRemote struct { ID string `json:"id"` // Remote file identifier // contains filtered or unexported fields }
InputFileRemote A file defined by its remote ID
func NewInputFileRemote ¶
func NewInputFileRemote(iD string) *InputFileRemote
NewInputFileRemote creates a new InputFileRemote
@param iD Remote file identifier
func (*InputFileRemote) GetInputFileEnum ¶
func (inputFileRemote *InputFileRemote) GetInputFileEnum() InputFileEnum
GetInputFileEnum return the enum type of this object
func (*InputFileRemote) MessageType ¶
func (inputFileRemote *InputFileRemote) MessageType() string
MessageType return the string telegram-type of InputFileRemote
type InputInlineQueryResult ¶
type InputInlineQueryResult interface {
GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
}
InputInlineQueryResult Represents a single result of an inline query; for bots only
type InputInlineQueryResultAnimatedGif ¶
type InputInlineQueryResultAnimatedGif struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the query result ThumbnailURL string `json:"thumbnail_url"` // URL of the static result thumbnail (JPEG or GIF), if it exists GifURL string `json:"gif_url"` // The URL of the GIF-file (file size must not exceed 1MB) GifDuration int32 `json:"gif_duration"` // Duration of the GIF, in seconds GifWidth int32 `json:"gif_width"` // Width of the GIF GifHeight int32 `json:"gif_height"` // Height of the GIF ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultAnimatedGif Represents a link to an animated GIF
func NewInputInlineQueryResultAnimatedGif ¶
func NewInputInlineQueryResultAnimatedGif(iD string, title string, thumbnailURL string, gifURL string, gifDuration int32, gifWidth int32, gifHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultAnimatedGif
NewInputInlineQueryResultAnimatedGif creates a new InputInlineQueryResultAnimatedGif
@param iD Unique identifier of the query result @param title Title of the query result @param thumbnailURL URL of the static result thumbnail (JPEG or GIF), if it exists @param gifURL The URL of the GIF-file (file size must not exceed 1MB) @param gifDuration Duration of the GIF, in seconds @param gifWidth Width of the GIF @param gifHeight Height of the GIF @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultAnimatedGif) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultAnimatedGif) MessageType ¶
func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultAnimatedGif
func (*InputInlineQueryResultAnimatedGif) UnmarshalJSON ¶
func (inputInlineQueryResultAnimatedGif *InputInlineQueryResultAnimatedGif) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultAnimatedMpeg4 ¶
type InputInlineQueryResultAnimatedMpeg4 struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the result ThumbnailURL string `json:"thumbnail_url"` // URL of the static result thumbnail (JPEG or GIF), if it exists Mpeg4URL string `json:"mpeg4_url"` // The URL of the MPEG4-file (file size must not exceed 1MB) Mpeg4Duration int32 `json:"mpeg4_duration"` // Duration of the video, in seconds Mpeg4Width int32 `json:"mpeg4_width"` // Width of the video Mpeg4Height int32 `json:"mpeg4_height"` // Height of the video ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultAnimatedMpeg4 Represents a link to an animated (i.e. without sound) H.264/MPEG-4 AVC video
func NewInputInlineQueryResultAnimatedMpeg4 ¶
func NewInputInlineQueryResultAnimatedMpeg4(iD string, title string, thumbnailURL string, mpeg4URL string, mpeg4Duration int32, mpeg4Width int32, mpeg4Height int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultAnimatedMpeg4
NewInputInlineQueryResultAnimatedMpeg4 creates a new InputInlineQueryResultAnimatedMpeg4
@param iD Unique identifier of the query result @param title Title of the result @param thumbnailURL URL of the static result thumbnail (JPEG or GIF), if it exists @param mpeg4URL The URL of the MPEG4-file (file size must not exceed 1MB) @param mpeg4Duration Duration of the video, in seconds @param mpeg4Width Width of the video @param mpeg4Height Height of the video @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultAnimatedMpeg4) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultAnimatedMpeg4) MessageType ¶
func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultAnimatedMpeg4
func (*InputInlineQueryResultAnimatedMpeg4) UnmarshalJSON ¶
func (inputInlineQueryResultAnimatedMpeg4 *InputInlineQueryResultAnimatedMpeg4) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultArticle ¶
type InputInlineQueryResultArticle struct { ID string `json:"id"` // Unique identifier of the query result URL string `json:"url"` // URL of the result, if it exists HideURL bool `json:"hide_url"` // True, if the URL must be not shown Title string `json:"title"` // Title of the result Description string `json:"description"` // ThumbnailURL string `json:"thumbnail_url"` // URL of the result thumbnail, if it exists ThumbnailWidth int32 `json:"thumbnail_width"` // Thumbnail width, if known ThumbnailHeight int32 `json:"thumbnail_height"` // Thumbnail height, if known ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultArticle Represents a link to an article or web page
func NewInputInlineQueryResultArticle ¶
func NewInputInlineQueryResultArticle(iD string, uRL string, hideURL bool, title string, description string, thumbnailURL string, thumbnailWidth int32, thumbnailHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultArticle
NewInputInlineQueryResultArticle creates a new InputInlineQueryResultArticle
@param iD Unique identifier of the query result @param uRL URL of the result, if it exists @param hideURL True, if the URL must be not shown @param title Title of the result @param description @param thumbnailURL URL of the result thumbnail, if it exists @param thumbnailWidth Thumbnail width, if known @param thumbnailHeight Thumbnail height, if known @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultArticle) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultArticle) MessageType ¶
func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultArticle
func (*InputInlineQueryResultArticle) UnmarshalJSON ¶
func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultAudio ¶
type InputInlineQueryResultAudio struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the audio file Performer string `json:"performer"` // Performer of the audio file AudioURL string `json:"audio_url"` // The URL of the audio file AudioDuration int32 `json:"audio_duration"` // Audio file duration, in seconds ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultAudio Represents a link to an MP3 audio file
func NewInputInlineQueryResultAudio ¶
func NewInputInlineQueryResultAudio(iD string, title string, performer string, audioURL string, audioDuration int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultAudio
NewInputInlineQueryResultAudio creates a new InputInlineQueryResultAudio
@param iD Unique identifier of the query result @param title Title of the audio file @param performer Performer of the audio file @param audioURL The URL of the audio file @param audioDuration Audio file duration, in seconds @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultAudio) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultAudio) MessageType ¶
func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultAudio
func (*InputInlineQueryResultAudio) UnmarshalJSON ¶
func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultContact ¶
type InputInlineQueryResultContact struct { ID string `json:"id"` // Unique identifier of the query result Contact *Contact `json:"contact"` // User contact ThumbnailURL string `json:"thumbnail_url"` // URL of the result thumbnail, if it exists ThumbnailWidth int32 `json:"thumbnail_width"` // Thumbnail width, if known ThumbnailHeight int32 `json:"thumbnail_height"` // Thumbnail height, if known ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultContact Represents a user contact
func NewInputInlineQueryResultContact ¶
func NewInputInlineQueryResultContact(iD string, contact *Contact, thumbnailURL string, thumbnailWidth int32, thumbnailHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultContact
NewInputInlineQueryResultContact creates a new InputInlineQueryResultContact
@param iD Unique identifier of the query result @param contact User contact @param thumbnailURL URL of the result thumbnail, if it exists @param thumbnailWidth Thumbnail width, if known @param thumbnailHeight Thumbnail height, if known @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultContact) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultContact *InputInlineQueryResultContact) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultContact) MessageType ¶
func (inputInlineQueryResultContact *InputInlineQueryResultContact) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultContact
func (*InputInlineQueryResultContact) UnmarshalJSON ¶
func (inputInlineQueryResultContact *InputInlineQueryResultContact) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultDocument ¶
type InputInlineQueryResultDocument struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the resulting file Description string `json:"description"` // DocumentURL string `json:"document_url"` // URL of the file MimeType string `json:"mime_type"` // MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed ThumbnailURL string `json:"thumbnail_url"` // The URL of the file thumbnail, if it exists ThumbnailWidth int32 `json:"thumbnail_width"` // Width of the thumbnail ThumbnailHeight int32 `json:"thumbnail_height"` // Height of the thumbnail ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultDocument Represents a link to a file
func NewInputInlineQueryResultDocument ¶
func NewInputInlineQueryResultDocument(iD string, title string, description string, documentURL string, mimeType string, thumbnailURL string, thumbnailWidth int32, thumbnailHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultDocument
NewInputInlineQueryResultDocument creates a new InputInlineQueryResultDocument
@param iD Unique identifier of the query result @param title Title of the resulting file @param description @param documentURL URL of the file @param mimeType MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed @param thumbnailURL The URL of the file thumbnail, if it exists @param thumbnailWidth Width of the thumbnail @param thumbnailHeight Height of the thumbnail @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultDocument) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultDocument) MessageType ¶
func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultDocument
func (*InputInlineQueryResultDocument) UnmarshalJSON ¶
func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultEnum ¶
type InputInlineQueryResultEnum string
InputInlineQueryResultEnum Alias for abstract InputInlineQueryResult 'Sub-Classes', used as constant-enum here
const ( InputInlineQueryResultAnimatedGifType InputInlineQueryResultEnum = "inputInlineQueryResultAnimatedGif" InputInlineQueryResultAnimatedMpeg4Type InputInlineQueryResultEnum = "inputInlineQueryResultAnimatedMpeg4" InputInlineQueryResultArticleType InputInlineQueryResultEnum = "inputInlineQueryResultArticle" InputInlineQueryResultAudioType InputInlineQueryResultEnum = "inputInlineQueryResultAudio" InputInlineQueryResultContactType InputInlineQueryResultEnum = "inputInlineQueryResultContact" InputInlineQueryResultDocumentType InputInlineQueryResultEnum = "inputInlineQueryResultDocument" InputInlineQueryResultGameType InputInlineQueryResultEnum = "inputInlineQueryResultGame" InputInlineQueryResultLocationType InputInlineQueryResultEnum = "inputInlineQueryResultLocation" InputInlineQueryResultPhotoType InputInlineQueryResultEnum = "inputInlineQueryResultPhoto" InputInlineQueryResultStickerType InputInlineQueryResultEnum = "inputInlineQueryResultSticker" InputInlineQueryResultVenueType InputInlineQueryResultEnum = "inputInlineQueryResultVenue" InputInlineQueryResultVideoType InputInlineQueryResultEnum = "inputInlineQueryResultVideo" InputInlineQueryResultVoiceNoteType InputInlineQueryResultEnum = "inputInlineQueryResultVoiceNote" )
InputInlineQueryResult enums
type InputInlineQueryResultGame ¶
type InputInlineQueryResultGame struct { ID string `json:"id"` // Unique identifier of the query result GameShortName string `json:"game_short_name"` // Short name of the game ReplyMarkup ReplyMarkup `json:"reply_markup"` // Message reply markup. Must be of type replyMarkupInlineKeyboard or null // contains filtered or unexported fields }
InputInlineQueryResultGame Represents a game
func NewInputInlineQueryResultGame ¶
func NewInputInlineQueryResultGame(iD string, gameShortName string, replyMarkup ReplyMarkup) *InputInlineQueryResultGame
NewInputInlineQueryResultGame creates a new InputInlineQueryResultGame
@param iD Unique identifier of the query result @param gameShortName Short name of the game @param replyMarkup Message reply markup. Must be of type replyMarkupInlineKeyboard or null
func (*InputInlineQueryResultGame) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultGame *InputInlineQueryResultGame) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultGame) MessageType ¶
func (inputInlineQueryResultGame *InputInlineQueryResultGame) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultGame
func (*InputInlineQueryResultGame) UnmarshalJSON ¶
func (inputInlineQueryResultGame *InputInlineQueryResultGame) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultLocation ¶
type InputInlineQueryResultLocation struct { ID string `json:"id"` // Unique identifier of the query result Location *Location `json:"location"` // Location result LivePeriod int32 `json:"live_period"` // Amount of time relative to the message sent time until the location can be updated, in seconds Title string `json:"title"` // Title of the result ThumbnailURL string `json:"thumbnail_url"` // URL of the result thumbnail, if it exists ThumbnailWidth int32 `json:"thumbnail_width"` // Thumbnail width, if known ThumbnailHeight int32 `json:"thumbnail_height"` // Thumbnail height, if known ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultLocation Represents a point on the map
func NewInputInlineQueryResultLocation ¶
func NewInputInlineQueryResultLocation(iD string, location *Location, livePeriod int32, title string, thumbnailURL string, thumbnailWidth int32, thumbnailHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultLocation
NewInputInlineQueryResultLocation creates a new InputInlineQueryResultLocation
@param iD Unique identifier of the query result @param location Location result @param livePeriod Amount of time relative to the message sent time until the location can be updated, in seconds @param title Title of the result @param thumbnailURL URL of the result thumbnail, if it exists @param thumbnailWidth Thumbnail width, if known @param thumbnailHeight Thumbnail height, if known @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultLocation) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultLocation) MessageType ¶
func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultLocation
func (*InputInlineQueryResultLocation) UnmarshalJSON ¶
func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultPhoto ¶
type InputInlineQueryResultPhoto struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the result, if known Description string `json:"description"` // ThumbnailURL string `json:"thumbnail_url"` // URL of the photo thumbnail, if it exists PhotoURL string `json:"photo_url"` // The URL of the JPEG photo (photo size must not exceed 5MB) PhotoWidth int32 `json:"photo_width"` // Width of the photo PhotoHeight int32 `json:"photo_height"` // Height of the photo ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultPhoto Represents link to a JPEG image
func NewInputInlineQueryResultPhoto ¶
func NewInputInlineQueryResultPhoto(iD string, title string, description string, thumbnailURL string, photoURL string, photoWidth int32, photoHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultPhoto
NewInputInlineQueryResultPhoto creates a new InputInlineQueryResultPhoto
@param iD Unique identifier of the query result @param title Title of the result, if known @param description @param thumbnailURL URL of the photo thumbnail, if it exists @param photoURL The URL of the JPEG photo (photo size must not exceed 5MB) @param photoWidth Width of the photo @param photoHeight Height of the photo @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultPhoto) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultPhoto) MessageType ¶
func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultPhoto
func (*InputInlineQueryResultPhoto) UnmarshalJSON ¶
func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultSticker ¶
type InputInlineQueryResultSticker struct { ID string `json:"id"` // Unique identifier of the query result ThumbnailURL string `json:"thumbnail_url"` // URL of the sticker thumbnail, if it exists StickerURL string `json:"sticker_url"` // The URL of the WEBP sticker (sticker file size must not exceed 5MB) StickerWidth int32 `json:"sticker_width"` // Width of the sticker StickerHeight int32 `json:"sticker_height"` // Height of the sticker ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultSticker Represents a link to a WEBP sticker
func NewInputInlineQueryResultSticker ¶
func NewInputInlineQueryResultSticker(iD string, thumbnailURL string, stickerURL string, stickerWidth int32, stickerHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultSticker
NewInputInlineQueryResultSticker creates a new InputInlineQueryResultSticker
@param iD Unique identifier of the query result @param thumbnailURL URL of the sticker thumbnail, if it exists @param stickerURL The URL of the WEBP sticker (sticker file size must not exceed 5MB) @param stickerWidth Width of the sticker @param stickerHeight Height of the sticker @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultSticker) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultSticker) MessageType ¶
func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultSticker
func (*InputInlineQueryResultSticker) UnmarshalJSON ¶
func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultVenue ¶
type InputInlineQueryResultVenue struct { ID string `json:"id"` // Unique identifier of the query result Venue *Venue `json:"venue"` // Venue result ThumbnailURL string `json:"thumbnail_url"` // URL of the result thumbnail, if it exists ThumbnailWidth int32 `json:"thumbnail_width"` // Thumbnail width, if known ThumbnailHeight int32 `json:"thumbnail_height"` // Thumbnail height, if known ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultVenue Represents information about a venue
func NewInputInlineQueryResultVenue ¶
func NewInputInlineQueryResultVenue(iD string, venue *Venue, thumbnailURL string, thumbnailWidth int32, thumbnailHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultVenue
NewInputInlineQueryResultVenue creates a new InputInlineQueryResultVenue
@param iD Unique identifier of the query result @param venue Venue result @param thumbnailURL URL of the result thumbnail, if it exists @param thumbnailWidth Thumbnail width, if known @param thumbnailHeight Thumbnail height, if known @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultVenue) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultVenue) MessageType ¶
func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultVenue
func (*InputInlineQueryResultVenue) UnmarshalJSON ¶
func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultVideo ¶
type InputInlineQueryResultVideo struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the result Description string `json:"description"` // ThumbnailURL string `json:"thumbnail_url"` // The URL of the video thumbnail (JPEG), if it exists VideoURL string `json:"video_url"` // URL of the embedded video player or video file MimeType string `json:"mime_type"` // MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported VideoWidth int32 `json:"video_width"` // Width of the video VideoHeight int32 `json:"video_height"` // Height of the video VideoDuration int32 `json:"video_duration"` // Video duration, in seconds ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultVideo Represents a link to a page containing an embedded video player or a video file
func NewInputInlineQueryResultVideo ¶
func NewInputInlineQueryResultVideo(iD string, title string, description string, thumbnailURL string, videoURL string, mimeType string, videoWidth int32, videoHeight int32, videoDuration int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultVideo
NewInputInlineQueryResultVideo creates a new InputInlineQueryResultVideo
@param iD Unique identifier of the query result @param title Title of the result @param description @param thumbnailURL The URL of the video thumbnail (JPEG), if it exists @param videoURL URL of the embedded video player or video file @param mimeType MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported @param videoWidth Width of the video @param videoHeight Height of the video @param videoDuration Video duration, in seconds @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultVideo) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultVideo) MessageType ¶
func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultVideo
func (*InputInlineQueryResultVideo) UnmarshalJSON ¶
func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputInlineQueryResultVoiceNote ¶
type InputInlineQueryResultVoiceNote struct { ID string `json:"id"` // Unique identifier of the query result Title string `json:"title"` // Title of the voice note VoiceNoteURL string `json:"voice_note_url"` // The URL of the voice note file VoiceNoteDuration int32 `json:"voice_note_duration"` // Duration of the voice note, in seconds ReplyMarkup ReplyMarkup `json:"reply_markup"` // The message reply markup. Must be of type replyMarkupInlineKeyboard or null InputMessageContent InputMessageContent `json:"input_message_content"` // The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact // contains filtered or unexported fields }
InputInlineQueryResultVoiceNote Represents a link to an opus-encoded audio file within an OGG container, single channel audio
func NewInputInlineQueryResultVoiceNote ¶
func NewInputInlineQueryResultVoiceNote(iD string, title string, voiceNoteURL string, voiceNoteDuration int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultVoiceNote
NewInputInlineQueryResultVoiceNote creates a new InputInlineQueryResultVoiceNote
@param iD Unique identifier of the query result @param title Title of the voice note @param voiceNoteURL The URL of the voice note file @param voiceNoteDuration Duration of the voice note, in seconds @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact
func (*InputInlineQueryResultVoiceNote) GetInputInlineQueryResultEnum ¶
func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
GetInputInlineQueryResultEnum return the enum type of this object
func (*InputInlineQueryResultVoiceNote) MessageType ¶
func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) MessageType() string
MessageType return the string telegram-type of InputInlineQueryResultVoiceNote
func (*InputInlineQueryResultVoiceNote) UnmarshalJSON ¶
func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageAnimation ¶
type InputMessageAnimation struct { Animation InputFile `json:"animation"` // Animation file to be sent Thumbnail *InputThumbnail `json:"thumbnail"` // Animation thumbnail, if available Duration int32 `json:"duration"` // Duration of the animation, in seconds Width int32 `json:"width"` // Width of the animation; may be replaced by the server Height int32 `json:"height"` // Height of the animation; may be replaced by the server Caption *FormattedText `json:"caption"` // Animation caption; 0-200 characters // contains filtered or unexported fields }
InputMessageAnimation An animation message (GIF-style).
func NewInputMessageAnimation ¶
func NewInputMessageAnimation(animation InputFile, thumbnail *InputThumbnail, duration int32, width int32, height int32, caption *FormattedText) *InputMessageAnimation
NewInputMessageAnimation creates a new InputMessageAnimation
@param animation Animation file to be sent @param thumbnail Animation thumbnail, if available @param duration Duration of the animation, in seconds @param width Width of the animation; may be replaced by the server @param height Height of the animation; may be replaced by the server @param caption Animation caption; 0-200 characters
func (*InputMessageAnimation) GetInputMessageContentEnum ¶
func (inputMessageAnimation *InputMessageAnimation) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageAnimation) MessageType ¶
func (inputMessageAnimation *InputMessageAnimation) MessageType() string
MessageType return the string telegram-type of InputMessageAnimation
func (*InputMessageAnimation) UnmarshalJSON ¶
func (inputMessageAnimation *InputMessageAnimation) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageAudio ¶
type InputMessageAudio struct { Audio InputFile `json:"audio"` // Audio file to be sent AlbumCoverThumbnail *InputThumbnail `json:"album_cover_thumbnail"` // Thumbnail of the cover for the album, if available Duration int32 `json:"duration"` // Duration of the audio, in seconds; may be replaced by the server Title string `json:"title"` // Title of the audio; 0-64 characters; may be replaced by the server Performer string `json:"performer"` // Performer of the audio; 0-64 characters, may be replaced by the server Caption *FormattedText `json:"caption"` // Audio caption; 0-200 characters // contains filtered or unexported fields }
InputMessageAudio An audio message
func NewInputMessageAudio ¶
func NewInputMessageAudio(audio InputFile, albumCoverThumbnail *InputThumbnail, duration int32, title string, performer string, caption *FormattedText) *InputMessageAudio
NewInputMessageAudio creates a new InputMessageAudio
@param audio Audio file to be sent @param albumCoverThumbnail Thumbnail of the cover for the album, if available @param duration Duration of the audio, in seconds; may be replaced by the server @param title Title of the audio; 0-64 characters; may be replaced by the server @param performer Performer of the audio; 0-64 characters, may be replaced by the server @param caption Audio caption; 0-200 characters
func (*InputMessageAudio) GetInputMessageContentEnum ¶
func (inputMessageAudio *InputMessageAudio) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageAudio) MessageType ¶
func (inputMessageAudio *InputMessageAudio) MessageType() string
MessageType return the string telegram-type of InputMessageAudio
func (*InputMessageAudio) UnmarshalJSON ¶
func (inputMessageAudio *InputMessageAudio) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageContact ¶
type InputMessageContact struct { Contact *Contact `json:"contact"` // Contact to send // contains filtered or unexported fields }
InputMessageContact A message containing a user contact
func NewInputMessageContact ¶
func NewInputMessageContact(contact *Contact) *InputMessageContact
NewInputMessageContact creates a new InputMessageContact
@param contact Contact to send
func (*InputMessageContact) GetInputMessageContentEnum ¶
func (inputMessageContact *InputMessageContact) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageContact) MessageType ¶
func (inputMessageContact *InputMessageContact) MessageType() string
MessageType return the string telegram-type of InputMessageContact
type InputMessageContent ¶
type InputMessageContent interface {
GetInputMessageContentEnum() InputMessageContentEnum
}
InputMessageContent The content of a message to send
type InputMessageContentEnum ¶
type InputMessageContentEnum string
InputMessageContentEnum Alias for abstract InputMessageContent 'Sub-Classes', used as constant-enum here
const ( InputMessageTextType InputMessageContentEnum = "inputMessageText" InputMessageAnimationType InputMessageContentEnum = "inputMessageAnimation" InputMessageAudioType InputMessageContentEnum = "inputMessageAudio" InputMessageDocumentType InputMessageContentEnum = "inputMessageDocument" InputMessagePhotoType InputMessageContentEnum = "inputMessagePhoto" InputMessageStickerType InputMessageContentEnum = "inputMessageSticker" InputMessageVideoType InputMessageContentEnum = "inputMessageVideo" InputMessageVideoNoteType InputMessageContentEnum = "inputMessageVideoNote" InputMessageVoiceNoteType InputMessageContentEnum = "inputMessageVoiceNote" InputMessageLocationType InputMessageContentEnum = "inputMessageLocation" InputMessageVenueType InputMessageContentEnum = "inputMessageVenue" InputMessageContactType InputMessageContentEnum = "inputMessageContact" InputMessageGameType InputMessageContentEnum = "inputMessageGame" InputMessageInvoiceType InputMessageContentEnum = "inputMessageInvoice" InputMessageForwardedType InputMessageContentEnum = "inputMessageForwarded" )
InputMessageContent enums
type InputMessageDocument ¶
type InputMessageDocument struct { Document InputFile `json:"document"` // Document to be sent Thumbnail *InputThumbnail `json:"thumbnail"` // Document thumbnail, if available Caption *FormattedText `json:"caption"` // Document caption; 0-200 characters // contains filtered or unexported fields }
InputMessageDocument A document message (general file)
func NewInputMessageDocument ¶
func NewInputMessageDocument(document InputFile, thumbnail *InputThumbnail, caption *FormattedText) *InputMessageDocument
NewInputMessageDocument creates a new InputMessageDocument
@param document Document to be sent @param thumbnail Document thumbnail, if available @param caption Document caption; 0-200 characters
func (*InputMessageDocument) GetInputMessageContentEnum ¶
func (inputMessageDocument *InputMessageDocument) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageDocument) MessageType ¶
func (inputMessageDocument *InputMessageDocument) MessageType() string
MessageType return the string telegram-type of InputMessageDocument
func (*InputMessageDocument) UnmarshalJSON ¶
func (inputMessageDocument *InputMessageDocument) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageForwarded ¶
type InputMessageForwarded struct { FromChatID int64 `json:"from_chat_id"` // Identifier for the chat this forwarded message came from MessageID int64 `json:"message_id"` // Identifier of the message to forward // contains filtered or unexported fields }
InputMessageForwarded A forwarded message
func NewInputMessageForwarded ¶
func NewInputMessageForwarded(fromChatID int64, messageID int64, inGameShare bool) *InputMessageForwarded
NewInputMessageForwarded creates a new InputMessageForwarded
@param fromChatID Identifier for the chat this forwarded message came from @param messageID Identifier of the message to forward @param inGameShare True, if a game message should be shared within a launched game; applies only to game messages
func (*InputMessageForwarded) GetInputMessageContentEnum ¶
func (inputMessageForwarded *InputMessageForwarded) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageForwarded) MessageType ¶
func (inputMessageForwarded *InputMessageForwarded) MessageType() string
MessageType return the string telegram-type of InputMessageForwarded
type InputMessageGame ¶
type InputMessageGame struct { BotUserID int32 `json:"bot_user_id"` // User identifier of the bot that owns the game GameShortName string `json:"game_short_name"` // Short name of the game // contains filtered or unexported fields }
InputMessageGame A message with a game; not supported for channels or secret chats
func NewInputMessageGame ¶
func NewInputMessageGame(botUserID int32, gameShortName string) *InputMessageGame
NewInputMessageGame creates a new InputMessageGame
@param botUserID User identifier of the bot that owns the game @param gameShortName Short name of the game
func (*InputMessageGame) GetInputMessageContentEnum ¶
func (inputMessageGame *InputMessageGame) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageGame) MessageType ¶
func (inputMessageGame *InputMessageGame) MessageType() string
MessageType return the string telegram-type of InputMessageGame
type InputMessageInvoice ¶
type InputMessageInvoice struct { Invoice *Invoice `json:"invoice"` // Invoice Title string `json:"title"` // Product title; 1-32 characters Description string `json:"description"` // PhotoURL string `json:"photo_url"` // Product photo URL; optional PhotoSize int32 `json:"photo_size"` // Product photo size PhotoWidth int32 `json:"photo_width"` // Product photo width PhotoHeight int32 `json:"photo_height"` // Product photo height Payload []byte `json:"payload"` // The invoice payload ProviderToken string `json:"provider_token"` // Payment provider token ProviderData string `json:"provider_data"` // JSON-encoded data about the invoice, which will be shared with the payment provider StartParameter string `json:"start_parameter"` // Unique invoice bot start_parameter for the generation of this invoice // contains filtered or unexported fields }
InputMessageInvoice A message with an invoice; can be used only by bots and only in private chats
func NewInputMessageInvoice ¶
func NewInputMessageInvoice(invoice *Invoice, title string, description string, photoURL string, photoSize int32, photoWidth int32, photoHeight int32, payload []byte, providerToken string, providerData string, startParameter string) *InputMessageInvoice
NewInputMessageInvoice creates a new InputMessageInvoice
@param invoice Invoice @param title Product title; 1-32 characters @param description @param photoURL Product photo URL; optional @param photoSize Product photo size @param photoWidth Product photo width @param photoHeight Product photo height @param payload The invoice payload @param providerToken Payment provider token @param providerData JSON-encoded data about the invoice, which will be shared with the payment provider @param startParameter Unique invoice bot start_parameter for the generation of this invoice
func (*InputMessageInvoice) GetInputMessageContentEnum ¶
func (inputMessageInvoice *InputMessageInvoice) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageInvoice) MessageType ¶
func (inputMessageInvoice *InputMessageInvoice) MessageType() string
MessageType return the string telegram-type of InputMessageInvoice
type InputMessageLocation ¶
type InputMessageLocation struct { Location *Location `json:"location"` // Location to be sent LivePeriod int32 `json:"live_period"` // Period for which the location can be updated, in seconds; should bebetween 60 and 86400 for a live location and 0 otherwise // contains filtered or unexported fields }
InputMessageLocation A message with a location
func NewInputMessageLocation ¶
func NewInputMessageLocation(location *Location, livePeriod int32) *InputMessageLocation
NewInputMessageLocation creates a new InputMessageLocation
@param location Location to be sent @param livePeriod Period for which the location can be updated, in seconds; should bebetween 60 and 86400 for a live location and 0 otherwise
func (*InputMessageLocation) GetInputMessageContentEnum ¶
func (inputMessageLocation *InputMessageLocation) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageLocation) MessageType ¶
func (inputMessageLocation *InputMessageLocation) MessageType() string
MessageType return the string telegram-type of InputMessageLocation
type InputMessagePhoto ¶
type InputMessagePhoto struct { Photo InputFile `json:"photo"` // Photo to send Thumbnail *InputThumbnail `json:"thumbnail"` // Photo thumbnail to be sent, this is sent to the other party in secret chats only AddedStickerFileIDs []int32 `json:"added_sticker_file_ids"` // File identifiers of the stickers added to the photo, if applicable Width int32 `json:"width"` // Photo width Height int32 `json:"height"` // Photo height Caption *FormattedText `json:"caption"` // Photo caption; 0-200 characters TTL int32 `json:"ttl"` // Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats // contains filtered or unexported fields }
InputMessagePhoto A photo message
func NewInputMessagePhoto ¶
func NewInputMessagePhoto(photo InputFile, thumbnail *InputThumbnail, addedStickerFileIDs []int32, width int32, height int32, caption *FormattedText, tTL int32) *InputMessagePhoto
NewInputMessagePhoto creates a new InputMessagePhoto
@param photo Photo to send @param thumbnail Photo thumbnail to be sent, this is sent to the other party in secret chats only @param addedStickerFileIDs File identifiers of the stickers added to the photo, if applicable @param width Photo width @param height Photo height @param caption Photo caption; 0-200 characters @param tTL Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
func (*InputMessagePhoto) GetInputMessageContentEnum ¶
func (inputMessagePhoto *InputMessagePhoto) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessagePhoto) MessageType ¶
func (inputMessagePhoto *InputMessagePhoto) MessageType() string
MessageType return the string telegram-type of InputMessagePhoto
func (*InputMessagePhoto) UnmarshalJSON ¶
func (inputMessagePhoto *InputMessagePhoto) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageSticker ¶
type InputMessageSticker struct { Sticker InputFile `json:"sticker"` // Sticker to be sent Thumbnail *InputThumbnail `json:"thumbnail"` // Sticker thumbnail, if available Width int32 `json:"width"` // Sticker width Height int32 `json:"height"` // Sticker height // contains filtered or unexported fields }
InputMessageSticker A sticker message
func NewInputMessageSticker ¶
func NewInputMessageSticker(sticker InputFile, thumbnail *InputThumbnail, width int32, height int32) *InputMessageSticker
NewInputMessageSticker creates a new InputMessageSticker
@param sticker Sticker to be sent @param thumbnail Sticker thumbnail, if available @param width Sticker width @param height Sticker height
func (*InputMessageSticker) GetInputMessageContentEnum ¶
func (inputMessageSticker *InputMessageSticker) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageSticker) MessageType ¶
func (inputMessageSticker *InputMessageSticker) MessageType() string
MessageType return the string telegram-type of InputMessageSticker
func (*InputMessageSticker) UnmarshalJSON ¶
func (inputMessageSticker *InputMessageSticker) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageText ¶
type InputMessageText struct { Text *FormattedText `json:"text"` // Formatted text to be sent. Only Bold, Italic, Code, Pre, PreCode and TextUrl entities are allowed to be specified manually DisableWebPagePreview bool `json:"disable_web_page_preview"` // True, if rich web page previews for URLs in the message text should be disabled ClearDraft bool `json:"clear_draft"` // True, if a chat message draft should be deleted // contains filtered or unexported fields }
InputMessageText A text message
func NewInputMessageText ¶
func NewInputMessageText(text *FormattedText, disableWebPagePreview bool, clearDraft bool) *InputMessageText
NewInputMessageText creates a new InputMessageText
@param text Formatted text to be sent. Only Bold, Italic, Code, Pre, PreCode and TextUrl entities are allowed to be specified manually @param disableWebPagePreview True, if rich web page previews for URLs in the message text should be disabled @param clearDraft True, if a chat message draft should be deleted
func (*InputMessageText) GetInputMessageContentEnum ¶
func (inputMessageText *InputMessageText) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageText) MessageType ¶
func (inputMessageText *InputMessageText) MessageType() string
MessageType return the string telegram-type of InputMessageText
type InputMessageVenue ¶
type InputMessageVenue struct { Venue *Venue `json:"venue"` // Venue to send // contains filtered or unexported fields }
InputMessageVenue A message with information about a venue
func NewInputMessageVenue ¶
func NewInputMessageVenue(venue *Venue) *InputMessageVenue
NewInputMessageVenue creates a new InputMessageVenue
@param venue Venue to send
func (*InputMessageVenue) GetInputMessageContentEnum ¶
func (inputMessageVenue *InputMessageVenue) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageVenue) MessageType ¶
func (inputMessageVenue *InputMessageVenue) MessageType() string
MessageType return the string telegram-type of InputMessageVenue
type InputMessageVideo ¶
type InputMessageVideo struct { Video InputFile `json:"video"` // Video to be sent Thumbnail *InputThumbnail `json:"thumbnail"` // Video thumbnail, if available AddedStickerFileIDs []int32 `json:"added_sticker_file_ids"` // File identifiers of the stickers added to the video, if applicable Duration int32 `json:"duration"` // Duration of the video, in seconds Width int32 `json:"width"` // Video width Height int32 `json:"height"` // Video height SupportsStreaming bool `json:"supports_streaming"` // True, if the video should be tried to be streamed Caption *FormattedText `json:"caption"` // Video caption; 0-200 characters TTL int32 `json:"ttl"` // Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats // contains filtered or unexported fields }
InputMessageVideo A video message
func NewInputMessageVideo ¶
func NewInputMessageVideo(video InputFile, thumbnail *InputThumbnail, addedStickerFileIDs []int32, duration int32, width int32, height int32, supportsStreaming bool, caption *FormattedText, tTL int32) *InputMessageVideo
NewInputMessageVideo creates a new InputMessageVideo
@param video Video to be sent @param thumbnail Video thumbnail, if available @param addedStickerFileIDs File identifiers of the stickers added to the video, if applicable @param duration Duration of the video, in seconds @param width Video width @param height Video height @param supportsStreaming True, if the video should be tried to be streamed @param caption Video caption; 0-200 characters @param tTL Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
func (*InputMessageVideo) GetInputMessageContentEnum ¶
func (inputMessageVideo *InputMessageVideo) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageVideo) MessageType ¶
func (inputMessageVideo *InputMessageVideo) MessageType() string
MessageType return the string telegram-type of InputMessageVideo
func (*InputMessageVideo) UnmarshalJSON ¶
func (inputMessageVideo *InputMessageVideo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageVideoNote ¶
type InputMessageVideoNote struct { VideoNote InputFile `json:"video_note"` // Video note to be sent Thumbnail *InputThumbnail `json:"thumbnail"` // Video thumbnail, if available Duration int32 `json:"duration"` // Duration of the video, in seconds Length int32 `json:"length"` // Video width and height; must be positive and not greater than 640 // contains filtered or unexported fields }
InputMessageVideoNote A video note message
func NewInputMessageVideoNote ¶
func NewInputMessageVideoNote(videoNote InputFile, thumbnail *InputThumbnail, duration int32, length int32) *InputMessageVideoNote
NewInputMessageVideoNote creates a new InputMessageVideoNote
@param videoNote Video note to be sent @param thumbnail Video thumbnail, if available @param duration Duration of the video, in seconds @param length Video width and height; must be positive and not greater than 640
func (*InputMessageVideoNote) GetInputMessageContentEnum ¶
func (inputMessageVideoNote *InputMessageVideoNote) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageVideoNote) MessageType ¶
func (inputMessageVideoNote *InputMessageVideoNote) MessageType() string
MessageType return the string telegram-type of InputMessageVideoNote
func (*InputMessageVideoNote) UnmarshalJSON ¶
func (inputMessageVideoNote *InputMessageVideoNote) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputMessageVoiceNote ¶
type InputMessageVoiceNote struct { VoiceNote InputFile `json:"voice_note"` // Voice note to be sent Duration int32 `json:"duration"` // Duration of the voice note, in seconds Waveform []byte `json:"waveform"` // Waveform representation of the voice note, in 5-bit format Caption *FormattedText `json:"caption"` // Voice note caption; 0-200 characters // contains filtered or unexported fields }
InputMessageVoiceNote A voice note message
func NewInputMessageVoiceNote ¶
func NewInputMessageVoiceNote(voiceNote InputFile, duration int32, waveform []byte, caption *FormattedText) *InputMessageVoiceNote
NewInputMessageVoiceNote creates a new InputMessageVoiceNote
@param voiceNote Voice note to be sent @param duration Duration of the voice note, in seconds @param waveform Waveform representation of the voice note, in 5-bit format @param caption Voice note caption; 0-200 characters
func (*InputMessageVoiceNote) GetInputMessageContentEnum ¶
func (inputMessageVoiceNote *InputMessageVoiceNote) GetInputMessageContentEnum() InputMessageContentEnum
GetInputMessageContentEnum return the enum type of this object
func (*InputMessageVoiceNote) MessageType ¶
func (inputMessageVoiceNote *InputMessageVoiceNote) MessageType() string
MessageType return the string telegram-type of InputMessageVoiceNote
func (*InputMessageVoiceNote) UnmarshalJSON ¶
func (inputMessageVoiceNote *InputMessageVoiceNote) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputSticker ¶
type InputSticker struct { PngSticker InputFile `json:"png_sticker"` // PNG image with the sticker; must be up to 512 kB in size and fit in a 512x512 square Emojis string `json:"emojis"` // Emoji corresponding to the sticker MaskPosition *MaskPosition `json:"mask_position"` // For masks, position where the mask should be placed; may be null // contains filtered or unexported fields }
InputSticker Describes a sticker that should be added to a sticker set
func NewInputSticker ¶
func NewInputSticker(pngSticker InputFile, emojis string, maskPosition *MaskPosition) *InputSticker
NewInputSticker creates a new InputSticker
@param pngSticker PNG image with the sticker; must be up to 512 kB in size and fit in a 512x512 square @param emojis Emoji corresponding to the sticker @param maskPosition For masks, position where the mask should be placed; may be null
func (*InputSticker) MessageType ¶
func (inputSticker *InputSticker) MessageType() string
MessageType return the string telegram-type of InputSticker
func (*InputSticker) UnmarshalJSON ¶
func (inputSticker *InputSticker) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type InputThumbnail ¶
type InputThumbnail struct { Thumbnail InputFile `json:"thumbnail"` // Thumbnail file to send. Sending thumbnails by file_id is currently not supported Width int32 `json:"width"` // Thumbnail width, usually shouldn't exceed 90. Use 0 if unknown Height int32 `json:"height"` // Thumbnail height, usually shouldn't exceed 90. Use 0 if unknown // contains filtered or unexported fields }
InputThumbnail A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 kB in size
func NewInputThumbnail ¶
func NewInputThumbnail(thumbnail InputFile, width int32, height int32) *InputThumbnail
NewInputThumbnail creates a new InputThumbnail
@param thumbnail Thumbnail file to send. Sending thumbnails by file_id is currently not supported @param width Thumbnail width, usually shouldn't exceed 90. Use 0 if unknown @param height Thumbnail height, usually shouldn't exceed 90. Use 0 if unknown
func (*InputThumbnail) MessageType ¶
func (inputThumbnail *InputThumbnail) MessageType() string
MessageType return the string telegram-type of InputThumbnail
func (*InputThumbnail) UnmarshalJSON ¶
func (inputThumbnail *InputThumbnail) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type Invoice ¶
type Invoice struct { Currency string `json:"currency"` // ISO 4217 currency code PriceParts []LabeledPricePart `json:"price_parts"` // A list of objects used to calculate the total price of the product IsTest bool `json:"is_test"` // True, if the payment is a test payment NeedName bool `json:"need_name"` // True, if the user's name is needed for payment NeedPhoneNumber bool `json:"need_phone_number"` // True, if the user's phone number is needed for payment NeedEmailAddress bool `json:"need_email_address"` // True, if the user's email address is needed for payment NeedShippingAddress bool `json:"need_shipping_address"` // True, if the user's shipping address is needed for payment SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider"` // True, if the user's phone number will be sent to the provider SendEmailAddressToProvider bool `json:"send_email_address_to_provider"` // True, if the user's email address will be sent to the provider IsFlexible bool `json:"is_flexible"` // True, if the total price depends on the shipping method // contains filtered or unexported fields }
Invoice Product invoice
func NewInvoice ¶
func NewInvoice(currency string, priceParts []LabeledPricePart, isTest bool, needName bool, needPhoneNumber bool, needEmailAddress bool, needShippingAddress bool, sendPhoneNumberToProvider bool, sendEmailAddressToProvider bool, isFlexible bool) *Invoice
NewInvoice creates a new Invoice
@param currency ISO 4217 currency code @param priceParts A list of objects used to calculate the total price of the product @param isTest True, if the payment is a test payment @param needName True, if the user's name is needed for payment @param needPhoneNumber True, if the user's phone number is needed for payment @param needEmailAddress True, if the user's email address is needed for payment @param needShippingAddress True, if the user's shipping address is needed for payment @param sendPhoneNumberToProvider True, if the user's phone number will be sent to the provider @param sendEmailAddressToProvider True, if the user's email address will be sent to the provider @param isFlexible True, if the total price depends on the shipping method
func (*Invoice) MessageType ¶
MessageType return the string telegram-type of Invoice
type JSONInt64 ¶
type JSONInt64 int64
JSONInt64 alias for int64, in order to deal with json big number problem
func (*JSONInt64) MarshalJSON ¶
MarshalJSON marshals to json
func (*JSONInt64) UnmarshalJSON ¶
UnmarshalJSON unmarshals from json
type KeyboardButton ¶
type KeyboardButton struct { Text string `json:"text"` // Text of the button Type KeyboardButtonType `json:"type"` // Type of the button // contains filtered or unexported fields }
KeyboardButton Represents a single button in a bot keyboard
func NewKeyboardButton ¶
func NewKeyboardButton(text string, typeParam KeyboardButtonType) *KeyboardButton
NewKeyboardButton creates a new KeyboardButton
@param text Text of the button @param typeParam Type of the button
func (*KeyboardButton) MessageType ¶
func (keyboardButton *KeyboardButton) MessageType() string
MessageType return the string telegram-type of KeyboardButton
func (*KeyboardButton) UnmarshalJSON ¶
func (keyboardButton *KeyboardButton) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type KeyboardButtonType ¶
type KeyboardButtonType interface {
GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum
}
KeyboardButtonType Describes a keyboard button type
type KeyboardButtonTypeEnum ¶
type KeyboardButtonTypeEnum string
KeyboardButtonTypeEnum Alias for abstract KeyboardButtonType 'Sub-Classes', used as constant-enum here
const ( KeyboardButtonTypeTextType KeyboardButtonTypeEnum = "keyboardButtonTypeText" KeyboardButtonTypeRequestPhoneNumberType KeyboardButtonTypeEnum = "keyboardButtonTypeRequestPhoneNumber" KeyboardButtonTypeRequestLocationType KeyboardButtonTypeEnum = "keyboardButtonTypeRequestLocation" )
KeyboardButtonType enums
type KeyboardButtonTypeRequestLocation ¶
type KeyboardButtonTypeRequestLocation struct {
// contains filtered or unexported fields
}
KeyboardButtonTypeRequestLocation A button that sends the user's location when pressed; available only in private chats
func NewKeyboardButtonTypeRequestLocation ¶
func NewKeyboardButtonTypeRequestLocation() *KeyboardButtonTypeRequestLocation
NewKeyboardButtonTypeRequestLocation creates a new KeyboardButtonTypeRequestLocation
func (*KeyboardButtonTypeRequestLocation) GetKeyboardButtonTypeEnum ¶
func (keyboardButtonTypeRequestLocation *KeyboardButtonTypeRequestLocation) GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum
GetKeyboardButtonTypeEnum return the enum type of this object
func (*KeyboardButtonTypeRequestLocation) MessageType ¶
func (keyboardButtonTypeRequestLocation *KeyboardButtonTypeRequestLocation) MessageType() string
MessageType return the string telegram-type of KeyboardButtonTypeRequestLocation
type KeyboardButtonTypeRequestPhoneNumber ¶
type KeyboardButtonTypeRequestPhoneNumber struct {
// contains filtered or unexported fields
}
KeyboardButtonTypeRequestPhoneNumber A button that sends the user's phone number when pressed; available only in private chats
func NewKeyboardButtonTypeRequestPhoneNumber ¶
func NewKeyboardButtonTypeRequestPhoneNumber() *KeyboardButtonTypeRequestPhoneNumber
NewKeyboardButtonTypeRequestPhoneNumber creates a new KeyboardButtonTypeRequestPhoneNumber
func (*KeyboardButtonTypeRequestPhoneNumber) GetKeyboardButtonTypeEnum ¶
func (keyboardButtonTypeRequestPhoneNumber *KeyboardButtonTypeRequestPhoneNumber) GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum
GetKeyboardButtonTypeEnum return the enum type of this object
func (*KeyboardButtonTypeRequestPhoneNumber) MessageType ¶
func (keyboardButtonTypeRequestPhoneNumber *KeyboardButtonTypeRequestPhoneNumber) MessageType() string
MessageType return the string telegram-type of KeyboardButtonTypeRequestPhoneNumber
type KeyboardButtonTypeText ¶
type KeyboardButtonTypeText struct {
// contains filtered or unexported fields
}
KeyboardButtonTypeText A simple button, with text that should be sent when the button is pressed
func NewKeyboardButtonTypeText ¶
func NewKeyboardButtonTypeText() *KeyboardButtonTypeText
NewKeyboardButtonTypeText creates a new KeyboardButtonTypeText
func (*KeyboardButtonTypeText) GetKeyboardButtonTypeEnum ¶
func (keyboardButtonTypeText *KeyboardButtonTypeText) GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum
GetKeyboardButtonTypeEnum return the enum type of this object
func (*KeyboardButtonTypeText) MessageType ¶
func (keyboardButtonTypeText *KeyboardButtonTypeText) MessageType() string
MessageType return the string telegram-type of KeyboardButtonTypeText
type LabeledPricePart ¶
type LabeledPricePart struct { Label string `json:"label"` // Label for this portion of the product price Amount int64 `json:"amount"` // Currency amount in minimal quantity of the currency // contains filtered or unexported fields }
LabeledPricePart Portion of the price of a product (e.g., "delivery cost", "tax amount")
func NewLabeledPricePart ¶
func NewLabeledPricePart(label string, amount int64) *LabeledPricePart
NewLabeledPricePart creates a new LabeledPricePart
@param label Label for this portion of the product price @param amount Currency amount in minimal quantity of the currency
func (*LabeledPricePart) MessageType ¶
func (labeledPricePart *LabeledPricePart) MessageType() string
MessageType return the string telegram-type of LabeledPricePart
type LinkState ¶
type LinkState interface {
GetLinkStateEnum() LinkStateEnum
}
LinkState Represents the relationship between user A and user B. For incoming_link, user A is the current user; for outgoing_link, user B is the current user
type LinkStateEnum ¶
type LinkStateEnum string
LinkStateEnum Alias for abstract LinkState 'Sub-Classes', used as constant-enum here
const ( LinkStateNoneType LinkStateEnum = "linkStateNone" LinkStateKnowsPhoneNumberType LinkStateEnum = "linkStateKnowsPhoneNumber" LinkStateIsContactType LinkStateEnum = "linkStateIsContact" )
LinkState enums
type LinkStateIsContact ¶
type LinkStateIsContact struct {
// contains filtered or unexported fields
}
LinkStateIsContact The phone number of user A has been saved to the contacts list of user B
func NewLinkStateIsContact ¶
func NewLinkStateIsContact() *LinkStateIsContact
NewLinkStateIsContact creates a new LinkStateIsContact
func (*LinkStateIsContact) GetLinkStateEnum ¶
func (linkStateIsContact *LinkStateIsContact) GetLinkStateEnum() LinkStateEnum
GetLinkStateEnum return the enum type of this object
func (*LinkStateIsContact) MessageType ¶
func (linkStateIsContact *LinkStateIsContact) MessageType() string
MessageType return the string telegram-type of LinkStateIsContact
type LinkStateKnowsPhoneNumber ¶
type LinkStateKnowsPhoneNumber struct {
// contains filtered or unexported fields
}
LinkStateKnowsPhoneNumber The phone number of user A is known but that number has not been saved to the contacts list of user B
func NewLinkStateKnowsPhoneNumber ¶
func NewLinkStateKnowsPhoneNumber() *LinkStateKnowsPhoneNumber
NewLinkStateKnowsPhoneNumber creates a new LinkStateKnowsPhoneNumber
func (*LinkStateKnowsPhoneNumber) GetLinkStateEnum ¶
func (linkStateKnowsPhoneNumber *LinkStateKnowsPhoneNumber) GetLinkStateEnum() LinkStateEnum
GetLinkStateEnum return the enum type of this object
func (*LinkStateKnowsPhoneNumber) MessageType ¶
func (linkStateKnowsPhoneNumber *LinkStateKnowsPhoneNumber) MessageType() string
MessageType return the string telegram-type of LinkStateKnowsPhoneNumber
type LinkStateNone ¶
type LinkStateNone struct {
// contains filtered or unexported fields
}
LinkStateNone The phone number of user A is not known to user B
func NewLinkStateNone ¶
func NewLinkStateNone() *LinkStateNone
NewLinkStateNone creates a new LinkStateNone
func (*LinkStateNone) GetLinkStateEnum ¶
func (linkStateNone *LinkStateNone) GetLinkStateEnum() LinkStateEnum
GetLinkStateEnum return the enum type of this object
func (*LinkStateNone) MessageType ¶
func (linkStateNone *LinkStateNone) MessageType() string
MessageType return the string telegram-type of LinkStateNone
type LocalFile ¶
type LocalFile struct { Path string `json:"path"` // Local path to the locally available file part; may be empty CanBeDownloaded bool `json:"can_be_downloaded"` // True, if it is possible to try to download or generate the file CanBeDeleted bool `json:"can_be_deleted"` // True, if the file can be deleted IsDownloadingActive bool `json:"is_downloading_active"` // True, if the file is currently being downloaded (or a local copy is being generated by some other means) IsDownloadingCompleted bool `json:"is_downloading_completed"` // True, if the local copy is fully available DownloadedPrefixSize int32 `json:"downloaded_prefix_size"` // If is_downloading_completed is false, then only some prefix of the file is ready to be read. downloaded_prefix_size is the size of that prefix DownloadedSize int32 `json:"downloaded_size"` // Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage // contains filtered or unexported fields }
LocalFile Represents a local file
func NewLocalFile ¶
func NewLocalFile(path string, canBeDownloaded bool, canBeDeleted bool, isDownloadingActive bool, isDownloadingCompleted bool, downloadedPrefixSize int32, downloadedSize int32) *LocalFile
NewLocalFile creates a new LocalFile
@param path Local path to the locally available file part; may be empty @param canBeDownloaded True, if it is possible to try to download or generate the file @param canBeDeleted True, if the file can be deleted @param isDownloadingActive True, if the file is currently being downloaded (or a local copy is being generated by some other means) @param isDownloadingCompleted True, if the local copy is fully available @param downloadedPrefixSize If is_downloading_completed is false, then only some prefix of the file is ready to be read. downloaded_prefix_size is the size of that prefix @param downloadedSize Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
func (*LocalFile) MessageType ¶
MessageType return the string telegram-type of LocalFile
type Location ¶
type Location struct { Latitude float64 `json:"latitude"` // Latitude of the location in degrees; as defined by the sender Longitude float64 `json:"longitude"` // Longitude of the location, in degrees; as defined by the sender // contains filtered or unexported fields }
Location Describes a location on planet Earth
func NewLocation ¶
NewLocation creates a new Location
@param latitude Latitude of the location in degrees; as defined by the sender @param longitude Longitude of the location, in degrees; as defined by the sender
func (*Location) MessageType ¶
MessageType return the string telegram-type of Location
type MaskPoint ¶
type MaskPoint interface {
GetMaskPointEnum() MaskPointEnum
}
MaskPoint Part of the face, relative to which a mask should be placed
type MaskPointChin ¶
type MaskPointChin struct {
// contains filtered or unexported fields
}
MaskPointChin A mask should be placed relatively to the chin
func NewMaskPointChin ¶
func NewMaskPointChin() *MaskPointChin
NewMaskPointChin creates a new MaskPointChin
func (*MaskPointChin) GetMaskPointEnum ¶
func (maskPointChin *MaskPointChin) GetMaskPointEnum() MaskPointEnum
GetMaskPointEnum return the enum type of this object
func (*MaskPointChin) MessageType ¶
func (maskPointChin *MaskPointChin) MessageType() string
MessageType return the string telegram-type of MaskPointChin
type MaskPointEnum ¶
type MaskPointEnum string
MaskPointEnum Alias for abstract MaskPoint 'Sub-Classes', used as constant-enum here
const ( MaskPointForeheadType MaskPointEnum = "maskPointForehead" MaskPointEyesType MaskPointEnum = "maskPointEyes" MaskPointMouthType MaskPointEnum = "maskPointMouth" MaskPointChinType MaskPointEnum = "maskPointChin" )
MaskPoint enums
type MaskPointEyes ¶
type MaskPointEyes struct {
// contains filtered or unexported fields
}
MaskPointEyes A mask should be placed relatively to the eyes
func NewMaskPointEyes ¶
func NewMaskPointEyes() *MaskPointEyes
NewMaskPointEyes creates a new MaskPointEyes
func (*MaskPointEyes) GetMaskPointEnum ¶
func (maskPointEyes *MaskPointEyes) GetMaskPointEnum() MaskPointEnum
GetMaskPointEnum return the enum type of this object
func (*MaskPointEyes) MessageType ¶
func (maskPointEyes *MaskPointEyes) MessageType() string
MessageType return the string telegram-type of MaskPointEyes
type MaskPointForehead ¶
type MaskPointForehead struct {
// contains filtered or unexported fields
}
MaskPointForehead A mask should be placed relatively to the forehead
func NewMaskPointForehead ¶
func NewMaskPointForehead() *MaskPointForehead
NewMaskPointForehead creates a new MaskPointForehead
func (*MaskPointForehead) GetMaskPointEnum ¶
func (maskPointForehead *MaskPointForehead) GetMaskPointEnum() MaskPointEnum
GetMaskPointEnum return the enum type of this object
func (*MaskPointForehead) MessageType ¶
func (maskPointForehead *MaskPointForehead) MessageType() string
MessageType return the string telegram-type of MaskPointForehead
type MaskPointMouth ¶
type MaskPointMouth struct {
// contains filtered or unexported fields
}
MaskPointMouth A mask should be placed relatively to the mouth
func NewMaskPointMouth ¶
func NewMaskPointMouth() *MaskPointMouth
NewMaskPointMouth creates a new MaskPointMouth
func (*MaskPointMouth) GetMaskPointEnum ¶
func (maskPointMouth *MaskPointMouth) GetMaskPointEnum() MaskPointEnum
GetMaskPointEnum return the enum type of this object
func (*MaskPointMouth) MessageType ¶
func (maskPointMouth *MaskPointMouth) MessageType() string
MessageType return the string telegram-type of MaskPointMouth
type MaskPosition ¶
type MaskPosition struct { Point MaskPoint `json:"point"` // Part of the face, relative to which the mask should be placed XShift float64 `json:"x_shift"` // Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) YShift float64 `json:"y_shift"` // Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position) Scale float64 `json:"scale"` // Mask scaling coefficient. (For example, 2.0 means a doubled size) // contains filtered or unexported fields }
MaskPosition Position on a photo where a mask should be placed
func NewMaskPosition ¶
func NewMaskPosition(point MaskPoint, xShift float64, yShift float64, scale float64) *MaskPosition
NewMaskPosition creates a new MaskPosition
@param point Part of the face, relative to which the mask should be placed @param xShift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) @param 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) @param scale Mask scaling coefficient. (For example, 2.0 means a doubled size)
func (*MaskPosition) MessageType ¶
func (maskPosition *MaskPosition) MessageType() string
MessageType return the string telegram-type of MaskPosition
func (*MaskPosition) UnmarshalJSON ¶
func (maskPosition *MaskPosition) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type Message ¶
type Message struct { ID int64 `json:"id"` // Unique message identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the message; 0 if unknown. It is unknown for channel posts ChatID int64 `json:"chat_id"` // Chat identifier SendingState MessageSendingState `json:"sending_state"` // Information about the sending state of the message; may be null IsOutgoing bool `json:"is_outgoing"` // True, if the message is outgoing CanBeEdited bool `json:"can_be_edited"` // True, if the message can be edited CanBeForwarded bool `json:"can_be_forwarded"` // True, if the message can be forwarded CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"` // True, if the message can be deleted only for the current user while other users will continue to see it CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"` // True, if the message can be deleted for all users IsChannelPost bool `json:"is_channel_post"` // True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts ContainsUnreadMention bool `json:"contains_unread_mention"` // True, if the message contains an unread mention for the current user Date int32 `json:"date"` // Point in time (Unix timestamp) when the message was sent EditDate int32 `json:"edit_date"` // Point in time (Unix timestamp) when the message was last edited ForwardInfo MessageForwardInfo `json:"forward_info"` // Information about the initial message sender; may be null ReplyToMessageID int64 `json:"reply_to_message_id"` // If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message TTL int32 `json:"ttl"` // For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires TTLExpiresIn float64 `json:"ttl_expires_in"` // Time left before the message expires, in seconds ViaBotUserID int32 `json:"via_bot_user_id"` // If non-zero, the user identifier of the bot through which this message was sent AuthorSignature string `json:"author_signature"` // For channel posts, optional author signature Views int32 `json:"views"` // Number of times this message was viewed MediaAlbumID JSONInt64 `json:"media_album_id"` // Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums Content MessageContent `json:"content"` // Content of the message ReplyMarkup ReplyMarkup `json:"reply_markup"` // Reply markup for the message; may be null // contains filtered or unexported fields }
Message Describes a message
func NewMessage ¶
func NewMessage(iD int64, senderUserID int32, chatID int64, sendingState MessageSendingState, isOutgoing bool, canBeEdited bool, canBeForwarded bool, canBeDeletedOnlyForSelf bool, canBeDeletedForAllUsers bool, isChannelPost bool, containsUnreadMention bool, date int32, editDate int32, forwardInfo MessageForwardInfo, replyToMessageID int64, tTL int32, tTLExpiresIn float64, viaBotUserID int32, authorSignature string, views int32, mediaAlbumID JSONInt64, content MessageContent, replyMarkup ReplyMarkup) *Message
NewMessage creates a new Message
@param iD Unique message identifier @param senderUserID Identifier of the user who sent the message; 0 if unknown. It is unknown for channel posts @param chatID Chat identifier @param sendingState Information about the sending state of the message; may be null @param isOutgoing True, if the message is outgoing @param canBeEdited True, if the message can be edited @param canBeForwarded True, if the message can be forwarded @param canBeDeletedOnlyForSelf True, if the message can be deleted only for the current user while other users will continue to see it @param canBeDeletedForAllUsers True, if the message can be deleted for all users @param isChannelPost True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts @param containsUnreadMention True, if the message contains an unread mention for the current user @param date Point in time (Unix timestamp) when the message was sent @param editDate Point in time (Unix timestamp) when the message was last edited @param forwardInfo Information about the initial message sender; may be null @param replyToMessageID If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message @param tTL For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires @param tTLExpiresIn Time left before the message expires, in seconds @param viaBotUserID If non-zero, the user identifier of the bot through which this message was sent @param authorSignature For channel posts, optional author signature @param views Number of times this message was viewed @param mediaAlbumID Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums @param content Content of the message @param replyMarkup Reply markup for the message; may be null
func (*Message) MessageType ¶
MessageType return the string telegram-type of Message
func (*Message) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type MessageAnimation ¶
type MessageAnimation struct { Animation *Animation `json:"animation"` // Message content Caption *FormattedText `json:"caption"` // Animation caption IsSecret bool `json:"is_secret"` // True, if the animation thumbnail must be blurred and the animation must be shown only while tapped // contains filtered or unexported fields }
MessageAnimation An animation message (GIF-style).
func NewMessageAnimation ¶
func NewMessageAnimation(animation *Animation, caption *FormattedText, isSecret bool) *MessageAnimation
NewMessageAnimation creates a new MessageAnimation
@param animation Message content @param caption Animation caption @param isSecret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
func (*MessageAnimation) GetMessageContentEnum ¶
func (messageAnimation *MessageAnimation) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageAnimation) MessageType ¶
func (messageAnimation *MessageAnimation) MessageType() string
MessageType return the string telegram-type of MessageAnimation
type MessageAudio ¶
type MessageAudio struct { Audio *Audio `json:"audio"` // Message content Caption *FormattedText `json:"caption"` // Audio caption // contains filtered or unexported fields }
MessageAudio An audio message
func NewMessageAudio ¶
func NewMessageAudio(audio *Audio, caption *FormattedText) *MessageAudio
NewMessageAudio creates a new MessageAudio
@param audio Message content @param caption Audio caption
func (*MessageAudio) GetMessageContentEnum ¶
func (messageAudio *MessageAudio) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageAudio) MessageType ¶
func (messageAudio *MessageAudio) MessageType() string
MessageType return the string telegram-type of MessageAudio
type MessageBasicGroupChatCreate ¶
type MessageBasicGroupChatCreate struct { Title string `json:"title"` // Title of the basic group MemberUserIDs []int32 `json:"member_user_ids"` // User identifiers of members in the basic group // contains filtered or unexported fields }
MessageBasicGroupChatCreate A newly created basic group
func NewMessageBasicGroupChatCreate ¶
func NewMessageBasicGroupChatCreate(title string, memberUserIDs []int32) *MessageBasicGroupChatCreate
NewMessageBasicGroupChatCreate creates a new MessageBasicGroupChatCreate
@param title Title of the basic group @param memberUserIDs User identifiers of members in the basic group
func (*MessageBasicGroupChatCreate) GetMessageContentEnum ¶
func (messageBasicGroupChatCreate *MessageBasicGroupChatCreate) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageBasicGroupChatCreate) MessageType ¶
func (messageBasicGroupChatCreate *MessageBasicGroupChatCreate) MessageType() string
MessageType return the string telegram-type of MessageBasicGroupChatCreate
type MessageCall ¶
type MessageCall struct { DiscardReason CallDiscardReason `json:"discard_reason"` // Reason why the call was discarded Duration int32 `json:"duration"` // Call duration, in seconds // contains filtered or unexported fields }
MessageCall A message with information about an ended call
func NewMessageCall ¶
func NewMessageCall(discardReason CallDiscardReason, duration int32) *MessageCall
NewMessageCall creates a new MessageCall
@param discardReason Reason why the call was discarded @param duration Call duration, in seconds
func (*MessageCall) GetMessageContentEnum ¶
func (messageCall *MessageCall) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageCall) MessageType ¶
func (messageCall *MessageCall) MessageType() string
MessageType return the string telegram-type of MessageCall
func (*MessageCall) UnmarshalJSON ¶
func (messageCall *MessageCall) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type MessageChatAddMembers ¶
type MessageChatAddMembers struct { MemberUserIDs []int32 `json:"member_user_ids"` // User identifiers of the new members // contains filtered or unexported fields }
MessageChatAddMembers New chat members were added
func NewMessageChatAddMembers ¶
func NewMessageChatAddMembers(memberUserIDs []int32) *MessageChatAddMembers
NewMessageChatAddMembers creates a new MessageChatAddMembers
@param memberUserIDs User identifiers of the new members
func (*MessageChatAddMembers) GetMessageContentEnum ¶
func (messageChatAddMembers *MessageChatAddMembers) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatAddMembers) MessageType ¶
func (messageChatAddMembers *MessageChatAddMembers) MessageType() string
MessageType return the string telegram-type of MessageChatAddMembers
type MessageChatChangePhoto ¶
type MessageChatChangePhoto struct { Photo *Photo `json:"photo"` // New chat photo // contains filtered or unexported fields }
MessageChatChangePhoto An updated chat photo
func NewMessageChatChangePhoto ¶
func NewMessageChatChangePhoto(photo *Photo) *MessageChatChangePhoto
NewMessageChatChangePhoto creates a new MessageChatChangePhoto
@param photo New chat photo
func (*MessageChatChangePhoto) GetMessageContentEnum ¶
func (messageChatChangePhoto *MessageChatChangePhoto) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatChangePhoto) MessageType ¶
func (messageChatChangePhoto *MessageChatChangePhoto) MessageType() string
MessageType return the string telegram-type of MessageChatChangePhoto
type MessageChatChangeTitle ¶
type MessageChatChangeTitle struct { Title string `json:"title"` // New chat title // contains filtered or unexported fields }
MessageChatChangeTitle An updated chat title
func NewMessageChatChangeTitle ¶
func NewMessageChatChangeTitle(title string) *MessageChatChangeTitle
NewMessageChatChangeTitle creates a new MessageChatChangeTitle
@param title New chat title
func (*MessageChatChangeTitle) GetMessageContentEnum ¶
func (messageChatChangeTitle *MessageChatChangeTitle) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatChangeTitle) MessageType ¶
func (messageChatChangeTitle *MessageChatChangeTitle) MessageType() string
MessageType return the string telegram-type of MessageChatChangeTitle
type MessageChatDeleteMember ¶
type MessageChatDeleteMember struct { UserID int32 `json:"user_id"` // User identifier of the deleted chat member // contains filtered or unexported fields }
MessageChatDeleteMember A chat member was deleted
func NewMessageChatDeleteMember ¶
func NewMessageChatDeleteMember(userID int32) *MessageChatDeleteMember
NewMessageChatDeleteMember creates a new MessageChatDeleteMember
@param userID User identifier of the deleted chat member
func (*MessageChatDeleteMember) GetMessageContentEnum ¶
func (messageChatDeleteMember *MessageChatDeleteMember) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatDeleteMember) MessageType ¶
func (messageChatDeleteMember *MessageChatDeleteMember) MessageType() string
MessageType return the string telegram-type of MessageChatDeleteMember
type MessageChatDeletePhoto ¶
type MessageChatDeletePhoto struct {
// contains filtered or unexported fields
}
MessageChatDeletePhoto A deleted chat photo
func NewMessageChatDeletePhoto ¶
func NewMessageChatDeletePhoto() *MessageChatDeletePhoto
NewMessageChatDeletePhoto creates a new MessageChatDeletePhoto
func (*MessageChatDeletePhoto) GetMessageContentEnum ¶
func (messageChatDeletePhoto *MessageChatDeletePhoto) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatDeletePhoto) MessageType ¶
func (messageChatDeletePhoto *MessageChatDeletePhoto) MessageType() string
MessageType return the string telegram-type of MessageChatDeletePhoto
type MessageChatJoinByLink ¶
type MessageChatJoinByLink struct {
// contains filtered or unexported fields
}
MessageChatJoinByLink A new member joined the chat by invite link
func NewMessageChatJoinByLink ¶
func NewMessageChatJoinByLink() *MessageChatJoinByLink
NewMessageChatJoinByLink creates a new MessageChatJoinByLink
func (*MessageChatJoinByLink) GetMessageContentEnum ¶
func (messageChatJoinByLink *MessageChatJoinByLink) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatJoinByLink) MessageType ¶
func (messageChatJoinByLink *MessageChatJoinByLink) MessageType() string
MessageType return the string telegram-type of MessageChatJoinByLink
type MessageChatSetTTL ¶
type MessageChatSetTTL struct { TTL int32 `json:"ttl"` // New TTL // contains filtered or unexported fields }
MessageChatSetTTL The TTL (Time To Live) setting messages in a secret chat has been changed
func NewMessageChatSetTTL ¶
func NewMessageChatSetTTL(tTL int32) *MessageChatSetTTL
NewMessageChatSetTTL creates a new MessageChatSetTTL
@param tTL New TTL
func (*MessageChatSetTTL) GetMessageContentEnum ¶
func (messageChatSetTTL *MessageChatSetTTL) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatSetTTL) MessageType ¶
func (messageChatSetTTL *MessageChatSetTTL) MessageType() string
MessageType return the string telegram-type of MessageChatSetTTL
type MessageChatUpgradeFrom ¶
type MessageChatUpgradeFrom struct { Title string `json:"title"` // Title of the newly created supergroup BasicGroupID int32 `json:"basic_group_id"` // The identifier of the original basic group // contains filtered or unexported fields }
MessageChatUpgradeFrom A supergroup has been created from a basic group
func NewMessageChatUpgradeFrom ¶
func NewMessageChatUpgradeFrom(title string, basicGroupID int32) *MessageChatUpgradeFrom
NewMessageChatUpgradeFrom creates a new MessageChatUpgradeFrom
@param title Title of the newly created supergroup @param basicGroupID The identifier of the original basic group
func (*MessageChatUpgradeFrom) GetMessageContentEnum ¶
func (messageChatUpgradeFrom *MessageChatUpgradeFrom) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatUpgradeFrom) MessageType ¶
func (messageChatUpgradeFrom *MessageChatUpgradeFrom) MessageType() string
MessageType return the string telegram-type of MessageChatUpgradeFrom
type MessageChatUpgradeTo ¶
type MessageChatUpgradeTo struct { SupergroupID int32 `json:"supergroup_id"` // Identifier of the supergroup to which the basic group was upgraded // contains filtered or unexported fields }
MessageChatUpgradeTo A basic group was upgraded to a supergroup and was deactivated as the result
func NewMessageChatUpgradeTo ¶
func NewMessageChatUpgradeTo(supergroupID int32) *MessageChatUpgradeTo
NewMessageChatUpgradeTo creates a new MessageChatUpgradeTo
@param supergroupID Identifier of the supergroup to which the basic group was upgraded
func (*MessageChatUpgradeTo) GetMessageContentEnum ¶
func (messageChatUpgradeTo *MessageChatUpgradeTo) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageChatUpgradeTo) MessageType ¶
func (messageChatUpgradeTo *MessageChatUpgradeTo) MessageType() string
MessageType return the string telegram-type of MessageChatUpgradeTo
type MessageContact ¶
type MessageContact struct { Contact *Contact `json:"contact"` // Message content // contains filtered or unexported fields }
MessageContact A message with a user contact
func NewMessageContact ¶
func NewMessageContact(contact *Contact) *MessageContact
NewMessageContact creates a new MessageContact
@param contact Message content
func (*MessageContact) GetMessageContentEnum ¶
func (messageContact *MessageContact) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageContact) MessageType ¶
func (messageContact *MessageContact) MessageType() string
MessageType return the string telegram-type of MessageContact
type MessageContactRegistered ¶
type MessageContactRegistered struct {
// contains filtered or unexported fields
}
MessageContactRegistered A contact has registered with Telegram
func NewMessageContactRegistered ¶
func NewMessageContactRegistered() *MessageContactRegistered
NewMessageContactRegistered creates a new MessageContactRegistered
func (*MessageContactRegistered) GetMessageContentEnum ¶
func (messageContactRegistered *MessageContactRegistered) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageContactRegistered) MessageType ¶
func (messageContactRegistered *MessageContactRegistered) MessageType() string
MessageType return the string telegram-type of MessageContactRegistered
type MessageContent ¶
type MessageContent interface {
GetMessageContentEnum() MessageContentEnum
}
MessageContent Contains the content of a message
type MessageContentEnum ¶
type MessageContentEnum string
MessageContentEnum Alias for abstract MessageContent 'Sub-Classes', used as constant-enum here
const ( MessageTextType MessageContentEnum = "messageText" MessageAnimationType MessageContentEnum = "messageAnimation" MessageAudioType MessageContentEnum = "messageAudio" MessageDocumentType MessageContentEnum = "messageDocument" MessagePhotoType MessageContentEnum = "messagePhoto" MessageExpiredPhotoType MessageContentEnum = "messageExpiredPhoto" MessageStickerType MessageContentEnum = "messageSticker" MessageVideoType MessageContentEnum = "messageVideo" MessageExpiredVideoType MessageContentEnum = "messageExpiredVideo" MessageVideoNoteType MessageContentEnum = "messageVideoNote" MessageVoiceNoteType MessageContentEnum = "messageVoiceNote" MessageLocationType MessageContentEnum = "messageLocation" MessageVenueType MessageContentEnum = "messageVenue" MessageContactType MessageContentEnum = "messageContact" MessageGameType MessageContentEnum = "messageGame" MessageInvoiceType MessageContentEnum = "messageInvoice" MessageCallType MessageContentEnum = "messageCall" MessageBasicGroupChatCreateType MessageContentEnum = "messageBasicGroupChatCreate" MessageSupergroupChatCreateType MessageContentEnum = "messageSupergroupChatCreate" MessageChatChangeTitleType MessageContentEnum = "messageChatChangeTitle" MessageChatChangePhotoType MessageContentEnum = "messageChatChangePhoto" MessageChatDeletePhotoType MessageContentEnum = "messageChatDeletePhoto" MessageChatAddMembersType MessageContentEnum = "messageChatAddMembers" MessageChatJoinByLinkType MessageContentEnum = "messageChatJoinByLink" MessageChatDeleteMemberType MessageContentEnum = "messageChatDeleteMember" MessageChatUpgradeToType MessageContentEnum = "messageChatUpgradeTo" MessageChatUpgradeFromType MessageContentEnum = "messageChatUpgradeFrom" MessagePinMessageType MessageContentEnum = "messagePinMessage" MessageScreenshotTakenType MessageContentEnum = "messageScreenshotTaken" MessageChatSetTTLType MessageContentEnum = "messageChatSetTTL" MessageCustomServiceActionType MessageContentEnum = "messageCustomServiceAction" MessageGameScoreType MessageContentEnum = "messageGameScore" MessagePaymentSuccessfulType MessageContentEnum = "messagePaymentSuccessful" MessagePaymentSuccessfulBotType MessageContentEnum = "messagePaymentSuccessfulBot" MessageContactRegisteredType MessageContentEnum = "messageContactRegistered" MessageWebsiteConnectedType MessageContentEnum = "messageWebsiteConnected" MessageUnsupportedType MessageContentEnum = "messageUnsupported" )
MessageContent enums
type MessageCustomServiceAction ¶
type MessageCustomServiceAction struct { Text string `json:"text"` // Message text to be shown in the chat // contains filtered or unexported fields }
MessageCustomServiceAction A non-standard action has happened in the chat
func NewMessageCustomServiceAction ¶
func NewMessageCustomServiceAction(text string) *MessageCustomServiceAction
NewMessageCustomServiceAction creates a new MessageCustomServiceAction
@param text Message text to be shown in the chat
func (*MessageCustomServiceAction) GetMessageContentEnum ¶
func (messageCustomServiceAction *MessageCustomServiceAction) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageCustomServiceAction) MessageType ¶
func (messageCustomServiceAction *MessageCustomServiceAction) MessageType() string
MessageType return the string telegram-type of MessageCustomServiceAction
type MessageDocument ¶
type MessageDocument struct { Document *Document `json:"document"` // Message content Caption *FormattedText `json:"caption"` // Document caption // contains filtered or unexported fields }
MessageDocument A document message (general file)
func NewMessageDocument ¶
func NewMessageDocument(document *Document, caption *FormattedText) *MessageDocument
NewMessageDocument creates a new MessageDocument
@param document Message content @param caption Document caption
func (*MessageDocument) GetMessageContentEnum ¶
func (messageDocument *MessageDocument) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageDocument) MessageType ¶
func (messageDocument *MessageDocument) MessageType() string
MessageType return the string telegram-type of MessageDocument
type MessageExpiredPhoto ¶
type MessageExpiredPhoto struct {
// contains filtered or unexported fields
}
MessageExpiredPhoto An expired photo message (self-destructed after TTL has elapsed)
func NewMessageExpiredPhoto ¶
func NewMessageExpiredPhoto() *MessageExpiredPhoto
NewMessageExpiredPhoto creates a new MessageExpiredPhoto
func (*MessageExpiredPhoto) GetMessageContentEnum ¶
func (messageExpiredPhoto *MessageExpiredPhoto) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageExpiredPhoto) MessageType ¶
func (messageExpiredPhoto *MessageExpiredPhoto) MessageType() string
MessageType return the string telegram-type of MessageExpiredPhoto
type MessageExpiredVideo ¶
type MessageExpiredVideo struct {
// contains filtered or unexported fields
}
MessageExpiredVideo An expired video message (self-destructed after TTL has elapsed)
func NewMessageExpiredVideo ¶
func NewMessageExpiredVideo() *MessageExpiredVideo
NewMessageExpiredVideo creates a new MessageExpiredVideo
func (*MessageExpiredVideo) GetMessageContentEnum ¶
func (messageExpiredVideo *MessageExpiredVideo) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageExpiredVideo) MessageType ¶
func (messageExpiredVideo *MessageExpiredVideo) MessageType() string
MessageType return the string telegram-type of MessageExpiredVideo
type MessageForwardInfo ¶
type MessageForwardInfo interface {
GetMessageForwardInfoEnum() MessageForwardInfoEnum
}
MessageForwardInfo Contains information about the initial sender of a forwarded message
type MessageForwardInfoEnum ¶
type MessageForwardInfoEnum string
MessageForwardInfoEnum Alias for abstract MessageForwardInfo 'Sub-Classes', used as constant-enum here
const ( MessageForwardedFromUserType MessageForwardInfoEnum = "messageForwardedFromUser" MessageForwardedPostType MessageForwardInfoEnum = "messageForwardedPost" )
MessageForwardInfo enums
type MessageForwardedFromUser ¶
type MessageForwardedFromUser struct { SenderUserID int32 `json:"sender_user_id"` // Identifier of the user that originally sent this message Date int32 `json:"date"` // Point in time (Unix timestamp) when the message was originally sent ForwardedFromChatID int64 `json:"forwarded_from_chat_id"` // For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown ForwardedFromMessageID int64 `json:"forwarded_from_message_id"` // For messages forwarded to the chat with the current user (saved messages) the identifier of the original message from which the new message was forwarded; 0 if unknown // contains filtered or unexported fields }
MessageForwardedFromUser The message was originally written by a known user
func NewMessageForwardedFromUser ¶
func NewMessageForwardedFromUser(senderUserID int32, date int32, forwardedFromChatID int64, forwardedFromMessageID int64) *MessageForwardedFromUser
NewMessageForwardedFromUser creates a new MessageForwardedFromUser
@param senderUserID Identifier of the user that originally sent this message @param date Point in time (Unix timestamp) when the message was originally sent @param forwardedFromChatID For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown @param forwardedFromMessageID For messages forwarded to the chat with the current user (saved messages) the identifier of the original message from which the new message was forwarded; 0 if unknown
func (*MessageForwardedFromUser) GetMessageForwardInfoEnum ¶
func (messageForwardedFromUser *MessageForwardedFromUser) GetMessageForwardInfoEnum() MessageForwardInfoEnum
GetMessageForwardInfoEnum return the enum type of this object
func (*MessageForwardedFromUser) MessageType ¶
func (messageForwardedFromUser *MessageForwardedFromUser) MessageType() string
MessageType return the string telegram-type of MessageForwardedFromUser
type MessageForwardedPost ¶
type MessageForwardedPost struct { ChatID int64 `json:"chat_id"` // Identifier of the chat from which the message was forwarded AuthorSignature string `json:"author_signature"` // Post author signature Date int32 `json:"date"` // Point in time (Unix timestamp) when the message was originally sent MessageID int64 `json:"message_id"` // Message identifier of the original message from which the new message was forwarded; 0 if unknown ForwardedFromChatID int64 `json:"forwarded_from_chat_id"` // For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown ForwardedFromMessageID int64 `json:"forwarded_from_message_id"` // For messages forwarded to the chat with the current user (saved messages), the identifier of the original message from which the new message was forwarded; 0 if unknown // contains filtered or unexported fields }
MessageForwardedPost The message was originally a post in a channel
func NewMessageForwardedPost ¶
func NewMessageForwardedPost(chatID int64, authorSignature string, date int32, messageID int64, forwardedFromChatID int64, forwardedFromMessageID int64) *MessageForwardedPost
NewMessageForwardedPost creates a new MessageForwardedPost
@param chatID Identifier of the chat from which the message was forwarded @param authorSignature Post author signature @param date Point in time (Unix timestamp) when the message was originally sent @param messageID Message identifier of the original message from which the new message was forwarded; 0 if unknown @param forwardedFromChatID For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown @param forwardedFromMessageID For messages forwarded to the chat with the current user (saved messages), the identifier of the original message from which the new message was forwarded; 0 if unknown
func (*MessageForwardedPost) GetMessageForwardInfoEnum ¶
func (messageForwardedPost *MessageForwardedPost) GetMessageForwardInfoEnum() MessageForwardInfoEnum
GetMessageForwardInfoEnum return the enum type of this object
func (*MessageForwardedPost) MessageType ¶
func (messageForwardedPost *MessageForwardedPost) MessageType() string
MessageType return the string telegram-type of MessageForwardedPost
type MessageGame ¶
type MessageGame struct { Game *Game `json:"game"` // Game // contains filtered or unexported fields }
MessageGame A message with a game
func NewMessageGame ¶
func NewMessageGame(game *Game) *MessageGame
NewMessageGame creates a new MessageGame
@param game Game
func (*MessageGame) GetMessageContentEnum ¶
func (messageGame *MessageGame) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageGame) MessageType ¶
func (messageGame *MessageGame) MessageType() string
MessageType return the string telegram-type of MessageGame
type MessageGameScore ¶
type MessageGameScore struct { GameMessageID int64 `json:"game_message_id"` // Identifier of the message with the game, can be an identifier of a deleted message GameID JSONInt64 `json:"game_id"` // Identifier of the game, may be different from the games presented in the message with the game Score int32 `json:"score"` // New score // contains filtered or unexported fields }
MessageGameScore A new high score was achieved in a game
func NewMessageGameScore ¶
func NewMessageGameScore(gameMessageID int64, gameID JSONInt64, score int32) *MessageGameScore
NewMessageGameScore creates a new MessageGameScore
@param gameMessageID Identifier of the message with the game, can be an identifier of a deleted message @param gameID Identifier of the game, may be different from the games presented in the message with the game @param score New score
func (*MessageGameScore) GetMessageContentEnum ¶
func (messageGameScore *MessageGameScore) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageGameScore) MessageType ¶
func (messageGameScore *MessageGameScore) MessageType() string
MessageType return the string telegram-type of MessageGameScore
type MessageInvoice ¶
type MessageInvoice struct { Title string `json:"title"` // Product title Description string `json:"description"` // Photo *Photo `json:"photo"` // Product photo; may be null Currency string `json:"currency"` // Currency for the product price TotalAmount int64 `json:"total_amount"` // Product total price in the minimal quantity of the currency StartParameter string `json:"start_parameter"` // Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} IsTest bool `json:"is_test"` // True, if the invoice is a test invoice NeedShippingAddress bool `json:"need_shipping_address"` // True, if the shipping address should be specified ReceiptMessageID int64 `json:"receipt_message_id"` // The identifier of the message with the receipt, after the product has been purchased // contains filtered or unexported fields }
MessageInvoice A message with an invoice from a bot
func NewMessageInvoice ¶
func NewMessageInvoice(title string, description string, photo *Photo, currency string, totalAmount int64, startParameter string, isTest bool, needShippingAddress bool, receiptMessageID int64) *MessageInvoice
NewMessageInvoice creates a new MessageInvoice
@param title Product title @param description @param photo Product photo; may be null @param currency Currency for the product price @param totalAmount Product total price in the minimal quantity of the currency @param startParameter Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} @param isTest True, if the invoice is a test invoice @param needShippingAddress True, if the shipping address should be specified @param receiptMessageID The identifier of the message with the receipt, after the product has been purchased
func (*MessageInvoice) GetMessageContentEnum ¶
func (messageInvoice *MessageInvoice) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageInvoice) MessageType ¶
func (messageInvoice *MessageInvoice) MessageType() string
MessageType return the string telegram-type of MessageInvoice
type MessageLocation ¶
type MessageLocation struct { Location *Location `json:"location"` // Message content LivePeriod int32 `json:"live_period"` // Time relative to the message sent date until which the location can be updated, in seconds ExpiresIn int32 `json:"expires_in"` // Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes // contains filtered or unexported fields }
MessageLocation A message with a location
func NewMessageLocation ¶
func NewMessageLocation(location *Location, livePeriod int32, expiresIn int32) *MessageLocation
NewMessageLocation creates a new MessageLocation
@param location Message content @param livePeriod Time relative to the message sent date until which the location can be updated, in seconds @param expiresIn Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes
func (*MessageLocation) GetMessageContentEnum ¶
func (messageLocation *MessageLocation) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageLocation) MessageType ¶
func (messageLocation *MessageLocation) MessageType() string
MessageType return the string telegram-type of MessageLocation
type MessagePaymentSuccessful ¶
type MessagePaymentSuccessful struct { InvoiceMessageID int64 `json:"invoice_message_id"` // Identifier of the message with the corresponding invoice; can be an identifier of a deleted message Currency string `json:"currency"` // Currency for the price of the product TotalAmount int64 `json:"total_amount"` // Total price for the product, in the minimal quantity of the currency // contains filtered or unexported fields }
MessagePaymentSuccessful A payment has been completed
func NewMessagePaymentSuccessful ¶
func NewMessagePaymentSuccessful(invoiceMessageID int64, currency string, totalAmount int64) *MessagePaymentSuccessful
NewMessagePaymentSuccessful creates a new MessagePaymentSuccessful
@param invoiceMessageID Identifier of the message with the corresponding invoice; can be an identifier of a deleted message @param currency Currency for the price of the product @param totalAmount Total price for the product, in the minimal quantity of the currency
func (*MessagePaymentSuccessful) GetMessageContentEnum ¶
func (messagePaymentSuccessful *MessagePaymentSuccessful) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessagePaymentSuccessful) MessageType ¶
func (messagePaymentSuccessful *MessagePaymentSuccessful) MessageType() string
MessageType return the string telegram-type of MessagePaymentSuccessful
type MessagePaymentSuccessfulBot ¶
type MessagePaymentSuccessfulBot struct { InvoiceMessageID int64 `json:"invoice_message_id"` // Identifier of the message with the corresponding invoice; can be an identifier of a deleted message Currency string `json:"currency"` // Currency for price of the product TotalAmount int64 `json:"total_amount"` // Total price for the product, in the minimal quantity of the currency InvoicePayload []byte `json:"invoice_payload"` // Invoice payload ShippingOptionID string `json:"shipping_option_id"` // Identifier of the shipping option chosen by the user, may be empty if not applicable OrderInfo *OrderInfo `json:"order_info"` // Information about the order; may be null TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` // Telegram payment identifier ProviderPaymentChargeID string `json:"provider_payment_charge_id"` // Provider payment identifier // contains filtered or unexported fields }
MessagePaymentSuccessfulBot A payment has been completed; for bots only
func NewMessagePaymentSuccessfulBot ¶
func NewMessagePaymentSuccessfulBot(invoiceMessageID int64, currency string, totalAmount int64, invoicePayload []byte, shippingOptionID string, orderInfo *OrderInfo, telegramPaymentChargeID string, providerPaymentChargeID string) *MessagePaymentSuccessfulBot
NewMessagePaymentSuccessfulBot creates a new MessagePaymentSuccessfulBot
@param invoiceMessageID Identifier of the message with the corresponding invoice; can be an identifier of a deleted message @param currency Currency for price of the product @param totalAmount Total price for the product, in the minimal quantity of the currency @param invoicePayload Invoice payload @param shippingOptionID Identifier of the shipping option chosen by the user, may be empty if not applicable @param orderInfo Information about the order; may be null @param telegramPaymentChargeID Telegram payment identifier @param providerPaymentChargeID Provider payment identifier
func (*MessagePaymentSuccessfulBot) GetMessageContentEnum ¶
func (messagePaymentSuccessfulBot *MessagePaymentSuccessfulBot) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessagePaymentSuccessfulBot) MessageType ¶
func (messagePaymentSuccessfulBot *MessagePaymentSuccessfulBot) MessageType() string
MessageType return the string telegram-type of MessagePaymentSuccessfulBot
type MessagePhoto ¶
type MessagePhoto struct { Photo *Photo `json:"photo"` // Message content Caption *FormattedText `json:"caption"` // Photo caption IsSecret bool `json:"is_secret"` // True, if the photo must be blurred and must be shown only while tapped // contains filtered or unexported fields }
MessagePhoto A photo message
func NewMessagePhoto ¶
func NewMessagePhoto(photo *Photo, caption *FormattedText, isSecret bool) *MessagePhoto
NewMessagePhoto creates a new MessagePhoto
@param photo Message content @param caption Photo caption @param isSecret True, if the photo must be blurred and must be shown only while tapped
func (*MessagePhoto) GetMessageContentEnum ¶
func (messagePhoto *MessagePhoto) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessagePhoto) MessageType ¶
func (messagePhoto *MessagePhoto) MessageType() string
MessageType return the string telegram-type of MessagePhoto
type MessagePinMessage ¶
type MessagePinMessage struct { MessageID int64 `json:"message_id"` // Identifier of the pinned message, can be an identifier of a deleted message // contains filtered or unexported fields }
MessagePinMessage A message has been pinned
func NewMessagePinMessage ¶
func NewMessagePinMessage(messageID int64) *MessagePinMessage
NewMessagePinMessage creates a new MessagePinMessage
@param messageID Identifier of the pinned message, can be an identifier of a deleted message
func (*MessagePinMessage) GetMessageContentEnum ¶
func (messagePinMessage *MessagePinMessage) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessagePinMessage) MessageType ¶
func (messagePinMessage *MessagePinMessage) MessageType() string
MessageType return the string telegram-type of MessagePinMessage
type MessageScreenshotTaken ¶
type MessageScreenshotTaken struct {
// contains filtered or unexported fields
}
MessageScreenshotTaken A screenshot of a message in the chat has been taken
func NewMessageScreenshotTaken ¶
func NewMessageScreenshotTaken() *MessageScreenshotTaken
NewMessageScreenshotTaken creates a new MessageScreenshotTaken
func (*MessageScreenshotTaken) GetMessageContentEnum ¶
func (messageScreenshotTaken *MessageScreenshotTaken) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageScreenshotTaken) MessageType ¶
func (messageScreenshotTaken *MessageScreenshotTaken) MessageType() string
MessageType return the string telegram-type of MessageScreenshotTaken
type MessageSendingState ¶
type MessageSendingState interface {
GetMessageSendingStateEnum() MessageSendingStateEnum
}
MessageSendingState Contains information about the sending state of the message
type MessageSendingStateEnum ¶
type MessageSendingStateEnum string
MessageSendingStateEnum Alias for abstract MessageSendingState 'Sub-Classes', used as constant-enum here
const ( MessageSendingStatePendingType MessageSendingStateEnum = "messageSendingStatePending" MessageSendingStateFailedType MessageSendingStateEnum = "messageSendingStateFailed" )
MessageSendingState enums
type MessageSendingStateFailed ¶
type MessageSendingStateFailed struct {
// contains filtered or unexported fields
}
MessageSendingStateFailed The message failed to be sent
func NewMessageSendingStateFailed ¶
func NewMessageSendingStateFailed() *MessageSendingStateFailed
NewMessageSendingStateFailed creates a new MessageSendingStateFailed
func (*MessageSendingStateFailed) GetMessageSendingStateEnum ¶
func (messageSendingStateFailed *MessageSendingStateFailed) GetMessageSendingStateEnum() MessageSendingStateEnum
GetMessageSendingStateEnum return the enum type of this object
func (*MessageSendingStateFailed) MessageType ¶
func (messageSendingStateFailed *MessageSendingStateFailed) MessageType() string
MessageType return the string telegram-type of MessageSendingStateFailed
type MessageSendingStatePending ¶
type MessageSendingStatePending struct {
// contains filtered or unexported fields
}
MessageSendingStatePending The message is being sent now, but has not yet been delivered to the server
func NewMessageSendingStatePending ¶
func NewMessageSendingStatePending() *MessageSendingStatePending
NewMessageSendingStatePending creates a new MessageSendingStatePending
func (*MessageSendingStatePending) GetMessageSendingStateEnum ¶
func (messageSendingStatePending *MessageSendingStatePending) GetMessageSendingStateEnum() MessageSendingStateEnum
GetMessageSendingStateEnum return the enum type of this object
func (*MessageSendingStatePending) MessageType ¶
func (messageSendingStatePending *MessageSendingStatePending) MessageType() string
MessageType return the string telegram-type of MessageSendingStatePending
type MessageSticker ¶
type MessageSticker struct { Sticker *Sticker `json:"sticker"` // Message content // contains filtered or unexported fields }
MessageSticker A sticker message
func NewMessageSticker ¶
func NewMessageSticker(sticker *Sticker) *MessageSticker
NewMessageSticker creates a new MessageSticker
@param sticker Message content
func (*MessageSticker) GetMessageContentEnum ¶
func (messageSticker *MessageSticker) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageSticker) MessageType ¶
func (messageSticker *MessageSticker) MessageType() string
MessageType return the string telegram-type of MessageSticker
type MessageSupergroupChatCreate ¶
type MessageSupergroupChatCreate struct { Title string `json:"title"` // Title of the supergroup or channel // contains filtered or unexported fields }
MessageSupergroupChatCreate A newly created supergroup or channel
func NewMessageSupergroupChatCreate ¶
func NewMessageSupergroupChatCreate(title string) *MessageSupergroupChatCreate
NewMessageSupergroupChatCreate creates a new MessageSupergroupChatCreate
@param title Title of the supergroup or channel
func (*MessageSupergroupChatCreate) GetMessageContentEnum ¶
func (messageSupergroupChatCreate *MessageSupergroupChatCreate) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageSupergroupChatCreate) MessageType ¶
func (messageSupergroupChatCreate *MessageSupergroupChatCreate) MessageType() string
MessageType return the string telegram-type of MessageSupergroupChatCreate
type MessageText ¶
type MessageText struct { Text *FormattedText `json:"text"` // Text of the message WebPage *WebPage `json:"web_page"` // A preview of the web page that's mentioned in the text; may be null // contains filtered or unexported fields }
MessageText A text message
func NewMessageText ¶
func NewMessageText(text *FormattedText, webPage *WebPage) *MessageText
NewMessageText creates a new MessageText
@param text Text of the message @param webPage A preview of the web page that's mentioned in the text; may be null
func (*MessageText) GetMessageContentEnum ¶
func (messageText *MessageText) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageText) MessageType ¶
func (messageText *MessageText) MessageType() string
MessageType return the string telegram-type of MessageText
type MessageUnsupported ¶
type MessageUnsupported struct {
// contains filtered or unexported fields
}
MessageUnsupported Message content that is not supported by the client
func NewMessageUnsupported ¶
func NewMessageUnsupported() *MessageUnsupported
NewMessageUnsupported creates a new MessageUnsupported
func (*MessageUnsupported) GetMessageContentEnum ¶
func (messageUnsupported *MessageUnsupported) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageUnsupported) MessageType ¶
func (messageUnsupported *MessageUnsupported) MessageType() string
MessageType return the string telegram-type of MessageUnsupported
type MessageVenue ¶
type MessageVenue struct { Venue *Venue `json:"venue"` // Message content // contains filtered or unexported fields }
MessageVenue A message with information about a venue
func NewMessageVenue ¶
func NewMessageVenue(venue *Venue) *MessageVenue
NewMessageVenue creates a new MessageVenue
@param venue Message content
func (*MessageVenue) GetMessageContentEnum ¶
func (messageVenue *MessageVenue) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageVenue) MessageType ¶
func (messageVenue *MessageVenue) MessageType() string
MessageType return the string telegram-type of MessageVenue
type MessageVideo ¶
type MessageVideo struct { Video *Video `json:"video"` // Message content Caption *FormattedText `json:"caption"` // Video caption IsSecret bool `json:"is_secret"` // True, if the video thumbnail must be blurred and the video must be shown only while tapped // contains filtered or unexported fields }
MessageVideo A video message
func NewMessageVideo ¶
func NewMessageVideo(video *Video, caption *FormattedText, isSecret bool) *MessageVideo
NewMessageVideo creates a new MessageVideo
@param video Message content @param caption Video caption @param isSecret True, if the video thumbnail must be blurred and the video must be shown only while tapped
func (*MessageVideo) GetMessageContentEnum ¶
func (messageVideo *MessageVideo) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageVideo) MessageType ¶
func (messageVideo *MessageVideo) MessageType() string
MessageType return the string telegram-type of MessageVideo
type MessageVideoNote ¶
type MessageVideoNote struct { VideoNote *VideoNote `json:"video_note"` // Message content IsViewed bool `json:"is_viewed"` // True, if at least one of the recipients has viewed the video note IsSecret bool `json:"is_secret"` // True, if the video note thumbnail must be blurred and the video note must be shown only while tapped // contains filtered or unexported fields }
MessageVideoNote A video note message
func NewMessageVideoNote ¶
func NewMessageVideoNote(videoNote *VideoNote, isViewed bool, isSecret bool) *MessageVideoNote
NewMessageVideoNote creates a new MessageVideoNote
@param videoNote Message content @param isViewed True, if at least one of the recipients has viewed the video note @param isSecret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
func (*MessageVideoNote) GetMessageContentEnum ¶
func (messageVideoNote *MessageVideoNote) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageVideoNote) MessageType ¶
func (messageVideoNote *MessageVideoNote) MessageType() string
MessageType return the string telegram-type of MessageVideoNote
type MessageVoiceNote ¶
type MessageVoiceNote struct { VoiceNote *VoiceNote `json:"voice_note"` // Message content Caption *FormattedText `json:"caption"` // Voice note caption IsListened bool `json:"is_listened"` // True, if at least one of the recipients has listened to the voice note // contains filtered or unexported fields }
MessageVoiceNote A voice note message
func NewMessageVoiceNote ¶
func NewMessageVoiceNote(voiceNote *VoiceNote, caption *FormattedText, isListened bool) *MessageVoiceNote
NewMessageVoiceNote creates a new MessageVoiceNote
@param voiceNote Message content @param caption Voice note caption @param isListened True, if at least one of the recipients has listened to the voice note
func (*MessageVoiceNote) GetMessageContentEnum ¶
func (messageVoiceNote *MessageVoiceNote) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageVoiceNote) MessageType ¶
func (messageVoiceNote *MessageVoiceNote) MessageType() string
MessageType return the string telegram-type of MessageVoiceNote
type MessageWebsiteConnected ¶
type MessageWebsiteConnected struct { DomainName string `json:"domain_name"` // Domain name of the connected website // contains filtered or unexported fields }
MessageWebsiteConnected The current user has connected a website by logging in using Telegram Login Widget on it
func NewMessageWebsiteConnected ¶
func NewMessageWebsiteConnected(domainName string) *MessageWebsiteConnected
NewMessageWebsiteConnected creates a new MessageWebsiteConnected
@param domainName Domain name of the connected website
func (*MessageWebsiteConnected) GetMessageContentEnum ¶
func (messageWebsiteConnected *MessageWebsiteConnected) GetMessageContentEnum() MessageContentEnum
GetMessageContentEnum return the enum type of this object
func (*MessageWebsiteConnected) MessageType ¶
func (messageWebsiteConnected *MessageWebsiteConnected) MessageType() string
MessageType return the string telegram-type of MessageWebsiteConnected
type Messages ¶
type Messages struct { TotalCount int32 `json:"total_count"` // Approximate total count of messages found Messages []Message `json:"messages"` // List of messages; messages may be null // contains filtered or unexported fields }
Messages Contains a list of messages
func NewMessages ¶
NewMessages creates a new Messages
@param totalCount Approximate total count of messages found @param messages List of messages; messages may be null
func (*Messages) MessageType ¶
MessageType return the string telegram-type of Messages
type NetworkStatistics ¶
type NetworkStatistics struct { SinceDate int32 `json:"since_date"` // Point in time (Unix timestamp) when the app began collecting statistics Entries []NetworkStatisticsEntry `json:"entries"` // Network statistics entries // contains filtered or unexported fields }
NetworkStatistics A full list of available network statistic entries
func NewNetworkStatistics ¶
func NewNetworkStatistics(sinceDate int32, entries []NetworkStatisticsEntry) *NetworkStatistics
NewNetworkStatistics creates a new NetworkStatistics
@param sinceDate Point in time (Unix timestamp) when the app began collecting statistics @param entries Network statistics entries
func (*NetworkStatistics) MessageType ¶
func (networkStatistics *NetworkStatistics) MessageType() string
MessageType return the string telegram-type of NetworkStatistics
type NetworkStatisticsEntry ¶
type NetworkStatisticsEntry interface {
GetNetworkStatisticsEntryEnum() NetworkStatisticsEntryEnum
}
NetworkStatisticsEntry Contains statistics about network usage
type NetworkStatisticsEntryCall ¶
type NetworkStatisticsEntryCall struct { NetworkType NetworkType `json:"network_type"` // Type of the network the data was sent through. Call setNetworkType to maintain the actual network type SentBytes int64 `json:"sent_bytes"` // Total number of bytes sent ReceivedBytes int64 `json:"received_bytes"` // Total number of bytes received Duration float64 `json:"duration"` // Total call duration, in seconds // contains filtered or unexported fields }
NetworkStatisticsEntryCall Contains information about the total amount of data that was used for calls
func NewNetworkStatisticsEntryCall ¶
func NewNetworkStatisticsEntryCall(networkType NetworkType, sentBytes int64, receivedBytes int64, duration float64) *NetworkStatisticsEntryCall
NewNetworkStatisticsEntryCall creates a new NetworkStatisticsEntryCall
@param networkType Type of the network the data was sent through. Call setNetworkType to maintain the actual network type @param sentBytes Total number of bytes sent @param receivedBytes Total number of bytes received @param duration Total call duration, in seconds
func (*NetworkStatisticsEntryCall) GetNetworkStatisticsEntryEnum ¶
func (networkStatisticsEntryCall *NetworkStatisticsEntryCall) GetNetworkStatisticsEntryEnum() NetworkStatisticsEntryEnum
GetNetworkStatisticsEntryEnum return the enum type of this object
func (*NetworkStatisticsEntryCall) MessageType ¶
func (networkStatisticsEntryCall *NetworkStatisticsEntryCall) MessageType() string
MessageType return the string telegram-type of NetworkStatisticsEntryCall
func (*NetworkStatisticsEntryCall) UnmarshalJSON ¶
func (networkStatisticsEntryCall *NetworkStatisticsEntryCall) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type NetworkStatisticsEntryEnum ¶
type NetworkStatisticsEntryEnum string
NetworkStatisticsEntryEnum Alias for abstract NetworkStatisticsEntry 'Sub-Classes', used as constant-enum here
const ( NetworkStatisticsEntryFileType NetworkStatisticsEntryEnum = "networkStatisticsEntryFile" NetworkStatisticsEntryCallType NetworkStatisticsEntryEnum = "networkStatisticsEntryCall" )
NetworkStatisticsEntry enums
type NetworkStatisticsEntryFile ¶
type NetworkStatisticsEntryFile struct { FileType FileType `json:"file_type"` // Type of the file the data is part of NetworkType NetworkType `json:"network_type"` // Type of the network the data was sent through. Call setNetworkType to maintain the actual network type SentBytes int64 `json:"sent_bytes"` // Total number of bytes sent ReceivedBytes int64 `json:"received_bytes"` // Total number of bytes received // contains filtered or unexported fields }
NetworkStatisticsEntryFile Contains information about the total amount of data that was used to send and receive files
func NewNetworkStatisticsEntryFile ¶
func NewNetworkStatisticsEntryFile(fileType FileType, networkType NetworkType, sentBytes int64, receivedBytes int64) *NetworkStatisticsEntryFile
NewNetworkStatisticsEntryFile creates a new NetworkStatisticsEntryFile
@param fileType Type of the file the data is part of @param networkType Type of the network the data was sent through. Call setNetworkType to maintain the actual network type @param sentBytes Total number of bytes sent @param receivedBytes Total number of bytes received
func (*NetworkStatisticsEntryFile) GetNetworkStatisticsEntryEnum ¶
func (networkStatisticsEntryFile *NetworkStatisticsEntryFile) GetNetworkStatisticsEntryEnum() NetworkStatisticsEntryEnum
GetNetworkStatisticsEntryEnum return the enum type of this object
func (*NetworkStatisticsEntryFile) MessageType ¶
func (networkStatisticsEntryFile *NetworkStatisticsEntryFile) MessageType() string
MessageType return the string telegram-type of NetworkStatisticsEntryFile
func (*NetworkStatisticsEntryFile) UnmarshalJSON ¶
func (networkStatisticsEntryFile *NetworkStatisticsEntryFile) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type NetworkType ¶
type NetworkType interface {
GetNetworkTypeEnum() NetworkTypeEnum
}
NetworkType Represents the type of a network
type NetworkTypeEnum ¶
type NetworkTypeEnum string
NetworkTypeEnum Alias for abstract NetworkType 'Sub-Classes', used as constant-enum here
const ( NetworkTypeNoneType NetworkTypeEnum = "networkTypeNone" NetworkTypeMobileType NetworkTypeEnum = "networkTypeMobile" NetworkTypeMobileRoamingType NetworkTypeEnum = "networkTypeMobileRoaming" NetworkTypeWiFiType NetworkTypeEnum = "networkTypeWiFi" NetworkTypeOtherType NetworkTypeEnum = "networkTypeOther" )
NetworkType enums
type NetworkTypeMobile ¶
type NetworkTypeMobile struct {
// contains filtered or unexported fields
}
NetworkTypeMobile A mobile network
func NewNetworkTypeMobile ¶
func NewNetworkTypeMobile() *NetworkTypeMobile
NewNetworkTypeMobile creates a new NetworkTypeMobile
func (*NetworkTypeMobile) GetNetworkTypeEnum ¶
func (networkTypeMobile *NetworkTypeMobile) GetNetworkTypeEnum() NetworkTypeEnum
GetNetworkTypeEnum return the enum type of this object
func (*NetworkTypeMobile) MessageType ¶
func (networkTypeMobile *NetworkTypeMobile) MessageType() string
MessageType return the string telegram-type of NetworkTypeMobile
type NetworkTypeMobileRoaming ¶
type NetworkTypeMobileRoaming struct {
// contains filtered or unexported fields
}
NetworkTypeMobileRoaming A mobile roaming network
func NewNetworkTypeMobileRoaming ¶
func NewNetworkTypeMobileRoaming() *NetworkTypeMobileRoaming
NewNetworkTypeMobileRoaming creates a new NetworkTypeMobileRoaming
func (*NetworkTypeMobileRoaming) GetNetworkTypeEnum ¶
func (networkTypeMobileRoaming *NetworkTypeMobileRoaming) GetNetworkTypeEnum() NetworkTypeEnum
GetNetworkTypeEnum return the enum type of this object
func (*NetworkTypeMobileRoaming) MessageType ¶
func (networkTypeMobileRoaming *NetworkTypeMobileRoaming) MessageType() string
MessageType return the string telegram-type of NetworkTypeMobileRoaming
type NetworkTypeNone ¶
type NetworkTypeNone struct {
// contains filtered or unexported fields
}
NetworkTypeNone The network is not available
func NewNetworkTypeNone ¶
func NewNetworkTypeNone() *NetworkTypeNone
NewNetworkTypeNone creates a new NetworkTypeNone
func (*NetworkTypeNone) GetNetworkTypeEnum ¶
func (networkTypeNone *NetworkTypeNone) GetNetworkTypeEnum() NetworkTypeEnum
GetNetworkTypeEnum return the enum type of this object
func (*NetworkTypeNone) MessageType ¶
func (networkTypeNone *NetworkTypeNone) MessageType() string
MessageType return the string telegram-type of NetworkTypeNone
type NetworkTypeOther ¶
type NetworkTypeOther struct {
// contains filtered or unexported fields
}
NetworkTypeOther A different network type (e.g., Ethernet network)
func NewNetworkTypeOther ¶
func NewNetworkTypeOther() *NetworkTypeOther
NewNetworkTypeOther creates a new NetworkTypeOther
func (*NetworkTypeOther) GetNetworkTypeEnum ¶
func (networkTypeOther *NetworkTypeOther) GetNetworkTypeEnum() NetworkTypeEnum
GetNetworkTypeEnum return the enum type of this object
func (*NetworkTypeOther) MessageType ¶
func (networkTypeOther *NetworkTypeOther) MessageType() string
MessageType return the string telegram-type of NetworkTypeOther
type NetworkTypeWiFi ¶
type NetworkTypeWiFi struct {
// contains filtered or unexported fields
}
NetworkTypeWiFi A Wi-Fi network
func NewNetworkTypeWiFi ¶
func NewNetworkTypeWiFi() *NetworkTypeWiFi
NewNetworkTypeWiFi creates a new NetworkTypeWiFi
func (*NetworkTypeWiFi) GetNetworkTypeEnum ¶
func (networkTypeWiFi *NetworkTypeWiFi) GetNetworkTypeEnum() NetworkTypeEnum
GetNetworkTypeEnum return the enum type of this object
func (*NetworkTypeWiFi) MessageType ¶
func (networkTypeWiFi *NetworkTypeWiFi) MessageType() string
MessageType return the string telegram-type of NetworkTypeWiFi
type NotificationSettings ¶
type NotificationSettings struct { MuteFor int32 `json:"mute_for"` // Time left before notifications will be unmuted, in seconds Sound string `json:"sound"` // An audio file name for notification sounds; only applies to iOS applications ShowPreview bool `json:"show_preview"` // True, if message content should be displayed in notifications // contains filtered or unexported fields }
NotificationSettings Contains information about notification settings for a chat or several chats
func NewNotificationSettings ¶
func NewNotificationSettings(muteFor int32, sound string, showPreview bool) *NotificationSettings
NewNotificationSettings creates a new NotificationSettings
@param muteFor Time left before notifications will be unmuted, in seconds @param sound An audio file name for notification sounds; only applies to iOS applications @param showPreview True, if message content should be displayed in notifications
func (*NotificationSettings) MessageType ¶
func (notificationSettings *NotificationSettings) MessageType() string
MessageType return the string telegram-type of NotificationSettings
type NotificationSettingsScope ¶
type NotificationSettingsScope interface {
GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
}
NotificationSettingsScope Describes the types of chats for which notification settings are applied
type NotificationSettingsScopeAllChats ¶
type NotificationSettingsScopeAllChats struct {
// contains filtered or unexported fields
}
NotificationSettingsScopeAllChats Notification settings applied to all chats
func NewNotificationSettingsScopeAllChats ¶
func NewNotificationSettingsScopeAllChats() *NotificationSettingsScopeAllChats
NewNotificationSettingsScopeAllChats creates a new NotificationSettingsScopeAllChats
func (*NotificationSettingsScopeAllChats) GetNotificationSettingsScopeEnum ¶
func (notificationSettingsScopeAllChats *NotificationSettingsScopeAllChats) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
GetNotificationSettingsScopeEnum return the enum type of this object
func (*NotificationSettingsScopeAllChats) MessageType ¶
func (notificationSettingsScopeAllChats *NotificationSettingsScopeAllChats) MessageType() string
MessageType return the string telegram-type of NotificationSettingsScopeAllChats
type NotificationSettingsScopeBasicGroupChats ¶
type NotificationSettingsScopeBasicGroupChats struct {
// contains filtered or unexported fields
}
NotificationSettingsScopeBasicGroupChats Notification settings applied to all basic groups and channels. (Supergroups have no common settings)
func NewNotificationSettingsScopeBasicGroupChats ¶
func NewNotificationSettingsScopeBasicGroupChats() *NotificationSettingsScopeBasicGroupChats
NewNotificationSettingsScopeBasicGroupChats creates a new NotificationSettingsScopeBasicGroupChats
func (*NotificationSettingsScopeBasicGroupChats) GetNotificationSettingsScopeEnum ¶
func (notificationSettingsScopeBasicGroupChats *NotificationSettingsScopeBasicGroupChats) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
GetNotificationSettingsScopeEnum return the enum type of this object
func (*NotificationSettingsScopeBasicGroupChats) MessageType ¶
func (notificationSettingsScopeBasicGroupChats *NotificationSettingsScopeBasicGroupChats) MessageType() string
MessageType return the string telegram-type of NotificationSettingsScopeBasicGroupChats
type NotificationSettingsScopeChat ¶
type NotificationSettingsScopeChat struct { ChatID int64 `json:"chat_id"` // Chat identifier // contains filtered or unexported fields }
NotificationSettingsScopeChat Notification settings applied to a particular chat
func NewNotificationSettingsScopeChat ¶
func NewNotificationSettingsScopeChat(chatID int64) *NotificationSettingsScopeChat
NewNotificationSettingsScopeChat creates a new NotificationSettingsScopeChat
@param chatID Chat identifier
func (*NotificationSettingsScopeChat) GetNotificationSettingsScopeEnum ¶
func (notificationSettingsScopeChat *NotificationSettingsScopeChat) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
GetNotificationSettingsScopeEnum return the enum type of this object
func (*NotificationSettingsScopeChat) MessageType ¶
func (notificationSettingsScopeChat *NotificationSettingsScopeChat) MessageType() string
MessageType return the string telegram-type of NotificationSettingsScopeChat
type NotificationSettingsScopeEnum ¶
type NotificationSettingsScopeEnum string
NotificationSettingsScopeEnum Alias for abstract NotificationSettingsScope 'Sub-Classes', used as constant-enum here
const ( NotificationSettingsScopeChatType NotificationSettingsScopeEnum = "notificationSettingsScopeChat" NotificationSettingsScopePrivateChatsType NotificationSettingsScopeEnum = "notificationSettingsScopePrivateChats" NotificationSettingsScopeBasicGroupChatsType NotificationSettingsScopeEnum = "notificationSettingsScopeBasicGroupChats" NotificationSettingsScopeAllChatsType NotificationSettingsScopeEnum = "notificationSettingsScopeAllChats" )
NotificationSettingsScope enums
type NotificationSettingsScopePrivateChats ¶
type NotificationSettingsScopePrivateChats struct {
// contains filtered or unexported fields
}
NotificationSettingsScopePrivateChats Notification settings applied to all private chats
func NewNotificationSettingsScopePrivateChats ¶
func NewNotificationSettingsScopePrivateChats() *NotificationSettingsScopePrivateChats
NewNotificationSettingsScopePrivateChats creates a new NotificationSettingsScopePrivateChats
func (*NotificationSettingsScopePrivateChats) GetNotificationSettingsScopeEnum ¶
func (notificationSettingsScopePrivateChats *NotificationSettingsScopePrivateChats) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
GetNotificationSettingsScopeEnum return the enum type of this object
func (*NotificationSettingsScopePrivateChats) MessageType ¶
func (notificationSettingsScopePrivateChats *NotificationSettingsScopePrivateChats) MessageType() string
MessageType return the string telegram-type of NotificationSettingsScopePrivateChats
type Ok ¶
type Ok struct {
// contains filtered or unexported fields
}
Ok An object of this type is returned on a successful function call for certain functions
func (*Ok) MessageType ¶
MessageType return the string telegram-type of Ok
type OptionValue ¶
type OptionValue interface {
GetOptionValueEnum() OptionValueEnum
}
OptionValue Represents the value of an option
type OptionValueBoolean ¶
type OptionValueBoolean struct { Value bool `json:"value"` // The value of the option // contains filtered or unexported fields }
OptionValueBoolean Boolean option
func NewOptionValueBoolean ¶
func NewOptionValueBoolean(value bool) *OptionValueBoolean
NewOptionValueBoolean creates a new OptionValueBoolean
@param value The value of the option
func (*OptionValueBoolean) GetOptionValueEnum ¶
func (optionValueBoolean *OptionValueBoolean) GetOptionValueEnum() OptionValueEnum
GetOptionValueEnum return the enum type of this object
func (*OptionValueBoolean) MessageType ¶
func (optionValueBoolean *OptionValueBoolean) MessageType() string
MessageType return the string telegram-type of OptionValueBoolean
type OptionValueEmpty ¶
type OptionValueEmpty struct {
// contains filtered or unexported fields
}
OptionValueEmpty An unknown option or an option which has a default value
func NewOptionValueEmpty ¶
func NewOptionValueEmpty() *OptionValueEmpty
NewOptionValueEmpty creates a new OptionValueEmpty
func (*OptionValueEmpty) GetOptionValueEnum ¶
func (optionValueEmpty *OptionValueEmpty) GetOptionValueEnum() OptionValueEnum
GetOptionValueEnum return the enum type of this object
func (*OptionValueEmpty) MessageType ¶
func (optionValueEmpty *OptionValueEmpty) MessageType() string
MessageType return the string telegram-type of OptionValueEmpty
type OptionValueEnum ¶
type OptionValueEnum string
OptionValueEnum Alias for abstract OptionValue 'Sub-Classes', used as constant-enum here
const ( OptionValueBooleanType OptionValueEnum = "optionValueBoolean" OptionValueEmptyType OptionValueEnum = "optionValueEmpty" OptionValueIntegerType OptionValueEnum = "optionValueInteger" OptionValueStringType OptionValueEnum = "optionValueString" )
OptionValue enums
type OptionValueInteger ¶
type OptionValueInteger struct { Value int32 `json:"value"` // The value of the option // contains filtered or unexported fields }
OptionValueInteger An integer option
func NewOptionValueInteger ¶
func NewOptionValueInteger(value int32) *OptionValueInteger
NewOptionValueInteger creates a new OptionValueInteger
@param value The value of the option
func (*OptionValueInteger) GetOptionValueEnum ¶
func (optionValueInteger *OptionValueInteger) GetOptionValueEnum() OptionValueEnum
GetOptionValueEnum return the enum type of this object
func (*OptionValueInteger) MessageType ¶
func (optionValueInteger *OptionValueInteger) MessageType() string
MessageType return the string telegram-type of OptionValueInteger
type OptionValueString ¶
type OptionValueString struct { Value string `json:"value"` // The value of the option // contains filtered or unexported fields }
OptionValueString A string option
func NewOptionValueString ¶
func NewOptionValueString(value string) *OptionValueString
NewOptionValueString creates a new OptionValueString
@param value The value of the option
func (*OptionValueString) GetOptionValueEnum ¶
func (optionValueString *OptionValueString) GetOptionValueEnum() OptionValueEnum
GetOptionValueEnum return the enum type of this object
func (*OptionValueString) MessageType ¶
func (optionValueString *OptionValueString) MessageType() string
MessageType return the string telegram-type of OptionValueString
type OrderInfo ¶
type OrderInfo struct { Name string `json:"name"` // Name of the user PhoneNumber string `json:"phone_number"` // Phone number of the user EmailAddress string `json:"email_address"` // Email address of the user ShippingAddress *ShippingAddress `json:"shipping_address"` // Shipping address for this order; may be null // contains filtered or unexported fields }
OrderInfo Order information
func NewOrderInfo ¶
func NewOrderInfo(name string, phoneNumber string, emailAddress string, shippingAddress *ShippingAddress) *OrderInfo
NewOrderInfo creates a new OrderInfo
@param name Name of the user @param phoneNumber Phone number of the user @param emailAddress Email address of the user @param shippingAddress Shipping address for this order; may be null
func (*OrderInfo) MessageType ¶
MessageType return the string telegram-type of OrderInfo
type PageBlock ¶
type PageBlock interface {
GetPageBlockEnum() PageBlockEnum
}
PageBlock Describes a block of an instant view web page
type PageBlockAnchor ¶
type PageBlockAnchor struct { Name string `json:"name"` // Name of the anchor // contains filtered or unexported fields }
PageBlockAnchor An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor
func NewPageBlockAnchor ¶
func NewPageBlockAnchor(name string) *PageBlockAnchor
NewPageBlockAnchor creates a new PageBlockAnchor
@param name Name of the anchor
func (*PageBlockAnchor) GetPageBlockEnum ¶
func (pageBlockAnchor *PageBlockAnchor) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockAnchor) MessageType ¶
func (pageBlockAnchor *PageBlockAnchor) MessageType() string
MessageType return the string telegram-type of PageBlockAnchor
type PageBlockAnimation ¶
type PageBlockAnimation struct { Animation *Animation `json:"animation"` // Animation file; may be null Caption RichText `json:"caption"` // Animation caption NeedAutoplay bool `json:"need_autoplay"` // True, if the animation should be played automatically // contains filtered or unexported fields }
PageBlockAnimation An animation
func NewPageBlockAnimation ¶
func NewPageBlockAnimation(animation *Animation, caption RichText, needAutoplay bool) *PageBlockAnimation
NewPageBlockAnimation creates a new PageBlockAnimation
@param animation Animation file; may be null @param caption Animation caption @param needAutoplay True, if the animation should be played automatically
func (*PageBlockAnimation) GetPageBlockEnum ¶
func (pageBlockAnimation *PageBlockAnimation) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockAnimation) MessageType ¶
func (pageBlockAnimation *PageBlockAnimation) MessageType() string
MessageType return the string telegram-type of PageBlockAnimation
func (*PageBlockAnimation) UnmarshalJSON ¶
func (pageBlockAnimation *PageBlockAnimation) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockAudio ¶
type PageBlockAudio struct { Audio *Audio `json:"audio"` // Audio file; may be null Caption RichText `json:"caption"` // Audio file caption // contains filtered or unexported fields }
PageBlockAudio An audio file
func NewPageBlockAudio ¶
func NewPageBlockAudio(audio *Audio, caption RichText) *PageBlockAudio
NewPageBlockAudio creates a new PageBlockAudio
@param audio Audio file; may be null @param caption Audio file caption
func (*PageBlockAudio) GetPageBlockEnum ¶
func (pageBlockAudio *PageBlockAudio) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockAudio) MessageType ¶
func (pageBlockAudio *PageBlockAudio) MessageType() string
MessageType return the string telegram-type of PageBlockAudio
func (*PageBlockAudio) UnmarshalJSON ¶
func (pageBlockAudio *PageBlockAudio) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockAuthorDate ¶
type PageBlockAuthorDate struct { Author RichText `json:"author"` // Author PublishDate int32 `json:"publish_date"` // Point in time (Unix timestamp) when the article was published; 0 if unknown // contains filtered or unexported fields }
PageBlockAuthorDate The author and publishing date of a page
func NewPageBlockAuthorDate ¶
func NewPageBlockAuthorDate(author RichText, publishDate int32) *PageBlockAuthorDate
NewPageBlockAuthorDate creates a new PageBlockAuthorDate
@param author Author @param publishDate Point in time (Unix timestamp) when the article was published; 0 if unknown
func (*PageBlockAuthorDate) GetPageBlockEnum ¶
func (pageBlockAuthorDate *PageBlockAuthorDate) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockAuthorDate) MessageType ¶
func (pageBlockAuthorDate *PageBlockAuthorDate) MessageType() string
MessageType return the string telegram-type of PageBlockAuthorDate
func (*PageBlockAuthorDate) UnmarshalJSON ¶
func (pageBlockAuthorDate *PageBlockAuthorDate) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockBlockQuote ¶
type PageBlockBlockQuote struct { Text RichText `json:"text"` // Quote text Caption RichText `json:"caption"` // Quote caption // contains filtered or unexported fields }
PageBlockBlockQuote A block quote
func NewPageBlockBlockQuote ¶
func NewPageBlockBlockQuote(text RichText, caption RichText) *PageBlockBlockQuote
NewPageBlockBlockQuote creates a new PageBlockBlockQuote
@param text Quote text @param caption Quote caption
func (*PageBlockBlockQuote) GetPageBlockEnum ¶
func (pageBlockBlockQuote *PageBlockBlockQuote) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockBlockQuote) MessageType ¶
func (pageBlockBlockQuote *PageBlockBlockQuote) MessageType() string
MessageType return the string telegram-type of PageBlockBlockQuote
func (*PageBlockBlockQuote) UnmarshalJSON ¶
func (pageBlockBlockQuote *PageBlockBlockQuote) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockChatLink ¶
type PageBlockChatLink struct { Title string `json:"title"` // Chat title Photo *ChatPhoto `json:"photo"` // Chat photo; may be null Username string `json:"username"` // Chat username, by which all other information about the chat should be resolved // contains filtered or unexported fields }
PageBlockChatLink A link to a chat
func NewPageBlockChatLink ¶
func NewPageBlockChatLink(title string, photo *ChatPhoto, username string) *PageBlockChatLink
NewPageBlockChatLink creates a new PageBlockChatLink
@param title Chat title @param photo Chat photo; may be null @param username Chat username, by which all other information about the chat should be resolved
func (*PageBlockChatLink) GetPageBlockEnum ¶
func (pageBlockChatLink *PageBlockChatLink) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockChatLink) MessageType ¶
func (pageBlockChatLink *PageBlockChatLink) MessageType() string
MessageType return the string telegram-type of PageBlockChatLink
type PageBlockCollage ¶
type PageBlockCollage struct { PageBlocks []PageBlock `json:"page_blocks"` // Collage item contents Caption RichText `json:"caption"` // Block caption // contains filtered or unexported fields }
PageBlockCollage A collage
func NewPageBlockCollage ¶
func NewPageBlockCollage(pageBlocks []PageBlock, caption RichText) *PageBlockCollage
NewPageBlockCollage creates a new PageBlockCollage
@param pageBlocks Collage item contents @param caption Block caption
func (*PageBlockCollage) GetPageBlockEnum ¶
func (pageBlockCollage *PageBlockCollage) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockCollage) MessageType ¶
func (pageBlockCollage *PageBlockCollage) MessageType() string
MessageType return the string telegram-type of PageBlockCollage
func (*PageBlockCollage) UnmarshalJSON ¶
func (pageBlockCollage *PageBlockCollage) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockCover ¶
type PageBlockCover struct { Cover PageBlock `json:"cover"` // Cover // contains filtered or unexported fields }
PageBlockCover A page cover
func NewPageBlockCover ¶
func NewPageBlockCover(cover PageBlock) *PageBlockCover
NewPageBlockCover creates a new PageBlockCover
@param cover Cover
func (*PageBlockCover) GetPageBlockEnum ¶
func (pageBlockCover *PageBlockCover) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockCover) MessageType ¶
func (pageBlockCover *PageBlockCover) MessageType() string
MessageType return the string telegram-type of PageBlockCover
func (*PageBlockCover) UnmarshalJSON ¶
func (pageBlockCover *PageBlockCover) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockDivider ¶
type PageBlockDivider struct {
// contains filtered or unexported fields
}
PageBlockDivider An empty block separating a page
func NewPageBlockDivider ¶
func NewPageBlockDivider() *PageBlockDivider
NewPageBlockDivider creates a new PageBlockDivider
func (*PageBlockDivider) GetPageBlockEnum ¶
func (pageBlockDivider *PageBlockDivider) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockDivider) MessageType ¶
func (pageBlockDivider *PageBlockDivider) MessageType() string
MessageType return the string telegram-type of PageBlockDivider
type PageBlockEmbedded ¶
type PageBlockEmbedded struct { URL string `json:"url"` // Web page URL, if available HTML string `json:"html"` // HTML-markup of the embedded page PosterPhoto *Photo `json:"poster_photo"` // Poster photo, if available; may be null Width int32 `json:"width"` // Block width Height int32 `json:"height"` // Block height Caption RichText `json:"caption"` // Block caption IsFullWidth bool `json:"is_full_width"` // True, if the block should be full width AllowScrolling bool `json:"allow_scrolling"` // True, if scrolling should be allowed // contains filtered or unexported fields }
PageBlockEmbedded An embedded web page
func NewPageBlockEmbedded ¶
func NewPageBlockEmbedded(uRL string, hTML string, posterPhoto *Photo, width int32, height int32, caption RichText, isFullWidth bool, allowScrolling bool) *PageBlockEmbedded
NewPageBlockEmbedded creates a new PageBlockEmbedded
@param uRL Web page URL, if available @param hTML HTML-markup of the embedded page @param posterPhoto Poster photo, if available; may be null @param width Block width @param height Block height @param caption Block caption @param isFullWidth True, if the block should be full width @param allowScrolling True, if scrolling should be allowed
func (*PageBlockEmbedded) GetPageBlockEnum ¶
func (pageBlockEmbedded *PageBlockEmbedded) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockEmbedded) MessageType ¶
func (pageBlockEmbedded *PageBlockEmbedded) MessageType() string
MessageType return the string telegram-type of PageBlockEmbedded
func (*PageBlockEmbedded) UnmarshalJSON ¶
func (pageBlockEmbedded *PageBlockEmbedded) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockEmbeddedPost ¶
type PageBlockEmbeddedPost struct { URL string `json:"url"` // Web page URL Author string `json:"author"` // Post author AuthorPhoto *Photo `json:"author_photo"` // Post author photo Date int32 `json:"date"` // Point in time (Unix timestamp) when the post was created; 0 if unknown PageBlocks []PageBlock `json:"page_blocks"` // Post content Caption RichText `json:"caption"` // Post caption // contains filtered or unexported fields }
PageBlockEmbeddedPost An embedded post
func NewPageBlockEmbeddedPost ¶
func NewPageBlockEmbeddedPost(uRL string, author string, authorPhoto *Photo, date int32, pageBlocks []PageBlock, caption RichText) *PageBlockEmbeddedPost
NewPageBlockEmbeddedPost creates a new PageBlockEmbeddedPost
@param uRL Web page URL @param author Post author @param authorPhoto Post author photo @param date Point in time (Unix timestamp) when the post was created; 0 if unknown @param pageBlocks Post content @param caption Post caption
func (*PageBlockEmbeddedPost) GetPageBlockEnum ¶
func (pageBlockEmbeddedPost *PageBlockEmbeddedPost) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockEmbeddedPost) MessageType ¶
func (pageBlockEmbeddedPost *PageBlockEmbeddedPost) MessageType() string
MessageType return the string telegram-type of PageBlockEmbeddedPost
func (*PageBlockEmbeddedPost) UnmarshalJSON ¶
func (pageBlockEmbeddedPost *PageBlockEmbeddedPost) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockEnum ¶
type PageBlockEnum string
PageBlockEnum Alias for abstract PageBlock 'Sub-Classes', used as constant-enum here
const ( PageBlockTitleType PageBlockEnum = "pageBlockTitle" PageBlockSubtitleType PageBlockEnum = "pageBlockSubtitle" PageBlockAuthorDateType PageBlockEnum = "pageBlockAuthorDate" PageBlockHeaderType PageBlockEnum = "pageBlockHeader" PageBlockSubheaderType PageBlockEnum = "pageBlockSubheader" PageBlockParagraphType PageBlockEnum = "pageBlockParagraph" PageBlockPreformattedType PageBlockEnum = "pageBlockPreformatted" PageBlockDividerType PageBlockEnum = "pageBlockDivider" PageBlockAnchorType PageBlockEnum = "pageBlockAnchor" PageBlockListType PageBlockEnum = "pageBlockList" PageBlockBlockQuoteType PageBlockEnum = "pageBlockBlockQuote" PageBlockPullQuoteType PageBlockEnum = "pageBlockPullQuote" PageBlockAnimationType PageBlockEnum = "pageBlockAnimation" PageBlockAudioType PageBlockEnum = "pageBlockAudio" PageBlockPhotoType PageBlockEnum = "pageBlockPhoto" PageBlockVideoType PageBlockEnum = "pageBlockVideo" PageBlockCoverType PageBlockEnum = "pageBlockCover" PageBlockEmbeddedType PageBlockEnum = "pageBlockEmbedded" PageBlockEmbeddedPostType PageBlockEnum = "pageBlockEmbeddedPost" PageBlockCollageType PageBlockEnum = "pageBlockCollage" PageBlockSlideshowType PageBlockEnum = "pageBlockSlideshow" PageBlockChatLinkType PageBlockEnum = "pageBlockChatLink" )
PageBlock enums
type PageBlockFooter ¶
type PageBlockFooter struct { // contains filtered or unexported fields }
PageBlockFooter The footer of a page
func NewPageBlockFooter ¶
func NewPageBlockFooter(footer RichText) *PageBlockFooter
NewPageBlockFooter creates a new PageBlockFooter
@param footer Footer
func (*PageBlockFooter) GetPageBlockEnum ¶
func (pageBlockFooter *PageBlockFooter) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockFooter) MessageType ¶
func (pageBlockFooter *PageBlockFooter) MessageType() string
MessageType return the string telegram-type of PageBlockFooter
func (*PageBlockFooter) UnmarshalJSON ¶
func (pageBlockFooter *PageBlockFooter) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockHeader ¶
type PageBlockHeader struct { Header RichText `json:"header"` // Header // contains filtered or unexported fields }
PageBlockHeader A header
func NewPageBlockHeader ¶
func NewPageBlockHeader(header RichText) *PageBlockHeader
NewPageBlockHeader creates a new PageBlockHeader
@param header Header
func (*PageBlockHeader) GetPageBlockEnum ¶
func (pageBlockHeader *PageBlockHeader) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockHeader) MessageType ¶
func (pageBlockHeader *PageBlockHeader) MessageType() string
MessageType return the string telegram-type of PageBlockHeader
func (*PageBlockHeader) UnmarshalJSON ¶
func (pageBlockHeader *PageBlockHeader) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockList ¶
type PageBlockList struct { Items []RichText `json:"items"` // Texts IsOrdered bool `json:"is_ordered"` // True, if the items should be marked with numbers // contains filtered or unexported fields }
PageBlockList A list of texts
func NewPageBlockList ¶
func NewPageBlockList(items []RichText, isOrdered bool) *PageBlockList
NewPageBlockList creates a new PageBlockList
@param items Texts @param isOrdered True, if the items should be marked with numbers
func (*PageBlockList) GetPageBlockEnum ¶
func (pageBlockList *PageBlockList) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockList) MessageType ¶
func (pageBlockList *PageBlockList) MessageType() string
MessageType return the string telegram-type of PageBlockList
type PageBlockParagraph ¶
type PageBlockParagraph struct { Text RichText `json:"text"` // Paragraph text // contains filtered or unexported fields }
PageBlockParagraph A text paragraph
func NewPageBlockParagraph ¶
func NewPageBlockParagraph(text RichText) *PageBlockParagraph
NewPageBlockParagraph creates a new PageBlockParagraph
@param text Paragraph text
func (*PageBlockParagraph) GetPageBlockEnum ¶
func (pageBlockParagraph *PageBlockParagraph) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockParagraph) MessageType ¶
func (pageBlockParagraph *PageBlockParagraph) MessageType() string
MessageType return the string telegram-type of PageBlockParagraph
func (*PageBlockParagraph) UnmarshalJSON ¶
func (pageBlockParagraph *PageBlockParagraph) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockPhoto ¶
type PageBlockPhoto struct { Photo *Photo `json:"photo"` // Photo file; may be null Caption RichText `json:"caption"` // Photo caption // contains filtered or unexported fields }
PageBlockPhoto A photo
func NewPageBlockPhoto ¶
func NewPageBlockPhoto(photo *Photo, caption RichText) *PageBlockPhoto
NewPageBlockPhoto creates a new PageBlockPhoto
@param photo Photo file; may be null @param caption Photo caption
func (*PageBlockPhoto) GetPageBlockEnum ¶
func (pageBlockPhoto *PageBlockPhoto) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockPhoto) MessageType ¶
func (pageBlockPhoto *PageBlockPhoto) MessageType() string
MessageType return the string telegram-type of PageBlockPhoto
func (*PageBlockPhoto) UnmarshalJSON ¶
func (pageBlockPhoto *PageBlockPhoto) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockPreformatted ¶
type PageBlockPreformatted struct { Text RichText `json:"text"` // Paragraph text Language string `json:"language"` // Programming language for which the text should be formatted // contains filtered or unexported fields }
PageBlockPreformatted A preformatted text paragraph
func NewPageBlockPreformatted ¶
func NewPageBlockPreformatted(text RichText, language string) *PageBlockPreformatted
NewPageBlockPreformatted creates a new PageBlockPreformatted
@param text Paragraph text @param language Programming language for which the text should be formatted
func (*PageBlockPreformatted) GetPageBlockEnum ¶
func (pageBlockPreformatted *PageBlockPreformatted) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockPreformatted) MessageType ¶
func (pageBlockPreformatted *PageBlockPreformatted) MessageType() string
MessageType return the string telegram-type of PageBlockPreformatted
func (*PageBlockPreformatted) UnmarshalJSON ¶
func (pageBlockPreformatted *PageBlockPreformatted) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockPullQuote ¶
type PageBlockPullQuote struct { Text RichText `json:"text"` // Quote text Caption RichText `json:"caption"` // Quote caption // contains filtered or unexported fields }
PageBlockPullQuote A pull quote
func NewPageBlockPullQuote ¶
func NewPageBlockPullQuote(text RichText, caption RichText) *PageBlockPullQuote
NewPageBlockPullQuote creates a new PageBlockPullQuote
@param text Quote text @param caption Quote caption
func (*PageBlockPullQuote) GetPageBlockEnum ¶
func (pageBlockPullQuote *PageBlockPullQuote) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockPullQuote) MessageType ¶
func (pageBlockPullQuote *PageBlockPullQuote) MessageType() string
MessageType return the string telegram-type of PageBlockPullQuote
func (*PageBlockPullQuote) UnmarshalJSON ¶
func (pageBlockPullQuote *PageBlockPullQuote) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockSlideshow ¶
type PageBlockSlideshow struct { PageBlocks []PageBlock `json:"page_blocks"` // Slideshow item contents Caption RichText `json:"caption"` // Block caption // contains filtered or unexported fields }
PageBlockSlideshow A slideshow
func NewPageBlockSlideshow ¶
func NewPageBlockSlideshow(pageBlocks []PageBlock, caption RichText) *PageBlockSlideshow
NewPageBlockSlideshow creates a new PageBlockSlideshow
@param pageBlocks Slideshow item contents @param caption Block caption
func (*PageBlockSlideshow) GetPageBlockEnum ¶
func (pageBlockSlideshow *PageBlockSlideshow) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockSlideshow) MessageType ¶
func (pageBlockSlideshow *PageBlockSlideshow) MessageType() string
MessageType return the string telegram-type of PageBlockSlideshow
func (*PageBlockSlideshow) UnmarshalJSON ¶
func (pageBlockSlideshow *PageBlockSlideshow) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockSubheader ¶
type PageBlockSubheader struct { Subheader RichText `json:"subheader"` // Subheader // contains filtered or unexported fields }
PageBlockSubheader A subheader
func NewPageBlockSubheader ¶
func NewPageBlockSubheader(subheader RichText) *PageBlockSubheader
NewPageBlockSubheader creates a new PageBlockSubheader
@param subheader Subheader
func (*PageBlockSubheader) GetPageBlockEnum ¶
func (pageBlockSubheader *PageBlockSubheader) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockSubheader) MessageType ¶
func (pageBlockSubheader *PageBlockSubheader) MessageType() string
MessageType return the string telegram-type of PageBlockSubheader
func (*PageBlockSubheader) UnmarshalJSON ¶
func (pageBlockSubheader *PageBlockSubheader) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockSubtitle ¶
type PageBlockSubtitle struct { Subtitle RichText `json:"subtitle"` // Subtitle // contains filtered or unexported fields }
PageBlockSubtitle The subtitle of a page
func NewPageBlockSubtitle ¶
func NewPageBlockSubtitle(subtitle RichText) *PageBlockSubtitle
NewPageBlockSubtitle creates a new PageBlockSubtitle
@param subtitle Subtitle
func (*PageBlockSubtitle) GetPageBlockEnum ¶
func (pageBlockSubtitle *PageBlockSubtitle) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockSubtitle) MessageType ¶
func (pageBlockSubtitle *PageBlockSubtitle) MessageType() string
MessageType return the string telegram-type of PageBlockSubtitle
func (*PageBlockSubtitle) UnmarshalJSON ¶
func (pageBlockSubtitle *PageBlockSubtitle) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockTitle ¶
type PageBlockTitle struct { Title RichText `json:"title"` // Title // contains filtered or unexported fields }
PageBlockTitle The title of a page
func NewPageBlockTitle ¶
func NewPageBlockTitle(title RichText) *PageBlockTitle
NewPageBlockTitle creates a new PageBlockTitle
@param title Title
func (*PageBlockTitle) GetPageBlockEnum ¶
func (pageBlockTitle *PageBlockTitle) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockTitle) MessageType ¶
func (pageBlockTitle *PageBlockTitle) MessageType() string
MessageType return the string telegram-type of PageBlockTitle
func (*PageBlockTitle) UnmarshalJSON ¶
func (pageBlockTitle *PageBlockTitle) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PageBlockVideo ¶
type PageBlockVideo struct { Video *Video `json:"video"` // Video file; may be null Caption RichText `json:"caption"` // Video caption NeedAutoplay bool `json:"need_autoplay"` // True, if the video should be played automatically IsLooped bool `json:"is_looped"` // True, if the video should be looped // contains filtered or unexported fields }
PageBlockVideo A video
func NewPageBlockVideo ¶
func NewPageBlockVideo(video *Video, caption RichText, needAutoplay bool, isLooped bool) *PageBlockVideo
NewPageBlockVideo creates a new PageBlockVideo
@param video Video file; may be null @param caption Video caption @param needAutoplay True, if the video should be played automatically @param isLooped True, if the video should be looped
func (*PageBlockVideo) GetPageBlockEnum ¶
func (pageBlockVideo *PageBlockVideo) GetPageBlockEnum() PageBlockEnum
GetPageBlockEnum return the enum type of this object
func (*PageBlockVideo) MessageType ¶
func (pageBlockVideo *PageBlockVideo) MessageType() string
MessageType return the string telegram-type of PageBlockVideo
func (*PageBlockVideo) UnmarshalJSON ¶
func (pageBlockVideo *PageBlockVideo) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type PasswordRecoveryInfo ¶
type PasswordRecoveryInfo struct { RecoveryEmailAddressPattern string `json:"recovery_email_address_pattern"` // Pattern of the email address to which a recovery email was sent // contains filtered or unexported fields }
PasswordRecoveryInfo Contains information available to the user after requesting password recovery
func NewPasswordRecoveryInfo ¶
func NewPasswordRecoveryInfo(recoveryEmailAddressPattern string) *PasswordRecoveryInfo
NewPasswordRecoveryInfo creates a new PasswordRecoveryInfo
@param recoveryEmailAddressPattern Pattern of the email address to which a recovery email was sent
func (*PasswordRecoveryInfo) MessageType ¶
func (passwordRecoveryInfo *PasswordRecoveryInfo) MessageType() string
MessageType return the string telegram-type of PasswordRecoveryInfo
type PasswordState ¶
type PasswordState struct { HasPassword bool `json:"has_password"` // True if a 2-step verification password has been set up PasswordHint string `json:"password_hint"` // Hint for the password; can be empty HasRecoveryEmailAddress bool `json:"has_recovery_email_address"` // True if a recovery email has been set up UnconfirmedRecoveryEmailAddressPattern string `json:"unconfirmed_recovery_email_address_pattern"` // Pattern of the email address to which a confirmation email was sent // contains filtered or unexported fields }
PasswordState Represents the current state of 2-step verification
func NewPasswordState ¶
func NewPasswordState(hasPassword bool, passwordHint string, hasRecoveryEmailAddress bool, unconfirmedRecoveryEmailAddressPattern string) *PasswordState
NewPasswordState creates a new PasswordState
@param hasPassword True if a 2-step verification password has been set up @param passwordHint Hint for the password; can be empty @param hasRecoveryEmailAddress True if a recovery email has been set up @param unconfirmedRecoveryEmailAddressPattern Pattern of the email address to which a confirmation email was sent
func (*PasswordState) MessageType ¶
func (passwordState *PasswordState) MessageType() string
MessageType return the string telegram-type of PasswordState
type PaymentForm ¶
type PaymentForm struct { Invoice *Invoice `json:"invoice"` // Full information of the invoice URL string `json:"url"` // Payment form URL PaymentsProvider *PaymentsProviderStripe `json:"payments_provider"` // Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null SavedOrderInfo *OrderInfo `json:"saved_order_info"` // Saved server-side order information; may be null SavedCredentials *SavedCredentials `json:"saved_credentials"` // Contains information about saved card credentials; may be null CanSaveCredentials bool `json:"can_save_credentials"` // True, if the user can choose to save credentials NeedPassword bool `json:"need_password"` // True, if the user will be able to save credentials protected by a password they set up // contains filtered or unexported fields }
PaymentForm Contains information about an invoice payment form
func NewPaymentForm ¶
func NewPaymentForm(invoice *Invoice, uRL string, paymentsProvider *PaymentsProviderStripe, savedOrderInfo *OrderInfo, savedCredentials *SavedCredentials, canSaveCredentials bool, needPassword bool) *PaymentForm
NewPaymentForm creates a new PaymentForm
@param invoice Full information of the invoice @param uRL Payment form URL @param paymentsProvider Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null @param savedOrderInfo Saved server-side order information; may be null @param savedCredentials Contains information about saved card credentials; may be null @param canSaveCredentials True, if the user can choose to save credentials @param needPassword True, if the user will be able to save credentials protected by a password they set up
func (*PaymentForm) MessageType ¶
func (paymentForm *PaymentForm) MessageType() string
MessageType return the string telegram-type of PaymentForm
type PaymentReceipt ¶
type PaymentReceipt struct { Date int32 `json:"date"` // Point in time (Unix timestamp) when the payment was made PaymentsProviderUserID int32 `json:"payments_provider_user_id"` // User identifier of the payment provider bot Invoice *Invoice `json:"invoice"` // Contains information about the invoice OrderInfo *OrderInfo `json:"order_info"` // Contains order information; may be null ShippingOption *ShippingOption `json:"shipping_option"` // Chosen shipping option; may be null CredentialsTitle string `json:"credentials_title"` // Title of the saved credentials // contains filtered or unexported fields }
PaymentReceipt Contains information about a successful payment
func NewPaymentReceipt ¶
func NewPaymentReceipt(date int32, paymentsProviderUserID int32, invoice *Invoice, orderInfo *OrderInfo, shippingOption *ShippingOption, credentialsTitle string) *PaymentReceipt
NewPaymentReceipt creates a new PaymentReceipt
@param date Point in time (Unix timestamp) when the payment was made @param paymentsProviderUserID User identifier of the payment provider bot @param invoice Contains information about the invoice @param orderInfo Contains order information; may be null @param shippingOption Chosen shipping option; may be null @param credentialsTitle Title of the saved credentials
func (*PaymentReceipt) MessageType ¶
func (paymentReceipt *PaymentReceipt) MessageType() string
MessageType return the string telegram-type of PaymentReceipt
type PaymentResult ¶
type PaymentResult struct { Success bool `json:"success"` // True, if the payment request was successful; otherwise the verification_url will be not empty VerificationURL string `json:"verification_url"` // URL for additional payment credentials verification // contains filtered or unexported fields }
PaymentResult Contains the result of a payment request
func NewPaymentResult ¶
func NewPaymentResult(success bool, verificationURL string) *PaymentResult
NewPaymentResult creates a new PaymentResult
@param success True, if the payment request was successful; otherwise the verification_url will be not empty @param verificationURL URL for additional payment credentials verification
func (*PaymentResult) MessageType ¶
func (paymentResult *PaymentResult) MessageType() string
MessageType return the string telegram-type of PaymentResult
type PaymentsProviderStripe ¶
type PaymentsProviderStripe struct { PublishableKey string `json:"publishable_key"` // Stripe API publishable key NeedCountry bool `json:"need_country"` // True, if the user country must be provided NeedPostalCode bool `json:"need_postal_code"` // True, if the user ZIP/postal code must be provided NeedCardholderName bool `json:"need_cardholder_name"` // True, if the cardholder name must be provided // contains filtered or unexported fields }
PaymentsProviderStripe Stripe payment provider
func NewPaymentsProviderStripe ¶
func NewPaymentsProviderStripe(publishableKey string, needCountry bool, needPostalCode bool, needCardholderName bool) *PaymentsProviderStripe
NewPaymentsProviderStripe creates a new PaymentsProviderStripe
@param publishableKey Stripe API publishable key @param needCountry True, if the user country must be provided @param needPostalCode True, if the user ZIP/postal code must be provided @param needCardholderName True, if the cardholder name must be provided
func (*PaymentsProviderStripe) MessageType ¶
func (paymentsProviderStripe *PaymentsProviderStripe) MessageType() string
MessageType return the string telegram-type of PaymentsProviderStripe
type Photo ¶
type Photo struct { ID JSONInt64 `json:"id"` // Photo identifier; 0 for deleted photos HasStickers bool `json:"has_stickers"` // True, if stickers were added to the photo Sizes []PhotoSize `json:"sizes"` // Available variants of the photo, in different sizes // contains filtered or unexported fields }
Photo Describes a photo
func NewPhoto ¶
NewPhoto creates a new Photo
@param iD Photo identifier; 0 for deleted photos @param hasStickers True, if stickers were added to the photo @param sizes Available variants of the photo, in different sizes
func (*Photo) MessageType ¶
MessageType return the string telegram-type of Photo
type PhotoSize ¶
type PhotoSize struct { Type string `json:"type"` // Thumbnail type (see https://core.telegram.org/constructor/photoSize) Photo *File `json:"photo"` // Information about the photo file Width int32 `json:"width"` // Photo width Height int32 `json:"height"` // Photo height // contains filtered or unexported fields }
PhotoSize Photo description
func NewPhotoSize ¶
NewPhotoSize creates a new PhotoSize
@param typeParam Thumbnail type (see https://core.telegram.org/constructor/photoSize) @param photo Information about the photo file @param width Photo width @param height Photo height
func (*PhotoSize) MessageType ¶
MessageType return the string telegram-type of PhotoSize
type ProfilePhoto ¶
type ProfilePhoto struct { ID JSONInt64 `json:"id"` // Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos Small *File `json:"small"` // A small (160x160) user profile photo Big *File `json:"big"` // A big (640x640) user profile photo // contains filtered or unexported fields }
ProfilePhoto Describes a user profile photo
func NewProfilePhoto ¶
func NewProfilePhoto(iD JSONInt64, small *File, big *File) *ProfilePhoto
NewProfilePhoto creates a new ProfilePhoto
@param iD Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos @param small A small (160x160) user profile photo @param big A big (640x640) user profile photo
func (*ProfilePhoto) MessageType ¶
func (profilePhoto *ProfilePhoto) MessageType() string
MessageType return the string telegram-type of ProfilePhoto
type Proxy ¶
type Proxy interface {
GetProxyEnum() ProxyEnum
}
Proxy Contains information about a proxy server
type ProxyEmpty ¶
type ProxyEmpty struct {
// contains filtered or unexported fields
}
ProxyEmpty An empty proxy server
func (*ProxyEmpty) GetProxyEnum ¶
func (proxyEmpty *ProxyEmpty) GetProxyEnum() ProxyEnum
GetProxyEnum return the enum type of this object
func (*ProxyEmpty) MessageType ¶
func (proxyEmpty *ProxyEmpty) MessageType() string
MessageType return the string telegram-type of ProxyEmpty
type ProxyEnum ¶
type ProxyEnum string
ProxyEnum Alias for abstract Proxy 'Sub-Classes', used as constant-enum here
type ProxySocks5 ¶
type ProxySocks5 struct { Server string `json:"server"` // Proxy server IP address Port int32 `json:"port"` // Proxy server port Username string `json:"username"` // Username for logging in Password string `json:"password"` // Password for logging in // contains filtered or unexported fields }
ProxySocks5 A SOCKS5 proxy server
func NewProxySocks5 ¶
func NewProxySocks5(server string, port int32, username string, password string) *ProxySocks5
NewProxySocks5 creates a new ProxySocks5
@param server Proxy server IP address @param port Proxy server port @param username Username for logging in @param password Password for logging in
func (*ProxySocks5) GetProxyEnum ¶
func (proxySocks5 *ProxySocks5) GetProxyEnum() ProxyEnum
GetProxyEnum return the enum type of this object
func (*ProxySocks5) MessageType ¶
func (proxySocks5 *ProxySocks5) MessageType() string
MessageType return the string telegram-type of ProxySocks5
type PublicMessageLink ¶
type PublicMessageLink struct { Link string `json:"link"` // Message link HTML string `json:"html"` // HTML-code for embedding the message // contains filtered or unexported fields }
PublicMessageLink Contains a public HTTPS link to a message in a public supergroup or channel
func NewPublicMessageLink ¶
func NewPublicMessageLink(link string, hTML string) *PublicMessageLink
NewPublicMessageLink creates a new PublicMessageLink
@param link Message link @param hTML HTML-code for embedding the message
func (*PublicMessageLink) MessageType ¶
func (publicMessageLink *PublicMessageLink) MessageType() string
MessageType return the string telegram-type of PublicMessageLink
type RecoveryEmailAddress ¶
type RecoveryEmailAddress struct { RecoveryEmailAddress string `json:"recovery_email_address"` // Recovery email address // contains filtered or unexported fields }
RecoveryEmailAddress Contains information about the current recovery email address
func NewRecoveryEmailAddress ¶
func NewRecoveryEmailAddress(recoveryEmailAddress string) *RecoveryEmailAddress
NewRecoveryEmailAddress creates a new RecoveryEmailAddress
@param recoveryEmailAddress Recovery email address
func (*RecoveryEmailAddress) MessageType ¶
func (recoveryEmailAddress *RecoveryEmailAddress) MessageType() string
MessageType return the string telegram-type of RecoveryEmailAddress
type RemoteFile ¶
type RemoteFile struct { ID string `json:"id"` // Remote file identifier, may be empty. Can be used across application restarts or even from other devices for the current user. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. IsUploadingActive bool `json:"is_uploading_active"` // True, if the file is currently being uploaded (or a remote copy is being generated by some other means) IsUploadingCompleted bool `json:"is_uploading_completed"` // True, if a remote copy is fully available UploadedSize int32 `json:"uploaded_size"` // Size of the remote available part of the file; 0 if unknown // contains filtered or unexported fields }
RemoteFile Represents a remote file
func NewRemoteFile ¶
func NewRemoteFile(iD string, isUploadingActive bool, isUploadingCompleted bool, uploadedSize int32) *RemoteFile
NewRemoteFile creates a new RemoteFile
@param iD Remote file identifier, may be empty. Can be used across application restarts or even from other devices for the current user. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. @param isUploadingActive True, if the file is currently being uploaded (or a remote copy is being generated by some other means) @param isUploadingCompleted True, if a remote copy is fully available @param uploadedSize Size of the remote available part of the file; 0 if unknown
func (*RemoteFile) MessageType ¶
func (remoteFile *RemoteFile) MessageType() string
MessageType return the string telegram-type of RemoteFile
type ReplyMarkup ¶
type ReplyMarkup interface {
GetReplyMarkupEnum() ReplyMarkupEnum
}
ReplyMarkup Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots
type ReplyMarkupEnum ¶
type ReplyMarkupEnum string
ReplyMarkupEnum Alias for abstract ReplyMarkup 'Sub-Classes', used as constant-enum here
const ( ReplyMarkupRemoveKeyboardType ReplyMarkupEnum = "replyMarkupRemoveKeyboard" ReplyMarkupForceReplyType ReplyMarkupEnum = "replyMarkupForceReply" ReplyMarkupShowKeyboardType ReplyMarkupEnum = "replyMarkupShowKeyboard" ReplyMarkupInlineKeyboardType ReplyMarkupEnum = "replyMarkupInlineKeyboard" )
ReplyMarkup enums
type ReplyMarkupForceReply ¶
type ReplyMarkupForceReply struct { IsPersonal bool `json:"is_personal"` // True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply // contains filtered or unexported fields }
ReplyMarkupForceReply Instructs clients to force a reply to this message
func NewReplyMarkupForceReply ¶
func NewReplyMarkupForceReply(isPersonal bool) *ReplyMarkupForceReply
NewReplyMarkupForceReply creates a new ReplyMarkupForceReply
@param isPersonal True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply
func (*ReplyMarkupForceReply) GetReplyMarkupEnum ¶
func (replyMarkupForceReply *ReplyMarkupForceReply) GetReplyMarkupEnum() ReplyMarkupEnum
GetReplyMarkupEnum return the enum type of this object
func (*ReplyMarkupForceReply) MessageType ¶
func (replyMarkupForceReply *ReplyMarkupForceReply) MessageType() string
MessageType return the string telegram-type of ReplyMarkupForceReply
type ReplyMarkupInlineKeyboard ¶
type ReplyMarkupInlineKeyboard struct { Rows [][]InlineKeyboardButton `json:"rows"` // A list of rows of inline keyboard buttons // contains filtered or unexported fields }
ReplyMarkupInlineKeyboard Contains an inline keyboard layout
func NewReplyMarkupInlineKeyboard ¶
func NewReplyMarkupInlineKeyboard(rows [][]InlineKeyboardButton) *ReplyMarkupInlineKeyboard
NewReplyMarkupInlineKeyboard creates a new ReplyMarkupInlineKeyboard
@param rows A list of rows of inline keyboard buttons
func (*ReplyMarkupInlineKeyboard) GetReplyMarkupEnum ¶
func (replyMarkupInlineKeyboard *ReplyMarkupInlineKeyboard) GetReplyMarkupEnum() ReplyMarkupEnum
GetReplyMarkupEnum return the enum type of this object
func (*ReplyMarkupInlineKeyboard) MessageType ¶
func (replyMarkupInlineKeyboard *ReplyMarkupInlineKeyboard) MessageType() string
MessageType return the string telegram-type of ReplyMarkupInlineKeyboard
type ReplyMarkupRemoveKeyboard ¶
type ReplyMarkupRemoveKeyboard struct { IsPersonal bool `json:"is_personal"` // True, if the keyboard is removed only for the mentioned users or the target user of a reply // contains filtered or unexported fields }
ReplyMarkupRemoveKeyboard Instructs clients to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent
func NewReplyMarkupRemoveKeyboard ¶
func NewReplyMarkupRemoveKeyboard(isPersonal bool) *ReplyMarkupRemoveKeyboard
NewReplyMarkupRemoveKeyboard creates a new ReplyMarkupRemoveKeyboard
@param isPersonal True, if the keyboard is removed only for the mentioned users or the target user of a reply
func (*ReplyMarkupRemoveKeyboard) GetReplyMarkupEnum ¶
func (replyMarkupRemoveKeyboard *ReplyMarkupRemoveKeyboard) GetReplyMarkupEnum() ReplyMarkupEnum
GetReplyMarkupEnum return the enum type of this object
func (*ReplyMarkupRemoveKeyboard) MessageType ¶
func (replyMarkupRemoveKeyboard *ReplyMarkupRemoveKeyboard) MessageType() string
MessageType return the string telegram-type of ReplyMarkupRemoveKeyboard
type ReplyMarkupShowKeyboard ¶
type ReplyMarkupShowKeyboard struct { Rows [][]KeyboardButton `json:"rows"` // A list of rows of bot keyboard buttons ResizeKeyboard bool `json:"resize_keyboard"` // True, if the client needs to resize the keyboard vertically OneTime bool `json:"one_time"` // True, if the client needs to hide the keyboard after use IsPersonal bool `json:"is_personal"` // True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply // contains filtered or unexported fields }
ReplyMarkupShowKeyboard Contains a custom keyboard layout to quickly reply to bots
func NewReplyMarkupShowKeyboard ¶
func NewReplyMarkupShowKeyboard(rows [][]KeyboardButton, resizeKeyboard bool, oneTime bool, isPersonal bool) *ReplyMarkupShowKeyboard
NewReplyMarkupShowKeyboard creates a new ReplyMarkupShowKeyboard
@param rows A list of rows of bot keyboard buttons @param resizeKeyboard True, if the client needs to resize the keyboard vertically @param oneTime True, if the client needs to hide the keyboard after use @param isPersonal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
func (*ReplyMarkupShowKeyboard) GetReplyMarkupEnum ¶
func (replyMarkupShowKeyboard *ReplyMarkupShowKeyboard) GetReplyMarkupEnum() ReplyMarkupEnum
GetReplyMarkupEnum return the enum type of this object
func (*ReplyMarkupShowKeyboard) MessageType ¶
func (replyMarkupShowKeyboard *ReplyMarkupShowKeyboard) MessageType() string
MessageType return the string telegram-type of ReplyMarkupShowKeyboard
type RichText ¶
type RichText interface {
GetRichTextEnum() RichTextEnum
}
RichText Describes a text object inside an instant-view web page
type RichTextBold ¶
type RichTextBold struct { Text RichText `json:"text"` // Text // contains filtered or unexported fields }
RichTextBold A bold rich text
func NewRichTextBold ¶
func NewRichTextBold(text RichText) *RichTextBold
NewRichTextBold creates a new RichTextBold
@param text Text
func (*RichTextBold) GetRichTextEnum ¶
func (richTextBold *RichTextBold) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextBold) MessageType ¶
func (richTextBold *RichTextBold) MessageType() string
MessageType return the string telegram-type of RichTextBold
func (*RichTextBold) UnmarshalJSON ¶
func (richTextBold *RichTextBold) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextEmailAddress ¶
type RichTextEmailAddress struct { Text RichText `json:"text"` // Text EmailAddress string `json:"email_address"` // Email address // contains filtered or unexported fields }
RichTextEmailAddress A rich text email link
func NewRichTextEmailAddress ¶
func NewRichTextEmailAddress(text RichText, emailAddress string) *RichTextEmailAddress
NewRichTextEmailAddress creates a new RichTextEmailAddress
@param text Text @param emailAddress Email address
func (*RichTextEmailAddress) GetRichTextEnum ¶
func (richTextEmailAddress *RichTextEmailAddress) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextEmailAddress) MessageType ¶
func (richTextEmailAddress *RichTextEmailAddress) MessageType() string
MessageType return the string telegram-type of RichTextEmailAddress
func (*RichTextEmailAddress) UnmarshalJSON ¶
func (richTextEmailAddress *RichTextEmailAddress) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextEnum ¶
type RichTextEnum string
RichTextEnum Alias for abstract RichText 'Sub-Classes', used as constant-enum here
const ( RichTextPlainType RichTextEnum = "richTextPlain" RichTextBoldType RichTextEnum = "richTextBold" RichTextItalicType RichTextEnum = "richTextItalic" RichTextUnderlineType RichTextEnum = "richTextUnderline" RichTextStrikethroughType RichTextEnum = "richTextStrikethrough" RichTextFixedType RichTextEnum = "richTextFixed" RichTextURLType RichTextEnum = "richTextURL" RichTextEmailAddressType RichTextEnum = "richTextEmailAddress" RichTextsType RichTextEnum = "richTexts" )
RichText enums
type RichTextFixed ¶
type RichTextFixed struct { Text RichText `json:"text"` // Text // contains filtered or unexported fields }
RichTextFixed A fixed-width rich text
func NewRichTextFixed ¶
func NewRichTextFixed(text RichText) *RichTextFixed
NewRichTextFixed creates a new RichTextFixed
@param text Text
func (*RichTextFixed) GetRichTextEnum ¶
func (richTextFixed *RichTextFixed) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextFixed) MessageType ¶
func (richTextFixed *RichTextFixed) MessageType() string
MessageType return the string telegram-type of RichTextFixed
func (*RichTextFixed) UnmarshalJSON ¶
func (richTextFixed *RichTextFixed) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextItalic ¶
type RichTextItalic struct { Text RichText `json:"text"` // Text // contains filtered or unexported fields }
RichTextItalic An italicized rich text
func NewRichTextItalic ¶
func NewRichTextItalic(text RichText) *RichTextItalic
NewRichTextItalic creates a new RichTextItalic
@param text Text
func (*RichTextItalic) GetRichTextEnum ¶
func (richTextItalic *RichTextItalic) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextItalic) MessageType ¶
func (richTextItalic *RichTextItalic) MessageType() string
MessageType return the string telegram-type of RichTextItalic
func (*RichTextItalic) UnmarshalJSON ¶
func (richTextItalic *RichTextItalic) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextPlain ¶
type RichTextPlain struct { Text string `json:"text"` // Text // contains filtered or unexported fields }
RichTextPlain A plain text
func NewRichTextPlain ¶
func NewRichTextPlain(text string) *RichTextPlain
NewRichTextPlain creates a new RichTextPlain
@param text Text
func (*RichTextPlain) GetRichTextEnum ¶
func (richTextPlain *RichTextPlain) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextPlain) MessageType ¶
func (richTextPlain *RichTextPlain) MessageType() string
MessageType return the string telegram-type of RichTextPlain
type RichTextStrikethrough ¶
type RichTextStrikethrough struct { Text RichText `json:"text"` // Text // contains filtered or unexported fields }
RichTextStrikethrough A strike-through rich text
func NewRichTextStrikethrough ¶
func NewRichTextStrikethrough(text RichText) *RichTextStrikethrough
NewRichTextStrikethrough creates a new RichTextStrikethrough
@param text Text
func (*RichTextStrikethrough) GetRichTextEnum ¶
func (richTextStrikethrough *RichTextStrikethrough) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextStrikethrough) MessageType ¶
func (richTextStrikethrough *RichTextStrikethrough) MessageType() string
MessageType return the string telegram-type of RichTextStrikethrough
func (*RichTextStrikethrough) UnmarshalJSON ¶
func (richTextStrikethrough *RichTextStrikethrough) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextURL ¶
type RichTextURL struct { Text RichText `json:"text"` // Text URL string `json:"url"` // URL // contains filtered or unexported fields }
RichTextURL A rich text URL link
func NewRichTextURL ¶
func NewRichTextURL(text RichText, uRL string) *RichTextURL
NewRichTextURL creates a new RichTextURL
@param text Text @param uRL URL
func (*RichTextURL) GetRichTextEnum ¶
func (richTextURL *RichTextURL) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextURL) MessageType ¶
func (richTextURL *RichTextURL) MessageType() string
MessageType return the string telegram-type of RichTextURL
func (*RichTextURL) UnmarshalJSON ¶
func (richTextURL *RichTextURL) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTextUnderline ¶
type RichTextUnderline struct { Text RichText `json:"text"` // Text // contains filtered or unexported fields }
RichTextUnderline An underlined rich text
func NewRichTextUnderline ¶
func NewRichTextUnderline(text RichText) *RichTextUnderline
NewRichTextUnderline creates a new RichTextUnderline
@param text Text
func (*RichTextUnderline) GetRichTextEnum ¶
func (richTextUnderline *RichTextUnderline) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTextUnderline) MessageType ¶
func (richTextUnderline *RichTextUnderline) MessageType() string
MessageType return the string telegram-type of RichTextUnderline
func (*RichTextUnderline) UnmarshalJSON ¶
func (richTextUnderline *RichTextUnderline) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type RichTexts ¶
type RichTexts struct { Texts []RichText `json:"texts"` // Texts // contains filtered or unexported fields }
RichTexts A concatenation of rich texts
func (*RichTexts) GetRichTextEnum ¶
func (richTexts *RichTexts) GetRichTextEnum() RichTextEnum
GetRichTextEnum return the enum type of this object
func (*RichTexts) MessageType ¶
MessageType return the string telegram-type of RichTexts
type SavedCredentials ¶
type SavedCredentials struct { ID string `json:"id"` // Unique identifier of the saved credentials Title string `json:"title"` // Title of the saved credentials // contains filtered or unexported fields }
SavedCredentials Contains information about saved card credentials
func NewSavedCredentials ¶
func NewSavedCredentials(iD string, title string) *SavedCredentials
NewSavedCredentials creates a new SavedCredentials
@param iD Unique identifier of the saved credentials @param title Title of the saved credentials
func (*SavedCredentials) MessageType ¶
func (savedCredentials *SavedCredentials) MessageType() string
MessageType return the string telegram-type of SavedCredentials
type SearchMessagesFilter ¶
type SearchMessagesFilter interface {
GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
}
SearchMessagesFilter Represents a filter for message search results
type SearchMessagesFilterAnimation ¶
type SearchMessagesFilterAnimation struct {
// contains filtered or unexported fields
}
SearchMessagesFilterAnimation Returns only animation messages
func NewSearchMessagesFilterAnimation ¶
func NewSearchMessagesFilterAnimation() *SearchMessagesFilterAnimation
NewSearchMessagesFilterAnimation creates a new SearchMessagesFilterAnimation
func (*SearchMessagesFilterAnimation) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterAnimation *SearchMessagesFilterAnimation) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterAnimation) MessageType ¶
func (searchMessagesFilterAnimation *SearchMessagesFilterAnimation) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterAnimation
type SearchMessagesFilterAudio ¶
type SearchMessagesFilterAudio struct {
// contains filtered or unexported fields
}
SearchMessagesFilterAudio Returns only audio messages
func NewSearchMessagesFilterAudio ¶
func NewSearchMessagesFilterAudio() *SearchMessagesFilterAudio
NewSearchMessagesFilterAudio creates a new SearchMessagesFilterAudio
func (*SearchMessagesFilterAudio) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterAudio *SearchMessagesFilterAudio) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterAudio) MessageType ¶
func (searchMessagesFilterAudio *SearchMessagesFilterAudio) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterAudio
type SearchMessagesFilterCall ¶
type SearchMessagesFilterCall struct {
// contains filtered or unexported fields
}
SearchMessagesFilterCall Returns only call messages
func NewSearchMessagesFilterCall ¶
func NewSearchMessagesFilterCall() *SearchMessagesFilterCall
NewSearchMessagesFilterCall creates a new SearchMessagesFilterCall
func (*SearchMessagesFilterCall) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterCall *SearchMessagesFilterCall) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterCall) MessageType ¶
func (searchMessagesFilterCall *SearchMessagesFilterCall) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterCall
type SearchMessagesFilterChatPhoto ¶
type SearchMessagesFilterChatPhoto struct {
// contains filtered or unexported fields
}
SearchMessagesFilterChatPhoto Returns only messages containing chat photos
func NewSearchMessagesFilterChatPhoto ¶
func NewSearchMessagesFilterChatPhoto() *SearchMessagesFilterChatPhoto
NewSearchMessagesFilterChatPhoto creates a new SearchMessagesFilterChatPhoto
func (*SearchMessagesFilterChatPhoto) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterChatPhoto *SearchMessagesFilterChatPhoto) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterChatPhoto) MessageType ¶
func (searchMessagesFilterChatPhoto *SearchMessagesFilterChatPhoto) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterChatPhoto
type SearchMessagesFilterDocument ¶
type SearchMessagesFilterDocument struct {
// contains filtered or unexported fields
}
SearchMessagesFilterDocument Returns only document messages
func NewSearchMessagesFilterDocument ¶
func NewSearchMessagesFilterDocument() *SearchMessagesFilterDocument
NewSearchMessagesFilterDocument creates a new SearchMessagesFilterDocument
func (*SearchMessagesFilterDocument) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterDocument *SearchMessagesFilterDocument) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterDocument) MessageType ¶
func (searchMessagesFilterDocument *SearchMessagesFilterDocument) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterDocument
type SearchMessagesFilterEmpty ¶
type SearchMessagesFilterEmpty struct {
// contains filtered or unexported fields
}
SearchMessagesFilterEmpty Returns all found messages, no filter is applied
func NewSearchMessagesFilterEmpty ¶
func NewSearchMessagesFilterEmpty() *SearchMessagesFilterEmpty
NewSearchMessagesFilterEmpty creates a new SearchMessagesFilterEmpty
func (*SearchMessagesFilterEmpty) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterEmpty *SearchMessagesFilterEmpty) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterEmpty) MessageType ¶
func (searchMessagesFilterEmpty *SearchMessagesFilterEmpty) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterEmpty
type SearchMessagesFilterEnum ¶
type SearchMessagesFilterEnum string
SearchMessagesFilterEnum Alias for abstract SearchMessagesFilter 'Sub-Classes', used as constant-enum here
const ( SearchMessagesFilterEmptyType SearchMessagesFilterEnum = "searchMessagesFilterEmpty" SearchMessagesFilterAnimationType SearchMessagesFilterEnum = "searchMessagesFilterAnimation" SearchMessagesFilterAudioType SearchMessagesFilterEnum = "searchMessagesFilterAudio" SearchMessagesFilterDocumentType SearchMessagesFilterEnum = "searchMessagesFilterDocument" SearchMessagesFilterPhotoType SearchMessagesFilterEnum = "searchMessagesFilterPhoto" SearchMessagesFilterVideoType SearchMessagesFilterEnum = "searchMessagesFilterVideo" SearchMessagesFilterVoiceNoteType SearchMessagesFilterEnum = "searchMessagesFilterVoiceNote" SearchMessagesFilterPhotoAndVideoType SearchMessagesFilterEnum = "searchMessagesFilterPhotoAndVideo" SearchMessagesFilterURLType SearchMessagesFilterEnum = "searchMessagesFilterURL" SearchMessagesFilterChatPhotoType SearchMessagesFilterEnum = "searchMessagesFilterChatPhoto" SearchMessagesFilterCallType SearchMessagesFilterEnum = "searchMessagesFilterCall" SearchMessagesFilterMissedCallType SearchMessagesFilterEnum = "searchMessagesFilterMissedCall" SearchMessagesFilterVideoNoteType SearchMessagesFilterEnum = "searchMessagesFilterVideoNote" SearchMessagesFilterVoiceAndVideoNoteType SearchMessagesFilterEnum = "searchMessagesFilterVoiceAndVideoNote" SearchMessagesFilterMentionType SearchMessagesFilterEnum = "searchMessagesFilterMention" SearchMessagesFilterUnreadMentionType SearchMessagesFilterEnum = "searchMessagesFilterUnreadMention" )
SearchMessagesFilter enums
type SearchMessagesFilterMention ¶
type SearchMessagesFilterMention struct {
// contains filtered or unexported fields
}
SearchMessagesFilterMention Returns only messages with mentions of the current user, or messages that are replies to their messages
func NewSearchMessagesFilterMention ¶
func NewSearchMessagesFilterMention() *SearchMessagesFilterMention
NewSearchMessagesFilterMention creates a new SearchMessagesFilterMention
func (*SearchMessagesFilterMention) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterMention *SearchMessagesFilterMention) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterMention) MessageType ¶
func (searchMessagesFilterMention *SearchMessagesFilterMention) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterMention
type SearchMessagesFilterMissedCall ¶
type SearchMessagesFilterMissedCall struct {
// contains filtered or unexported fields
}
SearchMessagesFilterMissedCall Returns only incoming call messages with missed/declined discard reasons
func NewSearchMessagesFilterMissedCall ¶
func NewSearchMessagesFilterMissedCall() *SearchMessagesFilterMissedCall
NewSearchMessagesFilterMissedCall creates a new SearchMessagesFilterMissedCall
func (*SearchMessagesFilterMissedCall) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterMissedCall *SearchMessagesFilterMissedCall) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterMissedCall) MessageType ¶
func (searchMessagesFilterMissedCall *SearchMessagesFilterMissedCall) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterMissedCall
type SearchMessagesFilterPhoto ¶
type SearchMessagesFilterPhoto struct {
// contains filtered or unexported fields
}
SearchMessagesFilterPhoto Returns only photo messages
func NewSearchMessagesFilterPhoto ¶
func NewSearchMessagesFilterPhoto() *SearchMessagesFilterPhoto
NewSearchMessagesFilterPhoto creates a new SearchMessagesFilterPhoto
func (*SearchMessagesFilterPhoto) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterPhoto *SearchMessagesFilterPhoto) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterPhoto) MessageType ¶
func (searchMessagesFilterPhoto *SearchMessagesFilterPhoto) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterPhoto
type SearchMessagesFilterPhotoAndVideo ¶
type SearchMessagesFilterPhotoAndVideo struct {
// contains filtered or unexported fields
}
SearchMessagesFilterPhotoAndVideo Returns only photo and video messages
func NewSearchMessagesFilterPhotoAndVideo ¶
func NewSearchMessagesFilterPhotoAndVideo() *SearchMessagesFilterPhotoAndVideo
NewSearchMessagesFilterPhotoAndVideo creates a new SearchMessagesFilterPhotoAndVideo
func (*SearchMessagesFilterPhotoAndVideo) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterPhotoAndVideo *SearchMessagesFilterPhotoAndVideo) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterPhotoAndVideo) MessageType ¶
func (searchMessagesFilterPhotoAndVideo *SearchMessagesFilterPhotoAndVideo) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterPhotoAndVideo
type SearchMessagesFilterURL ¶
type SearchMessagesFilterURL struct {
// contains filtered or unexported fields
}
SearchMessagesFilterURL Returns only messages containing URLs
func NewSearchMessagesFilterURL ¶
func NewSearchMessagesFilterURL() *SearchMessagesFilterURL
NewSearchMessagesFilterURL creates a new SearchMessagesFilterURL
func (*SearchMessagesFilterURL) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterURL *SearchMessagesFilterURL) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterURL) MessageType ¶
func (searchMessagesFilterURL *SearchMessagesFilterURL) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterURL
type SearchMessagesFilterUnreadMention ¶
type SearchMessagesFilterUnreadMention struct {
// contains filtered or unexported fields
}
SearchMessagesFilterUnreadMention Returns only messages with unread mentions of the current user or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user
func NewSearchMessagesFilterUnreadMention ¶
func NewSearchMessagesFilterUnreadMention() *SearchMessagesFilterUnreadMention
NewSearchMessagesFilterUnreadMention creates a new SearchMessagesFilterUnreadMention
func (*SearchMessagesFilterUnreadMention) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterUnreadMention *SearchMessagesFilterUnreadMention) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterUnreadMention) MessageType ¶
func (searchMessagesFilterUnreadMention *SearchMessagesFilterUnreadMention) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterUnreadMention
type SearchMessagesFilterVideo ¶
type SearchMessagesFilterVideo struct {
// contains filtered or unexported fields
}
SearchMessagesFilterVideo Returns only video messages
func NewSearchMessagesFilterVideo ¶
func NewSearchMessagesFilterVideo() *SearchMessagesFilterVideo
NewSearchMessagesFilterVideo creates a new SearchMessagesFilterVideo
func (*SearchMessagesFilterVideo) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterVideo *SearchMessagesFilterVideo) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterVideo) MessageType ¶
func (searchMessagesFilterVideo *SearchMessagesFilterVideo) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterVideo
type SearchMessagesFilterVideoNote ¶
type SearchMessagesFilterVideoNote struct {
// contains filtered or unexported fields
}
SearchMessagesFilterVideoNote Returns only video note messages
func NewSearchMessagesFilterVideoNote ¶
func NewSearchMessagesFilterVideoNote() *SearchMessagesFilterVideoNote
NewSearchMessagesFilterVideoNote creates a new SearchMessagesFilterVideoNote
func (*SearchMessagesFilterVideoNote) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterVideoNote *SearchMessagesFilterVideoNote) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterVideoNote) MessageType ¶
func (searchMessagesFilterVideoNote *SearchMessagesFilterVideoNote) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterVideoNote
type SearchMessagesFilterVoiceAndVideoNote ¶
type SearchMessagesFilterVoiceAndVideoNote struct {
// contains filtered or unexported fields
}
SearchMessagesFilterVoiceAndVideoNote Returns only voice and video note messages
func NewSearchMessagesFilterVoiceAndVideoNote ¶
func NewSearchMessagesFilterVoiceAndVideoNote() *SearchMessagesFilterVoiceAndVideoNote
NewSearchMessagesFilterVoiceAndVideoNote creates a new SearchMessagesFilterVoiceAndVideoNote
func (*SearchMessagesFilterVoiceAndVideoNote) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterVoiceAndVideoNote *SearchMessagesFilterVoiceAndVideoNote) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterVoiceAndVideoNote) MessageType ¶
func (searchMessagesFilterVoiceAndVideoNote *SearchMessagesFilterVoiceAndVideoNote) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterVoiceAndVideoNote
type SearchMessagesFilterVoiceNote ¶
type SearchMessagesFilterVoiceNote struct {
// contains filtered or unexported fields
}
SearchMessagesFilterVoiceNote Returns only voice note messages
func NewSearchMessagesFilterVoiceNote ¶
func NewSearchMessagesFilterVoiceNote() *SearchMessagesFilterVoiceNote
NewSearchMessagesFilterVoiceNote creates a new SearchMessagesFilterVoiceNote
func (*SearchMessagesFilterVoiceNote) GetSearchMessagesFilterEnum ¶
func (searchMessagesFilterVoiceNote *SearchMessagesFilterVoiceNote) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
GetSearchMessagesFilterEnum return the enum type of this object
func (*SearchMessagesFilterVoiceNote) MessageType ¶
func (searchMessagesFilterVoiceNote *SearchMessagesFilterVoiceNote) MessageType() string
MessageType return the string telegram-type of SearchMessagesFilterVoiceNote
type SecretChat ¶
type SecretChat struct { ID int32 `json:"id"` // Secret chat identifier UserID int32 `json:"user_id"` // Identifier of the chat partner State SecretChatState `json:"state"` // State of the secret chat IsOutbound bool `json:"is_outbound"` // True, if the chat was created by the current user; otherwise false TTL int32 `json:"ttl"` // Current message Time To Live setting (self-destruct timer) for the chat, in seconds KeyHash []byte `json:"key_hash"` // Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 bytes, which must be used to make a 12x12 square image with a color depth of 4. The first 16 bytes should be used to make a central 8x8 square, while the remaining 20 bytes should be used to construct a 2-pixel-wide border around that square. Layer int32 `json:"layer"` // Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66 // contains filtered or unexported fields }
SecretChat Represents a secret chat
func NewSecretChat ¶
func NewSecretChat(iD int32, userID int32, state SecretChatState, isOutbound bool, tTL int32, keyHash []byte, layer int32) *SecretChat
NewSecretChat creates a new SecretChat
@param iD Secret chat identifier @param userID Identifier of the chat partner @param state State of the secret chat @param isOutbound True, if the chat was created by the current user; otherwise false @param tTL Current message Time To Live setting (self-destruct timer) for the chat, in seconds @param keyHash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 bytes, which must be used to make a 12x12 square image with a color depth of 4. The first 16 bytes should be used to make a central 8x8 square, while the remaining 20 bytes should be used to construct a 2-pixel-wide border around that square. @param layer Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66
func (*SecretChat) MessageType ¶
func (secretChat *SecretChat) MessageType() string
MessageType return the string telegram-type of SecretChat
func (*SecretChat) UnmarshalJSON ¶
func (secretChat *SecretChat) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type SecretChatState ¶
type SecretChatState interface {
GetSecretChatStateEnum() SecretChatStateEnum
}
SecretChatState Describes the current secret chat state
type SecretChatStateClosed ¶
type SecretChatStateClosed struct {
// contains filtered or unexported fields
}
SecretChatStateClosed The secret chat is closed
func NewSecretChatStateClosed ¶
func NewSecretChatStateClosed() *SecretChatStateClosed
NewSecretChatStateClosed creates a new SecretChatStateClosed
func (*SecretChatStateClosed) GetSecretChatStateEnum ¶
func (secretChatStateClosed *SecretChatStateClosed) GetSecretChatStateEnum() SecretChatStateEnum
GetSecretChatStateEnum return the enum type of this object
func (*SecretChatStateClosed) MessageType ¶
func (secretChatStateClosed *SecretChatStateClosed) MessageType() string
MessageType return the string telegram-type of SecretChatStateClosed
type SecretChatStateEnum ¶
type SecretChatStateEnum string
SecretChatStateEnum Alias for abstract SecretChatState 'Sub-Classes', used as constant-enum here
const ( SecretChatStatePendingType SecretChatStateEnum = "secretChatStatePending" SecretChatStateReadyType SecretChatStateEnum = "secretChatStateReady" SecretChatStateClosedType SecretChatStateEnum = "secretChatStateClosed" )
SecretChatState enums
type SecretChatStatePending ¶
type SecretChatStatePending struct {
// contains filtered or unexported fields
}
SecretChatStatePending The secret chat is not yet created; waiting for the other user to get online
func NewSecretChatStatePending ¶
func NewSecretChatStatePending() *SecretChatStatePending
NewSecretChatStatePending creates a new SecretChatStatePending
func (*SecretChatStatePending) GetSecretChatStateEnum ¶
func (secretChatStatePending *SecretChatStatePending) GetSecretChatStateEnum() SecretChatStateEnum
GetSecretChatStateEnum return the enum type of this object
func (*SecretChatStatePending) MessageType ¶
func (secretChatStatePending *SecretChatStatePending) MessageType() string
MessageType return the string telegram-type of SecretChatStatePending
type SecretChatStateReady ¶
type SecretChatStateReady struct {
// contains filtered or unexported fields
}
SecretChatStateReady The secret chat is ready to use
func NewSecretChatStateReady ¶
func NewSecretChatStateReady() *SecretChatStateReady
NewSecretChatStateReady creates a new SecretChatStateReady
func (*SecretChatStateReady) GetSecretChatStateEnum ¶
func (secretChatStateReady *SecretChatStateReady) GetSecretChatStateEnum() SecretChatStateEnum
GetSecretChatStateEnum return the enum type of this object
func (*SecretChatStateReady) MessageType ¶
func (secretChatStateReady *SecretChatStateReady) MessageType() string
MessageType return the string telegram-type of SecretChatStateReady
type Session ¶
type Session struct { ID JSONInt64 `json:"id"` // Session identifier IsCurrent bool `json:"is_current"` // True, if this session is the current session APIID int32 `json:"api_id"` // Telegram API identifier, as provided by the application ApplicationName string `json:"application_name"` // Name of the application, as provided by the application ApplicationVersion string `json:"application_version"` // The version of the application, as provided by the application IsOfficialApplication bool `json:"is_official_application"` // True, if the application is an official application or uses the api_id of an official application DeviceModel string `json:"device_model"` // Model of the device the application has been run or is running on, as provided by the application Platform string `json:"platform"` // Operating system the application has been run or is running on, as provided by the application SystemVersion string `json:"system_version"` // Version of the operating system the application has been run or is running on, as provided by the application LogInDate int32 `json:"log_in_date"` // Point in time (Unix timestamp) when the user has logged in LastActiveDate int32 `json:"last_active_date"` // Point in time (Unix timestamp) when the session was last used IP string `json:"ip"` // IP address from which the session was created, in human-readable format Country string `json:"country"` // A two-letter country code for the country from which the session was created, based on the IP address Region string `json:"region"` // Region code from which the session was created, based on the IP address // contains filtered or unexported fields }
Session Contains information about one session in a Telegram application used by the current user
func NewSession ¶
func NewSession(iD JSONInt64, isCurrent bool, aPIID int32, applicationName string, applicationVersion string, isOfficialApplication bool, deviceModel string, platform string, systemVersion string, logInDate int32, lastActiveDate int32, iP string, country string, region string) *Session
NewSession creates a new Session
@param iD Session identifier @param isCurrent True, if this session is the current session @param aPIID Telegram API identifier, as provided by the application @param applicationName Name of the application, as provided by the application @param applicationVersion The version of the application, as provided by the application @param isOfficialApplication True, if the application is an official application or uses the api_id of an official application @param deviceModel Model of the device the application has been run or is running on, as provided by the application @param platform Operating system the application has been run or is running on, as provided by the application @param systemVersion Version of the operating system the application has been run or is running on, as provided by the application @param logInDate Point in time (Unix timestamp) when the user has logged in @param lastActiveDate Point in time (Unix timestamp) when the session was last used @param iP IP address from which the session was created, in human-readable format @param country A two-letter country code for the country from which the session was created, based on the IP address @param region Region code from which the session was created, based on the IP address
func (*Session) MessageType ¶
MessageType return the string telegram-type of Session
type Sessions ¶
type Sessions struct { Sessions []Session `json:"sessions"` // List of sessions // contains filtered or unexported fields }
Sessions Contains a list of sessions
func (*Sessions) MessageType ¶
MessageType return the string telegram-type of Sessions
type ShippingAddress ¶
type ShippingAddress struct { CountryCode string `json:"country_code"` // Two-letter ISO 3166-1 alpha-2 country code State string `json:"state"` // State, if applicable City string `json:"city"` // City StreetLine1 string `json:"street_line1"` // First line of the address StreetLine2 string `json:"street_line2"` // Second line of the address PostalCode string `json:"postal_code"` // Address postal code // contains filtered or unexported fields }
ShippingAddress Describes a shipping address
func NewShippingAddress ¶
func NewShippingAddress(countryCode string, state string, city string, streetLine1 string, streetLine2 string, postalCode string) *ShippingAddress
NewShippingAddress creates a new ShippingAddress
@param countryCode Two-letter ISO 3166-1 alpha-2 country code @param state State, if applicable @param city City @param streetLine1 First line of the address @param streetLine2 Second line of the address @param postalCode Address postal code
func (*ShippingAddress) MessageType ¶
func (shippingAddress *ShippingAddress) MessageType() string
MessageType return the string telegram-type of ShippingAddress
type ShippingOption ¶
type ShippingOption struct { ID string `json:"id"` // Shipping option identifier Title string `json:"title"` // Option title PriceParts []LabeledPricePart `json:"price_parts"` // A list of objects used to calculate the total shipping costs // contains filtered or unexported fields }
ShippingOption One shipping option
func NewShippingOption ¶
func NewShippingOption(iD string, title string, priceParts []LabeledPricePart) *ShippingOption
NewShippingOption creates a new ShippingOption
@param iD Shipping option identifier @param title Option title @param priceParts A list of objects used to calculate the total shipping costs
func (*ShippingOption) MessageType ¶
func (shippingOption *ShippingOption) MessageType() string
MessageType return the string telegram-type of ShippingOption
type Sticker ¶
type Sticker struct { SetID JSONInt64 `json:"set_id"` // The identifier of the sticker set to which the sticker belongs; 0 if none Width int32 `json:"width"` // Sticker width; as defined by the sender Height int32 `json:"height"` // Sticker height; as defined by the sender Emoji string `json:"emoji"` // Emoji corresponding to the sticker IsMask bool `json:"is_mask"` // True, if the sticker is a mask MaskPosition *MaskPosition `json:"mask_position"` // Position where the mask should be placed; may be null Thumbnail *PhotoSize `json:"thumbnail"` // Sticker thumbnail in WEBP or JPEG format; may be null Sticker *File `json:"sticker"` // File containing the sticker // contains filtered or unexported fields }
Sticker Describes a sticker
func NewSticker ¶
func NewSticker(setID JSONInt64, width int32, height int32, emoji string, isMask bool, maskPosition *MaskPosition, thumbnail *PhotoSize, sticker *File) *Sticker
NewSticker creates a new Sticker
@param setID The identifier of the sticker set to which the sticker belongs; 0 if none @param width Sticker width; as defined by the sender @param height Sticker height; as defined by the sender @param emoji Emoji corresponding to the sticker @param isMask True, if the sticker is a mask @param maskPosition Position where the mask should be placed; may be null @param thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @param sticker File containing the sticker
func (*Sticker) MessageType ¶
MessageType return the string telegram-type of Sticker
type StickerEmojis ¶
type StickerEmojis struct { Emojis []string `json:"emojis"` // List of emojis // contains filtered or unexported fields }
StickerEmojis Represents a list of all emoji corresponding to a sticker in a sticker set. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
func NewStickerEmojis ¶
func NewStickerEmojis(emojis []string) *StickerEmojis
NewStickerEmojis creates a new StickerEmojis
@param emojis List of emojis
func (*StickerEmojis) MessageType ¶
func (stickerEmojis *StickerEmojis) MessageType() string
MessageType return the string telegram-type of StickerEmojis
type StickerSet ¶
type StickerSet struct { ID JSONInt64 `json:"id"` // Identifier of the sticker set Title string `json:"title"` // Title of the sticker set Name string `json:"name"` // Name of the sticker set IsInstalled bool `json:"is_installed"` // True, if the sticker set has been installed by the current user IsArchived bool `json:"is_archived"` // True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously IsOfficial bool `json:"is_official"` // True, if the sticker set is official IsMasks bool `json:"is_masks"` // True, if the stickers in the set are masks IsViewed bool `json:"is_viewed"` // True for already viewed trending sticker sets Stickers []Sticker `json:"stickers"` // List of stickers in this set Emojis []StickerEmojis `json:"emojis"` // A list of emoji corresponding to the stickers in the same order // contains filtered or unexported fields }
StickerSet Represents a sticker set
func NewStickerSet ¶
func NewStickerSet(iD JSONInt64, title string, name string, isInstalled bool, isArchived bool, isOfficial bool, isMasks bool, isViewed bool, stickers []Sticker, emojis []StickerEmojis) *StickerSet
NewStickerSet creates a new StickerSet
@param iD Identifier of the sticker set @param title Title of the sticker set @param name Name of the sticker set @param isInstalled True, if the sticker set has been installed by the current user @param isArchived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously @param isOfficial True, if the sticker set is official @param isMasks True, if the stickers in the set are masks @param isViewed True for already viewed trending sticker sets @param stickers List of stickers in this set @param emojis A list of emoji corresponding to the stickers in the same order
func (*StickerSet) MessageType ¶
func (stickerSet *StickerSet) MessageType() string
MessageType return the string telegram-type of StickerSet
type StickerSetInfo ¶
type StickerSetInfo struct { ID JSONInt64 `json:"id"` // Identifier of the sticker set Title string `json:"title"` // Title of the sticker set Name string `json:"name"` // Name of the sticker set IsInstalled bool `json:"is_installed"` // True, if the sticker set has been installed by current user IsArchived bool `json:"is_archived"` // True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously IsOfficial bool `json:"is_official"` // True, if the sticker set is official IsMasks bool `json:"is_masks"` // True, if the stickers in the set are masks IsViewed bool `json:"is_viewed"` // True for already viewed trending sticker sets Size int32 `json:"size"` // Total number of stickers in the set Covers []Sticker `json:"covers"` // Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested // contains filtered or unexported fields }
StickerSetInfo Represents short information about a sticker set
func NewStickerSetInfo ¶
func NewStickerSetInfo(iD JSONInt64, title string, name string, isInstalled bool, isArchived bool, isOfficial bool, isMasks bool, isViewed bool, size int32, covers []Sticker) *StickerSetInfo
NewStickerSetInfo creates a new StickerSetInfo
@param iD Identifier of the sticker set @param title Title of the sticker set @param name Name of the sticker set @param isInstalled True, if the sticker set has been installed by current user @param isArchived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously @param isOfficial True, if the sticker set is official @param isMasks True, if the stickers in the set are masks @param isViewed True for already viewed trending sticker sets @param size Total number of stickers in the set @param covers Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested
func (*StickerSetInfo) MessageType ¶
func (stickerSetInfo *StickerSetInfo) MessageType() string
MessageType return the string telegram-type of StickerSetInfo
type StickerSets ¶
type StickerSets struct { TotalCount int32 `json:"total_count"` // Approximate total number of sticker sets found Sets []StickerSetInfo `json:"sets"` // List of sticker sets // contains filtered or unexported fields }
StickerSets Represents a list of sticker sets
func NewStickerSets ¶
func NewStickerSets(totalCount int32, sets []StickerSetInfo) *StickerSets
NewStickerSets creates a new StickerSets
@param totalCount Approximate total number of sticker sets found @param sets List of sticker sets
func (*StickerSets) MessageType ¶
func (stickerSets *StickerSets) MessageType() string
MessageType return the string telegram-type of StickerSets
type Stickers ¶
type Stickers struct { Stickers []Sticker `json:"stickers"` // List of stickers // contains filtered or unexported fields }
Stickers Represents a list of stickers
func (*Stickers) MessageType ¶
MessageType return the string telegram-type of Stickers
type StorageStatistics ¶
type StorageStatistics struct { Size int64 `json:"size"` // Total size of files Count int32 `json:"count"` // Total number of files ByChat []StorageStatisticsByChat `json:"by_chat"` // Statistics split by chats // contains filtered or unexported fields }
StorageStatistics Contains the exact storage usage statistics split by chats and file type
func NewStorageStatistics ¶
func NewStorageStatistics(size int64, count int32, byChat []StorageStatisticsByChat) *StorageStatistics
NewStorageStatistics creates a new StorageStatistics
@param size Total size of files @param count Total number of files @param byChat Statistics split by chats
func (*StorageStatistics) MessageType ¶
func (storageStatistics *StorageStatistics) MessageType() string
MessageType return the string telegram-type of StorageStatistics
type StorageStatisticsByChat ¶
type StorageStatisticsByChat struct { ChatID int64 `json:"chat_id"` // Chat identifier; 0 if none Size int64 `json:"size"` // Total size of the files in the chat Count int32 `json:"count"` // Total number of files in the chat ByFileType []StorageStatisticsByFileType `json:"by_file_type"` // Statistics split by file types // contains filtered or unexported fields }
StorageStatisticsByChat Contains the storage usage statistics for a specific chat
func NewStorageStatisticsByChat ¶
func NewStorageStatisticsByChat(chatID int64, size int64, count int32, byFileType []StorageStatisticsByFileType) *StorageStatisticsByChat
NewStorageStatisticsByChat creates a new StorageStatisticsByChat
@param chatID Chat identifier; 0 if none @param size Total size of the files in the chat @param count Total number of files in the chat @param byFileType Statistics split by file types
func (*StorageStatisticsByChat) MessageType ¶
func (storageStatisticsByChat *StorageStatisticsByChat) MessageType() string
MessageType return the string telegram-type of StorageStatisticsByChat
type StorageStatisticsByFileType ¶
type StorageStatisticsByFileType struct { FileType FileType `json:"file_type"` // File type Size int64 `json:"size"` // Total size of the files Count int32 `json:"count"` // Total number of files // contains filtered or unexported fields }
StorageStatisticsByFileType Contains the storage usage statistics for a specific file type
func NewStorageStatisticsByFileType ¶
func NewStorageStatisticsByFileType(fileType FileType, size int64, count int32) *StorageStatisticsByFileType
NewStorageStatisticsByFileType creates a new StorageStatisticsByFileType
@param fileType File type @param size Total size of the files @param count Total number of files
func (*StorageStatisticsByFileType) MessageType ¶
func (storageStatisticsByFileType *StorageStatisticsByFileType) MessageType() string
MessageType return the string telegram-type of StorageStatisticsByFileType
func (*StorageStatisticsByFileType) UnmarshalJSON ¶
func (storageStatisticsByFileType *StorageStatisticsByFileType) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type StorageStatisticsFast ¶
type StorageStatisticsFast struct { FilesSize int64 `json:"files_size"` // Approximate total size of files FileCount int32 `json:"file_count"` // Approximate number of files DatabaseSize int64 `json:"database_size"` // Size of the database // contains filtered or unexported fields }
StorageStatisticsFast Contains approximate storage usage statistics, excluding files of unknown file type
func NewStorageStatisticsFast ¶
func NewStorageStatisticsFast(filesSize int64, fileCount int32, databaseSize int64) *StorageStatisticsFast
NewStorageStatisticsFast creates a new StorageStatisticsFast
@param filesSize Approximate total size of files @param fileCount Approximate number of files @param databaseSize Size of the database
func (*StorageStatisticsFast) MessageType ¶
func (storageStatisticsFast *StorageStatisticsFast) MessageType() string
MessageType return the string telegram-type of StorageStatisticsFast
type Supergroup ¶
type Supergroup struct { ID int32 `json:"id"` // Supergroup or channel identifier Username string `json:"username"` // Username of the supergroup or channel; empty for private supergroups or channels Date int32 `json:"date"` // Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member Status ChatMemberStatus `json:"status"` // Status of the current user in the supergroup or channel MemberCount int32 `json:"member_count"` // Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats AnyoneCanInvite bool `json:"anyone_can_invite"` // True, if any member of the supergroup can invite other members. This field has no meaning for channels SignMessages bool `json:"sign_messages"` // True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels IsChannel bool `json:"is_channel"` // True, if the supergroup is a channel IsVerified bool `json:"is_verified"` // True, if the supergroup or channel is verified RestrictionReason string `json:"restriction_reason"` // If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is "{type}: {description}". // contains filtered or unexported fields }
Supergroup Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers
func NewSupergroup ¶
func NewSupergroup(iD int32, username string, date int32, status ChatMemberStatus, memberCount int32, anyoneCanInvite bool, signMessages bool, isChannel bool, isVerified bool, restrictionReason string) *Supergroup
NewSupergroup creates a new Supergroup
@param iD Supergroup or channel identifier @param username Username of the supergroup or channel; empty for private supergroups or channels @param date Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member @param status Status of the current user in the supergroup or channel @param memberCount Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats @param anyoneCanInvite True, if any member of the supergroup can invite other members. This field has no meaning for channels @param signMessages True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels @param isChannel True, if the supergroup is a channel @param isVerified True, if the supergroup or channel is verified @param restrictionReason If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is "{type}: {description}".
func (*Supergroup) MessageType ¶
func (supergroup *Supergroup) MessageType() string
MessageType return the string telegram-type of Supergroup
func (*Supergroup) UnmarshalJSON ¶
func (supergroup *Supergroup) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type SupergroupFullInfo ¶
type SupergroupFullInfo struct { Description string `json:"description"` // MemberCount int32 `json:"member_count"` // Number of members in the supergroup or channel; 0 if unknown AdministratorCount int32 `json:"administrator_count"` // Number of privileged users in the supergroup or channel; 0 if unknown RestrictedCount int32 `json:"restricted_count"` // Number of restricted users in the supergroup; 0 if unknown BannedCount int32 `json:"banned_count"` // Number of users banned from chat; 0 if unknown CanGetMembers bool `json:"can_get_members"` // True, if members of the chat can be retrieved CanSetUsername bool `json:"can_set_username"` // True, if the chat can be made public CanSetStickerSet bool `json:"can_set_sticker_set"` // True, if the supergroup sticker set can be changed IsAllHistoryAvailable bool `json:"is_all_history_available"` // True, if new chat members will have access to old messages. In public supergroups and both public and private channels, old messages are always available, so this option affects only private supergroups. The value of this field is only available for chat administrators StickerSetID JSONInt64 `json:"sticker_set_id"` // Identifier of the supergroup sticker set; 0 if none InviteLink string `json:"invite_link"` // Invite link for this chat PinnedMessageID int64 `json:"pinned_message_id"` // Identifier of the pinned message in the chat; 0 if none UpgradedFromBasicGroupID int32 `json:"upgraded_from_basic_group_id"` // Identifier of the basic group from which supergroup was upgraded; 0 if none UpgradedFromMaxMessageID int64 `json:"upgraded_from_max_message_id"` // Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none // contains filtered or unexported fields }
SupergroupFullInfo Contains full information about a supergroup or channel
func NewSupergroupFullInfo ¶
func NewSupergroupFullInfo(description string, memberCount int32, administratorCount int32, restrictedCount int32, bannedCount int32, canGetMembers bool, canSetUsername bool, canSetStickerSet bool, isAllHistoryAvailable bool, stickerSetID JSONInt64, inviteLink string, pinnedMessageID int64, upgradedFromBasicGroupID int32, upgradedFromMaxMessageID int64) *SupergroupFullInfo
NewSupergroupFullInfo creates a new SupergroupFullInfo
@param description @param memberCount Number of members in the supergroup or channel; 0 if unknown @param administratorCount Number of privileged users in the supergroup or channel; 0 if unknown @param restrictedCount Number of restricted users in the supergroup; 0 if unknown @param bannedCount Number of users banned from chat; 0 if unknown @param canGetMembers True, if members of the chat can be retrieved @param canSetUsername True, if the chat can be made public @param canSetStickerSet True, if the supergroup sticker set can be changed @param isAllHistoryAvailable True, if new chat members will have access to old messages. In public supergroups and both public and private channels, old messages are always available, so this option affects only private supergroups. The value of this field is only available for chat administrators @param stickerSetID Identifier of the supergroup sticker set; 0 if none @param inviteLink Invite link for this chat @param pinnedMessageID Identifier of the pinned message in the chat; 0 if none @param upgradedFromBasicGroupID Identifier of the basic group from which supergroup was upgraded; 0 if none @param upgradedFromMaxMessageID Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
func (*SupergroupFullInfo) MessageType ¶
func (supergroupFullInfo *SupergroupFullInfo) MessageType() string
MessageType return the string telegram-type of SupergroupFullInfo
type SupergroupMembersFilter ¶
type SupergroupMembersFilter interface {
GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
}
SupergroupMembersFilter Specifies the kind of chat members to return in getSupergroupMembers
type SupergroupMembersFilterAdministrators ¶
type SupergroupMembersFilterAdministrators struct {
// contains filtered or unexported fields
}
SupergroupMembersFilterAdministrators Returns the creator and administrators
func NewSupergroupMembersFilterAdministrators ¶
func NewSupergroupMembersFilterAdministrators() *SupergroupMembersFilterAdministrators
NewSupergroupMembersFilterAdministrators creates a new SupergroupMembersFilterAdministrators
func (*SupergroupMembersFilterAdministrators) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterAdministrators *SupergroupMembersFilterAdministrators) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterAdministrators) MessageType ¶
func (supergroupMembersFilterAdministrators *SupergroupMembersFilterAdministrators) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterAdministrators
type SupergroupMembersFilterBanned ¶
type SupergroupMembersFilterBanned struct { Query string `json:"query"` // Query to search for // contains filtered or unexported fields }
SupergroupMembersFilterBanned Returns users banned from the supergroup or channel; can be used only by administrators
func NewSupergroupMembersFilterBanned ¶
func NewSupergroupMembersFilterBanned(query string) *SupergroupMembersFilterBanned
NewSupergroupMembersFilterBanned creates a new SupergroupMembersFilterBanned
@param query Query to search for
func (*SupergroupMembersFilterBanned) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterBanned *SupergroupMembersFilterBanned) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterBanned) MessageType ¶
func (supergroupMembersFilterBanned *SupergroupMembersFilterBanned) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterBanned
type SupergroupMembersFilterBots ¶
type SupergroupMembersFilterBots struct {
// contains filtered or unexported fields
}
SupergroupMembersFilterBots Returns bot members of the supergroup or channel
func NewSupergroupMembersFilterBots ¶
func NewSupergroupMembersFilterBots() *SupergroupMembersFilterBots
NewSupergroupMembersFilterBots creates a new SupergroupMembersFilterBots
func (*SupergroupMembersFilterBots) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterBots *SupergroupMembersFilterBots) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterBots) MessageType ¶
func (supergroupMembersFilterBots *SupergroupMembersFilterBots) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterBots
type SupergroupMembersFilterEnum ¶
type SupergroupMembersFilterEnum string
SupergroupMembersFilterEnum Alias for abstract SupergroupMembersFilter 'Sub-Classes', used as constant-enum here
const ( SupergroupMembersFilterRecentType SupergroupMembersFilterEnum = "supergroupMembersFilterRecent" SupergroupMembersFilterAdministratorsType SupergroupMembersFilterEnum = "supergroupMembersFilterAdministrators" SupergroupMembersFilterSearchType SupergroupMembersFilterEnum = "supergroupMembersFilterSearch" SupergroupMembersFilterRestrictedType SupergroupMembersFilterEnum = "supergroupMembersFilterRestricted" SupergroupMembersFilterBannedType SupergroupMembersFilterEnum = "supergroupMembersFilterBanned" SupergroupMembersFilterBotsType SupergroupMembersFilterEnum = "supergroupMembersFilterBots" )
SupergroupMembersFilter enums
type SupergroupMembersFilterRecent ¶
type SupergroupMembersFilterRecent struct {
// contains filtered or unexported fields
}
SupergroupMembersFilterRecent Returns recently active users in reverse chronological order
func NewSupergroupMembersFilterRecent ¶
func NewSupergroupMembersFilterRecent() *SupergroupMembersFilterRecent
NewSupergroupMembersFilterRecent creates a new SupergroupMembersFilterRecent
func (*SupergroupMembersFilterRecent) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterRecent *SupergroupMembersFilterRecent) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterRecent) MessageType ¶
func (supergroupMembersFilterRecent *SupergroupMembersFilterRecent) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterRecent
type SupergroupMembersFilterRestricted ¶
type SupergroupMembersFilterRestricted struct { Query string `json:"query"` // Query to search for // contains filtered or unexported fields }
SupergroupMembersFilterRestricted Returns restricted supergroup members; can be used only by administrators
func NewSupergroupMembersFilterRestricted ¶
func NewSupergroupMembersFilterRestricted(query string) *SupergroupMembersFilterRestricted
NewSupergroupMembersFilterRestricted creates a new SupergroupMembersFilterRestricted
@param query Query to search for
func (*SupergroupMembersFilterRestricted) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterRestricted *SupergroupMembersFilterRestricted) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterRestricted) MessageType ¶
func (supergroupMembersFilterRestricted *SupergroupMembersFilterRestricted) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterRestricted
type SupergroupMembersFilterSearch ¶
type SupergroupMembersFilterSearch struct { Query string `json:"query"` // Query to search for // contains filtered or unexported fields }
SupergroupMembersFilterSearch Used to search for supergroup or channel members via a (string) query
func NewSupergroupMembersFilterSearch ¶
func NewSupergroupMembersFilterSearch(query string) *SupergroupMembersFilterSearch
NewSupergroupMembersFilterSearch creates a new SupergroupMembersFilterSearch
@param query Query to search for
func (*SupergroupMembersFilterSearch) GetSupergroupMembersFilterEnum ¶
func (supergroupMembersFilterSearch *SupergroupMembersFilterSearch) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
GetSupergroupMembersFilterEnum return the enum type of this object
func (*SupergroupMembersFilterSearch) MessageType ¶
func (supergroupMembersFilterSearch *SupergroupMembersFilterSearch) MessageType() string
MessageType return the string telegram-type of SupergroupMembersFilterSearch
type TMeURL ¶
type TMeURL struct { URL string `json:"url"` // URL Type TMeURLType `json:"type"` // Type of the URL // contains filtered or unexported fields }
TMeURL Represents a URL linking to an internal Telegram entity
func NewTMeURL ¶
func NewTMeURL(uRL string, typeParam TMeURLType) *TMeURL
NewTMeURL creates a new TMeURL
@param uRL URL @param typeParam Type of the URL
func (*TMeURL) MessageType ¶
MessageType return the string telegram-type of TMeURL
func (*TMeURL) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type TMeURLType ¶
type TMeURLType interface {
GetTMeURLTypeEnum() TMeURLTypeEnum
}
TMeURLType Describes the type of a URL linking to an internal Telegram entity
type TMeURLTypeChatInvite ¶
type TMeURLTypeChatInvite struct { Info *ChatInviteLinkInfo `json:"info"` // Chat invite link info // contains filtered or unexported fields }
TMeURLTypeChatInvite A chat invite link
func NewTMeURLTypeChatInvite ¶
func NewTMeURLTypeChatInvite(info *ChatInviteLinkInfo) *TMeURLTypeChatInvite
NewTMeURLTypeChatInvite creates a new TMeURLTypeChatInvite
@param info Chat invite link info
func (*TMeURLTypeChatInvite) GetTMeURLTypeEnum ¶
func (tMeURLTypeChatInvite *TMeURLTypeChatInvite) GetTMeURLTypeEnum() TMeURLTypeEnum
GetTMeURLTypeEnum return the enum type of this object
func (*TMeURLTypeChatInvite) MessageType ¶
func (tMeURLTypeChatInvite *TMeURLTypeChatInvite) MessageType() string
MessageType return the string telegram-type of TMeURLTypeChatInvite
type TMeURLTypeEnum ¶
type TMeURLTypeEnum string
TMeURLTypeEnum Alias for abstract TMeURLType 'Sub-Classes', used as constant-enum here
const ( TMeURLTypeUserType TMeURLTypeEnum = "tMeURLTypeUser" TMeURLTypeSupergroupType TMeURLTypeEnum = "tMeURLTypeSupergroup" TMeURLTypeChatInviteType TMeURLTypeEnum = "tMeURLTypeChatInvite" TMeURLTypeStickerSetType TMeURLTypeEnum = "tMeURLTypeStickerSet" )
TMeURLType enums
type TMeURLTypeStickerSet ¶
type TMeURLTypeStickerSet struct { StickerSetID JSONInt64 `json:"sticker_set_id"` // Identifier of the sticker set // contains filtered or unexported fields }
TMeURLTypeStickerSet A URL linking to a sticker set
func NewTMeURLTypeStickerSet ¶
func NewTMeURLTypeStickerSet(stickerSetID JSONInt64) *TMeURLTypeStickerSet
NewTMeURLTypeStickerSet creates a new TMeURLTypeStickerSet
@param stickerSetID Identifier of the sticker set
func (*TMeURLTypeStickerSet) GetTMeURLTypeEnum ¶
func (tMeURLTypeStickerSet *TMeURLTypeStickerSet) GetTMeURLTypeEnum() TMeURLTypeEnum
GetTMeURLTypeEnum return the enum type of this object
func (*TMeURLTypeStickerSet) MessageType ¶
func (tMeURLTypeStickerSet *TMeURLTypeStickerSet) MessageType() string
MessageType return the string telegram-type of TMeURLTypeStickerSet
type TMeURLTypeSupergroup ¶
type TMeURLTypeSupergroup struct { SupergroupID int64 `json:"supergroup_id"` // Identifier of the supergroup or channel // contains filtered or unexported fields }
TMeURLTypeSupergroup A URL linking to a public supergroup or channel
func NewTMeURLTypeSupergroup ¶
func NewTMeURLTypeSupergroup(supergroupID int64) *TMeURLTypeSupergroup
NewTMeURLTypeSupergroup creates a new TMeURLTypeSupergroup
@param supergroupID Identifier of the supergroup or channel
func (*TMeURLTypeSupergroup) GetTMeURLTypeEnum ¶
func (tMeURLTypeSupergroup *TMeURLTypeSupergroup) GetTMeURLTypeEnum() TMeURLTypeEnum
GetTMeURLTypeEnum return the enum type of this object
func (*TMeURLTypeSupergroup) MessageType ¶
func (tMeURLTypeSupergroup *TMeURLTypeSupergroup) MessageType() string
MessageType return the string telegram-type of TMeURLTypeSupergroup
type TMeURLTypeUser ¶
type TMeURLTypeUser struct { UserID int32 `json:"user_id"` // Identifier of the user // contains filtered or unexported fields }
TMeURLTypeUser A URL linking to a user
func NewTMeURLTypeUser ¶
func NewTMeURLTypeUser(userID int32) *TMeURLTypeUser
NewTMeURLTypeUser creates a new TMeURLTypeUser
@param userID Identifier of the user
func (*TMeURLTypeUser) GetTMeURLTypeEnum ¶
func (tMeURLTypeUser *TMeURLTypeUser) GetTMeURLTypeEnum() TMeURLTypeEnum
GetTMeURLTypeEnum return the enum type of this object
func (*TMeURLTypeUser) MessageType ¶
func (tMeURLTypeUser *TMeURLTypeUser) MessageType() string
MessageType return the string telegram-type of TMeURLTypeUser
type TMeURLs ¶
type TMeURLs struct { URLs []TMeURL `json:"urls"` // List of URLs // contains filtered or unexported fields }
TMeURLs Contains a list of t.me URLs
func (*TMeURLs) MessageType ¶
MessageType return the string telegram-type of TMeURLs
type TdMessage ¶
type TdMessage interface {
MessageType() string
}
TdMessage is the interface for all messages send and received to/from tdlib
type TdlibParameters ¶
type TdlibParameters struct { UseTestDc bool `json:"use_test_dc"` // If set to true, the Telegram test environment will be used instead of the production environment DatabaseDirectory string `json:"database_directory"` // The path to the directory for the persistent database; if empty, the current working directory will be used FilesDirectory string `json:"files_directory"` // The path to the directory for storing files; if empty, database_directory will be used UseFileDatabase bool `json:"use_file_database"` // If set to true, information about downloaded and uploaded files will be saved between application restarts UseChatInfoDatabase bool `json:"use_chat_info_database"` // If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database UseMessageDatabase bool `json:"use_message_database"` // If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database UseSecretChats bool `json:"use_secret_chats"` // If set to true, support for secret chats will be enabled APIID int32 `json:"api_id"` // Application identifier for Telegram API access, which can be obtained at https://my.telegram.org APIHash string `json:"api_hash"` // Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org SystemLanguageCode string `json:"system_language_code"` // IETF language tag of the user's operating system language; must be non-empty DeviceModel string `json:"device_model"` // Model of the device the application is being run on; must be non-empty SystemVersion string `json:"system_version"` // Version of the operating system the application is being run on; must be non-empty ApplicationVersion string `json:"application_version"` // Application version; must be non-empty EnableStorageOptimizer bool `json:"enable_storage_optimizer"` // If set to true, old files will automatically be deleted IgnoreFileNames bool `json:"ignore_file_names"` // If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name // contains filtered or unexported fields }
TdlibParameters Contains parameters for TDLib initialization
func NewTdlibParameters ¶
func NewTdlibParameters(useTestDc bool, databaseDirectory string, filesDirectory string, useFileDatabase bool, useChatInfoDatabase bool, useMessageDatabase bool, useSecretChats bool, aPIID int32, aPIHash string, systemLanguageCode string, deviceModel string, systemVersion string, applicationVersion string, enableStorageOptimizer bool, ignoreFileNames bool) *TdlibParameters
NewTdlibParameters creates a new TdlibParameters
@param useTestDc If set to true, the Telegram test environment will be used instead of the production environment @param databaseDirectory The path to the directory for the persistent database; if empty, the current working directory will be used @param filesDirectory The path to the directory for storing files; if empty, database_directory will be used @param useFileDatabase If set to true, information about downloaded and uploaded files will be saved between application restarts @param useChatInfoDatabase If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database @param useMessageDatabase If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database @param useSecretChats If set to true, support for secret chats will be enabled @param aPIID Application identifier for Telegram API access, which can be obtained at https://my.telegram.org @param aPIHash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org @param systemLanguageCode IETF language tag of the user's operating system language; must be non-empty @param deviceModel Model of the device the application is being run on; must be non-empty @param systemVersion Version of the operating system the application is being run on; must be non-empty @param applicationVersion Application version; must be non-empty @param enableStorageOptimizer If set to true, old files will automatically be deleted @param ignoreFileNames If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
func (*TdlibParameters) MessageType ¶
func (tdlibParameters *TdlibParameters) MessageType() string
MessageType return the string telegram-type of TdlibParameters
type TemporaryPasswordState ¶
type TemporaryPasswordState struct { HasPassword bool `json:"has_password"` // True, if a temporary password is available ValidFor int32 `json:"valid_for"` // Time left before the temporary password expires, in seconds // contains filtered or unexported fields }
TemporaryPasswordState Returns information about the availability of a temporary password, which can be used for payments
func NewTemporaryPasswordState ¶
func NewTemporaryPasswordState(hasPassword bool, validFor int32) *TemporaryPasswordState
NewTemporaryPasswordState creates a new TemporaryPasswordState
@param hasPassword True, if a temporary password is available @param validFor Time left before the temporary password expires, in seconds
func (*TemporaryPasswordState) MessageType ¶
func (temporaryPasswordState *TemporaryPasswordState) MessageType() string
MessageType return the string telegram-type of TemporaryPasswordState
type TestBytes ¶
type TestBytes struct { Value []byte `json:"value"` // Bytes // contains filtered or unexported fields }
TestBytes A simple object containing a sequence of bytes; for testing only
func (*TestBytes) MessageType ¶
MessageType return the string telegram-type of TestBytes
type TestInt ¶
type TestInt struct { Value int32 `json:"value"` // Number // contains filtered or unexported fields }
TestInt A simple object containing a number; for testing only
func (*TestInt) MessageType ¶
MessageType return the string telegram-type of TestInt
type TestString ¶
type TestString struct { Value string `json:"value"` // String // contains filtered or unexported fields }
TestString A simple object containing a string; for testing only
func NewTestString ¶
func NewTestString(value string) *TestString
NewTestString creates a new TestString
@param value String
func (*TestString) MessageType ¶
func (testString *TestString) MessageType() string
MessageType return the string telegram-type of TestString
type TestVectorInt ¶
type TestVectorInt struct { Value []int32 `json:"value"` // Vector of numbers // contains filtered or unexported fields }
TestVectorInt A simple object containing a vector of numbers; for testing only
func NewTestVectorInt ¶
func NewTestVectorInt(value []int32) *TestVectorInt
NewTestVectorInt creates a new TestVectorInt
@param value Vector of numbers
func (*TestVectorInt) MessageType ¶
func (testVectorInt *TestVectorInt) MessageType() string
MessageType return the string telegram-type of TestVectorInt
type TestVectorIntObject ¶
type TestVectorIntObject struct { Value []TestInt `json:"value"` // Vector of objects // contains filtered or unexported fields }
TestVectorIntObject A simple object containing a vector of objects that hold a number; for testing only
func NewTestVectorIntObject ¶
func NewTestVectorIntObject(value []TestInt) *TestVectorIntObject
NewTestVectorIntObject creates a new TestVectorIntObject
@param value Vector of objects
func (*TestVectorIntObject) MessageType ¶
func (testVectorIntObject *TestVectorIntObject) MessageType() string
MessageType return the string telegram-type of TestVectorIntObject
type TestVectorString ¶
type TestVectorString struct { Value []string `json:"value"` // Vector of strings // contains filtered or unexported fields }
TestVectorString A simple object containing a vector of strings; for testing only
func NewTestVectorString ¶
func NewTestVectorString(value []string) *TestVectorString
NewTestVectorString creates a new TestVectorString
@param value Vector of strings
func (*TestVectorString) MessageType ¶
func (testVectorString *TestVectorString) MessageType() string
MessageType return the string telegram-type of TestVectorString
type TestVectorStringObject ¶
type TestVectorStringObject struct { Value []TestString `json:"value"` // Vector of objects // contains filtered or unexported fields }
TestVectorStringObject A simple object containing a vector of objects that hold a string; for testing only
func NewTestVectorStringObject ¶
func NewTestVectorStringObject(value []TestString) *TestVectorStringObject
NewTestVectorStringObject creates a new TestVectorStringObject
@param value Vector of objects
func (*TestVectorStringObject) MessageType ¶
func (testVectorStringObject *TestVectorStringObject) MessageType() string
MessageType return the string telegram-type of TestVectorStringObject
type Text ¶
type Text struct { Text string `json:"text"` // Text // contains filtered or unexported fields }
Text Contains some text
func (*Text) MessageType ¶
MessageType return the string telegram-type of Text
type TextEntities ¶
type TextEntities struct { Entities []TextEntity `json:"entities"` // List of text entities // contains filtered or unexported fields }
TextEntities Contains a list of text entities
func NewTextEntities ¶
func NewTextEntities(entities []TextEntity) *TextEntities
NewTextEntities creates a new TextEntities
@param entities List of text entities
func (*TextEntities) MessageType ¶
func (textEntities *TextEntities) MessageType() string
MessageType return the string telegram-type of TextEntities
type TextEntity ¶
type TextEntity struct { Offset int32 `json:"offset"` // Offset of the entity in UTF-16 code points Length int32 `json:"length"` // Length of the entity, in UTF-16 code points Type TextEntityType `json:"type"` // Type of the entity // contains filtered or unexported fields }
TextEntity Represents a part of the text that needs to be formatted in some unusual way
func NewTextEntity ¶
func NewTextEntity(offset int32, length int32, typeParam TextEntityType) *TextEntity
NewTextEntity creates a new TextEntity
@param offset Offset of the entity in UTF-16 code points @param length Length of the entity, in UTF-16 code points @param typeParam Type of the entity
func (*TextEntity) MessageType ¶
func (textEntity *TextEntity) MessageType() string
MessageType return the string telegram-type of TextEntity
func (*TextEntity) UnmarshalJSON ¶
func (textEntity *TextEntity) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type TextEntityType ¶
type TextEntityType interface {
GetTextEntityTypeEnum() TextEntityTypeEnum
}
TextEntityType Represents a part of the text which must be formatted differently
type TextEntityTypeBold ¶
type TextEntityTypeBold struct {
// contains filtered or unexported fields
}
TextEntityTypeBold A bold text
func NewTextEntityTypeBold ¶
func NewTextEntityTypeBold() *TextEntityTypeBold
NewTextEntityTypeBold creates a new TextEntityTypeBold
func (*TextEntityTypeBold) GetTextEntityTypeEnum ¶
func (textEntityTypeBold *TextEntityTypeBold) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeBold) MessageType ¶
func (textEntityTypeBold *TextEntityTypeBold) MessageType() string
MessageType return the string telegram-type of TextEntityTypeBold
type TextEntityTypeBotCommand ¶
type TextEntityTypeBotCommand struct {
// contains filtered or unexported fields
}
TextEntityTypeBotCommand A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat
func NewTextEntityTypeBotCommand ¶
func NewTextEntityTypeBotCommand() *TextEntityTypeBotCommand
NewTextEntityTypeBotCommand creates a new TextEntityTypeBotCommand
func (*TextEntityTypeBotCommand) GetTextEntityTypeEnum ¶
func (textEntityTypeBotCommand *TextEntityTypeBotCommand) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeBotCommand) MessageType ¶
func (textEntityTypeBotCommand *TextEntityTypeBotCommand) MessageType() string
MessageType return the string telegram-type of TextEntityTypeBotCommand
type TextEntityTypeCashtag ¶
type TextEntityTypeCashtag struct {
// contains filtered or unexported fields
}
TextEntityTypeCashtag A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD")
func NewTextEntityTypeCashtag ¶
func NewTextEntityTypeCashtag() *TextEntityTypeCashtag
NewTextEntityTypeCashtag creates a new TextEntityTypeCashtag
func (*TextEntityTypeCashtag) GetTextEntityTypeEnum ¶
func (textEntityTypeCashtag *TextEntityTypeCashtag) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeCashtag) MessageType ¶
func (textEntityTypeCashtag *TextEntityTypeCashtag) MessageType() string
MessageType return the string telegram-type of TextEntityTypeCashtag
type TextEntityTypeCode ¶
type TextEntityTypeCode struct {
// contains filtered or unexported fields
}
TextEntityTypeCode Text that must be formatted as if inside a code HTML tag
func NewTextEntityTypeCode ¶
func NewTextEntityTypeCode() *TextEntityTypeCode
NewTextEntityTypeCode creates a new TextEntityTypeCode
func (*TextEntityTypeCode) GetTextEntityTypeEnum ¶
func (textEntityTypeCode *TextEntityTypeCode) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeCode) MessageType ¶
func (textEntityTypeCode *TextEntityTypeCode) MessageType() string
MessageType return the string telegram-type of TextEntityTypeCode
type TextEntityTypeEmailAddress ¶
type TextEntityTypeEmailAddress struct {
// contains filtered or unexported fields
}
TextEntityTypeEmailAddress An email address
func NewTextEntityTypeEmailAddress ¶
func NewTextEntityTypeEmailAddress() *TextEntityTypeEmailAddress
NewTextEntityTypeEmailAddress creates a new TextEntityTypeEmailAddress
func (*TextEntityTypeEmailAddress) GetTextEntityTypeEnum ¶
func (textEntityTypeEmailAddress *TextEntityTypeEmailAddress) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeEmailAddress) MessageType ¶
func (textEntityTypeEmailAddress *TextEntityTypeEmailAddress) MessageType() string
MessageType return the string telegram-type of TextEntityTypeEmailAddress
type TextEntityTypeEnum ¶
type TextEntityTypeEnum string
TextEntityTypeEnum Alias for abstract TextEntityType 'Sub-Classes', used as constant-enum here
const ( TextEntityTypeMentionType TextEntityTypeEnum = "textEntityTypeMention" TextEntityTypeHashtagType TextEntityTypeEnum = "textEntityTypeHashtag" TextEntityTypeCashtagType TextEntityTypeEnum = "textEntityTypeCashtag" TextEntityTypeBotCommandType TextEntityTypeEnum = "textEntityTypeBotCommand" TextEntityTypeURLType TextEntityTypeEnum = "textEntityTypeURL" TextEntityTypeEmailAddressType TextEntityTypeEnum = "textEntityTypeEmailAddress" TextEntityTypeBoldType TextEntityTypeEnum = "textEntityTypeBold" TextEntityTypeItalicType TextEntityTypeEnum = "textEntityTypeItalic" TextEntityTypeCodeType TextEntityTypeEnum = "textEntityTypeCode" TextEntityTypePreType TextEntityTypeEnum = "textEntityTypePre" TextEntityTypePreCodeType TextEntityTypeEnum = "textEntityTypePreCode" TextEntityTypeTextURLType TextEntityTypeEnum = "textEntityTypeTextURL" TextEntityTypeMentionNameType TextEntityTypeEnum = "textEntityTypeMentionName" TextEntityTypePhoneNumberType TextEntityTypeEnum = "textEntityTypePhoneNumber" )
TextEntityType enums
type TextEntityTypeHashtag ¶
type TextEntityTypeHashtag struct {
// contains filtered or unexported fields
}
TextEntityTypeHashtag A hashtag text, beginning with "#"
func NewTextEntityTypeHashtag ¶
func NewTextEntityTypeHashtag() *TextEntityTypeHashtag
NewTextEntityTypeHashtag creates a new TextEntityTypeHashtag
func (*TextEntityTypeHashtag) GetTextEntityTypeEnum ¶
func (textEntityTypeHashtag *TextEntityTypeHashtag) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeHashtag) MessageType ¶
func (textEntityTypeHashtag *TextEntityTypeHashtag) MessageType() string
MessageType return the string telegram-type of TextEntityTypeHashtag
type TextEntityTypeItalic ¶
type TextEntityTypeItalic struct {
// contains filtered or unexported fields
}
TextEntityTypeItalic An italic text
func NewTextEntityTypeItalic ¶
func NewTextEntityTypeItalic() *TextEntityTypeItalic
NewTextEntityTypeItalic creates a new TextEntityTypeItalic
func (*TextEntityTypeItalic) GetTextEntityTypeEnum ¶
func (textEntityTypeItalic *TextEntityTypeItalic) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeItalic) MessageType ¶
func (textEntityTypeItalic *TextEntityTypeItalic) MessageType() string
MessageType return the string telegram-type of TextEntityTypeItalic
type TextEntityTypeMention ¶
type TextEntityTypeMention struct {
// contains filtered or unexported fields
}
TextEntityTypeMention A mention of a user by their username
func NewTextEntityTypeMention ¶
func NewTextEntityTypeMention() *TextEntityTypeMention
NewTextEntityTypeMention creates a new TextEntityTypeMention
func (*TextEntityTypeMention) GetTextEntityTypeEnum ¶
func (textEntityTypeMention *TextEntityTypeMention) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeMention) MessageType ¶
func (textEntityTypeMention *TextEntityTypeMention) MessageType() string
MessageType return the string telegram-type of TextEntityTypeMention
type TextEntityTypeMentionName ¶
type TextEntityTypeMentionName struct { UserID int32 `json:"user_id"` // Identifier of the mentioned user // contains filtered or unexported fields }
TextEntityTypeMentionName A text shows instead of a raw mention of the user (e.g., when the user has no username)
func NewTextEntityTypeMentionName ¶
func NewTextEntityTypeMentionName(userID int32) *TextEntityTypeMentionName
NewTextEntityTypeMentionName creates a new TextEntityTypeMentionName
@param userID Identifier of the mentioned user
func (*TextEntityTypeMentionName) GetTextEntityTypeEnum ¶
func (textEntityTypeMentionName *TextEntityTypeMentionName) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeMentionName) MessageType ¶
func (textEntityTypeMentionName *TextEntityTypeMentionName) MessageType() string
MessageType return the string telegram-type of TextEntityTypeMentionName
type TextEntityTypePhoneNumber ¶
type TextEntityTypePhoneNumber struct {
// contains filtered or unexported fields
}
TextEntityTypePhoneNumber A phone number
func NewTextEntityTypePhoneNumber ¶
func NewTextEntityTypePhoneNumber() *TextEntityTypePhoneNumber
NewTextEntityTypePhoneNumber creates a new TextEntityTypePhoneNumber
func (*TextEntityTypePhoneNumber) GetTextEntityTypeEnum ¶
func (textEntityTypePhoneNumber *TextEntityTypePhoneNumber) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypePhoneNumber) MessageType ¶
func (textEntityTypePhoneNumber *TextEntityTypePhoneNumber) MessageType() string
MessageType return the string telegram-type of TextEntityTypePhoneNumber
type TextEntityTypePre ¶
type TextEntityTypePre struct {
// contains filtered or unexported fields
}
TextEntityTypePre Text that must be formatted as if inside a pre HTML tag
func NewTextEntityTypePre ¶
func NewTextEntityTypePre() *TextEntityTypePre
NewTextEntityTypePre creates a new TextEntityTypePre
func (*TextEntityTypePre) GetTextEntityTypeEnum ¶
func (textEntityTypePre *TextEntityTypePre) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypePre) MessageType ¶
func (textEntityTypePre *TextEntityTypePre) MessageType() string
MessageType return the string telegram-type of TextEntityTypePre
type TextEntityTypePreCode ¶
type TextEntityTypePreCode struct { Language string `json:"language"` // Programming language of the code; as defined by the sender // contains filtered or unexported fields }
TextEntityTypePreCode Text that must be formatted as if inside pre, and code HTML tags
func NewTextEntityTypePreCode ¶
func NewTextEntityTypePreCode(language string) *TextEntityTypePreCode
NewTextEntityTypePreCode creates a new TextEntityTypePreCode
@param language Programming language of the code; as defined by the sender
func (*TextEntityTypePreCode) GetTextEntityTypeEnum ¶
func (textEntityTypePreCode *TextEntityTypePreCode) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypePreCode) MessageType ¶
func (textEntityTypePreCode *TextEntityTypePreCode) MessageType() string
MessageType return the string telegram-type of TextEntityTypePreCode
type TextEntityTypeTextURL ¶
type TextEntityTypeTextURL struct { URL string `json:"url"` // URL to be opened when the link is clicked // contains filtered or unexported fields }
TextEntityTypeTextURL A text description shown instead of a raw URL
func NewTextEntityTypeTextURL ¶
func NewTextEntityTypeTextURL(uRL string) *TextEntityTypeTextURL
NewTextEntityTypeTextURL creates a new TextEntityTypeTextURL
@param uRL URL to be opened when the link is clicked
func (*TextEntityTypeTextURL) GetTextEntityTypeEnum ¶
func (textEntityTypeTextURL *TextEntityTypeTextURL) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeTextURL) MessageType ¶
func (textEntityTypeTextURL *TextEntityTypeTextURL) MessageType() string
MessageType return the string telegram-type of TextEntityTypeTextURL
type TextEntityTypeURL ¶
type TextEntityTypeURL struct {
// contains filtered or unexported fields
}
TextEntityTypeURL An HTTP URL
func NewTextEntityTypeURL ¶
func NewTextEntityTypeURL() *TextEntityTypeURL
NewTextEntityTypeURL creates a new TextEntityTypeURL
func (*TextEntityTypeURL) GetTextEntityTypeEnum ¶
func (textEntityTypeURL *TextEntityTypeURL) GetTextEntityTypeEnum() TextEntityTypeEnum
GetTextEntityTypeEnum return the enum type of this object
func (*TextEntityTypeURL) MessageType ¶
func (textEntityTypeURL *TextEntityTypeURL) MessageType() string
MessageType return the string telegram-type of TextEntityTypeURL
type TextParseMode ¶
type TextParseMode interface {
GetTextParseModeEnum() TextParseModeEnum
}
TextParseMode Describes the way the text should be parsed for TextEntities
type TextParseModeEnum ¶
type TextParseModeEnum string
TextParseModeEnum Alias for abstract TextParseMode 'Sub-Classes', used as constant-enum here
const ( TextParseModeMarkdownType TextParseModeEnum = "textParseModeMarkdown" TextParseModeHTMLType TextParseModeEnum = "textParseModeHTML" )
TextParseMode enums
type TextParseModeHTML ¶
type TextParseModeHTML struct {
// contains filtered or unexported fields
}
TextParseModeHTML The text should be parsed in HTML-style
func NewTextParseModeHTML ¶
func NewTextParseModeHTML() *TextParseModeHTML
NewTextParseModeHTML creates a new TextParseModeHTML
func (*TextParseModeHTML) GetTextParseModeEnum ¶
func (textParseModeHTML *TextParseModeHTML) GetTextParseModeEnum() TextParseModeEnum
GetTextParseModeEnum return the enum type of this object
func (*TextParseModeHTML) MessageType ¶
func (textParseModeHTML *TextParseModeHTML) MessageType() string
MessageType return the string telegram-type of TextParseModeHTML
type TextParseModeMarkdown ¶
type TextParseModeMarkdown struct {
// contains filtered or unexported fields
}
TextParseModeMarkdown The text should be parsed in markdown-style
func NewTextParseModeMarkdown ¶
func NewTextParseModeMarkdown() *TextParseModeMarkdown
NewTextParseModeMarkdown creates a new TextParseModeMarkdown
func (*TextParseModeMarkdown) GetTextParseModeEnum ¶
func (textParseModeMarkdown *TextParseModeMarkdown) GetTextParseModeEnum() TextParseModeEnum
GetTextParseModeEnum return the enum type of this object
func (*TextParseModeMarkdown) MessageType ¶
func (textParseModeMarkdown *TextParseModeMarkdown) MessageType() string
MessageType return the string telegram-type of TextParseModeMarkdown
type TopChatCategory ¶
type TopChatCategory interface {
GetTopChatCategoryEnum() TopChatCategoryEnum
}
TopChatCategory Represents the categories of chats for which a list of frequently used chats can be retrieved
type TopChatCategoryBots ¶
type TopChatCategoryBots struct {
// contains filtered or unexported fields
}
TopChatCategoryBots A category containing frequently used private chats with bot users
func NewTopChatCategoryBots ¶
func NewTopChatCategoryBots() *TopChatCategoryBots
NewTopChatCategoryBots creates a new TopChatCategoryBots
func (*TopChatCategoryBots) GetTopChatCategoryEnum ¶
func (topChatCategoryBots *TopChatCategoryBots) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryBots) MessageType ¶
func (topChatCategoryBots *TopChatCategoryBots) MessageType() string
MessageType return the string telegram-type of TopChatCategoryBots
type TopChatCategoryCalls ¶
type TopChatCategoryCalls struct {
// contains filtered or unexported fields
}
TopChatCategoryCalls A category containing frequently used chats used for calls
func NewTopChatCategoryCalls ¶
func NewTopChatCategoryCalls() *TopChatCategoryCalls
NewTopChatCategoryCalls creates a new TopChatCategoryCalls
func (*TopChatCategoryCalls) GetTopChatCategoryEnum ¶
func (topChatCategoryCalls *TopChatCategoryCalls) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryCalls) MessageType ¶
func (topChatCategoryCalls *TopChatCategoryCalls) MessageType() string
MessageType return the string telegram-type of TopChatCategoryCalls
type TopChatCategoryChannels ¶
type TopChatCategoryChannels struct {
// contains filtered or unexported fields
}
TopChatCategoryChannels A category containing frequently used channels
func NewTopChatCategoryChannels ¶
func NewTopChatCategoryChannels() *TopChatCategoryChannels
NewTopChatCategoryChannels creates a new TopChatCategoryChannels
func (*TopChatCategoryChannels) GetTopChatCategoryEnum ¶
func (topChatCategoryChannels *TopChatCategoryChannels) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryChannels) MessageType ¶
func (topChatCategoryChannels *TopChatCategoryChannels) MessageType() string
MessageType return the string telegram-type of TopChatCategoryChannels
type TopChatCategoryEnum ¶
type TopChatCategoryEnum string
TopChatCategoryEnum Alias for abstract TopChatCategory 'Sub-Classes', used as constant-enum here
const ( TopChatCategoryUsersType TopChatCategoryEnum = "topChatCategoryUsers" TopChatCategoryBotsType TopChatCategoryEnum = "topChatCategoryBots" TopChatCategoryGroupsType TopChatCategoryEnum = "topChatCategoryGroups" TopChatCategoryChannelsType TopChatCategoryEnum = "topChatCategoryChannels" TopChatCategoryInlineBotsType TopChatCategoryEnum = "topChatCategoryInlineBots" TopChatCategoryCallsType TopChatCategoryEnum = "topChatCategoryCalls" )
TopChatCategory enums
type TopChatCategoryGroups ¶
type TopChatCategoryGroups struct {
// contains filtered or unexported fields
}
TopChatCategoryGroups A category containing frequently used basic groups and supergroups
func NewTopChatCategoryGroups ¶
func NewTopChatCategoryGroups() *TopChatCategoryGroups
NewTopChatCategoryGroups creates a new TopChatCategoryGroups
func (*TopChatCategoryGroups) GetTopChatCategoryEnum ¶
func (topChatCategoryGroups *TopChatCategoryGroups) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryGroups) MessageType ¶
func (topChatCategoryGroups *TopChatCategoryGroups) MessageType() string
MessageType return the string telegram-type of TopChatCategoryGroups
type TopChatCategoryInlineBots ¶
type TopChatCategoryInlineBots struct {
// contains filtered or unexported fields
}
TopChatCategoryInlineBots A category containing frequently used chats with inline bots sorted by their usage in inline mode
func NewTopChatCategoryInlineBots ¶
func NewTopChatCategoryInlineBots() *TopChatCategoryInlineBots
NewTopChatCategoryInlineBots creates a new TopChatCategoryInlineBots
func (*TopChatCategoryInlineBots) GetTopChatCategoryEnum ¶
func (topChatCategoryInlineBots *TopChatCategoryInlineBots) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryInlineBots) MessageType ¶
func (topChatCategoryInlineBots *TopChatCategoryInlineBots) MessageType() string
MessageType return the string telegram-type of TopChatCategoryInlineBots
type TopChatCategoryUsers ¶
type TopChatCategoryUsers struct {
// contains filtered or unexported fields
}
TopChatCategoryUsers A category containing frequently used private chats with non-bot users
func NewTopChatCategoryUsers ¶
func NewTopChatCategoryUsers() *TopChatCategoryUsers
NewTopChatCategoryUsers creates a new TopChatCategoryUsers
func (*TopChatCategoryUsers) GetTopChatCategoryEnum ¶
func (topChatCategoryUsers *TopChatCategoryUsers) GetTopChatCategoryEnum() TopChatCategoryEnum
GetTopChatCategoryEnum return the enum type of this object
func (*TopChatCategoryUsers) MessageType ¶
func (topChatCategoryUsers *TopChatCategoryUsers) MessageType() string
MessageType return the string telegram-type of TopChatCategoryUsers
type Update ¶
type Update interface {
GetUpdateEnum() UpdateEnum
}
Update Contains notifications about data changes
type UpdateAuthorizationState ¶
type UpdateAuthorizationState struct { AuthorizationState AuthorizationState `json:"authorization_state"` // New authorization state // contains filtered or unexported fields }
UpdateAuthorizationState The user authorization state has changed
func NewUpdateAuthorizationState ¶
func NewUpdateAuthorizationState(authorizationState AuthorizationState) *UpdateAuthorizationState
NewUpdateAuthorizationState creates a new UpdateAuthorizationState
@param authorizationState New authorization state
func (*UpdateAuthorizationState) GetUpdateEnum ¶
func (updateAuthorizationState *UpdateAuthorizationState) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateAuthorizationState) MessageType ¶
func (updateAuthorizationState *UpdateAuthorizationState) MessageType() string
MessageType return the string telegram-type of UpdateAuthorizationState
func (*UpdateAuthorizationState) UnmarshalJSON ¶
func (updateAuthorizationState *UpdateAuthorizationState) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateBasicGroup ¶
type UpdateBasicGroup struct { BasicGroup *BasicGroup `json:"basic_group"` // New data about the group // contains filtered or unexported fields }
UpdateBasicGroup Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client
func NewUpdateBasicGroup ¶
func NewUpdateBasicGroup(basicGroup *BasicGroup) *UpdateBasicGroup
NewUpdateBasicGroup creates a new UpdateBasicGroup
@param basicGroup New data about the group
func (*UpdateBasicGroup) GetUpdateEnum ¶
func (updateBasicGroup *UpdateBasicGroup) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateBasicGroup) MessageType ¶
func (updateBasicGroup *UpdateBasicGroup) MessageType() string
MessageType return the string telegram-type of UpdateBasicGroup
type UpdateBasicGroupFullInfo ¶
type UpdateBasicGroupFullInfo struct { BasicGroupID int32 `json:"basic_group_id"` // Identifier of a basic group BasicGroupFullInfo *BasicGroupFullInfo `json:"basic_group_full_info"` // New full information about the group // contains filtered or unexported fields }
UpdateBasicGroupFullInfo Some data from basicGroupFullInfo has been changed
func NewUpdateBasicGroupFullInfo ¶
func NewUpdateBasicGroupFullInfo(basicGroupID int32, basicGroupFullInfo *BasicGroupFullInfo) *UpdateBasicGroupFullInfo
NewUpdateBasicGroupFullInfo creates a new UpdateBasicGroupFullInfo
@param basicGroupID Identifier of a basic group @param basicGroupFullInfo New full information about the group
func (*UpdateBasicGroupFullInfo) GetUpdateEnum ¶
func (updateBasicGroupFullInfo *UpdateBasicGroupFullInfo) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateBasicGroupFullInfo) MessageType ¶
func (updateBasicGroupFullInfo *UpdateBasicGroupFullInfo) MessageType() string
MessageType return the string telegram-type of UpdateBasicGroupFullInfo
type UpdateCall ¶
type UpdateCall struct { Call *Call `json:"call"` // New data about a call // contains filtered or unexported fields }
UpdateCall New call was created or information about a call was updated
func NewUpdateCall ¶
func NewUpdateCall(call *Call) *UpdateCall
NewUpdateCall creates a new UpdateCall
@param call New data about a call
func (*UpdateCall) GetUpdateEnum ¶
func (updateCall *UpdateCall) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateCall) MessageType ¶
func (updateCall *UpdateCall) MessageType() string
MessageType return the string telegram-type of UpdateCall
type UpdateChatDraftMessage ¶
type UpdateChatDraftMessage struct { ChatID int64 `json:"chat_id"` // Chat identifier DraftMessage *DraftMessage `json:"draft_message"` // The new draft message; may be null Order JSONInt64 `json:"order"` // New value of the chat order // contains filtered or unexported fields }
UpdateChatDraftMessage A draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied
func NewUpdateChatDraftMessage ¶
func NewUpdateChatDraftMessage(chatID int64, draftMessage *DraftMessage, order JSONInt64) *UpdateChatDraftMessage
NewUpdateChatDraftMessage creates a new UpdateChatDraftMessage
@param chatID Chat identifier @param draftMessage The new draft message; may be null @param order New value of the chat order
func (*UpdateChatDraftMessage) GetUpdateEnum ¶
func (updateChatDraftMessage *UpdateChatDraftMessage) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatDraftMessage) MessageType ¶
func (updateChatDraftMessage *UpdateChatDraftMessage) MessageType() string
MessageType return the string telegram-type of UpdateChatDraftMessage
type UpdateChatIsPinned ¶
type UpdateChatIsPinned struct { ChatID int64 `json:"chat_id"` // Chat identifier IsPinned bool `json:"is_pinned"` // New value of is_pinned Order JSONInt64 `json:"order"` // New value of the chat order // contains filtered or unexported fields }
UpdateChatIsPinned A chat was pinned or unpinned
func NewUpdateChatIsPinned ¶
func NewUpdateChatIsPinned(chatID int64, isPinned bool, order JSONInt64) *UpdateChatIsPinned
NewUpdateChatIsPinned creates a new UpdateChatIsPinned
@param chatID Chat identifier @param isPinned New value of is_pinned @param order New value of the chat order
func (*UpdateChatIsPinned) GetUpdateEnum ¶
func (updateChatIsPinned *UpdateChatIsPinned) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatIsPinned) MessageType ¶
func (updateChatIsPinned *UpdateChatIsPinned) MessageType() string
MessageType return the string telegram-type of UpdateChatIsPinned
type UpdateChatLastMessage ¶
type UpdateChatLastMessage struct { ChatID int64 `json:"chat_id"` // Chat identifier LastMessage *Message `json:"last_message"` // The new last message in the chat; may be null Order JSONInt64 `json:"order"` // New value of the chat order // contains filtered or unexported fields }
UpdateChatLastMessage The last message of a chat was changed. If last_message is null then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case
func NewUpdateChatLastMessage ¶
func NewUpdateChatLastMessage(chatID int64, lastMessage *Message, order JSONInt64) *UpdateChatLastMessage
NewUpdateChatLastMessage creates a new UpdateChatLastMessage
@param chatID Chat identifier @param lastMessage The new last message in the chat; may be null @param order New value of the chat order
func (*UpdateChatLastMessage) GetUpdateEnum ¶
func (updateChatLastMessage *UpdateChatLastMessage) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatLastMessage) MessageType ¶
func (updateChatLastMessage *UpdateChatLastMessage) MessageType() string
MessageType return the string telegram-type of UpdateChatLastMessage
type UpdateChatOrder ¶
type UpdateChatOrder struct { ChatID int64 `json:"chat_id"` // Chat identifier Order JSONInt64 `json:"order"` // New value of the order // contains filtered or unexported fields }
UpdateChatOrder The order of the chat in the chats list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent
func NewUpdateChatOrder ¶
func NewUpdateChatOrder(chatID int64, order JSONInt64) *UpdateChatOrder
NewUpdateChatOrder creates a new UpdateChatOrder
@param chatID Chat identifier @param order New value of the order
func (*UpdateChatOrder) GetUpdateEnum ¶
func (updateChatOrder *UpdateChatOrder) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatOrder) MessageType ¶
func (updateChatOrder *UpdateChatOrder) MessageType() string
MessageType return the string telegram-type of UpdateChatOrder
type UpdateChatPhoto ¶
type UpdateChatPhoto struct { ChatID int64 `json:"chat_id"` // Chat identifier Photo *ChatPhoto `json:"photo"` // The new chat photo; may be null // contains filtered or unexported fields }
UpdateChatPhoto A chat photo was changed
func NewUpdateChatPhoto ¶
func NewUpdateChatPhoto(chatID int64, photo *ChatPhoto) *UpdateChatPhoto
NewUpdateChatPhoto creates a new UpdateChatPhoto
@param chatID Chat identifier @param photo The new chat photo; may be null
func (*UpdateChatPhoto) GetUpdateEnum ¶
func (updateChatPhoto *UpdateChatPhoto) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatPhoto) MessageType ¶
func (updateChatPhoto *UpdateChatPhoto) MessageType() string
MessageType return the string telegram-type of UpdateChatPhoto
type UpdateChatReadInbox ¶
type UpdateChatReadInbox struct { ChatID int64 `json:"chat_id"` // Chat identifier LastReadInboxMessageID int64 `json:"last_read_inbox_message_id"` // Identifier of the last read incoming message UnreadCount int32 `json:"unread_count"` // The number of unread messages left in the chat // contains filtered or unexported fields }
UpdateChatReadInbox Incoming messages were read or number of unread messages has been changed
func NewUpdateChatReadInbox ¶
func NewUpdateChatReadInbox(chatID int64, lastReadInboxMessageID int64, unreadCount int32) *UpdateChatReadInbox
NewUpdateChatReadInbox creates a new UpdateChatReadInbox
@param chatID Chat identifier @param lastReadInboxMessageID Identifier of the last read incoming message @param unreadCount The number of unread messages left in the chat
func (*UpdateChatReadInbox) GetUpdateEnum ¶
func (updateChatReadInbox *UpdateChatReadInbox) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatReadInbox) MessageType ¶
func (updateChatReadInbox *UpdateChatReadInbox) MessageType() string
MessageType return the string telegram-type of UpdateChatReadInbox
type UpdateChatReadOutbox ¶
type UpdateChatReadOutbox struct { ChatID int64 `json:"chat_id"` // Chat identifier LastReadOutboxMessageID int64 `json:"last_read_outbox_message_id"` // Identifier of last read outgoing message // contains filtered or unexported fields }
UpdateChatReadOutbox Outgoing messages were read
func NewUpdateChatReadOutbox ¶
func NewUpdateChatReadOutbox(chatID int64, lastReadOutboxMessageID int64) *UpdateChatReadOutbox
NewUpdateChatReadOutbox creates a new UpdateChatReadOutbox
@param chatID Chat identifier @param lastReadOutboxMessageID Identifier of last read outgoing message
func (*UpdateChatReadOutbox) GetUpdateEnum ¶
func (updateChatReadOutbox *UpdateChatReadOutbox) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatReadOutbox) MessageType ¶
func (updateChatReadOutbox *UpdateChatReadOutbox) MessageType() string
MessageType return the string telegram-type of UpdateChatReadOutbox
type UpdateChatReplyMarkup ¶
type UpdateChatReplyMarkup struct { ChatID int64 `json:"chat_id"` // Chat identifier ReplyMarkupMessageID int64 `json:"reply_markup_message_id"` // Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat // contains filtered or unexported fields }
UpdateChatReplyMarkup The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user
func NewUpdateChatReplyMarkup ¶
func NewUpdateChatReplyMarkup(chatID int64, replyMarkupMessageID int64) *UpdateChatReplyMarkup
NewUpdateChatReplyMarkup creates a new UpdateChatReplyMarkup
@param chatID Chat identifier @param replyMarkupMessageID Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
func (*UpdateChatReplyMarkup) GetUpdateEnum ¶
func (updateChatReplyMarkup *UpdateChatReplyMarkup) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatReplyMarkup) MessageType ¶
func (updateChatReplyMarkup *UpdateChatReplyMarkup) MessageType() string
MessageType return the string telegram-type of UpdateChatReplyMarkup
type UpdateChatTitle ¶
type UpdateChatTitle struct { ChatID int64 `json:"chat_id"` // Chat identifier Title string `json:"title"` // The new chat title // contains filtered or unexported fields }
UpdateChatTitle The title of a chat was changed
func NewUpdateChatTitle ¶
func NewUpdateChatTitle(chatID int64, title string) *UpdateChatTitle
NewUpdateChatTitle creates a new UpdateChatTitle
@param chatID Chat identifier @param title The new chat title
func (*UpdateChatTitle) GetUpdateEnum ¶
func (updateChatTitle *UpdateChatTitle) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatTitle) MessageType ¶
func (updateChatTitle *UpdateChatTitle) MessageType() string
MessageType return the string telegram-type of UpdateChatTitle
type UpdateChatUnreadMentionCount ¶
type UpdateChatUnreadMentionCount struct { ChatID int64 `json:"chat_id"` // Chat identifier UnreadMentionCount int32 `json:"unread_mention_count"` // The number of unread mention messages left in the chat // contains filtered or unexported fields }
UpdateChatUnreadMentionCount The chat unread_mention_count has changed
func NewUpdateChatUnreadMentionCount ¶
func NewUpdateChatUnreadMentionCount(chatID int64, unreadMentionCount int32) *UpdateChatUnreadMentionCount
NewUpdateChatUnreadMentionCount creates a new UpdateChatUnreadMentionCount
@param chatID Chat identifier @param unreadMentionCount The number of unread mention messages left in the chat
func (*UpdateChatUnreadMentionCount) GetUpdateEnum ¶
func (updateChatUnreadMentionCount *UpdateChatUnreadMentionCount) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateChatUnreadMentionCount) MessageType ¶
func (updateChatUnreadMentionCount *UpdateChatUnreadMentionCount) MessageType() string
MessageType return the string telegram-type of UpdateChatUnreadMentionCount
type UpdateConnectionState ¶
type UpdateConnectionState struct { State ConnectionState `json:"state"` // The new connection state // contains filtered or unexported fields }
UpdateConnectionState The connection state has changed
func NewUpdateConnectionState ¶
func NewUpdateConnectionState(state ConnectionState) *UpdateConnectionState
NewUpdateConnectionState creates a new UpdateConnectionState
@param state The new connection state
func (*UpdateConnectionState) GetUpdateEnum ¶
func (updateConnectionState *UpdateConnectionState) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateConnectionState) MessageType ¶
func (updateConnectionState *UpdateConnectionState) MessageType() string
MessageType return the string telegram-type of UpdateConnectionState
func (*UpdateConnectionState) UnmarshalJSON ¶
func (updateConnectionState *UpdateConnectionState) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateDeleteMessages ¶
type UpdateDeleteMessages struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageIDs []int64 `json:"message_ids"` // Identifiers of the deleted messages IsPermanent bool `json:"is_permanent"` // True, if the messages are permanently deleted by a user (as opposed to just becoming unaccessible) FromCache bool `json:"from_cache"` // True, if the messages are deleted only from the cache and can possibly be retrieved again in the future // contains filtered or unexported fields }
UpdateDeleteMessages Some messages were deleted
func NewUpdateDeleteMessages ¶
func NewUpdateDeleteMessages(chatID int64, messageIDs []int64, isPermanent bool, fromCache bool) *UpdateDeleteMessages
NewUpdateDeleteMessages creates a new UpdateDeleteMessages
@param chatID Chat identifier @param messageIDs Identifiers of the deleted messages @param isPermanent True, if the messages are permanently deleted by a user (as opposed to just becoming unaccessible) @param fromCache True, if the messages are deleted only from the cache and can possibly be retrieved again in the future
func (*UpdateDeleteMessages) GetUpdateEnum ¶
func (updateDeleteMessages *UpdateDeleteMessages) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateDeleteMessages) MessageType ¶
func (updateDeleteMessages *UpdateDeleteMessages) MessageType() string
MessageType return the string telegram-type of UpdateDeleteMessages
type UpdateEnum ¶
type UpdateEnum string
UpdateEnum Alias for abstract Update 'Sub-Classes', used as constant-enum here
const ( UpdateAuthorizationStateType UpdateEnum = "updateAuthorizationState" UpdateNewMessageType UpdateEnum = "updateNewMessage" UpdateMessageSendAcknowledgedType UpdateEnum = "updateMessageSendAcknowledged" UpdateMessageSendSucceededType UpdateEnum = "updateMessageSendSucceeded" UpdateMessageSendFailedType UpdateEnum = "updateMessageSendFailed" UpdateMessageContentType UpdateEnum = "updateMessageContent" UpdateMessageEditedType UpdateEnum = "updateMessageEdited" UpdateMessageViewsType UpdateEnum = "updateMessageViews" UpdateMessageContentOpenedType UpdateEnum = "updateMessageContentOpened" UpdateMessageMentionReadType UpdateEnum = "updateMessageMentionRead" UpdateNewChatType UpdateEnum = "updateNewChat" UpdateChatTitleType UpdateEnum = "updateChatTitle" UpdateChatPhotoType UpdateEnum = "updateChatPhoto" UpdateChatLastMessageType UpdateEnum = "updateChatLastMessage" UpdateChatOrderType UpdateEnum = "updateChatOrder" UpdateChatIsPinnedType UpdateEnum = "updateChatIsPinned" UpdateChatReadInboxType UpdateEnum = "updateChatReadInbox" UpdateChatReadOutboxType UpdateEnum = "updateChatReadOutbox" UpdateChatUnreadMentionCountType UpdateEnum = "updateChatUnreadMentionCount" UpdateNotificationSettingsType UpdateEnum = "updateNotificationSettings" UpdateChatReplyMarkupType UpdateEnum = "updateChatReplyMarkup" UpdateChatDraftMessageType UpdateEnum = "updateChatDraftMessage" UpdateDeleteMessagesType UpdateEnum = "updateDeleteMessages" UpdateUserChatActionType UpdateEnum = "updateUserChatAction" UpdateUserStatusType UpdateEnum = "updateUserStatus" UpdateUserType UpdateEnum = "updateUser" UpdateBasicGroupType UpdateEnum = "updateBasicGroup" UpdateSupergroupType UpdateEnum = "updateSupergroup" UpdateSecretChatType UpdateEnum = "updateSecretChat" UpdateUserFullInfoType UpdateEnum = "updateUserFullInfo" UpdateBasicGroupFullInfoType UpdateEnum = "updateBasicGroupFullInfo" UpdateSupergroupFullInfoType UpdateEnum = "updateSupergroupFullInfo" UpdateServiceNotificationType UpdateEnum = "updateServiceNotification" UpdateFileType UpdateEnum = "updateFile" UpdateFileGenerationStartType UpdateEnum = "updateFileGenerationStart" UpdateFileGenerationStopType UpdateEnum = "updateFileGenerationStop" UpdateCallType UpdateEnum = "updateCall" UpdateUserPrivacySettingRulesType UpdateEnum = "updateUserPrivacySettingRules" UpdateUnreadMessageCountType UpdateEnum = "updateUnreadMessageCount" UpdateOptionType UpdateEnum = "updateOption" UpdateInstalledStickerSetsType UpdateEnum = "updateInstalledStickerSets" UpdateTrendingStickerSetsType UpdateEnum = "updateTrendingStickerSets" UpdateRecentStickersType UpdateEnum = "updateRecentStickers" UpdateFavoriteStickersType UpdateEnum = "updateFavoriteStickers" UpdateSavedAnimationsType UpdateEnum = "updateSavedAnimations" UpdateConnectionStateType UpdateEnum = "updateConnectionState" UpdateNewInlineQueryType UpdateEnum = "updateNewInlineQuery" UpdateNewChosenInlineResultType UpdateEnum = "updateNewChosenInlineResult" UpdateNewCallbackQueryType UpdateEnum = "updateNewCallbackQuery" UpdateNewInlineCallbackQueryType UpdateEnum = "updateNewInlineCallbackQuery" UpdateNewShippingQueryType UpdateEnum = "updateNewShippingQuery" UpdateNewPreCheckoutQueryType UpdateEnum = "updateNewPreCheckoutQuery" UpdateNewCustomEventType UpdateEnum = "updateNewCustomEvent" UpdateNewCustomQueryType UpdateEnum = "updateNewCustomQuery" )
Update enums
type UpdateFavoriteStickers ¶
type UpdateFavoriteStickers struct { StickerIDs []int32 `json:"sticker_ids"` // The new list of file identifiers of favorite stickers // contains filtered or unexported fields }
UpdateFavoriteStickers The list of favorite stickers was updated
func NewUpdateFavoriteStickers ¶
func NewUpdateFavoriteStickers(stickerIDs []int32) *UpdateFavoriteStickers
NewUpdateFavoriteStickers creates a new UpdateFavoriteStickers
@param stickerIDs The new list of file identifiers of favorite stickers
func (*UpdateFavoriteStickers) GetUpdateEnum ¶
func (updateFavoriteStickers *UpdateFavoriteStickers) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateFavoriteStickers) MessageType ¶
func (updateFavoriteStickers *UpdateFavoriteStickers) MessageType() string
MessageType return the string telegram-type of UpdateFavoriteStickers
type UpdateFile ¶
type UpdateFile struct { File *File `json:"file"` // New data about the file // contains filtered or unexported fields }
UpdateFile Information about a file was updated
func NewUpdateFile ¶
func NewUpdateFile(file *File) *UpdateFile
NewUpdateFile creates a new UpdateFile
@param file New data about the file
func (*UpdateFile) GetUpdateEnum ¶
func (updateFile *UpdateFile) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateFile) MessageType ¶
func (updateFile *UpdateFile) MessageType() string
MessageType return the string telegram-type of UpdateFile
type UpdateFileGenerationStart ¶
type UpdateFileGenerationStart struct { GenerationID JSONInt64 `json:"generation_id"` // Unique identifier for the generation process OriginalPath string `json:"original_path"` // The path to a file from which a new file is generated, may be empty DestinationPath string `json:"destination_path"` // The path to a file that should be created and where the new file should be generated Conversion string `json:"conversion"` // String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains a HTTP/HTTPS URL of a file, which should be downloaded by the client // contains filtered or unexported fields }
UpdateFileGenerationStart The file generation process needs to be started by the client
func NewUpdateFileGenerationStart ¶
func NewUpdateFileGenerationStart(generationID JSONInt64, originalPath string, destinationPath string, conversion string) *UpdateFileGenerationStart
NewUpdateFileGenerationStart creates a new UpdateFileGenerationStart
@param generationID Unique identifier for the generation process @param originalPath The path to a file from which a new file is generated, may be empty @param destinationPath The path to a file that should be created and where the new file should be generated @param conversion String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains a HTTP/HTTPS URL of a file, which should be downloaded by the client
func (*UpdateFileGenerationStart) GetUpdateEnum ¶
func (updateFileGenerationStart *UpdateFileGenerationStart) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateFileGenerationStart) MessageType ¶
func (updateFileGenerationStart *UpdateFileGenerationStart) MessageType() string
MessageType return the string telegram-type of UpdateFileGenerationStart
type UpdateFileGenerationStop ¶
type UpdateFileGenerationStop struct { GenerationID JSONInt64 `json:"generation_id"` // Unique identifier for the generation process // contains filtered or unexported fields }
UpdateFileGenerationStop File generation is no longer needed
func NewUpdateFileGenerationStop ¶
func NewUpdateFileGenerationStop(generationID JSONInt64) *UpdateFileGenerationStop
NewUpdateFileGenerationStop creates a new UpdateFileGenerationStop
@param generationID Unique identifier for the generation process
func (*UpdateFileGenerationStop) GetUpdateEnum ¶
func (updateFileGenerationStop *UpdateFileGenerationStop) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateFileGenerationStop) MessageType ¶
func (updateFileGenerationStop *UpdateFileGenerationStop) MessageType() string
MessageType return the string telegram-type of UpdateFileGenerationStop
type UpdateInstalledStickerSets ¶
type UpdateInstalledStickerSets struct { IsMasks bool `json:"is_masks"` // True, if the list of installed mask sticker sets was updated StickerSetIDs []JSONInt64 `json:"sticker_set_ids"` // The new list of installed ordinary sticker sets // contains filtered or unexported fields }
UpdateInstalledStickerSets The list of installed sticker sets was updated
func NewUpdateInstalledStickerSets ¶
func NewUpdateInstalledStickerSets(isMasks bool, stickerSetIDs []JSONInt64) *UpdateInstalledStickerSets
NewUpdateInstalledStickerSets creates a new UpdateInstalledStickerSets
@param isMasks True, if the list of installed mask sticker sets was updated @param stickerSetIDs The new list of installed ordinary sticker sets
func (*UpdateInstalledStickerSets) GetUpdateEnum ¶
func (updateInstalledStickerSets *UpdateInstalledStickerSets) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateInstalledStickerSets) MessageType ¶
func (updateInstalledStickerSets *UpdateInstalledStickerSets) MessageType() string
MessageType return the string telegram-type of UpdateInstalledStickerSets
type UpdateMessageContent ¶
type UpdateMessageContent struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageID int64 `json:"message_id"` // Message identifier NewContent MessageContent `json:"new_content"` // New message content // contains filtered or unexported fields }
UpdateMessageContent The message content has changed
func NewUpdateMessageContent ¶
func NewUpdateMessageContent(chatID int64, messageID int64, newContent MessageContent) *UpdateMessageContent
NewUpdateMessageContent creates a new UpdateMessageContent
@param chatID Chat identifier @param messageID Message identifier @param newContent New message content
func (*UpdateMessageContent) GetUpdateEnum ¶
func (updateMessageContent *UpdateMessageContent) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageContent) MessageType ¶
func (updateMessageContent *UpdateMessageContent) MessageType() string
MessageType return the string telegram-type of UpdateMessageContent
func (*UpdateMessageContent) UnmarshalJSON ¶
func (updateMessageContent *UpdateMessageContent) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateMessageContentOpened ¶
type UpdateMessageContentOpened struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageID int64 `json:"message_id"` // Message identifier // contains filtered or unexported fields }
UpdateMessageContentOpened The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages
func NewUpdateMessageContentOpened ¶
func NewUpdateMessageContentOpened(chatID int64, messageID int64) *UpdateMessageContentOpened
NewUpdateMessageContentOpened creates a new UpdateMessageContentOpened
@param chatID Chat identifier @param messageID Message identifier
func (*UpdateMessageContentOpened) GetUpdateEnum ¶
func (updateMessageContentOpened *UpdateMessageContentOpened) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageContentOpened) MessageType ¶
func (updateMessageContentOpened *UpdateMessageContentOpened) MessageType() string
MessageType return the string telegram-type of UpdateMessageContentOpened
type UpdateMessageEdited ¶
type UpdateMessageEdited struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageID int64 `json:"message_id"` // Message identifier EditDate int32 `json:"edit_date"` // Point in time (Unix timestamp) when the message was edited ReplyMarkup ReplyMarkup `json:"reply_markup"` // New message reply markup; may be null // contains filtered or unexported fields }
UpdateMessageEdited A message was edited. Changes in the message content will come in a separate updateMessageContent
func NewUpdateMessageEdited ¶
func NewUpdateMessageEdited(chatID int64, messageID int64, editDate int32, replyMarkup ReplyMarkup) *UpdateMessageEdited
NewUpdateMessageEdited creates a new UpdateMessageEdited
@param chatID Chat identifier @param messageID Message identifier @param editDate Point in time (Unix timestamp) when the message was edited @param replyMarkup New message reply markup; may be null
func (*UpdateMessageEdited) GetUpdateEnum ¶
func (updateMessageEdited *UpdateMessageEdited) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageEdited) MessageType ¶
func (updateMessageEdited *UpdateMessageEdited) MessageType() string
MessageType return the string telegram-type of UpdateMessageEdited
func (*UpdateMessageEdited) UnmarshalJSON ¶
func (updateMessageEdited *UpdateMessageEdited) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateMessageMentionRead ¶
type UpdateMessageMentionRead struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageID int64 `json:"message_id"` // Message identifier UnreadMentionCount int32 `json:"unread_mention_count"` // The new number of unread mention messages left in the chat // contains filtered or unexported fields }
UpdateMessageMentionRead A message with an unread mention was read
func NewUpdateMessageMentionRead ¶
func NewUpdateMessageMentionRead(chatID int64, messageID int64, unreadMentionCount int32) *UpdateMessageMentionRead
NewUpdateMessageMentionRead creates a new UpdateMessageMentionRead
@param chatID Chat identifier @param messageID Message identifier @param unreadMentionCount The new number of unread mention messages left in the chat
func (*UpdateMessageMentionRead) GetUpdateEnum ¶
func (updateMessageMentionRead *UpdateMessageMentionRead) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageMentionRead) MessageType ¶
func (updateMessageMentionRead *UpdateMessageMentionRead) MessageType() string
MessageType return the string telegram-type of UpdateMessageMentionRead
type UpdateMessageSendAcknowledged ¶
type UpdateMessageSendAcknowledged struct { ChatID int64 `json:"chat_id"` // The chat identifier of the sent message MessageID int64 `json:"message_id"` // A temporary message identifier // contains filtered or unexported fields }
UpdateMessageSendAcknowledged A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message
func NewUpdateMessageSendAcknowledged ¶
func NewUpdateMessageSendAcknowledged(chatID int64, messageID int64) *UpdateMessageSendAcknowledged
NewUpdateMessageSendAcknowledged creates a new UpdateMessageSendAcknowledged
@param chatID The chat identifier of the sent message @param messageID A temporary message identifier
func (*UpdateMessageSendAcknowledged) GetUpdateEnum ¶
func (updateMessageSendAcknowledged *UpdateMessageSendAcknowledged) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageSendAcknowledged) MessageType ¶
func (updateMessageSendAcknowledged *UpdateMessageSendAcknowledged) MessageType() string
MessageType return the string telegram-type of UpdateMessageSendAcknowledged
type UpdateMessageSendFailed ¶
type UpdateMessageSendFailed struct { Message *Message `json:"message"` // Contains information about the message that failed to send OldMessageID int64 `json:"old_message_id"` // The previous temporary message identifier ErrorCode int32 `json:"error_code"` // An error code ErrorMessage string `json:"error_message"` // Error message // contains filtered or unexported fields }
UpdateMessageSendFailed A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
func NewUpdateMessageSendFailed ¶
func NewUpdateMessageSendFailed(message *Message, oldMessageID int64, errorCode int32, errorMessage string) *UpdateMessageSendFailed
NewUpdateMessageSendFailed creates a new UpdateMessageSendFailed
@param message Contains information about the message that failed to send @param oldMessageID The previous temporary message identifier @param errorCode An error code @param errorMessage Error message
func (*UpdateMessageSendFailed) GetUpdateEnum ¶
func (updateMessageSendFailed *UpdateMessageSendFailed) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageSendFailed) MessageType ¶
func (updateMessageSendFailed *UpdateMessageSendFailed) MessageType() string
MessageType return the string telegram-type of UpdateMessageSendFailed
type UpdateMessageSendSucceeded ¶
type UpdateMessageSendSucceeded struct { Message *Message `json:"message"` // Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change OldMessageID int64 `json:"old_message_id"` // The previous temporary message identifier // contains filtered or unexported fields }
UpdateMessageSendSucceeded A message has been successfully sent
func NewUpdateMessageSendSucceeded ¶
func NewUpdateMessageSendSucceeded(message *Message, oldMessageID int64) *UpdateMessageSendSucceeded
NewUpdateMessageSendSucceeded creates a new UpdateMessageSendSucceeded
@param message Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change @param oldMessageID The previous temporary message identifier
func (*UpdateMessageSendSucceeded) GetUpdateEnum ¶
func (updateMessageSendSucceeded *UpdateMessageSendSucceeded) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageSendSucceeded) MessageType ¶
func (updateMessageSendSucceeded *UpdateMessageSendSucceeded) MessageType() string
MessageType return the string telegram-type of UpdateMessageSendSucceeded
type UpdateMessageViews ¶
type UpdateMessageViews struct { ChatID int64 `json:"chat_id"` // Chat identifier MessageID int64 `json:"message_id"` // Message identifier Views int32 `json:"views"` // New value of the view count // contains filtered or unexported fields }
UpdateMessageViews The view count of the message has changed
func NewUpdateMessageViews ¶
func NewUpdateMessageViews(chatID int64, messageID int64, views int32) *UpdateMessageViews
NewUpdateMessageViews creates a new UpdateMessageViews
@param chatID Chat identifier @param messageID Message identifier @param views New value of the view count
func (*UpdateMessageViews) GetUpdateEnum ¶
func (updateMessageViews *UpdateMessageViews) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateMessageViews) MessageType ¶
func (updateMessageViews *UpdateMessageViews) MessageType() string
MessageType return the string telegram-type of UpdateMessageViews
type UpdateMsg ¶
type UpdateMsg struct { Data UpdateData Raw []byte }
UpdateMsg is used to unmarshal recieved json strings into
type UpdateNewCallbackQuery ¶
type UpdateNewCallbackQuery struct { ID JSONInt64 `json:"id"` // Unique query identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query ChatID int64 `json:"chat_id"` // Identifier of the chat, in which the query was sent MessageID int64 `json:"message_id"` // Identifier of the message, from which the query originated ChatInstance JSONInt64 `json:"chat_instance"` // Identifier that uniquely corresponds to the chat to which the message was sent Payload CallbackQueryPayload `json:"payload"` // Query payload // contains filtered or unexported fields }
UpdateNewCallbackQuery A new incoming callback query; for bots only
func NewUpdateNewCallbackQuery ¶
func NewUpdateNewCallbackQuery(iD JSONInt64, senderUserID int32, chatID int64, messageID int64, chatInstance JSONInt64, payload CallbackQueryPayload) *UpdateNewCallbackQuery
NewUpdateNewCallbackQuery creates a new UpdateNewCallbackQuery
@param iD Unique query identifier @param senderUserID Identifier of the user who sent the query @param chatID Identifier of the chat, in which the query was sent @param messageID Identifier of the message, from which the query originated @param chatInstance Identifier that uniquely corresponds to the chat to which the message was sent @param payload Query payload
func (*UpdateNewCallbackQuery) GetUpdateEnum ¶
func (updateNewCallbackQuery *UpdateNewCallbackQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewCallbackQuery) MessageType ¶
func (updateNewCallbackQuery *UpdateNewCallbackQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewCallbackQuery
func (*UpdateNewCallbackQuery) UnmarshalJSON ¶
func (updateNewCallbackQuery *UpdateNewCallbackQuery) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateNewChat ¶
type UpdateNewChat struct { Chat *Chat `json:"chat"` // The chat // contains filtered or unexported fields }
UpdateNewChat A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates
func NewUpdateNewChat ¶
func NewUpdateNewChat(chat *Chat) *UpdateNewChat
NewUpdateNewChat creates a new UpdateNewChat
@param chat The chat
func (*UpdateNewChat) GetUpdateEnum ¶
func (updateNewChat *UpdateNewChat) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewChat) MessageType ¶
func (updateNewChat *UpdateNewChat) MessageType() string
MessageType return the string telegram-type of UpdateNewChat
type UpdateNewChosenInlineResult ¶
type UpdateNewChosenInlineResult struct { SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query UserLocation *Location `json:"user_location"` // User location, provided by the client; may be null Query string `json:"query"` // Text of the query ResultID string `json:"result_id"` // Identifier of the chosen result InlineMessageID string `json:"inline_message_id"` // Identifier of the sent inline message, if known // contains filtered or unexported fields }
UpdateNewChosenInlineResult The user has chosen a result of an inline query; for bots only
func NewUpdateNewChosenInlineResult ¶
func NewUpdateNewChosenInlineResult(senderUserID int32, userLocation *Location, query string, resultID string, inlineMessageID string) *UpdateNewChosenInlineResult
NewUpdateNewChosenInlineResult creates a new UpdateNewChosenInlineResult
@param senderUserID Identifier of the user who sent the query @param userLocation User location, provided by the client; may be null @param query Text of the query @param resultID Identifier of the chosen result @param inlineMessageID Identifier of the sent inline message, if known
func (*UpdateNewChosenInlineResult) GetUpdateEnum ¶
func (updateNewChosenInlineResult *UpdateNewChosenInlineResult) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewChosenInlineResult) MessageType ¶
func (updateNewChosenInlineResult *UpdateNewChosenInlineResult) MessageType() string
MessageType return the string telegram-type of UpdateNewChosenInlineResult
type UpdateNewCustomEvent ¶
type UpdateNewCustomEvent struct { Event string `json:"event"` // A JSON-serialized event // contains filtered or unexported fields }
UpdateNewCustomEvent A new incoming event; for bots only
func NewUpdateNewCustomEvent ¶
func NewUpdateNewCustomEvent(event string) *UpdateNewCustomEvent
NewUpdateNewCustomEvent creates a new UpdateNewCustomEvent
@param event A JSON-serialized event
func (*UpdateNewCustomEvent) GetUpdateEnum ¶
func (updateNewCustomEvent *UpdateNewCustomEvent) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewCustomEvent) MessageType ¶
func (updateNewCustomEvent *UpdateNewCustomEvent) MessageType() string
MessageType return the string telegram-type of UpdateNewCustomEvent
type UpdateNewCustomQuery ¶
type UpdateNewCustomQuery struct { ID JSONInt64 `json:"id"` // The query identifier Data string `json:"data"` // JSON-serialized query data Timeout int32 `json:"timeout"` // Query timeout // contains filtered or unexported fields }
UpdateNewCustomQuery A new incoming query; for bots only
func NewUpdateNewCustomQuery ¶
func NewUpdateNewCustomQuery(iD JSONInt64, data string, timeout int32) *UpdateNewCustomQuery
NewUpdateNewCustomQuery creates a new UpdateNewCustomQuery
@param iD The query identifier @param data JSON-serialized query data @param timeout Query timeout
func (*UpdateNewCustomQuery) GetUpdateEnum ¶
func (updateNewCustomQuery *UpdateNewCustomQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewCustomQuery) MessageType ¶
func (updateNewCustomQuery *UpdateNewCustomQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewCustomQuery
type UpdateNewInlineCallbackQuery ¶
type UpdateNewInlineCallbackQuery struct { ID JSONInt64 `json:"id"` // Unique query identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query InlineMessageID string `json:"inline_message_id"` // Identifier of the inline message, from which the query originated ChatInstance JSONInt64 `json:"chat_instance"` // An identifier uniquely corresponding to the chat a message was sent to Payload CallbackQueryPayload `json:"payload"` // Query payload // contains filtered or unexported fields }
UpdateNewInlineCallbackQuery A new incoming callback query from a message sent via a bot; for bots only
func NewUpdateNewInlineCallbackQuery ¶
func NewUpdateNewInlineCallbackQuery(iD JSONInt64, senderUserID int32, inlineMessageID string, chatInstance JSONInt64, payload CallbackQueryPayload) *UpdateNewInlineCallbackQuery
NewUpdateNewInlineCallbackQuery creates a new UpdateNewInlineCallbackQuery
@param iD Unique query identifier @param senderUserID Identifier of the user who sent the query @param inlineMessageID Identifier of the inline message, from which the query originated @param chatInstance An identifier uniquely corresponding to the chat a message was sent to @param payload Query payload
func (*UpdateNewInlineCallbackQuery) GetUpdateEnum ¶
func (updateNewInlineCallbackQuery *UpdateNewInlineCallbackQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewInlineCallbackQuery) MessageType ¶
func (updateNewInlineCallbackQuery *UpdateNewInlineCallbackQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewInlineCallbackQuery
func (*UpdateNewInlineCallbackQuery) UnmarshalJSON ¶
func (updateNewInlineCallbackQuery *UpdateNewInlineCallbackQuery) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateNewInlineQuery ¶
type UpdateNewInlineQuery struct { ID JSONInt64 `json:"id"` // Unique query identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query UserLocation *Location `json:"user_location"` // User location, provided by the client; may be null Query string `json:"query"` // Text of the query Offset string `json:"offset"` // Offset of the first entry to return // contains filtered or unexported fields }
UpdateNewInlineQuery A new incoming inline query; for bots only
func NewUpdateNewInlineQuery ¶
func NewUpdateNewInlineQuery(iD JSONInt64, senderUserID int32, userLocation *Location, query string, offset string) *UpdateNewInlineQuery
NewUpdateNewInlineQuery creates a new UpdateNewInlineQuery
@param iD Unique query identifier @param senderUserID Identifier of the user who sent the query @param userLocation User location, provided by the client; may be null @param query Text of the query @param offset Offset of the first entry to return
func (*UpdateNewInlineQuery) GetUpdateEnum ¶
func (updateNewInlineQuery *UpdateNewInlineQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewInlineQuery) MessageType ¶
func (updateNewInlineQuery *UpdateNewInlineQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewInlineQuery
type UpdateNewMessage ¶
type UpdateNewMessage struct { Message *Message `json:"message"` // The new message DisableNotification bool `json:"disable_notification"` // True, if this message must not generate a notification ContainsMention bool `json:"contains_mention"` // True, if the message contains a mention of the current user // contains filtered or unexported fields }
UpdateNewMessage A new message was received; can also be an outgoing message
func NewUpdateNewMessage ¶
func NewUpdateNewMessage(message *Message, disableNotification bool, containsMention bool) *UpdateNewMessage
NewUpdateNewMessage creates a new UpdateNewMessage
@param message The new message @param disableNotification True, if this message must not generate a notification @param containsMention True, if the message contains a mention of the current user
func (*UpdateNewMessage) GetUpdateEnum ¶
func (updateNewMessage *UpdateNewMessage) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewMessage) MessageType ¶
func (updateNewMessage *UpdateNewMessage) MessageType() string
MessageType return the string telegram-type of UpdateNewMessage
type UpdateNewPreCheckoutQuery ¶
type UpdateNewPreCheckoutQuery struct { ID JSONInt64 `json:"id"` // Unique query identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query Currency string `json:"currency"` // Currency for the product price TotalAmount int64 `json:"total_amount"` // Total price for the product, in the minimal quantity of the currency InvoicePayload []byte `json:"invoice_payload"` // Invoice payload ShippingOptionID string `json:"shipping_option_id"` // Identifier of a shipping option chosen by the user; may be empty if not applicable OrderInfo *OrderInfo `json:"order_info"` // Information about the order; may be null // contains filtered or unexported fields }
UpdateNewPreCheckoutQuery A new incoming pre-checkout query; for bots only. Contains full information about a checkout
func NewUpdateNewPreCheckoutQuery ¶
func NewUpdateNewPreCheckoutQuery(iD JSONInt64, senderUserID int32, currency string, totalAmount int64, invoicePayload []byte, shippingOptionID string, orderInfo *OrderInfo) *UpdateNewPreCheckoutQuery
NewUpdateNewPreCheckoutQuery creates a new UpdateNewPreCheckoutQuery
@param iD Unique query identifier @param senderUserID Identifier of the user who sent the query @param currency Currency for the product price @param totalAmount Total price for the product, in the minimal quantity of the currency @param invoicePayload Invoice payload @param shippingOptionID Identifier of a shipping option chosen by the user; may be empty if not applicable @param orderInfo Information about the order; may be null
func (*UpdateNewPreCheckoutQuery) GetUpdateEnum ¶
func (updateNewPreCheckoutQuery *UpdateNewPreCheckoutQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewPreCheckoutQuery) MessageType ¶
func (updateNewPreCheckoutQuery *UpdateNewPreCheckoutQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewPreCheckoutQuery
type UpdateNewShippingQuery ¶
type UpdateNewShippingQuery struct { ID JSONInt64 `json:"id"` // Unique query identifier SenderUserID int32 `json:"sender_user_id"` // Identifier of the user who sent the query InvoicePayload string `json:"invoice_payload"` // Invoice payload ShippingAddress *ShippingAddress `json:"shipping_address"` // User shipping address // contains filtered or unexported fields }
UpdateNewShippingQuery A new incoming shipping query; for bots only. Only for invoices with flexible price
func NewUpdateNewShippingQuery ¶
func NewUpdateNewShippingQuery(iD JSONInt64, senderUserID int32, invoicePayload string, shippingAddress *ShippingAddress) *UpdateNewShippingQuery
NewUpdateNewShippingQuery creates a new UpdateNewShippingQuery
@param iD Unique query identifier @param senderUserID Identifier of the user who sent the query @param invoicePayload Invoice payload @param shippingAddress User shipping address
func (*UpdateNewShippingQuery) GetUpdateEnum ¶
func (updateNewShippingQuery *UpdateNewShippingQuery) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNewShippingQuery) MessageType ¶
func (updateNewShippingQuery *UpdateNewShippingQuery) MessageType() string
MessageType return the string telegram-type of UpdateNewShippingQuery
type UpdateNotificationSettings ¶
type UpdateNotificationSettings struct { Scope NotificationSettingsScope `json:"scope"` // Types of chats for which notification settings were updated NotificationSettings *NotificationSettings `json:"notification_settings"` // The new notification settings // contains filtered or unexported fields }
UpdateNotificationSettings Notification settings for some chats were updated
func NewUpdateNotificationSettings ¶
func NewUpdateNotificationSettings(scope NotificationSettingsScope, notificationSettings *NotificationSettings) *UpdateNotificationSettings
NewUpdateNotificationSettings creates a new UpdateNotificationSettings
@param scope Types of chats for which notification settings were updated @param notificationSettings The new notification settings
func (*UpdateNotificationSettings) GetUpdateEnum ¶
func (updateNotificationSettings *UpdateNotificationSettings) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateNotificationSettings) MessageType ¶
func (updateNotificationSettings *UpdateNotificationSettings) MessageType() string
MessageType return the string telegram-type of UpdateNotificationSettings
func (*UpdateNotificationSettings) UnmarshalJSON ¶
func (updateNotificationSettings *UpdateNotificationSettings) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateOption ¶
type UpdateOption struct { Name string `json:"name"` // The option name Value OptionValue `json:"value"` // The new option value // contains filtered or unexported fields }
UpdateOption An option changed its value
func NewUpdateOption ¶
func NewUpdateOption(name string, value OptionValue) *UpdateOption
NewUpdateOption creates a new UpdateOption
@param name The option name @param value The new option value
func (*UpdateOption) GetUpdateEnum ¶
func (updateOption *UpdateOption) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateOption) MessageType ¶
func (updateOption *UpdateOption) MessageType() string
MessageType return the string telegram-type of UpdateOption
func (*UpdateOption) UnmarshalJSON ¶
func (updateOption *UpdateOption) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateRecentStickers ¶
type UpdateRecentStickers struct { IsAttached bool `json:"is_attached"` // True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated StickerIDs []int32 `json:"sticker_ids"` // The new list of file identifiers of recently used stickers // contains filtered or unexported fields }
UpdateRecentStickers The list of recently used stickers was updated
func NewUpdateRecentStickers ¶
func NewUpdateRecentStickers(isAttached bool, stickerIDs []int32) *UpdateRecentStickers
NewUpdateRecentStickers creates a new UpdateRecentStickers
@param isAttached True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated @param stickerIDs The new list of file identifiers of recently used stickers
func (*UpdateRecentStickers) GetUpdateEnum ¶
func (updateRecentStickers *UpdateRecentStickers) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateRecentStickers) MessageType ¶
func (updateRecentStickers *UpdateRecentStickers) MessageType() string
MessageType return the string telegram-type of UpdateRecentStickers
type UpdateSavedAnimations ¶
type UpdateSavedAnimations struct { AnimationIDs []int32 `json:"animation_ids"` // The new list of file identifiers of saved animations // contains filtered or unexported fields }
UpdateSavedAnimations The list of saved animations was updated
func NewUpdateSavedAnimations ¶
func NewUpdateSavedAnimations(animationIDs []int32) *UpdateSavedAnimations
NewUpdateSavedAnimations creates a new UpdateSavedAnimations
@param animationIDs The new list of file identifiers of saved animations
func (*UpdateSavedAnimations) GetUpdateEnum ¶
func (updateSavedAnimations *UpdateSavedAnimations) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateSavedAnimations) MessageType ¶
func (updateSavedAnimations *UpdateSavedAnimations) MessageType() string
MessageType return the string telegram-type of UpdateSavedAnimations
type UpdateSecretChat ¶
type UpdateSecretChat struct { SecretChat *SecretChat `json:"secret_chat"` // New data about the secret chat // contains filtered or unexported fields }
UpdateSecretChat Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client
func NewUpdateSecretChat ¶
func NewUpdateSecretChat(secretChat *SecretChat) *UpdateSecretChat
NewUpdateSecretChat creates a new UpdateSecretChat
@param secretChat New data about the secret chat
func (*UpdateSecretChat) GetUpdateEnum ¶
func (updateSecretChat *UpdateSecretChat) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateSecretChat) MessageType ¶
func (updateSecretChat *UpdateSecretChat) MessageType() string
MessageType return the string telegram-type of UpdateSecretChat
type UpdateServiceNotification ¶
type UpdateServiceNotification struct { Type string `json:"type"` // Notification type Content MessageContent `json:"content"` // Notification content // contains filtered or unexported fields }
UpdateServiceNotification Service notification from the server. Upon receiving this the client must show a popup with the content of the notification
func NewUpdateServiceNotification ¶
func NewUpdateServiceNotification(typeParam string, content MessageContent) *UpdateServiceNotification
NewUpdateServiceNotification creates a new UpdateServiceNotification
@param typeParam Notification type @param content Notification content
func (*UpdateServiceNotification) GetUpdateEnum ¶
func (updateServiceNotification *UpdateServiceNotification) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateServiceNotification) MessageType ¶
func (updateServiceNotification *UpdateServiceNotification) MessageType() string
MessageType return the string telegram-type of UpdateServiceNotification
func (*UpdateServiceNotification) UnmarshalJSON ¶
func (updateServiceNotification *UpdateServiceNotification) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateSupergroup ¶
type UpdateSupergroup struct { Supergroup *Supergroup `json:"supergroup"` // New data about the supergroup // contains filtered or unexported fields }
UpdateSupergroup Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client
func NewUpdateSupergroup ¶
func NewUpdateSupergroup(supergroup *Supergroup) *UpdateSupergroup
NewUpdateSupergroup creates a new UpdateSupergroup
@param supergroup New data about the supergroup
func (*UpdateSupergroup) GetUpdateEnum ¶
func (updateSupergroup *UpdateSupergroup) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateSupergroup) MessageType ¶
func (updateSupergroup *UpdateSupergroup) MessageType() string
MessageType return the string telegram-type of UpdateSupergroup
type UpdateSupergroupFullInfo ¶
type UpdateSupergroupFullInfo struct { SupergroupID int32 `json:"supergroup_id"` // Identifier of the supergroup or channel SupergroupFullInfo *SupergroupFullInfo `json:"supergroup_full_info"` // New full information about the supergroup // contains filtered or unexported fields }
UpdateSupergroupFullInfo Some data from supergroupFullInfo has been changed
func NewUpdateSupergroupFullInfo ¶
func NewUpdateSupergroupFullInfo(supergroupID int32, supergroupFullInfo *SupergroupFullInfo) *UpdateSupergroupFullInfo
NewUpdateSupergroupFullInfo creates a new UpdateSupergroupFullInfo
@param supergroupID Identifier of the supergroup or channel @param supergroupFullInfo New full information about the supergroup
func (*UpdateSupergroupFullInfo) GetUpdateEnum ¶
func (updateSupergroupFullInfo *UpdateSupergroupFullInfo) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateSupergroupFullInfo) MessageType ¶
func (updateSupergroupFullInfo *UpdateSupergroupFullInfo) MessageType() string
MessageType return the string telegram-type of UpdateSupergroupFullInfo
type UpdateTrendingStickerSets ¶
type UpdateTrendingStickerSets struct { StickerSets *StickerSets `json:"sticker_sets"` // The new list of trending sticker sets // contains filtered or unexported fields }
UpdateTrendingStickerSets The list of trending sticker sets was updated or some of them were viewed
func NewUpdateTrendingStickerSets ¶
func NewUpdateTrendingStickerSets(stickerSets *StickerSets) *UpdateTrendingStickerSets
NewUpdateTrendingStickerSets creates a new UpdateTrendingStickerSets
@param stickerSets The new list of trending sticker sets
func (*UpdateTrendingStickerSets) GetUpdateEnum ¶
func (updateTrendingStickerSets *UpdateTrendingStickerSets) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateTrendingStickerSets) MessageType ¶
func (updateTrendingStickerSets *UpdateTrendingStickerSets) MessageType() string
MessageType return the string telegram-type of UpdateTrendingStickerSets
type UpdateUnreadMessageCount ¶
type UpdateUnreadMessageCount struct { UnreadCount int32 `json:"unread_count"` // Total number of unread messages UnreadUnmutedCount int32 `json:"unread_unmuted_count"` // Total number of unread messages in unmuted chats // contains filtered or unexported fields }
UpdateUnreadMessageCount Number of unread messages has changed. This update is sent only if a message database is used
func NewUpdateUnreadMessageCount ¶
func NewUpdateUnreadMessageCount(unreadCount int32, unreadUnmutedCount int32) *UpdateUnreadMessageCount
NewUpdateUnreadMessageCount creates a new UpdateUnreadMessageCount
@param unreadCount Total number of unread messages @param unreadUnmutedCount Total number of unread messages in unmuted chats
func (*UpdateUnreadMessageCount) GetUpdateEnum ¶
func (updateUnreadMessageCount *UpdateUnreadMessageCount) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUnreadMessageCount) MessageType ¶
func (updateUnreadMessageCount *UpdateUnreadMessageCount) MessageType() string
MessageType return the string telegram-type of UpdateUnreadMessageCount
type UpdateUser ¶
type UpdateUser struct { User *User `json:"user"` // New data about the user // contains filtered or unexported fields }
UpdateUser Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client
func NewUpdateUser ¶
func NewUpdateUser(user *User) *UpdateUser
NewUpdateUser creates a new UpdateUser
@param user New data about the user
func (*UpdateUser) GetUpdateEnum ¶
func (updateUser *UpdateUser) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUser) MessageType ¶
func (updateUser *UpdateUser) MessageType() string
MessageType return the string telegram-type of UpdateUser
type UpdateUserChatAction ¶
type UpdateUserChatAction struct { ChatID int64 `json:"chat_id"` // Chat identifier UserID int32 `json:"user_id"` // Identifier of a user performing an action Action ChatAction `json:"action"` // The action description // contains filtered or unexported fields }
UpdateUserChatAction User activity in the chat has changed
func NewUpdateUserChatAction ¶
func NewUpdateUserChatAction(chatID int64, userID int32, action ChatAction) *UpdateUserChatAction
NewUpdateUserChatAction creates a new UpdateUserChatAction
@param chatID Chat identifier @param userID Identifier of a user performing an action @param action The action description
func (*UpdateUserChatAction) GetUpdateEnum ¶
func (updateUserChatAction *UpdateUserChatAction) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUserChatAction) MessageType ¶
func (updateUserChatAction *UpdateUserChatAction) MessageType() string
MessageType return the string telegram-type of UpdateUserChatAction
func (*UpdateUserChatAction) UnmarshalJSON ¶
func (updateUserChatAction *UpdateUserChatAction) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateUserFullInfo ¶
type UpdateUserFullInfo struct { UserID int32 `json:"user_id"` // User identifier UserFullInfo *UserFullInfo `json:"user_full_info"` // New full information about the user // contains filtered or unexported fields }
UpdateUserFullInfo Some data from userFullInfo has been changed
func NewUpdateUserFullInfo ¶
func NewUpdateUserFullInfo(userID int32, userFullInfo *UserFullInfo) *UpdateUserFullInfo
NewUpdateUserFullInfo creates a new UpdateUserFullInfo
@param userID User identifier @param userFullInfo New full information about the user
func (*UpdateUserFullInfo) GetUpdateEnum ¶
func (updateUserFullInfo *UpdateUserFullInfo) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUserFullInfo) MessageType ¶
func (updateUserFullInfo *UpdateUserFullInfo) MessageType() string
MessageType return the string telegram-type of UpdateUserFullInfo
type UpdateUserPrivacySettingRules ¶
type UpdateUserPrivacySettingRules struct { Setting UserPrivacySetting `json:"setting"` // The privacy setting Rules *UserPrivacySettingRules `json:"rules"` // New privacy rules // contains filtered or unexported fields }
UpdateUserPrivacySettingRules Some privacy setting rules have been changed
func NewUpdateUserPrivacySettingRules ¶
func NewUpdateUserPrivacySettingRules(setting UserPrivacySetting, rules *UserPrivacySettingRules) *UpdateUserPrivacySettingRules
NewUpdateUserPrivacySettingRules creates a new UpdateUserPrivacySettingRules
@param setting The privacy setting @param rules New privacy rules
func (*UpdateUserPrivacySettingRules) GetUpdateEnum ¶
func (updateUserPrivacySettingRules *UpdateUserPrivacySettingRules) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUserPrivacySettingRules) MessageType ¶
func (updateUserPrivacySettingRules *UpdateUserPrivacySettingRules) MessageType() string
MessageType return the string telegram-type of UpdateUserPrivacySettingRules
func (*UpdateUserPrivacySettingRules) UnmarshalJSON ¶
func (updateUserPrivacySettingRules *UpdateUserPrivacySettingRules) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type UpdateUserStatus ¶
type UpdateUserStatus struct { UserID int32 `json:"user_id"` // User identifier Status UserStatus `json:"status"` // New status of the user // contains filtered or unexported fields }
UpdateUserStatus The user went online or offline
func NewUpdateUserStatus ¶
func NewUpdateUserStatus(userID int32, status UserStatus) *UpdateUserStatus
NewUpdateUserStatus creates a new UpdateUserStatus
@param userID User identifier @param status New status of the user
func (*UpdateUserStatus) GetUpdateEnum ¶
func (updateUserStatus *UpdateUserStatus) GetUpdateEnum() UpdateEnum
GetUpdateEnum return the enum type of this object
func (*UpdateUserStatus) MessageType ¶
func (updateUserStatus *UpdateUserStatus) MessageType() string
MessageType return the string telegram-type of UpdateUserStatus
func (*UpdateUserStatus) UnmarshalJSON ¶
func (updateUserStatus *UpdateUserStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshal to json
type User ¶
type User struct { ID int32 `json:"id"` // User identifier FirstName string `json:"first_name"` // First name of the user LastName string `json:"last_name"` // Last name of the user Username string `json:"username"` // Username of the user PhoneNumber string `json:"phone_number"` // Phone number of the user Status UserStatus `json:"status"` // Current online status of the user ProfilePhoto *ProfilePhoto `json:"profile_photo"` // Profile photo of the user; may be null OutgoingLink LinkState `json:"outgoing_link"` // Relationship from the current user to the other user IncomingLink LinkState `json:"incoming_link"` // Relationship from the other user to the current user IsVerified bool `json:"is_verified"` // True, if the user is verified RestrictionReason string `json:"restriction_reason"` // If non-empty, it contains the reason why access to this user must be restricted. The format of the string is "{type}: {description}". HaveAccess bool `json:"have_access"` // If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser Type UserType `json:"type"` // Type of the user LanguageCode string `json:"language_code"` // IETF language tag of the user's language; only available to bots // contains filtered or unexported fields }
User Represents a user
func NewUser ¶
func NewUser(iD int32, firstName string, lastName string, username string, phoneNumber string, status UserStatus, profilePhoto *ProfilePhoto, outgoingLink LinkState, incomingLink LinkState, isVerified bool, restrictionReason string, haveAccess bool, typeParam UserType, languageCode string) *User
NewUser creates a new User
@param iD User identifier @param firstName First name of the user @param lastName Last name of the user @param username Username of the user @param phoneNumber Phone number of the user @param status Current online status of the user @param profilePhoto Profile photo of the user; may be null @param outgoingLink Relationship from the current user to the other user @param incomingLink Relationship from the other user to the current user @param isVerified True, if the user is verified @param restrictionReason If non-empty, it contains the reason why access to this user must be restricted. The format of the string is "{type}: {description}". @param haveAccess If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser @param typeParam Type of the user @param languageCode IETF language tag of the user's language; only available to bots
func (*User) MessageType ¶
MessageType return the string telegram-type of User
func (*User) UnmarshalJSON ¶
UnmarshalJSON unmarshal to json
type UserFullInfo ¶
type UserFullInfo struct { IsBlocked bool `json:"is_blocked"` // True, if the user is blacklisted by the current user CanBeCalled bool `json:"can_be_called"` // True, if the user can be called HasPrivateCalls bool `json:"has_private_calls"` // True, if the user can't be called due to their privacy settings Bio string `json:"bio"` // A short user bio GroupInCommonCount int32 `json:"group_in_common_count"` // Number of group chats where both the other user and the current user are a member; 0 for the current user BotInfo *BotInfo `json:"bot_info"` // If the user is a bot, information about the bot; may be null // contains filtered or unexported fields }
UserFullInfo Contains full information about a user (except the full list of profile photos)
func NewUserFullInfo ¶
func NewUserFullInfo(isBlocked bool, canBeCalled bool, hasPrivateCalls bool, bio string, shareText string, groupInCommonCount int32, botInfo *BotInfo) *UserFullInfo
NewUserFullInfo creates a new UserFullInfo
@param isBlocked True, if the user is blacklisted by the current user @param canBeCalled True, if the user can be called @param hasPrivateCalls True, if the user can't be called due to their privacy settings @param bio A short user bio @param shareText For bots, the text that is included with the link when users share the bot @param groupInCommonCount Number of group chats where both the other user and the current user are a member; 0 for the current user @param botInfo If the user is a bot, information about the bot; may be null
func (*UserFullInfo) MessageType ¶
func (userFullInfo *UserFullInfo) MessageType() string
MessageType return the string telegram-type of UserFullInfo
type UserPrivacySetting ¶
type UserPrivacySetting interface {
GetUserPrivacySettingEnum() UserPrivacySettingEnum
}
UserPrivacySetting Describes available user privacy settings
type UserPrivacySettingAllowCalls ¶
type UserPrivacySettingAllowCalls struct {
// contains filtered or unexported fields
}
UserPrivacySettingAllowCalls A privacy setting for managing whether the user can be called
func NewUserPrivacySettingAllowCalls ¶
func NewUserPrivacySettingAllowCalls() *UserPrivacySettingAllowCalls
NewUserPrivacySettingAllowCalls creates a new UserPrivacySettingAllowCalls
func (*UserPrivacySettingAllowCalls) GetUserPrivacySettingEnum ¶
func (userPrivacySettingAllowCalls *UserPrivacySettingAllowCalls) GetUserPrivacySettingEnum() UserPrivacySettingEnum
GetUserPrivacySettingEnum return the enum type of this object
func (*UserPrivacySettingAllowCalls) MessageType ¶
func (userPrivacySettingAllowCalls *UserPrivacySettingAllowCalls) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingAllowCalls
type UserPrivacySettingAllowChatInvites ¶
type UserPrivacySettingAllowChatInvites struct {
// contains filtered or unexported fields
}
UserPrivacySettingAllowChatInvites A privacy setting for managing whether the user can be invited to chats
func NewUserPrivacySettingAllowChatInvites ¶
func NewUserPrivacySettingAllowChatInvites() *UserPrivacySettingAllowChatInvites
NewUserPrivacySettingAllowChatInvites creates a new UserPrivacySettingAllowChatInvites
func (*UserPrivacySettingAllowChatInvites) GetUserPrivacySettingEnum ¶
func (userPrivacySettingAllowChatInvites *UserPrivacySettingAllowChatInvites) GetUserPrivacySettingEnum() UserPrivacySettingEnum
GetUserPrivacySettingEnum return the enum type of this object
func (*UserPrivacySettingAllowChatInvites) MessageType ¶
func (userPrivacySettingAllowChatInvites *UserPrivacySettingAllowChatInvites) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingAllowChatInvites
type UserPrivacySettingEnum ¶
type UserPrivacySettingEnum string
UserPrivacySettingEnum Alias for abstract UserPrivacySetting 'Sub-Classes', used as constant-enum here
const ( UserPrivacySettingShowStatusType UserPrivacySettingEnum = "userPrivacySettingShowStatus" UserPrivacySettingAllowChatInvitesType UserPrivacySettingEnum = "userPrivacySettingAllowChatInvites" UserPrivacySettingAllowCallsType UserPrivacySettingEnum = "userPrivacySettingAllowCalls" )
UserPrivacySetting enums
type UserPrivacySettingRule ¶
type UserPrivacySettingRule interface {
GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
}
UserPrivacySettingRule Represents a single rule for managing privacy settings
type UserPrivacySettingRuleAllowAll ¶
type UserPrivacySettingRuleAllowAll struct {
// contains filtered or unexported fields
}
UserPrivacySettingRuleAllowAll A rule to allow all users to do something
func NewUserPrivacySettingRuleAllowAll ¶
func NewUserPrivacySettingRuleAllowAll() *UserPrivacySettingRuleAllowAll
NewUserPrivacySettingRuleAllowAll creates a new UserPrivacySettingRuleAllowAll
func (*UserPrivacySettingRuleAllowAll) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleAllowAll *UserPrivacySettingRuleAllowAll) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleAllowAll) MessageType ¶
func (userPrivacySettingRuleAllowAll *UserPrivacySettingRuleAllowAll) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleAllowAll
type UserPrivacySettingRuleAllowContacts ¶
type UserPrivacySettingRuleAllowContacts struct {
// contains filtered or unexported fields
}
UserPrivacySettingRuleAllowContacts A rule to allow all of a user's contacts to do something
func NewUserPrivacySettingRuleAllowContacts ¶
func NewUserPrivacySettingRuleAllowContacts() *UserPrivacySettingRuleAllowContacts
NewUserPrivacySettingRuleAllowContacts creates a new UserPrivacySettingRuleAllowContacts
func (*UserPrivacySettingRuleAllowContacts) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleAllowContacts *UserPrivacySettingRuleAllowContacts) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleAllowContacts) MessageType ¶
func (userPrivacySettingRuleAllowContacts *UserPrivacySettingRuleAllowContacts) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleAllowContacts
type UserPrivacySettingRuleAllowUsers ¶
type UserPrivacySettingRuleAllowUsers struct { UserIDs []int32 `json:"user_ids"` // The user identifiers // contains filtered or unexported fields }
UserPrivacySettingRuleAllowUsers A rule to allow certain specified users to do something
func NewUserPrivacySettingRuleAllowUsers ¶
func NewUserPrivacySettingRuleAllowUsers(userIDs []int32) *UserPrivacySettingRuleAllowUsers
NewUserPrivacySettingRuleAllowUsers creates a new UserPrivacySettingRuleAllowUsers
@param userIDs The user identifiers
func (*UserPrivacySettingRuleAllowUsers) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleAllowUsers *UserPrivacySettingRuleAllowUsers) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleAllowUsers) MessageType ¶
func (userPrivacySettingRuleAllowUsers *UserPrivacySettingRuleAllowUsers) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleAllowUsers
type UserPrivacySettingRuleEnum ¶
type UserPrivacySettingRuleEnum string
UserPrivacySettingRuleEnum Alias for abstract UserPrivacySettingRule 'Sub-Classes', used as constant-enum here
const ( UserPrivacySettingRuleAllowAllType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowAll" UserPrivacySettingRuleAllowContactsType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowContacts" UserPrivacySettingRuleAllowUsersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowUsers" UserPrivacySettingRuleRestrictAllType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictAll" UserPrivacySettingRuleRestrictContactsType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictContacts" UserPrivacySettingRuleRestrictUsersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictUsers" )
UserPrivacySettingRule enums
type UserPrivacySettingRuleRestrictAll ¶
type UserPrivacySettingRuleRestrictAll struct {
// contains filtered or unexported fields
}
UserPrivacySettingRuleRestrictAll A rule to restrict all users from doing something
func NewUserPrivacySettingRuleRestrictAll ¶
func NewUserPrivacySettingRuleRestrictAll() *UserPrivacySettingRuleRestrictAll
NewUserPrivacySettingRuleRestrictAll creates a new UserPrivacySettingRuleRestrictAll
func (*UserPrivacySettingRuleRestrictAll) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleRestrictAll *UserPrivacySettingRuleRestrictAll) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleRestrictAll) MessageType ¶
func (userPrivacySettingRuleRestrictAll *UserPrivacySettingRuleRestrictAll) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleRestrictAll
type UserPrivacySettingRuleRestrictContacts ¶
type UserPrivacySettingRuleRestrictContacts struct {
// contains filtered or unexported fields
}
UserPrivacySettingRuleRestrictContacts A rule to restrict all contacts of a user from doing something
func NewUserPrivacySettingRuleRestrictContacts ¶
func NewUserPrivacySettingRuleRestrictContacts() *UserPrivacySettingRuleRestrictContacts
NewUserPrivacySettingRuleRestrictContacts creates a new UserPrivacySettingRuleRestrictContacts
func (*UserPrivacySettingRuleRestrictContacts) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleRestrictContacts *UserPrivacySettingRuleRestrictContacts) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleRestrictContacts) MessageType ¶
func (userPrivacySettingRuleRestrictContacts *UserPrivacySettingRuleRestrictContacts) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleRestrictContacts
type UserPrivacySettingRuleRestrictUsers ¶
type UserPrivacySettingRuleRestrictUsers struct { UserIDs []int32 `json:"user_ids"` // The user identifiers // contains filtered or unexported fields }
UserPrivacySettingRuleRestrictUsers A rule to restrict all specified users from doing something
func NewUserPrivacySettingRuleRestrictUsers ¶
func NewUserPrivacySettingRuleRestrictUsers(userIDs []int32) *UserPrivacySettingRuleRestrictUsers
NewUserPrivacySettingRuleRestrictUsers creates a new UserPrivacySettingRuleRestrictUsers
@param userIDs The user identifiers
func (*UserPrivacySettingRuleRestrictUsers) GetUserPrivacySettingRuleEnum ¶
func (userPrivacySettingRuleRestrictUsers *UserPrivacySettingRuleRestrictUsers) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
GetUserPrivacySettingRuleEnum return the enum type of this object
func (*UserPrivacySettingRuleRestrictUsers) MessageType ¶
func (userPrivacySettingRuleRestrictUsers *UserPrivacySettingRuleRestrictUsers) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRuleRestrictUsers
type UserPrivacySettingRules ¶
type UserPrivacySettingRules struct { Rules []UserPrivacySettingRule `json:"rules"` // A list of rules // contains filtered or unexported fields }
UserPrivacySettingRules A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed
func NewUserPrivacySettingRules ¶
func NewUserPrivacySettingRules(rules []UserPrivacySettingRule) *UserPrivacySettingRules
NewUserPrivacySettingRules creates a new UserPrivacySettingRules
@param rules A list of rules
func (*UserPrivacySettingRules) MessageType ¶
func (userPrivacySettingRules *UserPrivacySettingRules) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingRules
type UserPrivacySettingShowStatus ¶
type UserPrivacySettingShowStatus struct {
// contains filtered or unexported fields
}
UserPrivacySettingShowStatus A privacy setting for managing whether the user's online status is visible
func NewUserPrivacySettingShowStatus ¶
func NewUserPrivacySettingShowStatus() *UserPrivacySettingShowStatus
NewUserPrivacySettingShowStatus creates a new UserPrivacySettingShowStatus
func (*UserPrivacySettingShowStatus) GetUserPrivacySettingEnum ¶
func (userPrivacySettingShowStatus *UserPrivacySettingShowStatus) GetUserPrivacySettingEnum() UserPrivacySettingEnum
GetUserPrivacySettingEnum return the enum type of this object
func (*UserPrivacySettingShowStatus) MessageType ¶
func (userPrivacySettingShowStatus *UserPrivacySettingShowStatus) MessageType() string
MessageType return the string telegram-type of UserPrivacySettingShowStatus
type UserProfilePhotos ¶
type UserProfilePhotos struct { TotalCount int32 `json:"total_count"` // Total number of user profile photos Photos []Photo `json:"photos"` // A list of photos // contains filtered or unexported fields }
UserProfilePhotos Contains part of the list of user photos
func NewUserProfilePhotos ¶
func NewUserProfilePhotos(totalCount int32, photos []Photo) *UserProfilePhotos
NewUserProfilePhotos creates a new UserProfilePhotos
@param totalCount Total number of user profile photos @param photos A list of photos
func (*UserProfilePhotos) MessageType ¶
func (userProfilePhotos *UserProfilePhotos) MessageType() string
MessageType return the string telegram-type of UserProfilePhotos
type UserStatus ¶
type UserStatus interface {
GetUserStatusEnum() UserStatusEnum
}
UserStatus Describes the last time the user was online
type UserStatusEmpty ¶
type UserStatusEmpty struct {
// contains filtered or unexported fields
}
UserStatusEmpty The user status was never changed
func NewUserStatusEmpty ¶
func NewUserStatusEmpty() *UserStatusEmpty
NewUserStatusEmpty creates a new UserStatusEmpty
func (*UserStatusEmpty) GetUserStatusEnum ¶
func (userStatusEmpty *UserStatusEmpty) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusEmpty) MessageType ¶
func (userStatusEmpty *UserStatusEmpty) MessageType() string
MessageType return the string telegram-type of UserStatusEmpty
type UserStatusEnum ¶
type UserStatusEnum string
UserStatusEnum Alias for abstract UserStatus 'Sub-Classes', used as constant-enum here
const ( UserStatusEmptyType UserStatusEnum = "userStatusEmpty" UserStatusOnlineType UserStatusEnum = "userStatusOnline" UserStatusOfflineType UserStatusEnum = "userStatusOffline" UserStatusRecentlyType UserStatusEnum = "userStatusRecently" UserStatusLastWeekType UserStatusEnum = "userStatusLastWeek" UserStatusLastMonthType UserStatusEnum = "userStatusLastMonth" )
UserStatus enums
type UserStatusLastMonth ¶
type UserStatusLastMonth struct {
// contains filtered or unexported fields
}
UserStatusLastMonth The user is offline, but was online last month
func NewUserStatusLastMonth ¶
func NewUserStatusLastMonth() *UserStatusLastMonth
NewUserStatusLastMonth creates a new UserStatusLastMonth
func (*UserStatusLastMonth) GetUserStatusEnum ¶
func (userStatusLastMonth *UserStatusLastMonth) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusLastMonth) MessageType ¶
func (userStatusLastMonth *UserStatusLastMonth) MessageType() string
MessageType return the string telegram-type of UserStatusLastMonth
type UserStatusLastWeek ¶
type UserStatusLastWeek struct {
// contains filtered or unexported fields
}
UserStatusLastWeek The user is offline, but was online last week
func NewUserStatusLastWeek ¶
func NewUserStatusLastWeek() *UserStatusLastWeek
NewUserStatusLastWeek creates a new UserStatusLastWeek
func (*UserStatusLastWeek) GetUserStatusEnum ¶
func (userStatusLastWeek *UserStatusLastWeek) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusLastWeek) MessageType ¶
func (userStatusLastWeek *UserStatusLastWeek) MessageType() string
MessageType return the string telegram-type of UserStatusLastWeek
type UserStatusOffline ¶
type UserStatusOffline struct { WasOnline int32 `json:"was_online"` // Point in time (Unix timestamp) when the user was last online // contains filtered or unexported fields }
UserStatusOffline The user is offline
func NewUserStatusOffline ¶
func NewUserStatusOffline(wasOnline int32) *UserStatusOffline
NewUserStatusOffline creates a new UserStatusOffline
@param wasOnline Point in time (Unix timestamp) when the user was last online
func (*UserStatusOffline) GetUserStatusEnum ¶
func (userStatusOffline *UserStatusOffline) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusOffline) MessageType ¶
func (userStatusOffline *UserStatusOffline) MessageType() string
MessageType return the string telegram-type of UserStatusOffline
type UserStatusOnline ¶
type UserStatusOnline struct { Expires int32 `json:"expires"` // Point in time (Unix timestamp) when the user's online status will expire // contains filtered or unexported fields }
UserStatusOnline The user is online
func NewUserStatusOnline ¶
func NewUserStatusOnline(expires int32) *UserStatusOnline
NewUserStatusOnline creates a new UserStatusOnline
@param expires Point in time (Unix timestamp) when the user's online status will expire
func (*UserStatusOnline) GetUserStatusEnum ¶
func (userStatusOnline *UserStatusOnline) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusOnline) MessageType ¶
func (userStatusOnline *UserStatusOnline) MessageType() string
MessageType return the string telegram-type of UserStatusOnline
type UserStatusRecently ¶
type UserStatusRecently struct {
// contains filtered or unexported fields
}
UserStatusRecently The user was online recently
func NewUserStatusRecently ¶
func NewUserStatusRecently() *UserStatusRecently
NewUserStatusRecently creates a new UserStatusRecently
func (*UserStatusRecently) GetUserStatusEnum ¶
func (userStatusRecently *UserStatusRecently) GetUserStatusEnum() UserStatusEnum
GetUserStatusEnum return the enum type of this object
func (*UserStatusRecently) MessageType ¶
func (userStatusRecently *UserStatusRecently) MessageType() string
MessageType return the string telegram-type of UserStatusRecently
type UserType ¶
type UserType interface {
GetUserTypeEnum() UserTypeEnum
}
UserType Represents the type of the user. The following types are possible: regular users, deleted users and bots
type UserTypeBot ¶
type UserTypeBot struct { CanJoinGroups bool `json:"can_join_groups"` // True, if the bot can be invited to basic group and supergroup chats CanReadAllGroupMessages bool `json:"can_read_all_group_messages"` // True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages IsInline bool `json:"is_inline"` // True, if the bot supports inline queries InlineQueryPlaceholder string `json:"inline_query_placeholder"` // Placeholder for inline queries (displayed on the client input field) NeedLocation bool `json:"need_location"` // True, if the location of the user should be sent with every inline query to this bot // contains filtered or unexported fields }
UserTypeBot A bot (see https://core.telegram.org/bots)
func NewUserTypeBot ¶
func NewUserTypeBot(canJoinGroups bool, canReadAllGroupMessages bool, isInline bool, inlineQueryPlaceholder string, needLocation bool) *UserTypeBot
NewUserTypeBot creates a new UserTypeBot
@param canJoinGroups True, if the bot can be invited to basic group and supergroup chats @param canReadAllGroupMessages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages @param isInline True, if the bot supports inline queries @param inlineQueryPlaceholder Placeholder for inline queries (displayed on the client input field) @param needLocation True, if the location of the user should be sent with every inline query to this bot
func (*UserTypeBot) GetUserTypeEnum ¶
func (userTypeBot *UserTypeBot) GetUserTypeEnum() UserTypeEnum
GetUserTypeEnum return the enum type of this object
func (*UserTypeBot) MessageType ¶
func (userTypeBot *UserTypeBot) MessageType() string
MessageType return the string telegram-type of UserTypeBot
type UserTypeDeleted ¶
type UserTypeDeleted struct {
// contains filtered or unexported fields
}
UserTypeDeleted A deleted user or deleted bot. No information on the user besides the user_id is available. It is not possible to perform any active actions on this type of user
func NewUserTypeDeleted ¶
func NewUserTypeDeleted() *UserTypeDeleted
NewUserTypeDeleted creates a new UserTypeDeleted
func (*UserTypeDeleted) GetUserTypeEnum ¶
func (userTypeDeleted *UserTypeDeleted) GetUserTypeEnum() UserTypeEnum
GetUserTypeEnum return the enum type of this object
func (*UserTypeDeleted) MessageType ¶
func (userTypeDeleted *UserTypeDeleted) MessageType() string
MessageType return the string telegram-type of UserTypeDeleted
type UserTypeEnum ¶
type UserTypeEnum string
UserTypeEnum Alias for abstract UserType 'Sub-Classes', used as constant-enum here
const ( UserTypeRegularType UserTypeEnum = "userTypeRegular" UserTypeDeletedType UserTypeEnum = "userTypeDeleted" UserTypeBotType UserTypeEnum = "userTypeBot" UserTypeUnknownType UserTypeEnum = "userTypeUnknown" )
UserType enums
type UserTypeRegular ¶
type UserTypeRegular struct {
// contains filtered or unexported fields
}
UserTypeRegular A regular user
func NewUserTypeRegular ¶
func NewUserTypeRegular() *UserTypeRegular
NewUserTypeRegular creates a new UserTypeRegular
func (*UserTypeRegular) GetUserTypeEnum ¶
func (userTypeRegular *UserTypeRegular) GetUserTypeEnum() UserTypeEnum
GetUserTypeEnum return the enum type of this object
func (*UserTypeRegular) MessageType ¶
func (userTypeRegular *UserTypeRegular) MessageType() string
MessageType return the string telegram-type of UserTypeRegular
type UserTypeUnknown ¶
type UserTypeUnknown struct {
// contains filtered or unexported fields
}
UserTypeUnknown No information on the user besides the user_id is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
func NewUserTypeUnknown ¶
func NewUserTypeUnknown() *UserTypeUnknown
NewUserTypeUnknown creates a new UserTypeUnknown
func (*UserTypeUnknown) GetUserTypeEnum ¶
func (userTypeUnknown *UserTypeUnknown) GetUserTypeEnum() UserTypeEnum
GetUserTypeEnum return the enum type of this object
func (*UserTypeUnknown) MessageType ¶
func (userTypeUnknown *UserTypeUnknown) MessageType() string
MessageType return the string telegram-type of UserTypeUnknown
type Users ¶
type Users struct { TotalCount int32 `json:"total_count"` // Approximate total count of users found UserIDs []int32 `json:"user_ids"` // A list of user identifiers // contains filtered or unexported fields }
Users Represents a list of users
func NewUsers ¶
NewUsers creates a new Users
@param totalCount Approximate total count of users found @param userIDs A list of user identifiers
func (*Users) MessageType ¶
MessageType return the string telegram-type of Users
type ValidatedOrderInfo ¶
type ValidatedOrderInfo struct { OrderInfoID string `json:"order_info_id"` // Temporary identifier of the order information ShippingOptions []ShippingOption `json:"shipping_options"` // Available shipping options // contains filtered or unexported fields }
ValidatedOrderInfo Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options
func NewValidatedOrderInfo ¶
func NewValidatedOrderInfo(orderInfoID string, shippingOptions []ShippingOption) *ValidatedOrderInfo
NewValidatedOrderInfo creates a new ValidatedOrderInfo
@param orderInfoID Temporary identifier of the order information @param shippingOptions Available shipping options
func (*ValidatedOrderInfo) MessageType ¶
func (validatedOrderInfo *ValidatedOrderInfo) MessageType() string
MessageType return the string telegram-type of ValidatedOrderInfo
type Venue ¶
type Venue struct { Location *Location `json:"location"` // Venue location; as defined by the sender Title string `json:"title"` // Venue name; as defined by the sender Address string `json:"address"` // Venue address; as defined by the sender Provider string `json:"provider"` // Provider of the venue database; as defined by the sender. Currently only "foursquare" needs to be supported ID string `json:"id"` // Identifier of the venue in the provider database; as defined by the sender // contains filtered or unexported fields }
Venue Describes a venue
func NewVenue ¶
NewVenue creates a new Venue
@param location Venue location; as defined by the sender @param title Venue name; as defined by the sender @param address Venue address; as defined by the sender @param provider Provider of the venue database; as defined by the sender. Currently only "foursquare" needs to be supported @param iD Identifier of the venue in the provider database; as defined by the sender
func (*Venue) MessageType ¶
MessageType return the string telegram-type of Venue
type Video ¶
type Video struct { Duration int32 `json:"duration"` // Duration of the video, in seconds; as defined by the sender Width int32 `json:"width"` // Video width; as defined by the sender Height int32 `json:"height"` // Video height; as defined by the sender FileName string `json:"file_name"` // Original name of the file; as defined by the sender MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender HasStickers bool `json:"has_stickers"` // True, if stickers were added to the photo SupportsStreaming bool `json:"supports_streaming"` // True, if the video should be tried to be streamed Thumbnail *PhotoSize `json:"thumbnail"` // Video thumbnail; as defined by the sender; may be null Video *File `json:"video"` // File containing the video // contains filtered or unexported fields }
Video Describes a video file
func NewVideo ¶
func NewVideo(duration int32, width int32, height int32, fileName string, mimeType string, hasStickers bool, supportsStreaming bool, thumbnail *PhotoSize, video *File) *Video
NewVideo creates a new Video
@param duration Duration of the video, in seconds; as defined by the sender @param width Video width; as defined by the sender @param height Video height; as defined by the sender @param fileName Original name of the file; as defined by the sender @param mimeType MIME type of the file; as defined by the sender @param hasStickers True, if stickers were added to the photo @param supportsStreaming True, if the video should be tried to be streamed @param thumbnail Video thumbnail; as defined by the sender; may be null @param video File containing the video
func (*Video) MessageType ¶
MessageType return the string telegram-type of Video
type VideoNote ¶
type VideoNote struct { Duration int32 `json:"duration"` // Duration of the video, in seconds; as defined by the sender Length int32 `json:"length"` // Video width and height; as defined by the sender Thumbnail *PhotoSize `json:"thumbnail"` // Video thumbnail; as defined by the sender; may be null Video *File `json:"video"` // File containing the video // contains filtered or unexported fields }
VideoNote Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format
func NewVideoNote ¶
NewVideoNote creates a new VideoNote
@param duration Duration of the video, in seconds; as defined by the sender @param length Video width and height; as defined by the sender @param thumbnail Video thumbnail; as defined by the sender; may be null @param video File containing the video
func (*VideoNote) MessageType ¶
MessageType return the string telegram-type of VideoNote
type VoiceNote ¶
type VoiceNote struct { Duration int32 `json:"duration"` // Duration of the voice note, in seconds; as defined by the sender Waveform []byte `json:"waveform"` // A waveform representation of the voice note in 5-bit format MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender Voice *File `json:"voice"` // File containing the voice note // contains filtered or unexported fields }
VoiceNote Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel
func NewVoiceNote ¶
NewVoiceNote creates a new VoiceNote
@param duration Duration of the voice note, in seconds; as defined by the sender @param waveform A waveform representation of the voice note in 5-bit format @param mimeType MIME type of the file; as defined by the sender @param voice File containing the voice note
func (*VoiceNote) MessageType ¶
MessageType return the string telegram-type of VoiceNote
type Wallpaper ¶
type Wallpaper struct { ID int32 `json:"id"` // Unique persistent wallpaper identifier Sizes []PhotoSize `json:"sizes"` // Available variants of the wallpaper in different sizes. These photos can only be downloaded; they can't be sent in a message Color int32 `json:"color"` // Main color of the wallpaper in RGB24 format; should be treated as background color if no photos are specified // contains filtered or unexported fields }
Wallpaper Contains information about a wallpaper
func NewWallpaper ¶
NewWallpaper creates a new Wallpaper
@param iD Unique persistent wallpaper identifier @param sizes Available variants of the wallpaper in different sizes. These photos can only be downloaded; they can't be sent in a message @param color Main color of the wallpaper in RGB24 format; should be treated as background color if no photos are specified
func (*Wallpaper) MessageType ¶
MessageType return the string telegram-type of Wallpaper
type Wallpapers ¶
type Wallpapers struct { Wallpapers []Wallpaper `json:"wallpapers"` // A list of wallpapers // contains filtered or unexported fields }
Wallpapers Contains a list of wallpapers
func NewWallpapers ¶
func NewWallpapers(wallpapers []Wallpaper) *Wallpapers
NewWallpapers creates a new Wallpapers
@param wallpapers A list of wallpapers
func (*Wallpapers) MessageType ¶
func (wallpapers *Wallpapers) MessageType() string
MessageType return the string telegram-type of Wallpapers
type WebPage ¶
type WebPage struct { URL string `json:"url"` // Original URL of the link DisplayURL string `json:"display_url"` // URL to display Type string `json:"type"` // Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else SiteName string `json:"site_name"` // Short name of the site (e.g., Google Docs, App Store) Title string `json:"title"` // Title of the content Description string `json:"description"` // Photo *Photo `json:"photo"` // Image representing the content; may be null EmbedURL string `json:"embed_url"` // URL to show in the embedded preview EmbedType string `json:"embed_type"` // MIME type of the embedded preview, (e.g., text/html or video/mp4) EmbedWidth int32 `json:"embed_width"` // Width of the embedded preview EmbedHeight int32 `json:"embed_height"` // Height of the embedded preview Duration int32 `json:"duration"` // Duration of the content, in seconds Author string `json:"author"` // Author of the content Animation *Animation `json:"animation"` // Preview of the content as an animation, if available; may be null Audio *Audio `json:"audio"` // Preview of the content as an audio file, if available; may be null Document *Document `json:"document"` // Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null Sticker *Sticker `json:"sticker"` // Preview of the content as a sticker for small WEBP files, if available; may be null Video *Video `json:"video"` // Preview of the content as a video, if available; may be null VideoNote *VideoNote `json:"video_note"` // Preview of the content as a video note, if available; may be null VoiceNote *VoiceNote `json:"voice_note"` // Preview of the content as a voice note, if available; may be null HasInstantView bool `json:"has_instant_view"` // True, if the web page has an instant view // contains filtered or unexported fields }
WebPage Describes a web page preview
func NewWebPage ¶
func NewWebPage(uRL string, displayURL string, typeParam string, siteName string, title string, description string, photo *Photo, embedURL string, embedType string, embedWidth int32, embedHeight int32, duration int32, author string, animation *Animation, audio *Audio, document *Document, sticker *Sticker, video *Video, videoNote *VideoNote, voiceNote *VoiceNote, hasInstantView bool) *WebPage
NewWebPage creates a new WebPage
@param uRL Original URL of the link @param displayURL URL to display @param typeParam Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else @param siteName Short name of the site (e.g., Google Docs, App Store) @param title Title of the content @param description @param photo Image representing the content; may be null @param embedURL URL to show in the embedded preview @param embedType MIME type of the embedded preview, (e.g., text/html or video/mp4) @param embedWidth Width of the embedded preview @param embedHeight Height of the embedded preview @param duration Duration of the content, in seconds @param author Author of the content @param animation Preview of the content as an animation, if available; may be null @param audio Preview of the content as an audio file, if available; may be null @param document Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null @param sticker Preview of the content as a sticker for small WEBP files, if available; may be null @param video Preview of the content as a video, if available; may be null @param videoNote Preview of the content as a video note, if available; may be null @param voiceNote Preview of the content as a voice note, if available; may be null @param hasInstantView True, if the web page has an instant view
func (*WebPage) MessageType ¶
MessageType return the string telegram-type of WebPage
type WebPageInstantView ¶
type WebPageInstantView struct { PageBlocks []PageBlock `json:"page_blocks"` // Content of the web page IsFull bool `json:"is_full"` // True, if the instant view contains the full page. A network request might be needed to get the full web page instant view // contains filtered or unexported fields }
WebPageInstantView Describes an instant view page for a web page
func NewWebPageInstantView ¶
func NewWebPageInstantView(pageBlocks []PageBlock, isFull bool) *WebPageInstantView
NewWebPageInstantView creates a new WebPageInstantView
@param pageBlocks Content of the web page @param isFull True, if the instant view contains the full page. A network request might be needed to get the full web page instant view
func (*WebPageInstantView) MessageType ¶
func (webPageInstantView *WebPageInstantView) MessageType() string
MessageType return the string telegram-type of WebPageInstantView