tdlib

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

README

go-tdlib

Golang Telegram TDLib JSON bindings

ATTENTION! This is a fork of rezam90's fork of original package by Arman92. Thanks to these guys for their work.

GoDoc

Introduction

Telegram TDlib is a complete library for creating telegram clients, it laso has a simple tdjson ready-to-use library to ease the integration with different programming languages and platforms.

go-tdlib is a complete tdlib-tdjson binding package to help you create your own Telegram clients.

NOTE: basic tdjson-golang binding is inspired from this package: go-tdjson

All the classes and functions declared in TDLib TypeLanguage schema file have been exported using the autogenerate tool tl-parser. So you can use every single type and method in Tdlib.

Key features:

  • Autogenerated golang structs and methods of tdlib .tl schema
  • Custom event receivers defined by user (e.g. get only text messages from a specific user)
  • Supports all tdjson functions: Send(), Execute(), Receive(), Destroy(), SetFilePath(), SetLogVerbosityLevel()
  • Supports all tdlib functions and types

Installation

First of all you need to clone the TDlib repo and build it:

git clone git@github.com:tdlib/td.git
cd td
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -- -j5
make install

# -j5 refers to number of your cpu cores + 1 for multi-threaded build.

If hit any build errors, refer to TDLib build instructions I'm using static linking against tdlib so it won't require to build the whole tdlib source files.

Docker

You can use prebuilt tdlib with following Docker image:

Windows:

docker pull mihaildemidoff/tdlib-go

Example

Here is a simple example for authorization and fetching updates:

package main

import (
	"fmt"

	"github.com/dvz1/go-tdlib"
)

func main() {
	tdlib.SetLogVerbosityLevel(1)
	tdlib.SetFilePath("./errors.txt")

	// Create new instance of client
	client := tdlib.NewClient(tdlib.Config{
		APIID:               "187786",
		APIHash:             "e782045df67ba48e441ccb105da8fc85",
		SystemLanguageCode:  "en",
		DeviceModel:         "Server",
		SystemVersion:       "1.0.0",
		ApplicationVersion:  "1.0.0",
		UseMessageDatabase:  true,
		UseFileDatabase:     true,
		UseChatInfoDatabase: true,
		UseTestDataCenter:   false,
		DatabaseDirectory:   "./tdlib-db",
		FileDirectory:       "./tdlib-files",
		IgnoreFileNames:     false,
	})

	for {
		currentState, _ := client.Authorize()
		if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateWaitPhoneNumberType {
			fmt.Print("Enter phone: ")
			var number string
			fmt.Scanln(&number)
			_, err := client.SendPhoneNumber(number)
			if err != nil {
				fmt.Printf("Error sending phone number: %v", err)
			}
		} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateWaitCodeType {
			fmt.Print("Enter code: ")
			var code string
			fmt.Scanln(&code)
			_, err := client.SendAuthCode(code)
			if err != nil {
				fmt.Printf("Error sending auth code : %v", err)
			}
		} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateWaitPasswordType {
			fmt.Print("Enter Password: ")
			var password string
			fmt.Scanln(&password)
			_, err := client.SendAuthPassword(password)
			if err != nil {
				fmt.Printf("Error sending auth password: %v", err)
			}
		} else if currentState.GetAuthorizationStateEnum() == tdlib.AuthorizationStateReadyType {
			fmt.Println("Authorization Ready! Let's rock")
			break
		}
	}

	// Main loop
	for update := range client.GetRawUpdatesChannel(1) {
		// Show all updates
		fmt.Println(update.Data)
		fmt.Print("\n\n")
	}

}

More examples can be found on examples folder

Documentation

Index

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 Address

type Address struct {
	CountryCode string `json:"country_code"` // A 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
}

Address Describes an address

func NewAddress

func NewAddress(countryCode string, state string, city string, streetLine1 string, streetLine2 string, postalCode string) *Address

NewAddress creates a new Address

@param countryCode A 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 (*Address) MessageType

func (address *Address) MessageType() string

MessageType return the string telegram-type of Address

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

func (animation *Animation) MessageType() string

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

func (audio *Audio) MessageType() string

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"
	AuthorizationStateWaitRegistrationType    AuthorizationStateEnum = "authorizationStateWaitRegistration"
	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
	TermsOfService *TermsOfService         `json:"terms_of_service"` // Telegram terms of service, which should be accepted before user can continue registration; may be null
	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, termsOfService *TermsOfService, codeInfo *AuthenticationCodeInfo) *AuthorizationStateWaitCode

NewAuthorizationStateWaitCode creates a new AuthorizationStateWaitCode

@param isRegistered True, if the user is already registered @param termsOfService Telegram terms of service, which should be accepted before user can continue registration; may be null @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; may 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; may 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 AuthorizationStateWaitRegistration

type AuthorizationStateWaitRegistration struct {
	TermsOfService *TermsOfService `json:"terms_of_service"` // Telegram terms of service, which should be accepted before user can continue registration; may be null.
	// contains filtered or unexported fields
}

AuthorizationStateWaitRegistration returned by the Telegram server when the user is unregistered and need to accept terms of service and enter their first name and last name to finish registration.

func NewAuthorizationStateWaitRegistration

func NewAuthorizationStateWaitRegistration(termsOfService *TermsOfService) *AuthorizationStateWaitRegistration

func (*AuthorizationStateWaitRegistration) GetAuthorizationStateEnum

func (authorizationStateWaitRegistration *AuthorizationStateWaitRegistration) GetAuthorizationStateEnum() AuthorizationStateEnum

GetAuthorizationStateEnum return the enum type of this object

func (*AuthorizationStateWaitRegistration) MessageType

func (authorizationStateWaitRegistration *AuthorizationStateWaitRegistration) MessageType() string

MessageType return the string telegram-type of AuthorizationStateWaitRegistration.

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

func (botInfo *BotInfo) MessageType() string

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

func NewCall(iD int32, userID int32, isOutgoing bool, state CallState) *Call

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

func (call *Call) MessageType() string

MessageType return the string telegram-type of Call

func (*Call) UnmarshalJSON

func (call *Call) UnmarshalJSON(b []byte) error

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 NewCallID

func NewCallID(iD int32) *CallID

NewCallID creates a new CallID

@param iD Call identifier

func (*CallID) MessageType

func (callID *CallID) MessageType() string

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
	AllowP2p      bool             `json:"allow_p2p"`      // True, if peer-to-peer connection is allowed by users privacy settings
	// 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, allowP2p bool) *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 @param allowP2p True, if peer-to-peer connection is allowed by users privacy settings

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
	IsMarkedAsUnread           bool                      `json:"is_marked_as_unread"`          // True, if the chat is marked as unread
	IsSponsored                bool                      `json:"is_sponsored"`                 // True, if the chat is sponsored by the user's MTProxy server
	CanBeDeletedOnlyForSelf    bool                      `json:"can_be_deleted_only_for_self"` // True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
	CanBeDeletedForAllUsers    bool                      `json:"can_be_deleted_for_all_users"` // True, if the chat messages can be deleted for all users
	CanBeReported              bool                      `json:"can_be_reported"`              // True, if the chat can be reported to Telegram moderators through reportChat
	DefaultDisableNotification bool                      `json:"default_disable_notification"` // Default value of the disable_notification parameter, used when a message is sent to the chat
	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       *ChatNotificationSettings `json:"notification_settings"`        // Notification settings for this chat
	PinnedMessageID            int64                     `json:"pinned_message_id"`            // Identifier of the pinned message in the chat; 0 if none
	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, isMarkedAsUnread bool, isSponsored bool, canBeDeletedOnlyForSelf bool, canBeDeletedForAllUsers bool, canBeReported bool, defaultDisableNotification bool, unreadCount int32, lastReadInboxMessageID int64, lastReadOutboxMessageID int64, unreadMentionCount int32, notificationSettings *ChatNotificationSettings, pinnedMessageID int64, 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 isMarkedAsUnread True, if the chat is marked as unread @param isSponsored True, if the chat is sponsored by the user's MTProxy server @param canBeDeletedOnlyForSelf True, if the chat messages can be deleted only for the current user while other users will continue to see the messages @param canBeDeletedForAllUsers True, if the chat messages can be deleted for all users @param canBeReported True, if the chat can be reported to Telegram moderators through reportChat @param defaultDisableNotification Default value of the disable_notification parameter, used when a message is sent to the chat @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 pinnedMessageID Identifier of the pinned message in the chat; 0 if none @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

func (chat *Chat) MessageType() string

MessageType return the string telegram-type of Chat

func (*Chat) UnmarshalJSON

func (chat *Chat) UnmarshalJSON(b []byte) error

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

func (chatEvent *ChatEvent) MessageType() string

MessageType return the string telegram-type of ChatEvent

func (*ChatEvent) UnmarshalJSON

func (chatEvent *ChatEvent) UnmarshalJSON(b []byte) error

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 struct {
	InviteLink string `json:"invite_link"` // Chat invite link
	// contains filtered or unexported fields
}

ChatInviteLink Contains a chat invite link

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 groups 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 groups 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 ChatMembersFilter

type ChatMembersFilter interface {
	GetChatMembersFilterEnum() ChatMembersFilterEnum
}

ChatMembersFilter Specifies the kind of chat members to return in searchChatMembers

type ChatMembersFilterAdministrators

type ChatMembersFilterAdministrators struct {
	// contains filtered or unexported fields
}

ChatMembersFilterAdministrators Returns the creator and administrators

func NewChatMembersFilterAdministrators

func NewChatMembersFilterAdministrators() *ChatMembersFilterAdministrators

NewChatMembersFilterAdministrators creates a new ChatMembersFilterAdministrators

func (*ChatMembersFilterAdministrators) GetChatMembersFilterEnum

func (chatMembersFilterAdministrators *ChatMembersFilterAdministrators) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterAdministrators) MessageType

func (chatMembersFilterAdministrators *ChatMembersFilterAdministrators) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterAdministrators

type ChatMembersFilterBanned

type ChatMembersFilterBanned struct {
	// contains filtered or unexported fields
}

ChatMembersFilterBanned Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel

func NewChatMembersFilterBanned

func NewChatMembersFilterBanned() *ChatMembersFilterBanned

NewChatMembersFilterBanned creates a new ChatMembersFilterBanned

func (*ChatMembersFilterBanned) GetChatMembersFilterEnum

func (chatMembersFilterBanned *ChatMembersFilterBanned) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterBanned) MessageType

func (chatMembersFilterBanned *ChatMembersFilterBanned) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterBanned

type ChatMembersFilterBots

type ChatMembersFilterBots struct {
	// contains filtered or unexported fields
}

ChatMembersFilterBots Returns bot members of the chat

func NewChatMembersFilterBots

func NewChatMembersFilterBots() *ChatMembersFilterBots

NewChatMembersFilterBots creates a new ChatMembersFilterBots

func (*ChatMembersFilterBots) GetChatMembersFilterEnum

func (chatMembersFilterBots *ChatMembersFilterBots) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterBots) MessageType

func (chatMembersFilterBots *ChatMembersFilterBots) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterBots

type ChatMembersFilterEnum

type ChatMembersFilterEnum string

ChatMembersFilterEnum Alias for abstract ChatMembersFilter 'Sub-Classes', used as constant-enum here

const (
	ChatMembersFilterAdministratorsType ChatMembersFilterEnum = "chatMembersFilterAdministrators"
	ChatMembersFilterMembersType        ChatMembersFilterEnum = "chatMembersFilterMembers"
	ChatMembersFilterRestrictedType     ChatMembersFilterEnum = "chatMembersFilterRestricted"
	ChatMembersFilterBannedType         ChatMembersFilterEnum = "chatMembersFilterBanned"
	ChatMembersFilterBotsType           ChatMembersFilterEnum = "chatMembersFilterBots"
)

ChatMembersFilter enums

type ChatMembersFilterMembers

type ChatMembersFilterMembers struct {
	// contains filtered or unexported fields
}

ChatMembersFilterMembers Returns all chat members, including restricted chat members

func NewChatMembersFilterMembers

func NewChatMembersFilterMembers() *ChatMembersFilterMembers

NewChatMembersFilterMembers creates a new ChatMembersFilterMembers

func (*ChatMembersFilterMembers) GetChatMembersFilterEnum

func (chatMembersFilterMembers *ChatMembersFilterMembers) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterMembers) MessageType

func (chatMembersFilterMembers *ChatMembersFilterMembers) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterMembers

type ChatMembersFilterRestricted

type ChatMembersFilterRestricted struct {
	// contains filtered or unexported fields
}

ChatMembersFilterRestricted Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup

func NewChatMembersFilterRestricted

func NewChatMembersFilterRestricted() *ChatMembersFilterRestricted

NewChatMembersFilterRestricted creates a new ChatMembersFilterRestricted

func (*ChatMembersFilterRestricted) GetChatMembersFilterEnum

func (chatMembersFilterRestricted *ChatMembersFilterRestricted) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterRestricted) MessageType

func (chatMembersFilterRestricted *ChatMembersFilterRestricted) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterRestricted

type ChatNotificationSettings

type ChatNotificationSettings struct {
	UseDefaultMuteFor                           bool   `json:"use_default_mute_for"`                             // If true, mute_for is ignored and the value for the relevant type of chat is used instead
	MuteFor                                     int32  `json:"mute_for"`                                         // Time left before notifications will be unmuted, in seconds
	UseDefaultSound                             bool   `json:"use_default_sound"`                                // If true, sound is ignored and the value for the relevant type of chat is used instead
	Sound                                       string `json:"sound"`                                            // The name of an audio file to be used for notification sounds; only applies to iOS applications
	UseDefaultShowPreview                       bool   `json:"use_default_show_preview"`                         // If true, show_preview is ignored and the value for the relevant type of chat is used instead
	ShowPreview                                 bool   `json:"show_preview"`                                     // True, if message content should be displayed in notifications
	UseDefaultDisablePinnedMessageNotifications bool   `json:"use_default_disable_pinned_message_notifications"` // If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead
	DisablePinnedMessageNotifications           bool   `json:"disable_pinned_message_notifications"`             // If true, notifications for incoming pinned messages will be created as for an ordinary unread message
	UseDefaultDisableMentionNotifications       bool   `json:"use_default_disable_mention_notifications"`        // If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead
	DisableMentionNotifications                 bool   `json:"disable_mention_notifications"`                    // If true, notifications for messages with mentions will be created as for an ordinary unread message
	// contains filtered or unexported fields
}

ChatNotificationSettings Contains information about notification settings for a chat

func NewChatNotificationSettings

func NewChatNotificationSettings(useDefaultMuteFor bool, muteFor int32, useDefaultSound bool, sound string, useDefaultShowPreview bool, showPreview bool, useDefaultDisablePinnedMessageNotifications bool, disablePinnedMessageNotifications bool, useDefaultDisableMentionNotifications bool, disableMentionNotifications bool) *ChatNotificationSettings

NewChatNotificationSettings creates a new ChatNotificationSettings

@param useDefaultMuteFor If true, mute_for is ignored and the value for the relevant type of chat is used instead @param muteFor Time left before notifications will be unmuted, in seconds @param useDefaultSound If true, sound is ignored and the value for the relevant type of chat is used instead @param sound The name of an audio file to be used for notification sounds; only applies to iOS applications @param useDefaultShowPreview If true, show_preview is ignored and the value for the relevant type of chat is used instead @param showPreview True, if message content should be displayed in notifications @param useDefaultDisablePinnedMessageNotifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead @param disablePinnedMessageNotifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message @param useDefaultDisableMentionNotifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead @param disableMentionNotifications If true, notifications for messages with mentions will be created as for an ordinary unread message

func (*ChatNotificationSettings) MessageType

func (chatNotificationSettings *ChatNotificationSettings) MessageType() string

MessageType return the string telegram-type of ChatNotificationSettings

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

func NewChatPhoto(small *File, big *File) *ChatPhoto

NewChatPhoto creates a new ChatPhoto

@param small A small (160x160) chat photo @param big A big (640x640) chat photo

func (*ChatPhoto) MessageType

func (chatPhoto *ChatPhoto) MessageType() string

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 ChatReportReasonChildAbuse

type ChatReportReasonChildAbuse struct {
	// contains filtered or unexported fields
}

ChatReportReasonChildAbuse The chat has child abuse related content

func NewChatReportReasonChildAbuse

func NewChatReportReasonChildAbuse() *ChatReportReasonChildAbuse

NewChatReportReasonChildAbuse creates a new ChatReportReasonChildAbuse

func (*ChatReportReasonChildAbuse) GetChatReportReasonEnum

func (chatReportReasonChildAbuse *ChatReportReasonChildAbuse) GetChatReportReasonEnum() ChatReportReasonEnum

GetChatReportReasonEnum return the enum type of this object

func (*ChatReportReasonChildAbuse) MessageType

func (chatReportReasonChildAbuse *ChatReportReasonChildAbuse) MessageType() string

MessageType return the string telegram-type of ChatReportReasonChildAbuse

type ChatReportReasonCopyright

type ChatReportReasonCopyright struct {
	// contains filtered or unexported fields
}

ChatReportReasonCopyright The chat contains copyrighted content

func NewChatReportReasonCopyright

func NewChatReportReasonCopyright() *ChatReportReasonCopyright

NewChatReportReasonCopyright creates a new ChatReportReasonCopyright

func (*ChatReportReasonCopyright) GetChatReportReasonEnum

func (chatReportReasonCopyright *ChatReportReasonCopyright) GetChatReportReasonEnum() ChatReportReasonEnum

GetChatReportReasonEnum return the enum type of this object

func (*ChatReportReasonCopyright) MessageType

func (chatReportReasonCopyright *ChatReportReasonCopyright) MessageType() string

MessageType return the string telegram-type of ChatReportReasonCopyright

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"
	ChatReportReasonChildAbuseType  ChatReportReasonEnum = "chatReportReasonChildAbuse"
	ChatReportReasonCopyrightType   ChatReportReasonEnum = "chatReportReasonCopyright"
	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 NewChats

func NewChats(chatIDs []int64) *Chats

NewChats creates a new Chats

@param chatIDs List of chat identifiers

func (*Chats) MessageType

func (chats *Chats) MessageType() string

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"
	CheckChatUsernameResultPublicGroupsUnavailableType CheckChatUsernameResultEnum = "checkChatUsernameResultPublicGroupsUnavailable"
)

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

func NewClient(config Config) *Client

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

func (client *Client) AcceptTermsOfService(termsOfServiceID string) (*Ok, error)

AcceptTermsOfService Accepts Telegram terms of services @param termsOfServiceID Terms of service identifier

func (*Client) AddChatMember

func (client *Client) AddChatMember(chatID int64, userID int32, forwardLimit int32) (*Ok, error)

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 100. Ignored for supergroups and channels

func (*Client) AddChatMembers

func (client *Client) AddChatMembers(chatID int64, userIDs []int32) (*Ok, error)

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

func (client *Client) AddCustomServerLanguagePack(languagePackID string) (*Ok, error)

AddCustomServerLanguagePack Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @param languagePackID Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link

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

func (client *Client) AddFavoriteSticker(sticker InputFile) (*Ok, error)

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

func (client *Client) AddLocalMessage(chatID int64, senderUserID int32, replyToMessageID int64, disableNotification bool, inputMessageContent InputMessageContent) (*Message, error)

AddLocalMessage Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message @param chatID Target chat @param senderUserID Identifier of the user who will be shown as the sender of the message; may be 0 for channel posts @param replyToMessageID Identifier of the message to reply to or 0 @param disableNotification Pass true to disable notification for the message @param inputMessageContent The content of the message to be added

func (*Client) AddLogMessage

func (client *Client) AddLogMessage(verbosityLevel int32, text string) (*Ok, error)

AddLogMessage Adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously @param verbosityLevel Minimum verbosity level needed for the message to be logged, 0-1023 @param text Text of a message to log

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

func (client *Client) AddProxy(server string, port int32, enable bool, typeParam ProxyType) (*Proxy, error)

AddProxy Adds a proxy server for network requests. Can be called before authorization @param server Proxy server IP address @param port Proxy server port @param enable True, if the proxy should be enabled @param typeParam Proxy type

func (*Client) AddRecentSticker

func (client *Client) AddRecentSticker(isAttached bool, sticker InputFile) (*Stickers, error)

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

func (client *Client) AddRecentlyFoundChat(chatID int64) (*Ok, error)

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

func (client *Client) AddSavedAnimation(animation InputFile) (*Ok, error)

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

func (client *Client) AnswerCustomQuery(customQueryID JSONInt64, data string) (*Ok, error)

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

func (client *Client) BlockUser(userID int32) (*Ok, error)

BlockUser Adds a user to the blacklist @param userID User identifier

func (*Client) CancelDownloadFile

func (client *Client) CancelDownloadFile(fileID int32, onlyIfPending bool) (*Ok, error)

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

func (client *Client) CancelUploadFile(fileID int32) (*Ok, error)

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

func (client *Client) ChangeChatReportSpamState(chatID int64, isSpamChat bool) (*Ok, error)

ChangeChatReportSpamState Reports to the server whether a chat is a spam chat 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

func (client *Client) CheckAuthenticationBotToken(token string) (*Ok, error)

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-64 characters. You can also pass an empty string for unregistered user there to check verification code validness. In the latter case PHONE_NUMBER_UNOCCUPIED error will be returned for a valid code @param lastName If the user is not yet registered; the last name of the user; optional; 0-64 characters

func (*Client) CheckAuthenticationPassword

func (client *Client) CheckAuthenticationPassword(password string) (*Ok, error)

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

func (client *Client) CheckChangePhoneNumberCode(code string) (*Ok, error)

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 *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 int64, 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

func (client *Client) CheckDatabaseEncryptionKey(encryptionKey []byte) (*Ok, error)

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

func (client *Client) CheckEmailAddressVerificationCode(code string) (*Ok, error)

CheckEmailAddressVerificationCode Checks the email address verification code for Telegram Passport @param code Verification code

func (*Client) CheckPhoneNumberConfirmationCode

func (client *Client) CheckPhoneNumberConfirmationCode(code string) (*Ok, error)

CheckPhoneNumberConfirmationCode Checks phone number confirmation code @param code The phone number confirmation code

func (*Client) CheckPhoneNumberVerificationCode

func (client *Client) CheckPhoneNumberVerificationCode(code string) (*Ok, error)

CheckPhoneNumberVerificationCode Checks the phone number verification code for Telegram Passport @param code Verification code

func (*Client) CheckRecoveryEmailAddressCode

func (client *Client) CheckRecoveryEmailAddressCode(code string) (*PasswordState, error)

CheckRecoveryEmailAddressCode Checks the 2-step verification recovery email address verification code @param code Verification code

func (*Client) CleanFileName

func (client *Client) CleanFileName(fileName string) (*Text, error)

CleanFileName Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously @param fileName File name or path to the file

func (*Client) ClearAllDraftMessages

func (client *Client) ClearAllDraftMessages(excludeSecretChats bool) (*Ok, error)

ClearAllDraftMessages Clears draft messages in all chats @param excludeSecretChats If true, local draft messages in secret chats will not be cleared

func (*Client) ClearImportedContacts

func (client *Client) ClearImportedContacts() (*Ok, error)

ClearImportedContacts Clears all imported contacts, contact list remains unchanged

func (*Client) ClearRecentStickers

func (client *Client) ClearRecentStickers(isAttached bool) (*Ok, error)

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

func (client *Client) ClearRecentlyFoundChats() (*Ok, error)

ClearRecentlyFoundChats Clears the list of recently found chats

func (*Client) Close

func (client *Client) Close() (*Ok, error)

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

func (client *Client) CloseChat(chatID int64) (*Ok, error)

CloseChat Informs TDLib that 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

func (client *Client) CloseSecretChat(secretChatID int32) (*Ok, error)

CloseSecretChat Closes a secret chat, effectively transfering its state to secretChatStateClosed @param secretChatID Secret chat identifier

func (*Client) CreateBasicGroupChat

func (client *Client) CreateBasicGroupChat(basicGroupID int32, force bool) (*Chat, error)

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

func (client *Client) CreateNewBasicGroupChat(userIDs []int32, title string) (*Chat, error)

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-128 characters

func (*Client) CreateNewSecretChat

func (client *Client) CreateNewSecretChat(userID int32) (*Chat, error)

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-128 characters @param isChannel True, if a channel chat should be created @param description

func (*Client) CreatePrivateChat

func (client *Client) CreatePrivateChat(userID int32, force bool) (*Chat, error)

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

func (client *Client) CreateSecretChat(secretChatID int32) (*Chat, error)

CreateSecretChat Returns an existing chat corresponding to a known secret chat @param secretChatID Secret chat identifier

func (*Client) CreateSupergroupChat

func (client *Client) CreateSupergroupChat(supergroupID int32, force bool) (*Chat, error)

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

func (client *Client) DeleteAccount(reason string) (*Ok, error)

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. Can be called before authorization when the current authorization state is authorizationStateWaitPassword @param reason The reason why the account was deleted; optional

func (*Client) DeleteChatHistory

func (client *Client) DeleteChatHistory(chatID int64, removeFromChatList bool, revoke bool) (*Ok, error)

DeleteChatHistory Deletes all messages in the chat. Use Chat.can_be_deleted_only_for_self and Chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat @param chatID Chat identifier @param removeFromChatList Pass true if the chat should be removed from the chat list @param revoke Pass true to try to delete chat history for all users

func (*Client) DeleteChatMessagesFromUser

func (client *Client) DeleteChatMessagesFromUser(chatID int64, userID int32) (*Ok, error)

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

func (client *Client) DeleteChatReplyMarkup(chatID int64, messageID int64) (*Ok, error)

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

func (client *Client) DeleteFile(fileID int32) (*Ok, error)

DeleteFile Deletes a file from the TDLib file cache @param fileID Identifier of the file to delete

func (*Client) DeleteLanguagePack

func (client *Client) DeleteLanguagePack(languagePackID string) (*Ok, error)

DeleteLanguagePack Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization @param languagePackID Identifier of the language pack to delete

func (*Client) DeleteMessages

func (client *Client) DeleteMessages(chatID int64, messageIDs []int64, revoke bool) (*Ok, error)

DeleteMessages Deletes messages @param chatID Chat identifier @param messageIDs Identifiers of the messages to be deleted @param revoke Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats

func (*Client) DeletePassportElement

func (client *Client) DeletePassportElement(typeParam PassportElementType) (*Ok, error)

DeletePassportElement Deletes a Telegram Passport element @param typeParam Element type

func (*Client) DeleteProfilePhoto

func (client *Client) DeleteProfilePhoto(profilePhotoID JSONInt64) (*Ok, error)

DeleteProfilePhoto Deletes a profile photo. If something changes, updateUser will be sent @param profilePhotoID Identifier of the profile photo to delete

func (*Client) DeleteSavedCredentials

func (client *Client) DeleteSavedCredentials() (*Ok, error)

DeleteSavedCredentials Deletes saved credentials for all payment provider bots

func (*Client) DeleteSavedOrderInfo

func (client *Client) DeleteSavedOrderInfo() (*Ok, error)

DeleteSavedOrderInfo Deletes saved order info

func (*Client) DeleteSupergroup

func (client *Client) DeleteSupergroup(supergroupID int32) (*Ok, error)

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

func (client *Client) Destroy() (*Ok, error)

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

func (client *Client) DisableProxy() (*Ok, error)

DisableProxy Disables the currently enabled proxy. Can be called before authorization

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

func (client *Client) DisconnectAllWebsites() (*Ok, error)

DisconnectAllWebsites Disconnects all websites from the current user's Telegram account

func (*Client) DisconnectWebsite

func (client *Client) DisconnectWebsite(websiteID JSONInt64) (*Ok, error)

DisconnectWebsite Disconnects website from the current user's Telegram account @param websiteID Website identifier

func (*Client) DownloadFile

func (client *Client) DownloadFile(fileID int32, priority int32, offset int32, limit int32, synchronous bool) (*File, error)

DownloadFile Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates @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 @param offset The starting position from which the file should be downloaded @param limit Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically cancelled; use 0 to download without a limit @param synchronous If false, this request returns file state just after the download has been started. If true, this request returns file state only after

func (*Client) EditCustomLanguagePackInfo

func (client *Client) EditCustomLanguagePackInfo(info *LanguagePackInfo) (*Ok, error)

EditCustomLanguagePackInfo Edits information about a custom local language pack in the current localization target. Can be called before authorization @param info New information about the custom local language pack

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 The new message reply markup @param caption New message content caption; 0-GetOption("message_caption_length_max") 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 The 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) EditInlineMessageMedia

func (client *Client) EditInlineMessageMedia(inlineMessageID string, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Ok, error)

EditInlineMessageMedia Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup; for bots only @param inputMessageContent New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo

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 The 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 The 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. 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 caption New message content caption; 0-GetOption("message_caption_length_max") 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 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 location New location content of the message; may be null. Pass null to stop sharing the live location

func (*Client) EditMessageMedia

func (client *Client) EditMessageMedia(chatID int64, messageID int64, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Message, error)

EditMessageMedia Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. 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 content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo

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

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

func (client *Client) EditProxy(proxyID int32, server string, port int32, enable bool, typeParam ProxyType) (*Proxy, error)

EditProxy Edits an existing proxy server for network requests. Can be called before authorization @param proxyID Proxy identifier @param server Proxy server IP address @param port Proxy server port @param enable True, if the proxy should be enabled @param typeParam Proxy type

func (*Client) EnableProxy

func (client *Client) EnableProxy(proxyID int32) (*Ok, error)

EnableProxy Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @param proxyID Proxy identifier

func (*Client) Execute

func (client *Client) Execute(jsonQuery interface{}) UpdateMsg

Execute Synchronously executes TDLib request. Only a few requests can be executed synchronously.

func (*Client) FinishFileGeneration

func (client *Client) FinishFileGeneration(generationID JSONInt64, error *Error) (*Ok, error)

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 *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

func (client *Client) GetActiveLiveLocationMessages() (*Messages, error)

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

func (client *Client) GetActiveSessions() (*Sessions, error)

GetActiveSessions Returns all active sessions of the current user

func (*Client) GetAllPassportElements

func (client *Client) GetAllPassportElements(password string) (*PassportElements, error)

GetAllPassportElements Returns all available Telegram Passport elements @param password Password of the current user

func (*Client) GetApplicationConfig

func (client *Client) GetApplicationConfig() (JsonValue, error)

GetApplicationConfig Returns application config, provided by the server. Can be called before authorization

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

func (client *Client) GetBlockedUsers(offset int32, limit int32) (*Users, error)

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

func (client *Client) GetChat(chatID int64) (*Chat, error)

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

func (client *Client) GetChatAdministrators(chatID int64) (*Users, error)

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 last message @param offset Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally 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 or equal to -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

func (client *Client) GetChatMessageByDate(chatID int64, date int32) (*Message, error)

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

func (client *Client) GetChatMessageCount(chatID int64, filter SearchMessagesFilter, returnLocal bool) (*Count, error)

GetChatMessageCount Returns approximate number of messages of the specified type in the chat @param chatID Identifier of the chat in which to count messages @param filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function @param returnLocal If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown

func (*Client) GetChatNotificationSettingsExceptions

func (client *Client) GetChatNotificationSettingsExceptions(scope NotificationSettingsScope, compareSound bool) (*Chats, error)

GetChatNotificationSettingsExceptions Returns list of chats with non-default notification settings @param scope If specified, only chats from the specified scope will be returned @param compareSound If true, also chats with non-default sound will be returned

func (*Client) GetChatPinnedMessage

func (client *Client) GetChatPinnedMessage(chatID int64) (*Message, error)

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

func (client *Client) GetChatStatisticsURL(chatID int64, parameters string, isDark bool) (*HttpURL, error)

GetChatStatisticsURL Returns URL with the chat statistics. Currently this method can be used only for channels @param chatID Chat identifier @param parameters Parameters from "tg://statsrefresh?params=******" link @param isDark Pass true if a URL with the dark theme must be returned

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 a biggest signed 64-bit number 9223372036854775807 == 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) GetContacts

func (client *Client) GetContacts() (*Users, error)

GetContacts Returns all user contacts

func (*Client) GetCountryCode

func (client *Client) GetCountryCode() (*Text, error)

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

func (client *Client) GetCreatedPublicChats() (*Chats, error)

GetCreatedPublicChats Returns a list of public chats created by the user

func (*Client) GetCurrentState

func (client *Client) GetCurrentState() (*Updates, error)

GetCurrentState Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially usefull if TDLib is run in a separate process. This is an offline method. Can be called before authorization

func (*Client) GetDatabaseStatistics

func (client *Client) GetDatabaseStatistics() (*DatabaseStatistics, error)

GetDatabaseStatistics Returns database statistics

func (*Client) GetDeepLinkInfo

func (client *Client) GetDeepLinkInfo(link string) (*DeepLinkInfo, error)

GetDeepLinkInfo Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization @param link The link

func (*Client) GetFavoriteStickers

func (client *Client) GetFavoriteStickers() (*Stickers, error)

GetFavoriteStickers Returns favorite stickers

func (*Client) GetFile

func (client *Client) GetFile(fileID int32) (*File, error)

GetFile Returns information about a file; this is an offline request @param fileID Identifier of the file to get

func (*Client) GetFileDownloadedPrefixSize

func (client *Client) GetFileDownloadedPrefixSize(fileID int32, offset int32) (*Count, error)

GetFileDownloadedPrefixSize Returns file downloaded prefix size from a given offset @param fileID Identifier of the file @param offset Offset from which downloaded prefix size should be calculated

func (*Client) GetFileExtension

func (client *Client) GetFileExtension(mimeType string) (*Text, error)

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

func (client *Client) GetFileMimeType(fileName string) (*Text, error)

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 group 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

func (client *Client) GetImportedContactCount() (*Count, error)

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

func (client *Client) GetInviteText() (*Text, error)

GetInviteText Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram

func (*Client) GetJsonString

func (client *Client) GetJsonString(jsonValue JsonValue) (*Text, error)

GetJsonString Converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously @param jsonValue The JsonValue object

func (*Client) GetJsonValue

func (client *Client) GetJsonValue(jsonObj string) (JsonValue, error)

GetJsonValue Converts a JSON-serialized string to corresponding JsonValue object. This is an offline method. Can be called before authorization. Can be called synchronously @param json The JSON-serialized string

func (*Client) GetLanguagePackInfo

func (client *Client) GetLanguagePackInfo(languagePackID string) (*LanguagePackInfo, error)

GetLanguagePackInfo Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization @param languagePackID Language pack identifier

func (*Client) GetLanguagePackString

func (client *Client) GetLanguagePackString(languagePackDatabasePath string, localizationTarget string, languagePackID string, key string) (LanguagePackStringValue, error)

GetLanguagePackString Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. This is an offline method. Can be called before authorization. Can be called synchronously @param languagePackDatabasePath Path to the language pack database in which strings are stored @param localizationTarget Localization target to which the language pack belongs @param languagePackID Language pack identifier @param key Language pack key of the string to be returned

func (*Client) GetLanguagePackStrings

func (client *Client) GetLanguagePackStrings(languagePackID string, keys []string) (*LanguagePackStrings, error)

GetLanguagePackStrings Returns strings from a language pack in the current localization target by their keys. Can be called before authorization @param languagePackID Language pack identifier of the strings to be returned @param keys Language pack keys of the strings to be returned; leave empty to request all available strings

func (*Client) GetLocalizationTargetInfo

func (client *Client) GetLocalizationTargetInfo(onlyLocal bool) (*LocalizationTargetInfo, error)

GetLocalizationTargetInfo Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization @param onlyLocal If true, returns only locally available information without sending network requests

func (*Client) GetLogStream

func (client *Client) GetLogStream() (LogStream, error)

GetLogStream Returns information about currently used log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetLogTagVerbosityLevel

func (client *Client) GetLogTagVerbosityLevel(tag string) (*LogVerbosityLevel, error)

GetLogTagVerbosityLevel Returns current verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously @param tag Logging tag to change verbosity level

func (*Client) GetLogTags

func (client *Client) GetLogTags() (*LogTags, error)

GetLogTags Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetLogVerbosityLevel

func (client *Client) GetLogVerbosityLevel() (*LogVerbosityLevel, error)

GetLogVerbosityLevel Returns current verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetMapThumbnailFile

func (client *Client) GetMapThumbnailFile(location *Location, zoom int32, width int32, height int32, scale int32, chatID int64) (*File, error)

GetMapThumbnailFile Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded @param location Location of the map center @param zoom Map zoom level; 13-20 @param width Map width in pixels before applying scale; 16-1024 @param height Map height in pixels before applying scale; 16-1024 @param scale Map scale; 1-3 @param chatID Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown

func (*Client) GetMe

func (client *Client) GetMe() (*User, error)

GetMe Returns the current user

func (*Client) GetMessage

func (client *Client) GetMessage(chatID int64, messageID int64) (*Message, error)

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 *Client) GetMessageLink(chatID int64, messageID int64) (*HttpURL, error)

GetMessageLink Returns a private HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. The link will work only for members of the chat @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message

func (*Client) GetMessageLocally

func (client *Client) GetMessageLocally(chatID int64, messageID int64) (*Message, error)

GetMessageLocally Returns information about a message, if it is available locally without sending network request. This is an offline request @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message to get

func (*Client) GetMessages

func (client *Client) GetMessages(chatID int64, messageIDs []int64) (*Messages, error)

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

func (client *Client) GetPassportAuthorizationForm(botUserID int32, scope string, publicKey string, nonce string) (*PassportAuthorizationForm, error)

GetPassportAuthorizationForm Returns a Telegram Passport authorization form for sharing data with a service @param botUserID User identifier of the service's bot @param scope Telegram Passport element types requested by the service @param publicKey Service's public_key @param nonce Authorization form nonce provided by the service

func (*Client) GetPassportAuthorizationFormAvailableElements

func (client *Client) GetPassportAuthorizationFormAvailableElements(autorizationFormID int32, password string) (*PassportElementsWithErrors, error)

GetPassportAuthorizationFormAvailableElements Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form @param autorizationFormID Authorization form identifier @param password Password of the current user

func (*Client) GetPassportElement

func (client *Client) GetPassportElement(typeParam PassportElementType, password string) (PassportElement, error)

GetPassportElement Returns one of the available Telegram Passport elements @param typeParam Telegram Passport element type @param password Password of the current user

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

func (client *Client) GetPreferredCountryLanguage(countryCode string) (*Text, error)

GetPreferredCountryLanguage Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @param countryCode A two-letter ISO 3166-1 alpha-2 country code

func (*Client) GetProxies

func (client *Client) GetProxies() (*Proxies, error)

GetProxies Returns list of proxies that are currently set up. Can be called before authorization

func (client *Client) GetProxyLink(proxyID int32) (*Text, error)

GetProxyLink Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization @param proxyID Proxy identifier

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

func (client *Client) GetPushReceiverID(payload string) (*PushReceiverID, error)

GetPushReceiverID Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. This is an offline method. Can be called before authorization. Can be called synchronously @param payload JSON-encoded push notification payload

func (*Client) GetRawUpdatesChannel

func (client *Client) GetRawUpdatesChannel(capacity int) chan UpdateMsg

GetRawUpdatesChannel creates a general channel that fetches every update comming from tdlib

func (*Client) GetRecentInlineBots

func (client *Client) GetRecentInlineBots() (*Users, error)

GetRecentInlineBots Returns up to 20 recently used inline bots in the order of their last usage

func (*Client) GetRecentStickers

func (client *Client) GetRecentStickers(isAttached bool) (*Stickers, error)

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

func (client *Client) GetRecentlyVisitedTMeURLs(referrer string) (*TMeURLs, error)

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 2-step verification 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

func (client *Client) GetRemoteFile(remoteFileID string, fileType FileType) (*File, error)

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

func (client *Client) GetRepliedMessage(chatID int64, messageID int64) (*Message, error)

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

func (client *Client) GetSavedOrderInfo() (*OrderInfo, error)

GetSavedOrderInfo Returns saved order info, if any

func (*Client) GetScopeNotificationSettings

func (client *Client) GetScopeNotificationSettings(scope NotificationSettingsScope) (*ScopeNotificationSettings, error)

GetScopeNotificationSettings Returns the notification settings for chats of a given type @param scope Types of chats for which to return the notification settings information

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

func (client *Client) GetStickers(emoji string, limit int32) (*Stickers, error)

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. Can be called before authorization @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. Can be called before authorization

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

func (client *Client) GetSupportUser() (*User, error)

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

func (client *Client) GetUser(userID int32) (*User, error)

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, contact's vCard are ignored and are not imported

func (*Client) JoinChat

func (client *Client) JoinChat(chatID int64) (*Ok, error)

JoinChat Adds current user as a new member to a chat. Private and secret chats can't be joined using this method @param chatID Chat identifier

func (client *Client) JoinChatByInviteLink(inviteLink string) (*Chat, error)

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

func (client *Client) LeaveChat(chatID int64) (*Ok, error)

LeaveChat Removes current user from chat members. Private and secret chats can't be left using this method @param chatID Chat identifier

func (*Client) LogOut

func (client *Client) LogOut() (*Ok, error)

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

func (client *Client) OpenChat(chatID int64) (*Ok, error)

OpenChat Informs TDLib that 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

func (client *Client) OpenMessageContent(chatID int64, messageID int64) (*Ok, error)

OpenMessageContent Informs TDLib that 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) PinChatMessage

func (client *Client) PinChatMessage(chatID int64, messageID int64, disableNotification bool) (*Ok, error)

PinChatMessage Pins a message in a chat; requires appropriate administrator rights in the group or channel @param chatID Identifier of the chat @param messageID Identifier of the new pinned message @param disableNotification True, if there should be no notification about the pinned message

func (*Client) PingProxy

func (client *Client) PingProxy(proxyID int32) (*Seconds, error)

PingProxy Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization @param proxyID Proxy identifier. Use 0 to ping a Telegram server without a proxy

func (*Client) ProcessPushNotification

func (client *Client) ProcessPushNotification(payload string) (*Ok, error)

ProcessPushNotification Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization @param payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added

func (*Client) ReadAllChatMentions

func (client *Client) ReadAllChatMentions(chatID int64) (*Ok, error)

ReadAllChatMentions Marks all mentions in a chat as read @param chatID Chat identifier

func (*Client) ReadFilePart

func (client *Client) ReadFilePart(fileID int32, offset int32, count int32) (*FilePart, error)

ReadFilePart Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct read from the file @param fileID Identifier of the file. The file must be located in the TDLib file cache @param offset The offset from which to read the file @param count Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position

func (*Client) Receive

func (client *Client) Receive(timeout float64) []byte

Receive Receives incoming updates and request responses from the TDLib client. You can provide string or UpdateData.

func (*Client) RecoverAuthenticationPassword

func (client *Client) RecoverAuthenticationPassword(recoveryCode string) (*Ok, error)

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) (*PushReceiverID, error)

RegisterDevice Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @param deviceToken Device token @param otherUserIDs List of user identifiers of other users currently using the client

func (*Client) RegisterUser

func (client *Client) RegisterUser(firstName string, lastName string) (*Ok, error)

RegisterUser Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.

func (*Client) RemoveContacts

func (client *Client) RemoveContacts(userIDs []int32) (*Ok, error)

RemoveContacts Removes users from the contact list @param userIDs Identifiers of users to be deleted

func (*Client) RemoveFavoriteSticker

func (client *Client) RemoveFavoriteSticker(sticker InputFile) (*Ok, error)

RemoveFavoriteSticker Removes a sticker from the list of favorite stickers @param sticker Sticker file to delete from the list

func (*Client) RemoveNotification

func (client *Client) RemoveNotification(notificationGroupID int32, notificationID int32) (*Ok, error)

RemoveNotification Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @param notificationGroupID Identifier of notification group to which the notification belongs @param notificationID Identifier of removed notification

func (*Client) RemoveNotificationGroup

func (client *Client) RemoveNotificationGroup(notificationGroupID int32, maxNotificationID int32) (*Ok, error)

RemoveNotificationGroup Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user @param notificationGroupID Notification group identifier @param maxNotificationID Maximum identifier of removed notifications

func (*Client) RemoveProxy

func (client *Client) RemoveProxy(proxyID int32) (*Ok, error)

RemoveProxy Removes a proxy server. Can be called before authorization @param proxyID Proxy identifier

func (*Client) RemoveRecentHashtag

func (client *Client) RemoveRecentHashtag(hashtag string) (*Ok, error)

RemoveRecentHashtag Removes a hashtag from the list of recently used hashtags @param hashtag Hashtag to delete

func (*Client) RemoveRecentSticker

func (client *Client) RemoveRecentSticker(isAttached bool, sticker InputFile) (*Ok, error)

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

func (client *Client) RemoveRecentlyFoundChat(chatID int64) (*Ok, error)

RemoveRecentlyFoundChat Removes a chat from the list of recently found chats @param chatID Identifier of the chat to be removed

func (*Client) RemoveSavedAnimation

func (client *Client) RemoveSavedAnimation(animation InputFile) (*Ok, error)

RemoveSavedAnimation Removes an animation from the list of saved animations @param animation Animation file to be removed

func (*Client) RemoveStickerFromSet

func (client *Client) RemoveStickerFromSet(sticker InputFile) (*Ok, error)

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; requires administrator rights in the supergroup @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

func (client *Client) RequestAuthenticationPasswordRecovery() (*Ok, error)

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() (*EmailAddressAuthenticationCodeInfo, error)

RequestPasswordRecovery Requests to send a password recovery code to an email address that was previously set up

func (*Client) ResendAuthenticationCode

func (client *Client) ResendAuthenticationCode() (*Ok, error)

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

func (client *Client) ResendEmailAddressVerificationCode() (*EmailAddressAuthenticationCodeInfo, error)

ResendEmailAddressVerificationCode Re-sends the code to verify an email address to be added to a user's Telegram Passport

func (*Client) ResendPhoneNumberConfirmationCode

func (client *Client) ResendPhoneNumberConfirmationCode() (*AuthenticationCodeInfo, error)

ResendPhoneNumberConfirmationCode Resends phone number confirmation code

func (*Client) ResendPhoneNumberVerificationCode

func (client *Client) ResendPhoneNumberVerificationCode() (*AuthenticationCodeInfo, error)

ResendPhoneNumberVerificationCode Re-sends the code to verify a phone number to be added to a user's Telegram Passport

func (*Client) ResendRecoveryEmailAddressCode

func (client *Client) ResendRecoveryEmailAddressCode() (*PasswordState, error)

ResendRecoveryEmailAddressCode Resends the 2-step verification recovery email address verification code

func (*Client) ResetAllNotificationSettings

func (client *Client) ResetAllNotificationSettings() (*Ok, error)

ResetAllNotificationSettings Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown

func (*Client) ResetNetworkStatistics

func (client *Client) ResetNetworkStatistics() (*Ok, error)

ResetNetworkStatistics Resets all network data usage statistics to zero. Can be called before authorization

func (*Client) SaveApplicationLogEvent

func (client *Client) SaveApplicationLogEvent(typeParam string, chatID int64, data JsonValue) (*Ok, error)

SaveApplicationLogEvent Saves application log event on the server. Can be called before authorization @param typeParam Event type @param chatID Optional chat identifier, associated with the event @param data The log event data

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 last message @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, filter ChatMembersFilter) (*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 @param filter The type of users to return. By default, chatMembersFilterMembers

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 last message @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

func (client *Client) SearchChats(query string, limit int32) (*Chats, error)

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

func (client *Client) SearchChatsOnServer(query string, limit int32) (*Chats, error)

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

func (client *Client) SearchContacts(query string, limit int32) (*Users, error)

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; may be empty to return all contacts @param limit Maximum number of users to be returned

func (*Client) SearchHashtags

func (client *Client) SearchHashtags(prefix string, limit int32) (*Hashtags, error)

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 last message @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

func (client *Client) SearchPublicChat(username string) (*Chat, error)

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

func (client *Client) SearchPublicChats(query string) (*Chats, error)

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 last message @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

func (client *Client) SearchStickers(emoji string, limit int32) (*Stickers, error)

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

func (client *Client) SendAndCatch(jsonQuery interface{}) (UpdateMsg, error)

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

func (client *Client) SendCallDebugInformation(callID int32, debugInformation string) (*Ok, error)

SendCallDebugInformation Sends debug information for a call @param callID Call identifier @param debugInformation Debug information in application-specific format

func (*Client) SendCallRating

func (client *Client) SendCallRating(callID int32, rating int32, comment string) (*Ok, error)

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

func (client *Client) SendChatScreenshotTakenNotification(chatID int64) (*Ok, error)

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

func (client *Client) SendChatSetTTLMessage(chatID int64, tTL int32) (*Message, error)

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

func (client *Client) SendEmailAddressVerificationCode(emailAddress string) (*EmailAddressAuthenticationCodeInfo, error)

SendEmailAddressVerificationCode Sends a code to verify an email address to be added to a user's Telegram Passport @param emailAddress Email address

func (*Client) SendInlineQueryResultMessage

func (client *Client) SendInlineQueryResultMessage(chatID int64, replyToMessageID int64, disableNotification bool, fromBackground bool, queryID JSONInt64, resultID string, hideViaBot bool) (*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 @param hideViaBot If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username")

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

func (client *Client) SendPassportAuthorizationForm(autorizationFormID int32, typeParams []PassportElementType) (*Ok, error)

SendPassportAuthorizationForm Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used @param autorizationFormID Authorization form identifier @param typeParams Types of Telegram Passport elements chosen by user to complete the authorization form

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

func (client *Client) SendPhoneNumberConfirmationCode(hash string, phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*AuthenticationCodeInfo, error)

SendPhoneNumberConfirmationCode Sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link @param hash Value of the "hash" parameter from the link @param phoneNumber Value of the "phone" parameter from the link @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) SendPhoneNumberVerificationCode

func (client *Client) SendPhoneNumberVerificationCode(phoneNumber string, allowFlashCall bool, isCurrentPhoneNumber bool) (*AuthenticationCodeInfo, error)

SendPhoneNumberVerificationCode Sends a code to verify a phone number to be added to a user's Telegram Passport @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) 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

func (client *Client) SetAlarm(seconds float64) (*Ok, error)

SetAlarm Succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization @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

func (client *Client) SetBio(bio string) (*Ok, error)

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

func (client *Client) SetChatClientData(chatID int64, clientData string) (*Ok, error)

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

func (client *Client) SetChatNotificationSettings(chatID int64, notificationSettings *ChatNotificationSettings) (*Ok, error)

SetChatNotificationSettings Changes the notification settings of a chat @param chatID Chat identifier @param notificationSettings New notification settings for the chat

func (*Client) SetChatPhoto

func (client *Client) SetChatPhoto(chatID int64, photo InputFile) (*Ok, error)

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

func (client *Client) SetChatTitle(chatID int64, title string) (*Ok, error)

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-128 characters

func (*Client) SetCustomLanguagePack

func (client *Client) SetCustomLanguagePack(info *LanguagePackInfo, strings []LanguagePackString) (*Ok, error)

SetCustomLanguagePack Adds or changes a custom local language pack to the current localization target @param info Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization @param strings Strings of the new language pack

func (*Client) SetCustomLanguagePackString

func (client *Client) SetCustomLanguagePackString(languagePackID string, newString *LanguagePackString) (*Ok, error)

SetCustomLanguagePackString Adds, edits or deletes a string in a custom local language pack. Can be called before authorization @param languagePackID Identifier of a previously added custom local language pack in the current localization target @param newString New language pack string

func (*Client) SetDatabaseEncryptionKey

func (client *Client) SetDatabaseEncryptionKey(newEncryptionKey []byte) (*Ok, error)

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 Informs TDLib on a file generation prograss @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 belongs @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) SetLogStream

func (client *Client) SetLogStream(logStream LogStream) (*Ok, error)

SetLogStream Sets new log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously @param logStream New log stream

func (*Client) SetLogTagVerbosityLevel

func (client *Client) SetLogTagVerbosityLevel(tag string, newVerbosityLevel int32) (*Ok, error)

SetLogTagVerbosityLevel Sets the verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously @param tag Logging tag to change verbosity level @param newVerbosityLevel New verbosity level; 1-1024

func (*Client) SetLogVerbosityLevel

func (client *Client) SetLogVerbosityLevel(newVerbosityLevel int32) (*Ok, error)

SetLogVerbosityLevel Sets the verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously @param newVerbosityLevel New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging

func (*Client) SetName

func (client *Client) SetName(firstName string, lastName string) (*Ok, error)

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-64 characters @param lastName The new value of the optional last name for the user; 0-64 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) 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) SetPassportElement

func (client *Client) SetPassportElement(element InputPassportElement, password string) (PassportElement, error)

SetPassportElement Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first @param element Input Telegram Passport element @param password Password of the current user

func (*Client) SetPassportElementErrors

func (client *Client) SetPassportElementErrors(userID int32, errors []InputPassportElementError) (*Ok, error)

SetPassportElementErrors Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @param userID User identifier @param errors The errors

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 change will not be applied until the new recovery email address is 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

func (client *Client) SetPinnedChats(chatIDs []int64) (*Ok, error)

SetPinnedChats Changes the order of pinned chats @param chatIDs The new list of pinned chats

func (*Client) SetPollAnswer

func (client *Client) SetPollAnswer(chatID int64, messageID int64, optionIDs []int32) (*Ok, error)

SetPollAnswer Changes user answer to a poll @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param optionIDs 0-based identifiers of options, chosen by the user. Currently user can't choose more than 1 option

func (*Client) SetProfilePhoto

func (client *Client) SetProfilePhoto(photo InputFile) (*Ok, error)

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

func (client *Client) SetRecoveryEmailAddress(password string, newRecoveryEmailAddress string) (*PasswordState, error)

SetRecoveryEmailAddress Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed @param password @param newRecoveryEmailAddress

func (*Client) SetScopeNotificationSettings

func (client *Client) SetScopeNotificationSettings(scope NotificationSettingsScope, notificationSettings *ScopeNotificationSettings) (*Ok, error)

SetScopeNotificationSettings Changes notification settings for chats of a given type @param scope Types of chats for which to change the notification settings @param notificationSettings The new notification settings for the given scope

func (*Client) SetStickerPositionInSet

func (client *Client) SetStickerPositionInSet(sticker InputFile, position int32) (*Ok, error)

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

func (client *Client) SetSupergroupDescription(supergroupID int32, description string) (*Ok, error)

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

func (client *Client) SetSupergroupUsername(supergroupID int32, username string) (*Ok, error)

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

func (client *Client) SetUsername(username string) (*Ok, error)

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

func (client *Client) StopPoll(chatID int64, messageID int64, replyMarkup ReplyMarkup) (*Ok, error)

StopPoll Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param replyMarkup The new message reply markup; for bots only

func (*Client) SynchronizeLanguagePack

func (client *Client) SynchronizeLanguagePack(languagePackID string) (*Ok, error)

SynchronizeLanguagePack Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization @param languagePackID Language pack identifier

func (*Client) TerminateAllOtherSessions

func (client *Client) TerminateAllOtherSessions() (*Ok, error)

TerminateAllOtherSessions Terminates all other sessions of the current user

func (*Client) TerminateSession

func (client *Client) TerminateSession(sessionID JSONInt64) (*Ok, error)

TerminateSession Terminates a session of the current user @param sessionID Session identifier

func (*Client) TestCallBytes

func (client *Client) TestCallBytes(x []byte) (*TestBytes, error)

TestCallBytes Returns the received bytes; for testing only. This is an offline method. Can be called before authorization @param x Bytes to return

func (*Client) TestCallEmpty

func (client *Client) TestCallEmpty() (*Ok, error)

TestCallEmpty Does nothing; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallString

func (client *Client) TestCallString(x string) (*TestString, error)

TestCallString Returns the received string; for testing only. This is an offline method. Can be called before authorization @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. This is an offline method. Can be called before authorization @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. This is an offline method. Can be called before authorization @param x Vector of objects to return

func (*Client) TestCallVectorString

func (client *Client) TestCallVectorString(x []string) (*TestVectorString, error)

TestCallVectorString Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization @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. This is an offline method. Can be called before authorization @param x Vector of objects to return

func (*Client) TestGetDifference

func (client *Client) TestGetDifference() (*Ok, error)

TestGetDifference Forces an updates.getDifference call to the Telegram servers; for testing only

func (*Client) TestNetwork

func (client *Client) TestNetwork() (*Ok, error)

TestNetwork Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization

func (*Client) TestSquareInt

func (client *Client) TestSquareInt(x int32) (*TestInt, error)

TestSquareInt Returns the squared received number; for testing only. This is an offline method. Can be called before authorization @param x Number to square

func (*Client) TestUseError

func (client *Client) TestUseError() (*Error, error)

TestUseError Does nothing and ensures that the Error object is used; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestUseUpdate

func (client *Client) TestUseUpdate() (Update, error)

TestUseUpdate Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization

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

func (client *Client) ToggleChatDefaultDisableNotification(chatID int64, defaultDisableNotification bool) (*Ok, error)

ToggleChatDefaultDisableNotification Changes the value of the default disable_notification parameter, used when a message is sent to a chat @param chatID Chat identifier @param defaultDisableNotification New value of default_disable_notification

func (*Client) ToggleChatIsMarkedAsUnread

func (client *Client) ToggleChatIsMarkedAsUnread(chatID int64, isMarkedAsUnread bool) (*Ok, error)

ToggleChatIsMarkedAsUnread Changes the marked as unread state of a chat @param chatID Chat identifier @param isMarkedAsUnread New value of is_marked_as_unread

func (*Client) ToggleChatIsPinned

func (client *Client) ToggleChatIsPinned(chatID int64, isPinned bool) (*Ok, error)

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

func (client *Client) UnblockUser(userID int32) (*Ok, error)

UnblockUser Removes a user from the blacklist @param userID User identifier

func (*Client) UnpinChatMessage

func (client *Client) UnpinChatMessage(chatID int64) (*Ok, error)

UnpinChatMessage Removes the pinned message from a chat; requires appropriate administrator rights in the group or channel @param chatID Identifier of the chat

func (*Client) UpgradeBasicGroupChatToSupergroupChat

func (client *Client) UpgradeBasicGroupChatToSupergroupChat(chatID int64) (*Chat, error)

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

func (client *Client) UploadFile(file InputFile, fileType FileType, priority int32) (*File, error)

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

func (client *Client) UploadStickerFile(userID int32, pngSticker InputFile) (*File, error)

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

func (client *Client) ViewMessages(chatID int64, messageIDs []int64, forceRead bool) (*Ok, error)

ViewMessages Informs TDLib that 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

func (*Client) ViewTrendingStickerSets

func (client *Client) ViewTrendingStickerSets(stickerSetIDs []JSONInt64) (*Ok, error)

ViewTrendingStickerSets Informs the server that some trending sticker sets have been viewed by the user @param stickerSetIDs Identifiers of viewed trending sticker sets

func (*Client) WriteGeneratedFilePart

func (client *Client) WriteGeneratedFilePart(generationID JSONInt64, offset int32, data []byte) (*Ok, error)

WriteGeneratedFilePart Writes a part of a generated file. This method is intended to be used only if the client has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file @param generationID The identifier of the generation process @param offset The offset from which to write the data to the file @param data The data to write

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.
	Timeout                time.Duration // Timeout for tdlib client operations
}

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
	Vcard       string `json:"vcard"`        // Additional data about the user in a form of vCard; 0-2048 bytes in length
	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

func NewContact(phoneNumber string, firstName string, lastName string, vcard string, userID int32) *Contact

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 vcard Additional data about the user in a form of vCard; 0-2048 bytes in length @param userID Identifier of the user, if known; otherwise 0

func (*Contact) MessageType

func (contact *Contact) MessageType() string

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 NewCount

func NewCount(count int32) *Count

NewCount creates a new Count

@param count Count

func (*Count) MessageType

func (count *Count) MessageType() string

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 DatabaseStatistics

type DatabaseStatistics struct {
	Statistics string `json:"statistics"` // Database statistics in an unspecified human-readable format
	// contains filtered or unexported fields
}

DatabaseStatistics Contains database statistics

func NewDatabaseStatistics

func NewDatabaseStatistics(statistics string) *DatabaseStatistics

NewDatabaseStatistics creates a new DatabaseStatistics

@param statistics Database statistics in an unspecified human-readable format

func (*DatabaseStatistics) MessageType

func (databaseStatistics *DatabaseStatistics) MessageType() string

MessageType return the string telegram-type of DatabaseStatistics

type Date

type Date struct {
	Day   int32 `json:"day"`   // Day of the month, 1-31
	Month int32 `json:"month"` // Month, 1-12
	Year  int32 `json:"year"`  // Year, 1-9999
	// contains filtered or unexported fields
}

Date Represents a date according to the Gregorian calendar

func NewDate

func NewDate(day int32, month int32, year int32) *Date

NewDate creates a new Date

@param day Day of the month, 1-31 @param month Month, 1-12 @param year Year, 1-9999

func (*Date) MessageType

func (date *Date) MessageType() string

MessageType return the string telegram-type of Date

type DatedFile

type DatedFile struct {
	File *File `json:"file"` // The file
	Date int32 `json:"date"` // Point in time (Unix timestamp) when the file was uploaded
	// contains filtered or unexported fields
}

DatedFile File with the date it was uploaded

func NewDatedFile

func NewDatedFile(file *File, date int32) *DatedFile

NewDatedFile creates a new DatedFile

@param file The file @param date Point in time (Unix timestamp) when the file was uploaded

func (*DatedFile) MessageType

func (datedFile *DatedFile) MessageType() string

MessageType return the string telegram-type of DatedFile

type DeepLinkInfo

type DeepLinkInfo struct {
	Text                  *FormattedText `json:"text"`                    // Text to be shown to the user
	NeedUpdateApplication bool           `json:"need_update_application"` // True, if user should be asked to update the application
	// contains filtered or unexported fields
}

DeepLinkInfo Contains information about a tg:// deep link

func NewDeepLinkInfo

func NewDeepLinkInfo(text *FormattedText, needUpdateApplication bool) *DeepLinkInfo

NewDeepLinkInfo creates a new DeepLinkInfo

@param text Text to be shown to the user @param needUpdateApplication True, if user should be asked to update the application

func (*DeepLinkInfo) MessageType

func (deepLinkInfo *DeepLinkInfo) MessageType() string

MessageType return the string telegram-type of DeepLinkInfo

type DeviceToken

type DeviceToken interface {
	GetDeviceTokenEnum() DeviceTokenEnum
}

DeviceToken Represents a data needed to subscribe for push notifications through registerDevice method. 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
	Encrypt      bool   `json:"encrypt"`        // True, if push notifications should be additionally encrypted
	// contains filtered or unexported fields
}

DeviceTokenApplePushVoIP A token for Apple Push Notification service VoIP notifications

func NewDeviceTokenApplePushVoIP

func NewDeviceTokenApplePushVoIP(deviceToken string, isAppSandbox bool, encrypt 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 @param encrypt True, if push notifications should be additionally encrypted

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 (
	DeviceTokenFirebaseCloudMessagingType DeviceTokenEnum = "deviceTokenFirebaseCloudMessaging"
	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 DeviceTokenFirebaseCloudMessaging

type DeviceTokenFirebaseCloudMessaging struct {
	Token   string `json:"token"`   // Device registration token; may be empty to de-register a device
	Encrypt bool   `json:"encrypt"` // True, if push notifications should be additionally encrypted
	// contains filtered or unexported fields
}

DeviceTokenFirebaseCloudMessaging A token for Firebase Cloud Messaging

func NewDeviceTokenFirebaseCloudMessaging

func NewDeviceTokenFirebaseCloudMessaging(token string, encrypt bool) *DeviceTokenFirebaseCloudMessaging

NewDeviceTokenFirebaseCloudMessaging creates a new DeviceTokenFirebaseCloudMessaging

@param token Device registration token; may be empty to de-register a device @param encrypt True, if push notifications should be additionally encrypted

func (*DeviceTokenFirebaseCloudMessaging) GetDeviceTokenEnum

func (deviceTokenFirebaseCloudMessaging *DeviceTokenFirebaseCloudMessaging) GetDeviceTokenEnum() DeviceTokenEnum

GetDeviceTokenEnum return the enum type of this object

func (*DeviceTokenFirebaseCloudMessaging) MessageType

func (deviceTokenFirebaseCloudMessaging *DeviceTokenFirebaseCloudMessaging) MessageType() string

MessageType return the string telegram-type of DeviceTokenFirebaseCloudMessaging

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

func NewDocument(fileName string, mimeType string, thumbnail *PhotoSize, document *File) *Document

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

func (document *Document) MessageType() string

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 EmailAddressAuthenticationCodeInfo

type EmailAddressAuthenticationCodeInfo struct {
	EmailAddressPattern string `json:"email_address_pattern"` // Pattern of the email address to which an authentication code was sent
	Length              int32  `json:"length"`                // Length of the code; 0 if unknown
	// contains filtered or unexported fields
}

EmailAddressAuthenticationCodeInfo Information about the email address authentication code that was sent

func NewEmailAddressAuthenticationCodeInfo

func NewEmailAddressAuthenticationCodeInfo(emailAddressPattern string, length int32) *EmailAddressAuthenticationCodeInfo

NewEmailAddressAuthenticationCodeInfo creates a new EmailAddressAuthenticationCodeInfo

@param emailAddressPattern Pattern of the email address to which an authentication code was sent @param length Length of the code; 0 if unknown

func (*EmailAddressAuthenticationCodeInfo) MessageType

func (emailAddressAuthenticationCodeInfo *EmailAddressAuthenticationCodeInfo) MessageType() string

MessageType return the string telegram-type of EmailAddressAuthenticationCodeInfo

type EncryptedCredentials

type EncryptedCredentials struct {
	Data   []byte `json:"data"`   // The encrypted credentials
	Hash   []byte `json:"hash"`   // The decrypted data hash
	Secret []byte `json:"secret"` // Secret for data decryption, encrypted with the service's public key
	// contains filtered or unexported fields
}

EncryptedCredentials Contains encrypted Telegram Passport data credentials

func NewEncryptedCredentials

func NewEncryptedCredentials(data []byte, hash []byte, secret []byte) *EncryptedCredentials

NewEncryptedCredentials creates a new EncryptedCredentials

@param data The encrypted credentials @param hash The decrypted data hash @param secret Secret for data decryption, encrypted with the service's public key

func (*EncryptedCredentials) MessageType

func (encryptedCredentials *EncryptedCredentials) MessageType() string

MessageType return the string telegram-type of EncryptedCredentials

type EncryptedPassportElement

type EncryptedPassportElement struct {
	Type        PassportElementType `json:"type"`         // Type of Telegram Passport element
	Data        []byte              `json:"data"`         // Encrypted JSON-encoded data about the user
	FrontSide   *DatedFile          `json:"front_side"`   // The front side of an identity document
	ReverseSide *DatedFile          `json:"reverse_side"` // The reverse side of an identity document; may be null
	Selfie      *DatedFile          `json:"selfie"`       // Selfie with the document; may be null
	Translation []DatedFile         `json:"translation"`  // List of files containing a certified English translation of the document
	Files       []DatedFile         `json:"files"`        // List of attached files
	Value       string              `json:"value"`        // Unencrypted data, phone number or email address
	Hash        string              `json:"hash"`         // Hash of the entire element
	// contains filtered or unexported fields
}

EncryptedPassportElement Contains information about an encrypted Telegram Passport element; for bots only

func NewEncryptedPassportElement

func NewEncryptedPassportElement(typeParam PassportElementType, data []byte, frontSide *DatedFile, reverseSide *DatedFile, selfie *DatedFile, translation []DatedFile, files []DatedFile, value string, hash string) *EncryptedPassportElement

NewEncryptedPassportElement creates a new EncryptedPassportElement

@param typeParam Type of Telegram Passport element @param data Encrypted JSON-encoded data about the user @param frontSide The front side of an identity document @param reverseSide The reverse side of an identity document; may be null @param selfie Selfie with the document; may be null @param translation List of files containing a certified English translation of the document @param files List of attached files @param value Unencrypted data, phone number or email address @param hash Hash of the entire element

func (*EncryptedPassportElement) MessageType

func (encryptedPassportElement *EncryptedPassportElement) MessageType() string

MessageType return the string telegram-type of EncryptedPassportElement

func (*EncryptedPassportElement) UnmarshalJSON

func (encryptedPassportElement *EncryptedPassportElement) 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

func NewError(code int32, message string) *Error

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

func (error *Error) MessageType() string

MessageType return the string telegram-type of Error

type EventFilterFunc

type EventFilterFunc func(msg *TdMessage) bool

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

func NewFile(iD int32, size int32, expectedSize int32, local *LocalFile, remote *RemoteFile) *File

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

func (file *File) MessageType() string

MessageType return the string telegram-type of File

type FilePart

type FilePart struct {
	Data []byte `json:"data"` // File bytes
	// contains filtered or unexported fields
}

FilePart Contains a part of a file

func NewFilePart

func NewFilePart(data []byte) *FilePart

NewFilePart creates a new FilePart

@param data File bytes

func (*FilePart) MessageType

func (filePart *FilePart) MessageType() string

MessageType return the string telegram-type of FilePart

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"
	FileTypeSecretThumbnailType FileTypeEnum = "fileTypeSecretThumbnail"
	FileTypeSecureType          FileTypeEnum = "fileTypeSecure"
	FileTypeStickerType         FileTypeEnum = "fileTypeSticker"
	FileTypeThumbnailType       FileTypeEnum = "fileTypeThumbnail"
	FileTypeUnknownType         FileTypeEnum = "fileTypeUnknown"
	FileTypeVideoType           FileTypeEnum = "fileTypeVideo"
	FileTypeVideoNoteType       FileTypeEnum = "fileTypeVideoNote"
	FileTypeVoiceNoteType       FileTypeEnum = "fileTypeVoiceNote"
	FileTypeWallpaperType       FileTypeEnum = "fileTypeWallpaper"
)

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 FileTypeSecure

type FileTypeSecure struct {
	// contains filtered or unexported fields
}

FileTypeSecure The file is a file from Secure storage used for storing Telegram Passport files

func NewFileTypeSecure

func NewFileTypeSecure() *FileTypeSecure

NewFileTypeSecure creates a new FileTypeSecure

func (*FileTypeSecure) GetFileTypeEnum

func (fileTypeSecure *FileTypeSecure) GetFileTypeEnum() FileTypeEnum

GetFileTypeEnum return the enum type of this object

func (*FileTypeSecure) MessageType

func (fileTypeSecure *FileTypeSecure) MessageType() string

MessageType return the string telegram-type of FileTypeSecure

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

func (game *Game) MessageType() string

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 {
	Hashtags []string `json:"hashtags"` // A list of hashtags
	// contains filtered or unexported fields
}

Hashtags Contains a list of hashtags

func NewHashtags

func NewHashtags(hashtags []string) *Hashtags

NewHashtags creates a new Hashtags

@param hashtags A list of hashtags

func (*Hashtags) MessageType

func (hashtags *Hashtags) MessageType() string

MessageType return the string telegram-type of Hashtags

type HttpURL

type HttpURL struct {
	URL string `json:"url"` // The URL
	// contains filtered or unexported fields
}

HttpURL Contains an HTTP URL

func NewHttpURL

func NewHttpURL(uRL string) *HttpURL

NewHttpURL creates a new HttpURL

@param uRL The URL

func (*HttpURL) MessageType

func (httpURL *HttpURL) MessageType() string

MessageType return the string telegram-type of HttpURL

type IDentityDocument

type IDentityDocument struct {
	Number      string      `json:"number"`       // Document number; 1-24 characters
	ExpiryDate  *Date       `json:"expiry_date"`  // Document expiry date; may be null
	FrontSide   *DatedFile  `json:"front_side"`   // Front side of the document
	ReverseSide *DatedFile  `json:"reverse_side"` // Reverse side of the document; only for driver license and identity card
	Selfie      *DatedFile  `json:"selfie"`       // Selfie with the document; may be null
	Translation []DatedFile `json:"translation"`  // List of files containing a certified English translation of the document
	// contains filtered or unexported fields
}

IDentityDocument An identity document

func NewIDentityDocument

func NewIDentityDocument(number string, expiryDate *Date, frontSide *DatedFile, reverseSide *DatedFile, selfie *DatedFile, translation []DatedFile) *IDentityDocument

NewIDentityDocument creates a new IDentityDocument

@param number Document number; 1-24 characters @param expiryDate Document expiry date; may be null @param frontSide Front side of the document @param reverseSide Reverse side of the document; only for driver license and identity card @param selfie Selfie with the document; may be null @param translation List of files containing a certified English translation of the document

func (*IDentityDocument) MessageType

func (iDentityDocument *IDentityDocument) MessageType() string

MessageType return the string telegram-type of IDentityDocument

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"` // HTTP or tg:// 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 HTTP or tg:// 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. Conversions beginning with '#' are reserved for internal TDLib usage
	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. Conversions beginning with '#' are reserved for internal TDLib usage @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 InputIDentityDocument

type InputIDentityDocument struct {
	Number      string      `json:"number"`       // Document number; 1-24 characters
	ExpiryDate  *Date       `json:"expiry_date"`  // Document expiry date, if available
	FrontSide   InputFile   `json:"front_side"`   // Front side of the document
	ReverseSide InputFile   `json:"reverse_side"` // Reverse side of the document; only for driver license and identity card
	Selfie      InputFile   `json:"selfie"`       // Selfie with the document, if available
	Translation []InputFile `json:"translation"`  // List of files containing a certified English translation of the document
	// contains filtered or unexported fields
}

InputIDentityDocument An identity document to be saved to Telegram Passport

func NewInputIDentityDocument

func NewInputIDentityDocument(number string, expiryDate *Date, frontSide InputFile, reverseSide InputFile, selfie InputFile, translation []InputFile) *InputIDentityDocument

NewInputIDentityDocument creates a new InputIDentityDocument

@param number Document number; 1-24 characters @param expiryDate Document expiry date, if available @param frontSide Front side of the document @param reverseSide Reverse side of the document; only for driver license and identity card @param selfie Selfie with the document, if available @param translation List of files containing a certified English translation of the document

func (*InputIDentityDocument) MessageType

func (inputIDentityDocument *InputIDentityDocument) MessageType() string

MessageType return the string telegram-type of InputIDentityDocument

func (*InputIDentityDocument) UnmarshalJSON

func (inputIDentityDocument *InputIDentityDocument) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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"
	InputMessagePollType      InputMessageContentEnum = "inputMessagePoll"
	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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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
	InGameShare bool  `json:"in_game_share"` // True, if a game message should be shared within a launched game; applies only to game messages
	// 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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 InputMessagePoll

type InputMessagePoll struct {
	Question string   `json:"question"` // Poll question, 1-255 characters
	Options  []string `json:"options"`  // List of poll answer options, 2-10 strings 1-100 characters each
	// contains filtered or unexported fields
}

InputMessagePoll A message with a poll. Polls can't be sent to private or secret chats

func NewInputMessagePoll

func NewInputMessagePoll(question string, options []string) *InputMessagePoll

NewInputMessagePoll creates a new InputMessagePoll

@param question Poll question, 1-255 characters @param options List of poll answer options, 2-10 strings 1-100 characters each

func (*InputMessagePoll) GetInputMessageContentEnum

func (inputMessagePoll *InputMessagePoll) GetInputMessageContentEnum() InputMessageContentEnum

GetInputMessageContentEnum return the enum type of this object

func (*InputMessagePoll) MessageType

func (inputMessagePoll *InputMessagePoll) MessageType() string

MessageType return the string telegram-type of InputMessagePoll

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; 1-GetOption("message_text_length_max") characters. 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; 1-GetOption("message_text_length_max") characters. 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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-GetOption("message_caption_length_max") 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 InputPassportElement

type InputPassportElement interface {
	GetInputPassportElementEnum() InputPassportElementEnum
}

InputPassportElement Contains information about a Telegram Passport element to be saved

type InputPassportElementAddress

type InputPassportElementAddress struct {
	Address *Address `json:"address"` // The address to be saved
	// contains filtered or unexported fields
}

InputPassportElementAddress A Telegram Passport element to be saved containing the user's address

func NewInputPassportElementAddress

func NewInputPassportElementAddress(address *Address) *InputPassportElementAddress

NewInputPassportElementAddress creates a new InputPassportElementAddress

@param address The address to be saved

func (*InputPassportElementAddress) GetInputPassportElementEnum

func (inputPassportElementAddress *InputPassportElementAddress) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementAddress) MessageType

func (inputPassportElementAddress *InputPassportElementAddress) MessageType() string

MessageType return the string telegram-type of InputPassportElementAddress

type InputPassportElementBankStatement

type InputPassportElementBankStatement struct {
	BankStatement *InputPersonalDocument `json:"bank_statement"` // The bank statement to be saved
	// contains filtered or unexported fields
}

InputPassportElementBankStatement A Telegram Passport element to be saved containing the user's bank statement

func NewInputPassportElementBankStatement

func NewInputPassportElementBankStatement(bankStatement *InputPersonalDocument) *InputPassportElementBankStatement

NewInputPassportElementBankStatement creates a new InputPassportElementBankStatement

@param bankStatement The bank statement to be saved

func (*InputPassportElementBankStatement) GetInputPassportElementEnum

func (inputPassportElementBankStatement *InputPassportElementBankStatement) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementBankStatement) MessageType

func (inputPassportElementBankStatement *InputPassportElementBankStatement) MessageType() string

MessageType return the string telegram-type of InputPassportElementBankStatement

type InputPassportElementDriverLicense

type InputPassportElementDriverLicense struct {
	DriverLicense *InputIDentityDocument `json:"driver_license"` // The driver license to be saved
	// contains filtered or unexported fields
}

InputPassportElementDriverLicense A Telegram Passport element to be saved containing the user's driver license

func NewInputPassportElementDriverLicense

func NewInputPassportElementDriverLicense(driverLicense *InputIDentityDocument) *InputPassportElementDriverLicense

NewInputPassportElementDriverLicense creates a new InputPassportElementDriverLicense

@param driverLicense The driver license to be saved

func (*InputPassportElementDriverLicense) GetInputPassportElementEnum

func (inputPassportElementDriverLicense *InputPassportElementDriverLicense) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementDriverLicense) MessageType

func (inputPassportElementDriverLicense *InputPassportElementDriverLicense) MessageType() string

MessageType return the string telegram-type of InputPassportElementDriverLicense

type InputPassportElementEmailAddress

type InputPassportElementEmailAddress struct {
	EmailAddress string `json:"email_address"` // The email address to be saved
	// contains filtered or unexported fields
}

InputPassportElementEmailAddress A Telegram Passport element to be saved containing the user's email address

func NewInputPassportElementEmailAddress

func NewInputPassportElementEmailAddress(emailAddress string) *InputPassportElementEmailAddress

NewInputPassportElementEmailAddress creates a new InputPassportElementEmailAddress

@param emailAddress The email address to be saved

func (*InputPassportElementEmailAddress) GetInputPassportElementEnum

func (inputPassportElementEmailAddress *InputPassportElementEmailAddress) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementEmailAddress) MessageType

func (inputPassportElementEmailAddress *InputPassportElementEmailAddress) MessageType() string

MessageType return the string telegram-type of InputPassportElementEmailAddress

type InputPassportElementEnum

type InputPassportElementEnum string

InputPassportElementEnum Alias for abstract InputPassportElement 'Sub-Classes', used as constant-enum here

const (
	InputPassportElementPersonalDetailsType       InputPassportElementEnum = "inputPassportElementPersonalDetails"
	InputPassportElementPassportType              InputPassportElementEnum = "inputPassportElementPassport"
	InputPassportElementDriverLicenseType         InputPassportElementEnum = "inputPassportElementDriverLicense"
	InputPassportElementIDentityCardType          InputPassportElementEnum = "inputPassportElementIDentityCard"
	InputPassportElementInternalPassportType      InputPassportElementEnum = "inputPassportElementInternalPassport"
	InputPassportElementAddressType               InputPassportElementEnum = "inputPassportElementAddress"
	InputPassportElementUtilityBillType           InputPassportElementEnum = "inputPassportElementUtilityBill"
	InputPassportElementBankStatementType         InputPassportElementEnum = "inputPassportElementBankStatement"
	InputPassportElementRentalAgreementType       InputPassportElementEnum = "inputPassportElementRentalAgreement"
	InputPassportElementPassportRegistrationType  InputPassportElementEnum = "inputPassportElementPassportRegistration"
	InputPassportElementTemporaryRegistrationType InputPassportElementEnum = "inputPassportElementTemporaryRegistration"
	InputPassportElementPhoneNumberType           InputPassportElementEnum = "inputPassportElementPhoneNumber"
	InputPassportElementEmailAddressType          InputPassportElementEnum = "inputPassportElementEmailAddress"
)

InputPassportElement enums

type InputPassportElementError

type InputPassportElementError struct {
	Type    PassportElementType             `json:"type"`    // Type of Telegram Passport element that has the error
	Message string                          `json:"message"` // Error message
	Source  InputPassportElementErrorSource `json:"source"`  // Error source
	// contains filtered or unexported fields
}

InputPassportElementError Contains the description of an error in a Telegram Passport element; for bots only

func NewInputPassportElementError

func NewInputPassportElementError(typeParam PassportElementType, message string, source InputPassportElementErrorSource) *InputPassportElementError

NewInputPassportElementError creates a new InputPassportElementError

@param typeParam Type of Telegram Passport element that has the error @param message Error message @param source Error source

func (*InputPassportElementError) MessageType

func (inputPassportElementError *InputPassportElementError) MessageType() string

MessageType return the string telegram-type of InputPassportElementError

func (*InputPassportElementError) UnmarshalJSON

func (inputPassportElementError *InputPassportElementError) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputPassportElementErrorSource

type InputPassportElementErrorSource interface {
	GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum
}

InputPassportElementErrorSource Contains the description of an error in a Telegram Passport element; for bots only

type InputPassportElementErrorSourceDataField

type InputPassportElementErrorSourceDataField struct {
	FieldName string `json:"field_name"` // Field name
	DataHash  []byte `json:"data_hash"`  // Current data hash
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceDataField A data field contains an error. The error is considered resolved when the field's value changes

func NewInputPassportElementErrorSourceDataField

func NewInputPassportElementErrorSourceDataField(fieldName string, dataHash []byte) *InputPassportElementErrorSourceDataField

NewInputPassportElementErrorSourceDataField creates a new InputPassportElementErrorSourceDataField

@param fieldName Field name @param dataHash Current data hash

func (*InputPassportElementErrorSourceDataField) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceDataField *InputPassportElementErrorSourceDataField) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceDataField) MessageType

func (inputPassportElementErrorSourceDataField *InputPassportElementErrorSourceDataField) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceDataField

type InputPassportElementErrorSourceEnum

type InputPassportElementErrorSourceEnum string

InputPassportElementErrorSourceEnum Alias for abstract InputPassportElementErrorSource 'Sub-Classes', used as constant-enum here

const (
	InputPassportElementErrorSourceUnspecifiedType      InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceUnspecified"
	InputPassportElementErrorSourceDataFieldType        InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceDataField"
	InputPassportElementErrorSourceFrontSideType        InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFrontSide"
	InputPassportElementErrorSourceReverseSideType      InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceReverseSide"
	InputPassportElementErrorSourceSelfieType           InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceSelfie"
	InputPassportElementErrorSourceTranslationFileType  InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceTranslationFile"
	InputPassportElementErrorSourceTranslationFilesType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceTranslationFiles"
	InputPassportElementErrorSourceFileType             InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFile"
	InputPassportElementErrorSourceFilesType            InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFiles"
)

InputPassportElementErrorSource enums

type InputPassportElementErrorSourceFile

type InputPassportElementErrorSourceFile struct {
	FileHash []byte `json:"file_hash"` // Current hash of the file which has the error
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceFile The file contains an error. The error is considered resolved when the file changes

func NewInputPassportElementErrorSourceFile

func NewInputPassportElementErrorSourceFile(fileHash []byte) *InputPassportElementErrorSourceFile

NewInputPassportElementErrorSourceFile creates a new InputPassportElementErrorSourceFile

@param fileHash Current hash of the file which has the error

func (*InputPassportElementErrorSourceFile) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceFile *InputPassportElementErrorSourceFile) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceFile) MessageType

func (inputPassportElementErrorSourceFile *InputPassportElementErrorSourceFile) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceFile

type InputPassportElementErrorSourceFiles

type InputPassportElementErrorSourceFiles struct {
	FileHashes [][]byte `json:"file_hashes"` // Current hashes of all attached files
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceFiles The list of attached files contains an error. The error is considered resolved when the file list changes

func NewInputPassportElementErrorSourceFiles

func NewInputPassportElementErrorSourceFiles(fileHashes [][]byte) *InputPassportElementErrorSourceFiles

NewInputPassportElementErrorSourceFiles creates a new InputPassportElementErrorSourceFiles

@param fileHashes Current hashes of all attached files

func (*InputPassportElementErrorSourceFiles) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceFiles *InputPassportElementErrorSourceFiles) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceFiles) MessageType

func (inputPassportElementErrorSourceFiles *InputPassportElementErrorSourceFiles) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceFiles

type InputPassportElementErrorSourceFrontSide

type InputPassportElementErrorSourceFrontSide struct {
	FileHash []byte `json:"file_hash"` // Current hash of the file containing the front side
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceFrontSide The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes

func NewInputPassportElementErrorSourceFrontSide

func NewInputPassportElementErrorSourceFrontSide(fileHash []byte) *InputPassportElementErrorSourceFrontSide

NewInputPassportElementErrorSourceFrontSide creates a new InputPassportElementErrorSourceFrontSide

@param fileHash Current hash of the file containing the front side

func (*InputPassportElementErrorSourceFrontSide) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceFrontSide *InputPassportElementErrorSourceFrontSide) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceFrontSide) MessageType

func (inputPassportElementErrorSourceFrontSide *InputPassportElementErrorSourceFrontSide) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceFrontSide

type InputPassportElementErrorSourceReverseSide

type InputPassportElementErrorSourceReverseSide struct {
	FileHash []byte `json:"file_hash"` // Current hash of the file containing the reverse side
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceReverseSide The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes

func NewInputPassportElementErrorSourceReverseSide

func NewInputPassportElementErrorSourceReverseSide(fileHash []byte) *InputPassportElementErrorSourceReverseSide

NewInputPassportElementErrorSourceReverseSide creates a new InputPassportElementErrorSourceReverseSide

@param fileHash Current hash of the file containing the reverse side

func (*InputPassportElementErrorSourceReverseSide) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceReverseSide *InputPassportElementErrorSourceReverseSide) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceReverseSide) MessageType

func (inputPassportElementErrorSourceReverseSide *InputPassportElementErrorSourceReverseSide) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceReverseSide

type InputPassportElementErrorSourceSelfie

type InputPassportElementErrorSourceSelfie struct {
	FileHash []byte `json:"file_hash"` // Current hash of the file containing the selfie
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceSelfie The selfie contains an error. The error is considered resolved when the file with the selfie changes

func NewInputPassportElementErrorSourceSelfie

func NewInputPassportElementErrorSourceSelfie(fileHash []byte) *InputPassportElementErrorSourceSelfie

NewInputPassportElementErrorSourceSelfie creates a new InputPassportElementErrorSourceSelfie

@param fileHash Current hash of the file containing the selfie

func (*InputPassportElementErrorSourceSelfie) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceSelfie *InputPassportElementErrorSourceSelfie) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceSelfie) MessageType

func (inputPassportElementErrorSourceSelfie *InputPassportElementErrorSourceSelfie) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceSelfie

type InputPassportElementErrorSourceTranslationFile

type InputPassportElementErrorSourceTranslationFile struct {
	FileHash []byte `json:"file_hash"` // Current hash of the file containing the translation
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceTranslationFile One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes

func NewInputPassportElementErrorSourceTranslationFile

func NewInputPassportElementErrorSourceTranslationFile(fileHash []byte) *InputPassportElementErrorSourceTranslationFile

NewInputPassportElementErrorSourceTranslationFile creates a new InputPassportElementErrorSourceTranslationFile

@param fileHash Current hash of the file containing the translation

func (*InputPassportElementErrorSourceTranslationFile) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceTranslationFile *InputPassportElementErrorSourceTranslationFile) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceTranslationFile) MessageType

func (inputPassportElementErrorSourceTranslationFile *InputPassportElementErrorSourceTranslationFile) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceTranslationFile

type InputPassportElementErrorSourceTranslationFiles

type InputPassportElementErrorSourceTranslationFiles struct {
	FileHashes [][]byte `json:"file_hashes"` // Current hashes of all files with the translation
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceTranslationFiles The translation of the document contains an error. The error is considered resolved when the list of files changes

func NewInputPassportElementErrorSourceTranslationFiles

func NewInputPassportElementErrorSourceTranslationFiles(fileHashes [][]byte) *InputPassportElementErrorSourceTranslationFiles

NewInputPassportElementErrorSourceTranslationFiles creates a new InputPassportElementErrorSourceTranslationFiles

@param fileHashes Current hashes of all files with the translation

func (*InputPassportElementErrorSourceTranslationFiles) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceTranslationFiles *InputPassportElementErrorSourceTranslationFiles) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceTranslationFiles) MessageType

func (inputPassportElementErrorSourceTranslationFiles *InputPassportElementErrorSourceTranslationFiles) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceTranslationFiles

type InputPassportElementErrorSourceUnspecified

type InputPassportElementErrorSourceUnspecified struct {
	ElementHash []byte `json:"element_hash"` // Current hash of the entire element
	// contains filtered or unexported fields
}

InputPassportElementErrorSourceUnspecified The element contains an error in an unspecified place. The error will be considered resolved when new data is added

func NewInputPassportElementErrorSourceUnspecified

func NewInputPassportElementErrorSourceUnspecified(elementHash []byte) *InputPassportElementErrorSourceUnspecified

NewInputPassportElementErrorSourceUnspecified creates a new InputPassportElementErrorSourceUnspecified

@param elementHash Current hash of the entire element

func (*InputPassportElementErrorSourceUnspecified) GetInputPassportElementErrorSourceEnum

func (inputPassportElementErrorSourceUnspecified *InputPassportElementErrorSourceUnspecified) GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum

GetInputPassportElementErrorSourceEnum return the enum type of this object

func (*InputPassportElementErrorSourceUnspecified) MessageType

func (inputPassportElementErrorSourceUnspecified *InputPassportElementErrorSourceUnspecified) MessageType() string

MessageType return the string telegram-type of InputPassportElementErrorSourceUnspecified

type InputPassportElementIDentityCard

type InputPassportElementIDentityCard struct {
	IDentityCard *InputIDentityDocument `json:"identity_card"` // The identity card to be saved
	// contains filtered or unexported fields
}

InputPassportElementIDentityCard A Telegram Passport element to be saved containing the user's identity card

func NewInputPassportElementIDentityCard

func NewInputPassportElementIDentityCard(iDentityCard *InputIDentityDocument) *InputPassportElementIDentityCard

NewInputPassportElementIDentityCard creates a new InputPassportElementIDentityCard

@param iDentityCard The identity card to be saved

func (*InputPassportElementIDentityCard) GetInputPassportElementEnum

func (inputPassportElementIDentityCard *InputPassportElementIDentityCard) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementIDentityCard) MessageType

func (inputPassportElementIDentityCard *InputPassportElementIDentityCard) MessageType() string

MessageType return the string telegram-type of InputPassportElementIDentityCard

type InputPassportElementInternalPassport

type InputPassportElementInternalPassport struct {
	InternalPassport *InputIDentityDocument `json:"internal_passport"` // The internal passport to be saved
	// contains filtered or unexported fields
}

InputPassportElementInternalPassport A Telegram Passport element to be saved containing the user's internal passport

func NewInputPassportElementInternalPassport

func NewInputPassportElementInternalPassport(internalPassport *InputIDentityDocument) *InputPassportElementInternalPassport

NewInputPassportElementInternalPassport creates a new InputPassportElementInternalPassport

@param internalPassport The internal passport to be saved

func (*InputPassportElementInternalPassport) GetInputPassportElementEnum

func (inputPassportElementInternalPassport *InputPassportElementInternalPassport) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementInternalPassport) MessageType

func (inputPassportElementInternalPassport *InputPassportElementInternalPassport) MessageType() string

MessageType return the string telegram-type of InputPassportElementInternalPassport

type InputPassportElementPassport

type InputPassportElementPassport struct {
	Passport *InputIDentityDocument `json:"passport"` // The passport to be saved
	// contains filtered or unexported fields
}

InputPassportElementPassport A Telegram Passport element to be saved containing the user's passport

func NewInputPassportElementPassport

func NewInputPassportElementPassport(passport *InputIDentityDocument) *InputPassportElementPassport

NewInputPassportElementPassport creates a new InputPassportElementPassport

@param passport The passport to be saved

func (*InputPassportElementPassport) GetInputPassportElementEnum

func (inputPassportElementPassport *InputPassportElementPassport) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementPassport) MessageType

func (inputPassportElementPassport *InputPassportElementPassport) MessageType() string

MessageType return the string telegram-type of InputPassportElementPassport

type InputPassportElementPassportRegistration

type InputPassportElementPassportRegistration struct {
	PassportRegistration *InputPersonalDocument `json:"passport_registration"` // The passport registration page to be saved
	// contains filtered or unexported fields
}

InputPassportElementPassportRegistration A Telegram Passport element to be saved containing the user's passport registration

func NewInputPassportElementPassportRegistration

func NewInputPassportElementPassportRegistration(passportRegistration *InputPersonalDocument) *InputPassportElementPassportRegistration

NewInputPassportElementPassportRegistration creates a new InputPassportElementPassportRegistration

@param passportRegistration The passport registration page to be saved

func (*InputPassportElementPassportRegistration) GetInputPassportElementEnum

func (inputPassportElementPassportRegistration *InputPassportElementPassportRegistration) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementPassportRegistration) MessageType

func (inputPassportElementPassportRegistration *InputPassportElementPassportRegistration) MessageType() string

MessageType return the string telegram-type of InputPassportElementPassportRegistration

type InputPassportElementPersonalDetails

type InputPassportElementPersonalDetails struct {
	PersonalDetails *PersonalDetails `json:"personal_details"` // Personal details of the user
	// contains filtered or unexported fields
}

InputPassportElementPersonalDetails A Telegram Passport element to be saved containing the user's personal details

func NewInputPassportElementPersonalDetails

func NewInputPassportElementPersonalDetails(personalDetails *PersonalDetails) *InputPassportElementPersonalDetails

NewInputPassportElementPersonalDetails creates a new InputPassportElementPersonalDetails

@param personalDetails Personal details of the user

func (*InputPassportElementPersonalDetails) GetInputPassportElementEnum

func (inputPassportElementPersonalDetails *InputPassportElementPersonalDetails) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementPersonalDetails) MessageType

func (inputPassportElementPersonalDetails *InputPassportElementPersonalDetails) MessageType() string

MessageType return the string telegram-type of InputPassportElementPersonalDetails

type InputPassportElementPhoneNumber

type InputPassportElementPhoneNumber struct {
	PhoneNumber string `json:"phone_number"` // The phone number to be saved
	// contains filtered or unexported fields
}

InputPassportElementPhoneNumber A Telegram Passport element to be saved containing the user's phone number

func NewInputPassportElementPhoneNumber

func NewInputPassportElementPhoneNumber(phoneNumber string) *InputPassportElementPhoneNumber

NewInputPassportElementPhoneNumber creates a new InputPassportElementPhoneNumber

@param phoneNumber The phone number to be saved

func (*InputPassportElementPhoneNumber) GetInputPassportElementEnum

func (inputPassportElementPhoneNumber *InputPassportElementPhoneNumber) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementPhoneNumber) MessageType

func (inputPassportElementPhoneNumber *InputPassportElementPhoneNumber) MessageType() string

MessageType return the string telegram-type of InputPassportElementPhoneNumber

type InputPassportElementRentalAgreement

type InputPassportElementRentalAgreement struct {
	RentalAgreement *InputPersonalDocument `json:"rental_agreement"` // The rental agreement to be saved
	// contains filtered or unexported fields
}

InputPassportElementRentalAgreement A Telegram Passport element to be saved containing the user's rental agreement

func NewInputPassportElementRentalAgreement

func NewInputPassportElementRentalAgreement(rentalAgreement *InputPersonalDocument) *InputPassportElementRentalAgreement

NewInputPassportElementRentalAgreement creates a new InputPassportElementRentalAgreement

@param rentalAgreement The rental agreement to be saved

func (*InputPassportElementRentalAgreement) GetInputPassportElementEnum

func (inputPassportElementRentalAgreement *InputPassportElementRentalAgreement) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementRentalAgreement) MessageType

func (inputPassportElementRentalAgreement *InputPassportElementRentalAgreement) MessageType() string

MessageType return the string telegram-type of InputPassportElementRentalAgreement

type InputPassportElementTemporaryRegistration

type InputPassportElementTemporaryRegistration struct {
	TemporaryRegistration *InputPersonalDocument `json:"temporary_registration"` // The temporary registration document to be saved
	// contains filtered or unexported fields
}

InputPassportElementTemporaryRegistration A Telegram Passport element to be saved containing the user's temporary registration

func NewInputPassportElementTemporaryRegistration

func NewInputPassportElementTemporaryRegistration(temporaryRegistration *InputPersonalDocument) *InputPassportElementTemporaryRegistration

NewInputPassportElementTemporaryRegistration creates a new InputPassportElementTemporaryRegistration

@param temporaryRegistration The temporary registration document to be saved

func (*InputPassportElementTemporaryRegistration) GetInputPassportElementEnum

func (inputPassportElementTemporaryRegistration *InputPassportElementTemporaryRegistration) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementTemporaryRegistration) MessageType

func (inputPassportElementTemporaryRegistration *InputPassportElementTemporaryRegistration) MessageType() string

MessageType return the string telegram-type of InputPassportElementTemporaryRegistration

type InputPassportElementUtilityBill

type InputPassportElementUtilityBill struct {
	UtilityBill *InputPersonalDocument `json:"utility_bill"` // The utility bill to be saved
	// contains filtered or unexported fields
}

InputPassportElementUtilityBill A Telegram Passport element to be saved containing the user's utility bill

func NewInputPassportElementUtilityBill

func NewInputPassportElementUtilityBill(utilityBill *InputPersonalDocument) *InputPassportElementUtilityBill

NewInputPassportElementUtilityBill creates a new InputPassportElementUtilityBill

@param utilityBill The utility bill to be saved

func (*InputPassportElementUtilityBill) GetInputPassportElementEnum

func (inputPassportElementUtilityBill *InputPassportElementUtilityBill) GetInputPassportElementEnum() InputPassportElementEnum

GetInputPassportElementEnum return the enum type of this object

func (*InputPassportElementUtilityBill) MessageType

func (inputPassportElementUtilityBill *InputPassportElementUtilityBill) MessageType() string

MessageType return the string telegram-type of InputPassportElementUtilityBill

type InputPersonalDocument

type InputPersonalDocument struct {
	Files       []InputFile `json:"files"`       // List of files containing the pages of the document
	Translation []InputFile `json:"translation"` // List of files containing a certified English translation of the document
	// contains filtered or unexported fields
}

InputPersonalDocument A personal document to be saved to Telegram Passport

func NewInputPersonalDocument

func NewInputPersonalDocument(files []InputFile, translation []InputFile) *InputPersonalDocument

NewInputPersonalDocument creates a new InputPersonalDocument

@param files List of files containing the pages of the document @param translation List of files containing a certified English translation of the document

func (*InputPersonalDocument) MessageType

func (inputPersonalDocument *InputPersonalDocument) MessageType() string

MessageType return the string telegram-type of InputPersonalDocument

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 320. Use 0 if unknown
	Height    int32     `json:"height"`    // Thumbnail height, usually shouldn't exceed 320. 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 320. Use 0 if unknown @param height Thumbnail height, usually shouldn't exceed 320. 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

func (invoice *Invoice) MessageType() string

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

func (jsonInt *JSONInt64) MarshalJSON() ([]byte, error)

MarshalJSON marshals to json

func (*JSONInt64) UnmarshalJSON

func (jsonInt *JSONInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals from json

type JsonObjectMember

type JsonObjectMember struct {
	Key   string    `json:"key"`   // Member's key
	Value JsonValue `json:"value"` // Member's value
	// contains filtered or unexported fields
}

JsonObjectMember Represents one member of a JSON object

func NewJsonObjectMember

func NewJsonObjectMember(key string, value JsonValue) *JsonObjectMember

NewJsonObjectMember creates a new JsonObjectMember

@param key Member's key @param value Member's value

func (*JsonObjectMember) MessageType

func (jsonObjectMember *JsonObjectMember) MessageType() string

MessageType return the string telegram-type of JsonObjectMember

func (*JsonObjectMember) UnmarshalJSON

func (jsonObjectMember *JsonObjectMember) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type JsonValue

type JsonValue interface {
	GetJsonValueEnum() JsonValueEnum
}

JsonValue Represents a JSON value

type JsonValueArray

type JsonValueArray struct {
	Values []JsonValue `json:"values"` // The list of array elements
	// contains filtered or unexported fields
}

JsonValueArray Represents a JSON array

func NewJsonValueArray

func NewJsonValueArray(values []JsonValue) *JsonValueArray

NewJsonValueArray creates a new JsonValueArray

@param values The list of array elements

func (*JsonValueArray) GetJsonValueEnum

func (jsonValueArray *JsonValueArray) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueArray) MessageType

func (jsonValueArray *JsonValueArray) MessageType() string

MessageType return the string telegram-type of JsonValueArray

type JsonValueBoolean

type JsonValueBoolean struct {
	Value bool `json:"value"` // The value
	// contains filtered or unexported fields
}

JsonValueBoolean Represents a boolean JSON value

func NewJsonValueBoolean

func NewJsonValueBoolean(value bool) *JsonValueBoolean

NewJsonValueBoolean creates a new JsonValueBoolean

@param value The value

func (*JsonValueBoolean) GetJsonValueEnum

func (jsonValueBoolean *JsonValueBoolean) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueBoolean) MessageType

func (jsonValueBoolean *JsonValueBoolean) MessageType() string

MessageType return the string telegram-type of JsonValueBoolean

type JsonValueEnum

type JsonValueEnum string

JsonValueEnum Alias for abstract JsonValue 'Sub-Classes', used as constant-enum here

const (
	JsonValueNullType    JsonValueEnum = "jsonValueNull"
	JsonValueBooleanType JsonValueEnum = "jsonValueBoolean"
	JsonValueNumberType  JsonValueEnum = "jsonValueNumber"
	JsonValueStringType  JsonValueEnum = "jsonValueString"
	JsonValueArrayType   JsonValueEnum = "jsonValueArray"
	JsonValueObjectType  JsonValueEnum = "jsonValueObject"
)

JsonValue enums

type JsonValueNull

type JsonValueNull struct {
	// contains filtered or unexported fields
}

JsonValueNull Represents a null JSON value

func NewJsonValueNull

func NewJsonValueNull() *JsonValueNull

NewJsonValueNull creates a new JsonValueNull

func (*JsonValueNull) GetJsonValueEnum

func (jsonValueNull *JsonValueNull) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueNull) MessageType

func (jsonValueNull *JsonValueNull) MessageType() string

MessageType return the string telegram-type of JsonValueNull

type JsonValueNumber

type JsonValueNumber struct {
	Value float64 `json:"value"` // The value
	// contains filtered or unexported fields
}

JsonValueNumber Represents a numeric JSON value

func NewJsonValueNumber

func NewJsonValueNumber(value float64) *JsonValueNumber

NewJsonValueNumber creates a new JsonValueNumber

@param value The value

func (*JsonValueNumber) GetJsonValueEnum

func (jsonValueNumber *JsonValueNumber) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueNumber) MessageType

func (jsonValueNumber *JsonValueNumber) MessageType() string

MessageType return the string telegram-type of JsonValueNumber

type JsonValueObject

type JsonValueObject struct {
	Members []JsonObjectMember `json:"members"` // The list of object members
	// contains filtered or unexported fields
}

JsonValueObject Represents a JSON object

func NewJsonValueObject

func NewJsonValueObject(members []JsonObjectMember) *JsonValueObject

NewJsonValueObject creates a new JsonValueObject

@param members The list of object members

func (*JsonValueObject) GetJsonValueEnum

func (jsonValueObject *JsonValueObject) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueObject) MessageType

func (jsonValueObject *JsonValueObject) MessageType() string

MessageType return the string telegram-type of JsonValueObject

type JsonValueString

type JsonValueString struct {
	Value string `json:"value"` // The value
	// contains filtered or unexported fields
}

JsonValueString Represents a string JSON value

func NewJsonValueString

func NewJsonValueString(value string) *JsonValueString

NewJsonValueString creates a new JsonValueString

@param value The value

func (*JsonValueString) GetJsonValueEnum

func (jsonValueString *JsonValueString) GetJsonValueEnum() JsonValueEnum

GetJsonValueEnum return the enum type of this object

func (*JsonValueString) MessageType

func (jsonValueString *JsonValueString) MessageType() string

MessageType return the string telegram-type of JsonValueString

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 LanguagePackInfo

type LanguagePackInfo struct {
	ID                    string `json:"id"`                      // Unique language pack identifier
	BaseLanguagePackID    string `json:"base_language_pack_id"`   // Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs
	Name                  string `json:"name"`                    // Language name
	NativeName            string `json:"native_name"`             // Name of the language in that language
	PluralCode            string `json:"plural_code"`             // A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info
	IsOfficial            bool   `json:"is_official"`             // True, if the language pack is official
	IsRtl                 bool   `json:"is_rtl"`                  // True, if the language pack strings are RTL
	IsBeta                bool   `json:"is_beta"`                 // True, if the language pack is a beta language pack
	IsInstalled           bool   `json:"is_installed"`            // True, if the language pack is installed by the current user
	TotalStringCount      int32  `json:"total_string_count"`      // Total number of non-deleted strings from the language pack
	TranslatedStringCount int32  `json:"translated_string_count"` // Total number of translated strings from the language pack
	LocalStringCount      int32  `json:"local_string_count"`      // Total number of non-deleted strings from the language pack available locally
	TranslationURL        string `json:"translation_url"`         // Link to language translation interface; empty for custom local language packs
	// contains filtered or unexported fields
}

LanguagePackInfo Contains information about a language pack

func NewLanguagePackInfo

func NewLanguagePackInfo(iD string, baseLanguagePackID string, name string, nativeName string, pluralCode string, isOfficial bool, isRtl bool, isBeta bool, isInstalled bool, totalStringCount int32, translatedStringCount int32, localStringCount int32, translationURL string) *LanguagePackInfo

NewLanguagePackInfo creates a new LanguagePackInfo

@param iD Unique language pack identifier @param baseLanguagePackID Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs @param name Language name @param nativeName Name of the language in that language @param pluralCode A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info @param isOfficial True, if the language pack is official @param isRtl True, if the language pack strings are RTL @param isBeta True, if the language pack is a beta language pack @param isInstalled True, if the language pack is installed by the current user @param totalStringCount Total number of non-deleted strings from the language pack @param translatedStringCount Total number of translated strings from the language pack @param localStringCount Total number of non-deleted strings from the language pack available locally @param translationURL Link to language translation interface; empty for custom local language packs

func (*LanguagePackInfo) MessageType

func (languagePackInfo *LanguagePackInfo) MessageType() string

MessageType return the string telegram-type of LanguagePackInfo

type LanguagePackString

type LanguagePackString struct {
	Key   string                  `json:"key"`   // String key
	Value LanguagePackStringValue `json:"value"` // String value
	// contains filtered or unexported fields
}

LanguagePackString Represents one language pack string

func NewLanguagePackString

func NewLanguagePackString(key string, value LanguagePackStringValue) *LanguagePackString

NewLanguagePackString creates a new LanguagePackString

@param key String key @param value String value

func (*LanguagePackString) MessageType

func (languagePackString *LanguagePackString) MessageType() string

MessageType return the string telegram-type of LanguagePackString

func (*LanguagePackString) UnmarshalJSON

func (languagePackString *LanguagePackString) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type LanguagePackStringValue

type LanguagePackStringValue interface {
	GetLanguagePackStringValueEnum() LanguagePackStringValueEnum
}

LanguagePackStringValue Represents the value of a string in a language pack

type LanguagePackStringValueDeleted

type LanguagePackStringValueDeleted struct {
	// contains filtered or unexported fields
}

LanguagePackStringValueDeleted A deleted language pack string, the value should be taken from the built-in english language pack

func NewLanguagePackStringValueDeleted

func NewLanguagePackStringValueDeleted() *LanguagePackStringValueDeleted

NewLanguagePackStringValueDeleted creates a new LanguagePackStringValueDeleted

func (*LanguagePackStringValueDeleted) GetLanguagePackStringValueEnum

func (languagePackStringValueDeleted *LanguagePackStringValueDeleted) GetLanguagePackStringValueEnum() LanguagePackStringValueEnum

GetLanguagePackStringValueEnum return the enum type of this object

func (*LanguagePackStringValueDeleted) MessageType

func (languagePackStringValueDeleted *LanguagePackStringValueDeleted) MessageType() string

MessageType return the string telegram-type of LanguagePackStringValueDeleted

type LanguagePackStringValueEnum

type LanguagePackStringValueEnum string

LanguagePackStringValueEnum Alias for abstract LanguagePackStringValue 'Sub-Classes', used as constant-enum here

const (
	LanguagePackStringValueOrdinaryType   LanguagePackStringValueEnum = "languagePackStringValueOrdinary"
	LanguagePackStringValuePluralizedType LanguagePackStringValueEnum = "languagePackStringValuePluralized"
	LanguagePackStringValueDeletedType    LanguagePackStringValueEnum = "languagePackStringValueDeleted"
)

LanguagePackStringValue enums

type LanguagePackStringValueOrdinary

type LanguagePackStringValueOrdinary struct {
	Value string `json:"value"` // String value
	// contains filtered or unexported fields
}

LanguagePackStringValueOrdinary An ordinary language pack string

func NewLanguagePackStringValueOrdinary

func NewLanguagePackStringValueOrdinary(value string) *LanguagePackStringValueOrdinary

NewLanguagePackStringValueOrdinary creates a new LanguagePackStringValueOrdinary

@param value String value

func (*LanguagePackStringValueOrdinary) GetLanguagePackStringValueEnum

func (languagePackStringValueOrdinary *LanguagePackStringValueOrdinary) GetLanguagePackStringValueEnum() LanguagePackStringValueEnum

GetLanguagePackStringValueEnum return the enum type of this object

func (*LanguagePackStringValueOrdinary) MessageType

func (languagePackStringValueOrdinary *LanguagePackStringValueOrdinary) MessageType() string

MessageType return the string telegram-type of LanguagePackStringValueOrdinary

type LanguagePackStringValuePluralized

type LanguagePackStringValuePluralized struct {
	ZeroValue  string `json:"zero_value"`  // Value for zero objects
	OneValue   string `json:"one_value"`   // Value for one object
	TwoValue   string `json:"two_value"`   // Value for two objects
	FewValue   string `json:"few_value"`   // Value for few objects
	ManyValue  string `json:"many_value"`  // Value for many objects
	OtherValue string `json:"other_value"` // Default value
	// contains filtered or unexported fields
}

LanguagePackStringValuePluralized A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info

func NewLanguagePackStringValuePluralized

func NewLanguagePackStringValuePluralized(zeroValue string, oneValue string, twoValue string, fewValue string, manyValue string, otherValue string) *LanguagePackStringValuePluralized

NewLanguagePackStringValuePluralized creates a new LanguagePackStringValuePluralized

@param zeroValue Value for zero objects @param oneValue Value for one object @param twoValue Value for two objects @param fewValue Value for few objects @param manyValue Value for many objects @param otherValue Default value

func (*LanguagePackStringValuePluralized) GetLanguagePackStringValueEnum

func (languagePackStringValuePluralized *LanguagePackStringValuePluralized) GetLanguagePackStringValueEnum() LanguagePackStringValueEnum

GetLanguagePackStringValueEnum return the enum type of this object

func (*LanguagePackStringValuePluralized) MessageType

func (languagePackStringValuePluralized *LanguagePackStringValuePluralized) MessageType() string

MessageType return the string telegram-type of LanguagePackStringValuePluralized

type LanguagePackStrings

type LanguagePackStrings struct {
	Strings []LanguagePackString `json:"strings"` // A list of language pack strings
	// contains filtered or unexported fields
}

LanguagePackStrings Contains a list of language pack strings

func NewLanguagePackStrings

func NewLanguagePackStrings(strings []LanguagePackString) *LanguagePackStrings

NewLanguagePackStrings creates a new LanguagePackStrings

@param strings A list of language pack strings

func (*LanguagePackStrings) MessageType

func (languagePackStrings *LanguagePackStrings) MessageType() string

MessageType return the string telegram-type of LanguagePackStrings

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 contact 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 contact 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
	DownloadOffset         int32  `json:"download_offset"`          // Download will be started from this offset. downloaded_prefix_size is calculated from this offset
	DownloadedPrefixSize   int32  `json:"downloaded_prefix_size"`   // If is_downloading_completed is false, then only some prefix of the file starting from download_offset 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, downloadOffset int32, 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 downloadOffset Download will be started from this offset. downloaded_prefix_size is calculated from this offset @param downloadedPrefixSize If is_downloading_completed is false, then only some prefix of the file starting from download_offset 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

func (localFile *LocalFile) MessageType() string

MessageType return the string telegram-type of LocalFile

type LocalizationTargetInfo

type LocalizationTargetInfo struct {
	LanguagePacks []LanguagePackInfo `json:"language_packs"` // List of available language packs for this application
	// contains filtered or unexported fields
}

LocalizationTargetInfo Contains information about the current localization target

func NewLocalizationTargetInfo

func NewLocalizationTargetInfo(languagePacks []LanguagePackInfo) *LocalizationTargetInfo

NewLocalizationTargetInfo creates a new LocalizationTargetInfo

@param languagePacks List of available language packs for this application

func (*LocalizationTargetInfo) MessageType

func (localizationTargetInfo *LocalizationTargetInfo) MessageType() string

MessageType return the string telegram-type of LocalizationTargetInfo

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

func NewLocation(latitude float64, longitude float64) *Location

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

func (location *Location) MessageType() string

MessageType return the string telegram-type of Location

type LogStream

type LogStream interface {
	GetLogStreamEnum() LogStreamEnum
}

LogStream Describes a stream to which TDLib internal log is written

type LogStreamDefault

type LogStreamDefault struct {
	// contains filtered or unexported fields
}

LogStreamDefault The log is written to stderr or an OS specific log

func NewLogStreamDefault

func NewLogStreamDefault() *LogStreamDefault

NewLogStreamDefault creates a new LogStreamDefault

func (*LogStreamDefault) GetLogStreamEnum

func (logStreamDefault *LogStreamDefault) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamDefault) MessageType

func (logStreamDefault *LogStreamDefault) MessageType() string

MessageType return the string telegram-type of LogStreamDefault

type LogStreamEmpty

type LogStreamEmpty struct {
	// contains filtered or unexported fields
}

LogStreamEmpty The log is written nowhere

func NewLogStreamEmpty

func NewLogStreamEmpty() *LogStreamEmpty

NewLogStreamEmpty creates a new LogStreamEmpty

func (*LogStreamEmpty) GetLogStreamEnum

func (logStreamEmpty *LogStreamEmpty) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamEmpty) MessageType

func (logStreamEmpty *LogStreamEmpty) MessageType() string

MessageType return the string telegram-type of LogStreamEmpty

type LogStreamEnum

type LogStreamEnum string

LogStreamEnum Alias for abstract LogStream 'Sub-Classes', used as constant-enum here

const (
	LogStreamDefaultType LogStreamEnum = "logStreamDefault"
	LogStreamFileType    LogStreamEnum = "logStreamFile"
	LogStreamEmptyType   LogStreamEnum = "logStreamEmpty"
)

LogStream enums

type LogStreamFile

type LogStreamFile struct {
	Path        string `json:"path"`          // Path to the file to where the internal TDLib log will be written
	MaxFileSize int64  `json:"max_file_size"` // Maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated
	// contains filtered or unexported fields
}

LogStreamFile The log is written to a file

func NewLogStreamFile

func NewLogStreamFile(path string, maxFileSize int64) *LogStreamFile

NewLogStreamFile creates a new LogStreamFile

@param path Path to the file to where the internal TDLib log will be written @param maxFileSize Maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated

func (*LogStreamFile) GetLogStreamEnum

func (logStreamFile *LogStreamFile) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamFile) MessageType

func (logStreamFile *LogStreamFile) MessageType() string

MessageType return the string telegram-type of LogStreamFile

type LogTags

type LogTags struct {
	Tags []string `json:"tags"` // List of log tags
	// contains filtered or unexported fields
}

LogTags Contains a list of available TDLib internal log tags

func NewLogTags

func NewLogTags(tags []string) *LogTags

NewLogTags creates a new LogTags

@param tags List of log tags

func (*LogTags) MessageType

func (logTags *LogTags) MessageType() string

MessageType return the string telegram-type of LogTags

type LogVerbosityLevel

type LogVerbosityLevel struct {
	VerbosityLevel int32 `json:"verbosity_level"` // Log verbosity level
	// contains filtered or unexported fields
}

LogVerbosityLevel Contains a TDLib internal log verbosity level

func NewLogVerbosityLevel

func NewLogVerbosityLevel(verbosityLevel int32) *LogVerbosityLevel

NewLogVerbosityLevel creates a new LogVerbosityLevel

@param verbosityLevel Log verbosity level

func (*LogVerbosityLevel) MessageType

func (logVerbosityLevel *LogVerbosityLevel) MessageType() string

MessageType return the string telegram-type of LogVerbosityLevel

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"`                           // Message identifier, unique for the chat to which the message belongs
	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. For live location and poll messages this fields shows, whether editMessageLiveLocation or stopPoll can be used with this message by the client
	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 Message identifier, unique for the chat to which the message belongs @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. For live location and poll messages this fields shows, whether editMessageLiveLocation or stopPoll can be used with this message by the client @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

func (message *Message) MessageType() string

MessageType return the string telegram-type of Message

func (*Message) UnmarshalJSON

func (message *Message) UnmarshalJSON(b []byte) error

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 struct {
	// contains filtered or unexported fields
}

MessageChatJoinByLink A new member joined the chat by invite link

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"
	MessagePollType                 MessageContentEnum = "messagePoll"
	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"
	MessagePassportDataSentType     MessageContentEnum = "messagePassportDataSent"
	MessagePassportDataReceivedType MessageContentEnum = "messagePassportDataReceived"
	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 struct {
	Origin        MessageForwardOrigin `json:"origin"`          // Origin of a forwarded message
	Date          int32                `json:"date"`            // Point in time (Unix timestamp) when the message was originally sent
	FromChatID    int64                `json:"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 last time; 0 if unknown
	FromMessageID int64                `json:"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 last time; 0 if unknown
	// contains filtered or unexported fields
}

MessageForwardInfo Contains information about a forwarded message

func NewMessageForwardInfo

func NewMessageForwardInfo(origin MessageForwardOrigin, date int32, fromChatID int64, fromMessageID int64) *MessageForwardInfo

NewMessageForwardInfo creates a new MessageForwardInfo

@param origin Origin of a forwarded message @param date Point in time (Unix timestamp) when the message was originally sent @param fromChatID For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded last time; 0 if unknown @param fromMessageID 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 last time; 0 if unknown

func (*MessageForwardInfo) MessageType

func (messageForwardInfo *MessageForwardInfo) MessageType() string

MessageType return the string telegram-type of MessageForwardInfo

func (*MessageForwardInfo) UnmarshalJSON

func (messageForwardInfo *MessageForwardInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type MessageForwardOrigin

type MessageForwardOrigin interface {
	GetMessageForwardOriginEnum() MessageForwardOriginEnum
}

MessageForwardOrigin Contains information about the origin of a forwarded message

type MessageForwardOriginChannel

type MessageForwardOriginChannel struct {
	ChatID          int64  `json:"chat_id"`          // Identifier of the chat from which the message was originally forwarded
	MessageID       int64  `json:"message_id"`       // Message identifier of the original message; 0 if unknown
	AuthorSignature string `json:"author_signature"` // Original post author signature
	// contains filtered or unexported fields
}

MessageForwardOriginChannel The message was originally a post in a channel

func NewMessageForwardOriginChannel

func NewMessageForwardOriginChannel(chatID int64, messageID int64, authorSignature string) *MessageForwardOriginChannel

NewMessageForwardOriginChannel creates a new MessageForwardOriginChannel

@param chatID Identifier of the chat from which the message was originally forwarded @param messageID Message identifier of the original message; 0 if unknown @param authorSignature Original post author signature

func (*MessageForwardOriginChannel) GetMessageForwardOriginEnum

func (messageForwardOriginChannel *MessageForwardOriginChannel) GetMessageForwardOriginEnum() MessageForwardOriginEnum

GetMessageForwardOriginEnum return the enum type of this object

func (*MessageForwardOriginChannel) MessageType

func (messageForwardOriginChannel *MessageForwardOriginChannel) MessageType() string

MessageType return the string telegram-type of MessageForwardOriginChannel

type MessageForwardOriginEnum

type MessageForwardOriginEnum string

MessageForwardOriginEnum Alias for abstract MessageForwardOrigin 'Sub-Classes', used as constant-enum here

const (
	MessageForwardOriginUserType       MessageForwardOriginEnum = "messageForwardOriginUser"
	MessageForwardOriginHiddenUserType MessageForwardOriginEnum = "messageForwardOriginHiddenUser"
	MessageForwardOriginChannelType    MessageForwardOriginEnum = "messageForwardOriginChannel"
)

MessageForwardOrigin enums

type MessageForwardOriginHiddenUser

type MessageForwardOriginHiddenUser struct {
	SenderName string `json:"sender_name"` // Name of the sender
	// contains filtered or unexported fields
}

MessageForwardOriginHiddenUser The message was originally written by a user, which is hidden by his privacy settings

func NewMessageForwardOriginHiddenUser

func NewMessageForwardOriginHiddenUser(senderName string) *MessageForwardOriginHiddenUser

NewMessageForwardOriginHiddenUser creates a new MessageForwardOriginHiddenUser

@param senderName Name of the sender

func (*MessageForwardOriginHiddenUser) GetMessageForwardOriginEnum

func (messageForwardOriginHiddenUser *MessageForwardOriginHiddenUser) GetMessageForwardOriginEnum() MessageForwardOriginEnum

GetMessageForwardOriginEnum return the enum type of this object

func (*MessageForwardOriginHiddenUser) MessageType

func (messageForwardOriginHiddenUser *MessageForwardOriginHiddenUser) MessageType() string

MessageType return the string telegram-type of MessageForwardOriginHiddenUser

type MessageForwardOriginUser

type MessageForwardOriginUser struct {
	SenderUserID int32 `json:"sender_user_id"` // Identifier of the user that originally sent the message
	// contains filtered or unexported fields
}

MessageForwardOriginUser The message was originally written by a known user

func NewMessageForwardOriginUser

func NewMessageForwardOriginUser(senderUserID int32) *MessageForwardOriginUser

NewMessageForwardOriginUser creates a new MessageForwardOriginUser

@param senderUserID Identifier of the user that originally sent the message

func (*MessageForwardOriginUser) GetMessageForwardOriginEnum

func (messageForwardOriginUser *MessageForwardOriginUser) GetMessageForwardOriginEnum() MessageForwardOriginEnum

GetMessageForwardOriginEnum return the enum type of this object

func (*MessageForwardOriginUser) MessageType

func (messageForwardOriginUser *MessageForwardOriginUser) MessageType() string

MessageType return the string telegram-type of MessageForwardOriginUser

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 MessagePassportDataReceived

type MessagePassportDataReceived struct {
	Elements    []EncryptedPassportElement `json:"elements"`    // List of received Telegram Passport elements
	Credentials *EncryptedCredentials      `json:"credentials"` // Encrypted data credentials
	// contains filtered or unexported fields
}

MessagePassportDataReceived Telegram Passport data has been received; for bots only

func NewMessagePassportDataReceived

func NewMessagePassportDataReceived(elements []EncryptedPassportElement, credentials *EncryptedCredentials) *MessagePassportDataReceived

NewMessagePassportDataReceived creates a new MessagePassportDataReceived

@param elements List of received Telegram Passport elements @param credentials Encrypted data credentials

func (*MessagePassportDataReceived) GetMessageContentEnum

func (messagePassportDataReceived *MessagePassportDataReceived) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessagePassportDataReceived) MessageType

func (messagePassportDataReceived *MessagePassportDataReceived) MessageType() string

MessageType return the string telegram-type of MessagePassportDataReceived

type MessagePassportDataSent

type MessagePassportDataSent struct {
	Types []PassportElementType `json:"types"` // List of Telegram Passport element types sent
	// contains filtered or unexported fields
}

MessagePassportDataSent Telegram Passport data has been sent

func NewMessagePassportDataSent

func NewMessagePassportDataSent(typeParams []PassportElementType) *MessagePassportDataSent

NewMessagePassportDataSent creates a new MessagePassportDataSent

@param typeParams List of Telegram Passport element types sent

func (*MessagePassportDataSent) GetMessageContentEnum

func (messagePassportDataSent *MessagePassportDataSent) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessagePassportDataSent) MessageType

func (messagePassportDataSent *MessagePassportDataSent) MessageType() string

MessageType return the string telegram-type of MessagePassportDataSent

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 or 0
	// 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 or 0

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 MessagePoll

type MessagePoll struct {
	Poll *Poll `json:"poll"` // Poll
	// contains filtered or unexported fields
}

MessagePoll A message with a poll

func NewMessagePoll

func NewMessagePoll(poll *Poll) *MessagePoll

NewMessagePoll creates a new MessagePoll

@param poll Poll

func (*MessagePoll) GetMessageContentEnum

func (messagePoll *MessagePoll) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessagePoll) MessageType

func (messagePoll *MessagePoll) MessageType() string

MessageType return the string telegram-type of MessagePoll

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

func NewMessages(totalCount int32, messages []Message) *Messages

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

func (messages *Messages) MessageType() string

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 Notification

type Notification struct {
	ID   int32            `json:"id"`   // Unique persistent identifier of this notification
	Date int32            `json:"date"` // Notification date
	Type NotificationType `json:"type"` // Notification type
	// contains filtered or unexported fields
}

Notification Contains information about a notification

func NewNotification

func NewNotification(iD int32, date int32, typeParam NotificationType) *Notification

NewNotification creates a new Notification

@param iD Unique persistent identifier of this notification @param date Notification date @param typeParam Notification type

func (*Notification) MessageType

func (notification *Notification) MessageType() string

MessageType return the string telegram-type of Notification

func (*Notification) UnmarshalJSON

func (notification *Notification) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type NotificationGroup

type NotificationGroup struct {
	ID            int32                 `json:"id"`            // Unique persistent auto-incremented from 1 identifier of the notification group
	Type          NotificationGroupType `json:"type"`          // Type of the group
	ChatID        int64                 `json:"chat_id"`       // Identifier of a chat to which all notifications in the group belong
	TotalCount    int32                 `json:"total_count"`   // Total number of active notifications in the group
	Notifications []Notification        `json:"notifications"` // The list of active notifications
	// contains filtered or unexported fields
}

NotificationGroup Describes a group of notifications

func NewNotificationGroup

func NewNotificationGroup(iD int32, typeParam NotificationGroupType, chatID int64, totalCount int32, notifications []Notification) *NotificationGroup

NewNotificationGroup creates a new NotificationGroup

@param iD Unique persistent auto-incremented from 1 identifier of the notification group @param typeParam Type of the group @param chatID Identifier of a chat to which all notifications in the group belong @param totalCount Total number of active notifications in the group @param notifications The list of active notifications

func (*NotificationGroup) MessageType

func (notificationGroup *NotificationGroup) MessageType() string

MessageType return the string telegram-type of NotificationGroup

func (*NotificationGroup) UnmarshalJSON

func (notificationGroup *NotificationGroup) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type NotificationGroupType

type NotificationGroupType interface {
	GetNotificationGroupTypeEnum() NotificationGroupTypeEnum
}

NotificationGroupType Describes type of notifications in the group

type NotificationGroupTypeCalls

type NotificationGroupTypeCalls struct {
	// contains filtered or unexported fields
}

NotificationGroupTypeCalls A group containing notifications of type notificationTypeNewCall

func NewNotificationGroupTypeCalls

func NewNotificationGroupTypeCalls() *NotificationGroupTypeCalls

NewNotificationGroupTypeCalls creates a new NotificationGroupTypeCalls

func (*NotificationGroupTypeCalls) GetNotificationGroupTypeEnum

func (notificationGroupTypeCalls *NotificationGroupTypeCalls) GetNotificationGroupTypeEnum() NotificationGroupTypeEnum

GetNotificationGroupTypeEnum return the enum type of this object

func (*NotificationGroupTypeCalls) MessageType

func (notificationGroupTypeCalls *NotificationGroupTypeCalls) MessageType() string

MessageType return the string telegram-type of NotificationGroupTypeCalls

type NotificationGroupTypeEnum

type NotificationGroupTypeEnum string

NotificationGroupTypeEnum Alias for abstract NotificationGroupType 'Sub-Classes', used as constant-enum here

const (
	NotificationGroupTypeMessagesType   NotificationGroupTypeEnum = "notificationGroupTypeMessages"
	NotificationGroupTypeMentionsType   NotificationGroupTypeEnum = "notificationGroupTypeMentions"
	NotificationGroupTypeSecretChatType NotificationGroupTypeEnum = "notificationGroupTypeSecretChat"
	NotificationGroupTypeCallsType      NotificationGroupTypeEnum = "notificationGroupTypeCalls"
)

NotificationGroupType enums

type NotificationGroupTypeMentions

type NotificationGroupTypeMentions struct {
	// contains filtered or unexported fields
}

NotificationGroupTypeMentions A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message

func NewNotificationGroupTypeMentions

func NewNotificationGroupTypeMentions() *NotificationGroupTypeMentions

NewNotificationGroupTypeMentions creates a new NotificationGroupTypeMentions

func (*NotificationGroupTypeMentions) GetNotificationGroupTypeEnum

func (notificationGroupTypeMentions *NotificationGroupTypeMentions) GetNotificationGroupTypeEnum() NotificationGroupTypeEnum

GetNotificationGroupTypeEnum return the enum type of this object

func (*NotificationGroupTypeMentions) MessageType

func (notificationGroupTypeMentions *NotificationGroupTypeMentions) MessageType() string

MessageType return the string telegram-type of NotificationGroupTypeMentions

type NotificationGroupTypeMessages

type NotificationGroupTypeMessages struct {
	// contains filtered or unexported fields
}

NotificationGroupTypeMessages A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages

func NewNotificationGroupTypeMessages

func NewNotificationGroupTypeMessages() *NotificationGroupTypeMessages

NewNotificationGroupTypeMessages creates a new NotificationGroupTypeMessages

func (*NotificationGroupTypeMessages) GetNotificationGroupTypeEnum

func (notificationGroupTypeMessages *NotificationGroupTypeMessages) GetNotificationGroupTypeEnum() NotificationGroupTypeEnum

GetNotificationGroupTypeEnum return the enum type of this object

func (*NotificationGroupTypeMessages) MessageType

func (notificationGroupTypeMessages *NotificationGroupTypeMessages) MessageType() string

MessageType return the string telegram-type of NotificationGroupTypeMessages

type NotificationGroupTypeSecretChat

type NotificationGroupTypeSecretChat struct {
	// contains filtered or unexported fields
}

NotificationGroupTypeSecretChat A group containing a notification of type notificationTypeNewSecretChat

func NewNotificationGroupTypeSecretChat

func NewNotificationGroupTypeSecretChat() *NotificationGroupTypeSecretChat

NewNotificationGroupTypeSecretChat creates a new NotificationGroupTypeSecretChat

func (*NotificationGroupTypeSecretChat) GetNotificationGroupTypeEnum

func (notificationGroupTypeSecretChat *NotificationGroupTypeSecretChat) GetNotificationGroupTypeEnum() NotificationGroupTypeEnum

GetNotificationGroupTypeEnum return the enum type of this object

func (*NotificationGroupTypeSecretChat) MessageType

func (notificationGroupTypeSecretChat *NotificationGroupTypeSecretChat) MessageType() string

MessageType return the string telegram-type of NotificationGroupTypeSecretChat

type NotificationSettingsScope

type NotificationSettingsScope interface {
	GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
}

NotificationSettingsScope Describes the types of chats to which notification settings are applied

type NotificationSettingsScopeChannelChats

type NotificationSettingsScopeChannelChats struct {
	// contains filtered or unexported fields
}

NotificationSettingsScopeChannelChats Notification settings applied to all channels when the corresponding chat setting has a default value

func NewNotificationSettingsScopeChannelChats

func NewNotificationSettingsScopeChannelChats() *NotificationSettingsScopeChannelChats

NewNotificationSettingsScopeChannelChats creates a new NotificationSettingsScopeChannelChats

func (*NotificationSettingsScopeChannelChats) GetNotificationSettingsScopeEnum

func (notificationSettingsScopeChannelChats *NotificationSettingsScopeChannelChats) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum

GetNotificationSettingsScopeEnum return the enum type of this object

func (*NotificationSettingsScopeChannelChats) MessageType

func (notificationSettingsScopeChannelChats *NotificationSettingsScopeChannelChats) MessageType() string

MessageType return the string telegram-type of NotificationSettingsScopeChannelChats

type NotificationSettingsScopeEnum

type NotificationSettingsScopeEnum string

NotificationSettingsScopeEnum Alias for abstract NotificationSettingsScope 'Sub-Classes', used as constant-enum here

const (
	NotificationSettingsScopePrivateChatsType NotificationSettingsScopeEnum = "notificationSettingsScopePrivateChats"
	NotificationSettingsScopeGroupChatsType   NotificationSettingsScopeEnum = "notificationSettingsScopeGroupChats"
	NotificationSettingsScopeChannelChatsType NotificationSettingsScopeEnum = "notificationSettingsScopeChannelChats"
)

NotificationSettingsScope enums

type NotificationSettingsScopeGroupChats

type NotificationSettingsScopeGroupChats struct {
	// contains filtered or unexported fields
}

NotificationSettingsScopeGroupChats Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value

func NewNotificationSettingsScopeGroupChats

func NewNotificationSettingsScopeGroupChats() *NotificationSettingsScopeGroupChats

NewNotificationSettingsScopeGroupChats creates a new NotificationSettingsScopeGroupChats

func (*NotificationSettingsScopeGroupChats) GetNotificationSettingsScopeEnum

func (notificationSettingsScopeGroupChats *NotificationSettingsScopeGroupChats) GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum

GetNotificationSettingsScopeEnum return the enum type of this object

func (*NotificationSettingsScopeGroupChats) MessageType

func (notificationSettingsScopeGroupChats *NotificationSettingsScopeGroupChats) MessageType() string

MessageType return the string telegram-type of NotificationSettingsScopeGroupChats

type NotificationSettingsScopePrivateChats

type NotificationSettingsScopePrivateChats struct {
	// contains filtered or unexported fields
}

NotificationSettingsScopePrivateChats Notification settings applied to all private and secret chats when the corresponding chat setting has a default value

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 NotificationType

type NotificationType interface {
	GetNotificationTypeEnum() NotificationTypeEnum
}

NotificationType Contains detailed information about a notification

type NotificationTypeEnum

type NotificationTypeEnum string

NotificationTypeEnum Alias for abstract NotificationType 'Sub-Classes', used as constant-enum here

const (
	NotificationTypeNewMessageType     NotificationTypeEnum = "notificationTypeNewMessage"
	NotificationTypeNewSecretChatType  NotificationTypeEnum = "notificationTypeNewSecretChat"
	NotificationTypeNewCallType        NotificationTypeEnum = "notificationTypeNewCall"
	NotificationTypeNewPushMessageType NotificationTypeEnum = "notificationTypeNewPushMessage"
)

NotificationType enums

type NotificationTypeNewCall

type NotificationTypeNewCall struct {
	CallID int32 `json:"call_id"` // Call identifier
	// contains filtered or unexported fields
}

NotificationTypeNewCall New call was received

func NewNotificationTypeNewCall

func NewNotificationTypeNewCall(callID int32) *NotificationTypeNewCall

NewNotificationTypeNewCall creates a new NotificationTypeNewCall

@param callID Call identifier

func (*NotificationTypeNewCall) GetNotificationTypeEnum

func (notificationTypeNewCall *NotificationTypeNewCall) GetNotificationTypeEnum() NotificationTypeEnum

GetNotificationTypeEnum return the enum type of this object

func (*NotificationTypeNewCall) MessageType

func (notificationTypeNewCall *NotificationTypeNewCall) MessageType() string

MessageType return the string telegram-type of NotificationTypeNewCall

type NotificationTypeNewMessage

type NotificationTypeNewMessage struct {
	Message *Message `json:"message"` // The message
	// contains filtered or unexported fields
}

NotificationTypeNewMessage New message was received

func NewNotificationTypeNewMessage

func NewNotificationTypeNewMessage(message *Message) *NotificationTypeNewMessage

NewNotificationTypeNewMessage creates a new NotificationTypeNewMessage

@param message The message

func (*NotificationTypeNewMessage) GetNotificationTypeEnum

func (notificationTypeNewMessage *NotificationTypeNewMessage) GetNotificationTypeEnum() NotificationTypeEnum

GetNotificationTypeEnum return the enum type of this object

func (*NotificationTypeNewMessage) MessageType

func (notificationTypeNewMessage *NotificationTypeNewMessage) MessageType() string

MessageType return the string telegram-type of NotificationTypeNewMessage

type NotificationTypeNewPushMessage

type NotificationTypeNewPushMessage struct {
	MessageID    int64              `json:"message_id"`     // The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages and as reply_to_message_id
	SenderUserID int32              `json:"sender_user_id"` // Sender of the message. Corresponding user may be inaccessible
	Content      PushMessageContent `json:"content"`        // Push message content
	// contains filtered or unexported fields
}

NotificationTypeNewPushMessage New message was received through a push notification

func NewNotificationTypeNewPushMessage

func NewNotificationTypeNewPushMessage(messageID int64, senderUserID int32, content PushMessageContent) *NotificationTypeNewPushMessage

NewNotificationTypeNewPushMessage creates a new NotificationTypeNewPushMessage

@param messageID The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages and as reply_to_message_id @param senderUserID Sender of the message. Corresponding user may be inaccessible @param content Push message content

func (*NotificationTypeNewPushMessage) GetNotificationTypeEnum

func (notificationTypeNewPushMessage *NotificationTypeNewPushMessage) GetNotificationTypeEnum() NotificationTypeEnum

GetNotificationTypeEnum return the enum type of this object

func (*NotificationTypeNewPushMessage) MessageType

func (notificationTypeNewPushMessage *NotificationTypeNewPushMessage) MessageType() string

MessageType return the string telegram-type of NotificationTypeNewPushMessage

func (*NotificationTypeNewPushMessage) UnmarshalJSON

func (notificationTypeNewPushMessage *NotificationTypeNewPushMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type NotificationTypeNewSecretChat

type NotificationTypeNewSecretChat struct {
	// contains filtered or unexported fields
}

NotificationTypeNewSecretChat New secret chat was created

func NewNotificationTypeNewSecretChat

func NewNotificationTypeNewSecretChat() *NotificationTypeNewSecretChat

NewNotificationTypeNewSecretChat creates a new NotificationTypeNewSecretChat

func (*NotificationTypeNewSecretChat) GetNotificationTypeEnum

func (notificationTypeNewSecretChat *NotificationTypeNewSecretChat) GetNotificationTypeEnum() NotificationTypeEnum

GetNotificationTypeEnum return the enum type of this object

func (*NotificationTypeNewSecretChat) MessageType

func (notificationTypeNewSecretChat *NotificationTypeNewSecretChat) MessageType() string

MessageType return the string telegram-type of NotificationTypeNewSecretChat

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 NewOk

func NewOk() *Ok

NewOk creates a new Ok

func (*Ok) MessageType

func (ok *Ok) MessageType() string

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 Represents a 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 Represents 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 Represents 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 Represents 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 *Address `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 *Address) *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

func (orderInfo *OrderInfo) MessageType() string

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      *PageBlockCaption `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 *PageBlockCaption, 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

type PageBlockAudio

type PageBlockAudio struct {
	Audio   *Audio            `json:"audio"`   // Audio file; may be null
	Caption *PageBlockCaption `json:"caption"` // Audio file caption
	// contains filtered or unexported fields
}

PageBlockAudio An audio file

func NewPageBlockAudio

func NewPageBlockAudio(audio *Audio, caption *PageBlockCaption) *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

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
	Credit RichText `json:"credit"` // Quote credit
	// contains filtered or unexported fields
}

PageBlockBlockQuote A block quote

func NewPageBlockBlockQuote

func NewPageBlockBlockQuote(text RichText, credit RichText) *PageBlockBlockQuote

NewPageBlockBlockQuote creates a new PageBlockBlockQuote

@param text Quote text @param credit Quote credit

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 PageBlockCaption

type PageBlockCaption struct {
	Text   RichText `json:"text"`   // Content of the caption
	Credit RichText `json:"credit"` // Block credit (like HTML tag <cite>)
	// contains filtered or unexported fields
}

PageBlockCaption Contains a caption of an instant view web page block, consisting of a text and a trailing credit

func NewPageBlockCaption

func NewPageBlockCaption(text RichText, credit RichText) *PageBlockCaption

NewPageBlockCaption creates a new PageBlockCaption

@param text Content of the caption @param credit Block credit (like HTML tag <cite>)

func (*PageBlockCaption) MessageType

func (pageBlockCaption *PageBlockCaption) MessageType() string

MessageType return the string telegram-type of PageBlockCaption

func (*PageBlockCaption) UnmarshalJSON

func (pageBlockCaption *PageBlockCaption) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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(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    *PageBlockCaption `json:"caption"`     // Block caption
	// contains filtered or unexported fields
}

PageBlockCollage A collage

func NewPageBlockCollage

func NewPageBlockCollage(pageBlocks []PageBlock, caption *PageBlockCaption) *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

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 PageBlockDetails

type PageBlockDetails struct {
	Header     RichText    `json:"header"`      // Always visible heading for the block
	PageBlocks []PageBlock `json:"page_blocks"` // Block contents
	IsOpen     bool        `json:"is_open"`     // True, if the block is open by default
	// contains filtered or unexported fields
}

PageBlockDetails A collapsible block

func NewPageBlockDetails

func NewPageBlockDetails(header RichText, pageBlocks []PageBlock, isOpen bool) *PageBlockDetails

NewPageBlockDetails creates a new PageBlockDetails

@param header Always visible heading for the block @param pageBlocks Block contents @param isOpen True, if the block is open by default

func (*PageBlockDetails) GetPageBlockEnum

func (pageBlockDetails *PageBlockDetails) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockDetails) MessageType

func (pageBlockDetails *PageBlockDetails) MessageType() string

MessageType return the string telegram-type of PageBlockDetails

func (*PageBlockDetails) UnmarshalJSON

func (pageBlockDetails *PageBlockDetails) 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, 0 if unknown
	Height         int32             `json:"height"`          // Block height, 0 if unknown
	Caption        *PageBlockCaption `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 *PageBlockCaption, 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, 0 if unknown @param height Block height, 0 if unknown @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

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     *PageBlockCaption `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 *PageBlockCaption) *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

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"
	PageBlockKickerType          PageBlockEnum = "pageBlockKicker"
	PageBlockParagraphType       PageBlockEnum = "pageBlockParagraph"
	PageBlockPreformattedType    PageBlockEnum = "pageBlockPreformatted"
	PageBlockFooterType          PageBlockEnum = "pageBlockFooter"
	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"
	PageBlockTableType           PageBlockEnum = "pageBlockTable"
	PageBlockDetailsType         PageBlockEnum = "pageBlockDetails"
	PageBlockRelatedArticlesType PageBlockEnum = "pageBlockRelatedArticles"
	PageBlockMapType             PageBlockEnum = "pageBlockMap"
)

PageBlock enums

type PageBlockFooter

type PageBlockFooter struct {
	Footer RichText `json:"footer"` // Footer
	// 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 PageBlockHorizontalAlignment

type PageBlockHorizontalAlignment interface {
	GetPageBlockHorizontalAlignmentEnum() PageBlockHorizontalAlignmentEnum
}

PageBlockHorizontalAlignment Describes a horizontal alignment of a table cell content

type PageBlockHorizontalAlignmentCenter

type PageBlockHorizontalAlignmentCenter struct {
	// contains filtered or unexported fields
}

PageBlockHorizontalAlignmentCenter The content should be center-aligned

func NewPageBlockHorizontalAlignmentCenter

func NewPageBlockHorizontalAlignmentCenter() *PageBlockHorizontalAlignmentCenter

NewPageBlockHorizontalAlignmentCenter creates a new PageBlockHorizontalAlignmentCenter

func (*PageBlockHorizontalAlignmentCenter) GetPageBlockHorizontalAlignmentEnum

func (pageBlockHorizontalAlignmentCenter *PageBlockHorizontalAlignmentCenter) GetPageBlockHorizontalAlignmentEnum() PageBlockHorizontalAlignmentEnum

GetPageBlockHorizontalAlignmentEnum return the enum type of this object

func (*PageBlockHorizontalAlignmentCenter) MessageType

func (pageBlockHorizontalAlignmentCenter *PageBlockHorizontalAlignmentCenter) MessageType() string

MessageType return the string telegram-type of PageBlockHorizontalAlignmentCenter

type PageBlockHorizontalAlignmentEnum

type PageBlockHorizontalAlignmentEnum string

PageBlockHorizontalAlignmentEnum Alias for abstract PageBlockHorizontalAlignment 'Sub-Classes', used as constant-enum here

const (
	PageBlockHorizontalAlignmentLeftType   PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentLeft"
	PageBlockHorizontalAlignmentCenterType PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentCenter"
	PageBlockHorizontalAlignmentRightType  PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentRight"
)

PageBlockHorizontalAlignment enums

type PageBlockHorizontalAlignmentLeft

type PageBlockHorizontalAlignmentLeft struct {
	// contains filtered or unexported fields
}

PageBlockHorizontalAlignmentLeft The content should be left-aligned

func NewPageBlockHorizontalAlignmentLeft

func NewPageBlockHorizontalAlignmentLeft() *PageBlockHorizontalAlignmentLeft

NewPageBlockHorizontalAlignmentLeft creates a new PageBlockHorizontalAlignmentLeft

func (*PageBlockHorizontalAlignmentLeft) GetPageBlockHorizontalAlignmentEnum

func (pageBlockHorizontalAlignmentLeft *PageBlockHorizontalAlignmentLeft) GetPageBlockHorizontalAlignmentEnum() PageBlockHorizontalAlignmentEnum

GetPageBlockHorizontalAlignmentEnum return the enum type of this object

func (*PageBlockHorizontalAlignmentLeft) MessageType

func (pageBlockHorizontalAlignmentLeft *PageBlockHorizontalAlignmentLeft) MessageType() string

MessageType return the string telegram-type of PageBlockHorizontalAlignmentLeft

type PageBlockHorizontalAlignmentRight

type PageBlockHorizontalAlignmentRight struct {
	// contains filtered or unexported fields
}

PageBlockHorizontalAlignmentRight The content should be right-aligned

func NewPageBlockHorizontalAlignmentRight

func NewPageBlockHorizontalAlignmentRight() *PageBlockHorizontalAlignmentRight

NewPageBlockHorizontalAlignmentRight creates a new PageBlockHorizontalAlignmentRight

func (*PageBlockHorizontalAlignmentRight) GetPageBlockHorizontalAlignmentEnum

func (pageBlockHorizontalAlignmentRight *PageBlockHorizontalAlignmentRight) GetPageBlockHorizontalAlignmentEnum() PageBlockHorizontalAlignmentEnum

GetPageBlockHorizontalAlignmentEnum return the enum type of this object

func (*PageBlockHorizontalAlignmentRight) MessageType

func (pageBlockHorizontalAlignmentRight *PageBlockHorizontalAlignmentRight) MessageType() string

MessageType return the string telegram-type of PageBlockHorizontalAlignmentRight

type PageBlockKicker

type PageBlockKicker struct {
	Kicker RichText `json:"kicker"` // Kicker
	// contains filtered or unexported fields
}

PageBlockKicker A kicker

func NewPageBlockKicker

func NewPageBlockKicker(kicker RichText) *PageBlockKicker

NewPageBlockKicker creates a new PageBlockKicker

@param kicker Kicker

func (*PageBlockKicker) GetPageBlockEnum

func (pageBlockKicker *PageBlockKicker) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockKicker) MessageType

func (pageBlockKicker *PageBlockKicker) MessageType() string

MessageType return the string telegram-type of PageBlockKicker

func (*PageBlockKicker) UnmarshalJSON

func (pageBlockKicker *PageBlockKicker) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type PageBlockList

type PageBlockList struct {
	Items []PageBlockListItem `json:"items"` // The items of the list
	// contains filtered or unexported fields
}

PageBlockList A list of data blocks

func NewPageBlockList

func NewPageBlockList(items []PageBlockListItem) *PageBlockList

NewPageBlockList creates a new PageBlockList

@param items The items of the list

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 PageBlockListItem

type PageBlockListItem struct {
	Label      string      `json:"label"`       // Item label
	PageBlocks []PageBlock `json:"page_blocks"` // Item blocks
	// contains filtered or unexported fields
}

PageBlockListItem Describes an item of a list page block

func NewPageBlockListItem

func NewPageBlockListItem(label string, pageBlocks []PageBlock) *PageBlockListItem

NewPageBlockListItem creates a new PageBlockListItem

@param label Item label @param pageBlocks Item blocks

func (*PageBlockListItem) MessageType

func (pageBlockListItem *PageBlockListItem) MessageType() string

MessageType return the string telegram-type of PageBlockListItem

type PageBlockMap

type PageBlockMap struct {
	Location *Location         `json:"location"` // Location of the map center
	Zoom     int32             `json:"zoom"`     // Map zoom level
	Width    int32             `json:"width"`    // Map width
	Height   int32             `json:"height"`   // Map height
	Caption  *PageBlockCaption `json:"caption"`  // Block caption
	// contains filtered or unexported fields
}

PageBlockMap A map

func NewPageBlockMap

func NewPageBlockMap(location *Location, zoom int32, width int32, height int32, caption *PageBlockCaption) *PageBlockMap

NewPageBlockMap creates a new PageBlockMap

@param location Location of the map center @param zoom Map zoom level @param width Map width @param height Map height @param caption Block caption

func (*PageBlockMap) GetPageBlockEnum

func (pageBlockMap *PageBlockMap) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockMap) MessageType

func (pageBlockMap *PageBlockMap) MessageType() string

MessageType return the string telegram-type of PageBlockMap

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 *PageBlockCaption `json:"caption"` // Photo caption
	URL     string            `json:"url"`     // URL that needs to be opened when the photo is clicked
	// contains filtered or unexported fields
}

PageBlockPhoto A photo

func NewPageBlockPhoto

func NewPageBlockPhoto(photo *Photo, caption *PageBlockCaption, uRL string) *PageBlockPhoto

NewPageBlockPhoto creates a new PageBlockPhoto

@param photo Photo file; may be null @param caption Photo caption @param uRL URL that needs to be opened when the photo is clicked

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

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
	Credit RichText `json:"credit"` // Quote credit
	// contains filtered or unexported fields
}

PageBlockPullQuote A pull quote

func NewPageBlockPullQuote

func NewPageBlockPullQuote(text RichText, credit RichText) *PageBlockPullQuote

NewPageBlockPullQuote creates a new PageBlockPullQuote

@param text Quote text @param credit Quote credit

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 PageBlockRelatedArticle

type PageBlockRelatedArticle struct {
	URL         string `json:"url"`          // Related article URL
	Title       string `json:"title"`        // Article title; may be empty
	Description string `json:"description"`  //
	Photo       *Photo `json:"photo"`        // Article photo; may be null
	Author      string `json:"author"`       // Article author; may be empty
	PublishDate int32  `json:"publish_date"` // Point in time (Unix timestamp) when the article was published; 0 if unknown
	// contains filtered or unexported fields
}

PageBlockRelatedArticle Contains information about a related article

func NewPageBlockRelatedArticle

func NewPageBlockRelatedArticle(uRL string, title string, description string, photo *Photo, author string, publishDate int32) *PageBlockRelatedArticle

NewPageBlockRelatedArticle creates a new PageBlockRelatedArticle

@param uRL Related article URL @param title Article title; may be empty @param description @param photo Article photo; may be null @param author Article author; may be empty @param publishDate Point in time (Unix timestamp) when the article was published; 0 if unknown

func (*PageBlockRelatedArticle) MessageType

func (pageBlockRelatedArticle *PageBlockRelatedArticle) MessageType() string

MessageType return the string telegram-type of PageBlockRelatedArticle

type PageBlockRelatedArticles

type PageBlockRelatedArticles struct {
	Header   RichText                  `json:"header"`   // Block header
	Articles []PageBlockRelatedArticle `json:"articles"` // List of related articles
	// contains filtered or unexported fields
}

PageBlockRelatedArticles Related articles

func NewPageBlockRelatedArticles

func NewPageBlockRelatedArticles(header RichText, articles []PageBlockRelatedArticle) *PageBlockRelatedArticles

NewPageBlockRelatedArticles creates a new PageBlockRelatedArticles

@param header Block header @param articles List of related articles

func (*PageBlockRelatedArticles) GetPageBlockEnum

func (pageBlockRelatedArticles *PageBlockRelatedArticles) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockRelatedArticles) MessageType

func (pageBlockRelatedArticles *PageBlockRelatedArticles) MessageType() string

MessageType return the string telegram-type of PageBlockRelatedArticles

func (*PageBlockRelatedArticles) UnmarshalJSON

func (pageBlockRelatedArticles *PageBlockRelatedArticles) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type PageBlockSlideshow

type PageBlockSlideshow struct {
	PageBlocks []PageBlock       `json:"page_blocks"` // Slideshow item contents
	Caption    *PageBlockCaption `json:"caption"`     // Block caption
	// contains filtered or unexported fields
}

PageBlockSlideshow A slideshow

func NewPageBlockSlideshow

func NewPageBlockSlideshow(pageBlocks []PageBlock, caption *PageBlockCaption) *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

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 PageBlockTable

type PageBlockTable struct {
	Caption    RichText               `json:"caption"`     // Table caption
	Cells      [][]PageBlockTableCell `json:"cells"`       // Table cells
	IsBordered bool                   `json:"is_bordered"` // True, if the table is bordered
	IsStriped  bool                   `json:"is_striped"`  // True, if the table is striped
	// contains filtered or unexported fields
}

PageBlockTable A table

func NewPageBlockTable

func NewPageBlockTable(caption RichText, cells [][]PageBlockTableCell, isBordered bool, isStriped bool) *PageBlockTable

NewPageBlockTable creates a new PageBlockTable

@param caption Table caption @param cells Table cells @param isBordered True, if the table is bordered @param isStriped True, if the table is striped

func (*PageBlockTable) GetPageBlockEnum

func (pageBlockTable *PageBlockTable) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockTable) MessageType

func (pageBlockTable *PageBlockTable) MessageType() string

MessageType return the string telegram-type of PageBlockTable

func (*PageBlockTable) UnmarshalJSON

func (pageBlockTable *PageBlockTable) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type PageBlockTableCell

type PageBlockTableCell struct {
	Text     RichText                     `json:"text"`      // Cell text
	IsHeader bool                         `json:"is_header"` // True, if it is a header cell
	Colspan  int32                        `json:"colspan"`   // The number of columns the cell should span
	Rowspan  int32                        `json:"rowspan"`   // The number of rows the cell should span
	Align    PageBlockHorizontalAlignment `json:"align"`     // Horizontal cell content alignment
	Valign   PageBlockVerticalAlignment   `json:"valign"`    // Vertical cell content alignment
	// contains filtered or unexported fields
}

PageBlockTableCell Represents a cell of a table

func NewPageBlockTableCell

func NewPageBlockTableCell(text RichText, isHeader bool, colspan int32, rowspan int32, align PageBlockHorizontalAlignment, valign PageBlockVerticalAlignment) *PageBlockTableCell

NewPageBlockTableCell creates a new PageBlockTableCell

@param text Cell text @param isHeader True, if it is a header cell @param colspan The number of columns the cell should span @param rowspan The number of rows the cell should span @param align Horizontal cell content alignment @param valign Vertical cell content alignment

func (*PageBlockTableCell) MessageType

func (pageBlockTableCell *PageBlockTableCell) MessageType() string

MessageType return the string telegram-type of PageBlockTableCell

func (*PageBlockTableCell) UnmarshalJSON

func (pageBlockTableCell *PageBlockTableCell) 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 PageBlockVerticalAlignment

type PageBlockVerticalAlignment interface {
	GetPageBlockVerticalAlignmentEnum() PageBlockVerticalAlignmentEnum
}

PageBlockVerticalAlignment Describes a Vertical alignment of a table cell content

type PageBlockVerticalAlignmentBottom

type PageBlockVerticalAlignmentBottom struct {
	// contains filtered or unexported fields
}

PageBlockVerticalAlignmentBottom The content should be bottom-aligned

func NewPageBlockVerticalAlignmentBottom

func NewPageBlockVerticalAlignmentBottom() *PageBlockVerticalAlignmentBottom

NewPageBlockVerticalAlignmentBottom creates a new PageBlockVerticalAlignmentBottom

func (*PageBlockVerticalAlignmentBottom) GetPageBlockVerticalAlignmentEnum

func (pageBlockVerticalAlignmentBottom *PageBlockVerticalAlignmentBottom) GetPageBlockVerticalAlignmentEnum() PageBlockVerticalAlignmentEnum

GetPageBlockVerticalAlignmentEnum return the enum type of this object

func (*PageBlockVerticalAlignmentBottom) MessageType

func (pageBlockVerticalAlignmentBottom *PageBlockVerticalAlignmentBottom) MessageType() string

MessageType return the string telegram-type of PageBlockVerticalAlignmentBottom

type PageBlockVerticalAlignmentEnum

type PageBlockVerticalAlignmentEnum string

PageBlockVerticalAlignmentEnum Alias for abstract PageBlockVerticalAlignment 'Sub-Classes', used as constant-enum here

const (
	PageBlockVerticalAlignmentTopType    PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentTop"
	PageBlockVerticalAlignmentMiddleType PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentMiddle"
	PageBlockVerticalAlignmentBottomType PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentBottom"
)

PageBlockVerticalAlignment enums

type PageBlockVerticalAlignmentMiddle

type PageBlockVerticalAlignmentMiddle struct {
	// contains filtered or unexported fields
}

PageBlockVerticalAlignmentMiddle The content should be middle-aligned

func NewPageBlockVerticalAlignmentMiddle

func NewPageBlockVerticalAlignmentMiddle() *PageBlockVerticalAlignmentMiddle

NewPageBlockVerticalAlignmentMiddle creates a new PageBlockVerticalAlignmentMiddle

func (*PageBlockVerticalAlignmentMiddle) GetPageBlockVerticalAlignmentEnum

func (pageBlockVerticalAlignmentMiddle *PageBlockVerticalAlignmentMiddle) GetPageBlockVerticalAlignmentEnum() PageBlockVerticalAlignmentEnum

GetPageBlockVerticalAlignmentEnum return the enum type of this object

func (*PageBlockVerticalAlignmentMiddle) MessageType

func (pageBlockVerticalAlignmentMiddle *PageBlockVerticalAlignmentMiddle) MessageType() string

MessageType return the string telegram-type of PageBlockVerticalAlignmentMiddle

type PageBlockVerticalAlignmentTop

type PageBlockVerticalAlignmentTop struct {
	// contains filtered or unexported fields
}

PageBlockVerticalAlignmentTop The content should be top-aligned

func NewPageBlockVerticalAlignmentTop

func NewPageBlockVerticalAlignmentTop() *PageBlockVerticalAlignmentTop

NewPageBlockVerticalAlignmentTop creates a new PageBlockVerticalAlignmentTop

func (*PageBlockVerticalAlignmentTop) GetPageBlockVerticalAlignmentEnum

func (pageBlockVerticalAlignmentTop *PageBlockVerticalAlignmentTop) GetPageBlockVerticalAlignmentEnum() PageBlockVerticalAlignmentEnum

GetPageBlockVerticalAlignmentEnum return the enum type of this object

func (*PageBlockVerticalAlignmentTop) MessageType

func (pageBlockVerticalAlignmentTop *PageBlockVerticalAlignmentTop) MessageType() string

MessageType return the string telegram-type of PageBlockVerticalAlignmentTop

type PageBlockVideo

type PageBlockVideo struct {
	Video        *Video            `json:"video"`         // Video file; may be null
	Caption      *PageBlockCaption `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 *PageBlockCaption, 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

type PassportAuthorizationForm

type PassportAuthorizationForm struct {
	ID               int32                     `json:"id"`                 // Unique identifier of the authorization form
	RequiredElements []PassportRequiredElement `json:"required_elements"`  // Information about the Telegram Passport elements that need to be provided to complete the form
	PrivacyPolicyURL string                    `json:"privacy_policy_url"` // URL for the privacy policy of the service; may be empty
	// contains filtered or unexported fields
}

PassportAuthorizationForm Contains information about a Telegram Passport authorization form that was requested

func NewPassportAuthorizationForm

func NewPassportAuthorizationForm(iD int32, requiredElements []PassportRequiredElement, privacyPolicyURL string) *PassportAuthorizationForm

NewPassportAuthorizationForm creates a new PassportAuthorizationForm

@param iD Unique identifier of the authorization form @param requiredElements Information about the Telegram Passport elements that need to be provided to complete the form @param privacyPolicyURL URL for the privacy policy of the service; may be empty

func (*PassportAuthorizationForm) MessageType

func (passportAuthorizationForm *PassportAuthorizationForm) MessageType() string

MessageType return the string telegram-type of PassportAuthorizationForm

type PassportElement

type PassportElement interface {
	GetPassportElementEnum() PassportElementEnum
}

PassportElement Contains information about a Telegram Passport element

type PassportElementAddress

type PassportElementAddress struct {
	Address *Address `json:"address"` // Address
	// contains filtered or unexported fields
}

PassportElementAddress A Telegram Passport element containing the user's address

func NewPassportElementAddress

func NewPassportElementAddress(address *Address) *PassportElementAddress

NewPassportElementAddress creates a new PassportElementAddress

@param address Address

func (*PassportElementAddress) GetPassportElementEnum

func (passportElementAddress *PassportElementAddress) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementAddress) MessageType

func (passportElementAddress *PassportElementAddress) MessageType() string

MessageType return the string telegram-type of PassportElementAddress

type PassportElementBankStatement

type PassportElementBankStatement struct {
	BankStatement *PersonalDocument `json:"bank_statement"` // Bank statement
	// contains filtered or unexported fields
}

PassportElementBankStatement A Telegram Passport element containing the user's bank statement

func NewPassportElementBankStatement

func NewPassportElementBankStatement(bankStatement *PersonalDocument) *PassportElementBankStatement

NewPassportElementBankStatement creates a new PassportElementBankStatement

@param bankStatement Bank statement

func (*PassportElementBankStatement) GetPassportElementEnum

func (passportElementBankStatement *PassportElementBankStatement) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementBankStatement) MessageType

func (passportElementBankStatement *PassportElementBankStatement) MessageType() string

MessageType return the string telegram-type of PassportElementBankStatement

type PassportElementDriverLicense

type PassportElementDriverLicense struct {
	DriverLicense *IDentityDocument `json:"driver_license"` // Driver license
	// contains filtered or unexported fields
}

PassportElementDriverLicense A Telegram Passport element containing the user's driver license

func NewPassportElementDriverLicense

func NewPassportElementDriverLicense(driverLicense *IDentityDocument) *PassportElementDriverLicense

NewPassportElementDriverLicense creates a new PassportElementDriverLicense

@param driverLicense Driver license

func (*PassportElementDriverLicense) GetPassportElementEnum

func (passportElementDriverLicense *PassportElementDriverLicense) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementDriverLicense) MessageType

func (passportElementDriverLicense *PassportElementDriverLicense) MessageType() string

MessageType return the string telegram-type of PassportElementDriverLicense

type PassportElementEmailAddress

type PassportElementEmailAddress struct {
	EmailAddress string `json:"email_address"` // Email address
	// contains filtered or unexported fields
}

PassportElementEmailAddress A Telegram Passport element containing the user's email address

func NewPassportElementEmailAddress

func NewPassportElementEmailAddress(emailAddress string) *PassportElementEmailAddress

NewPassportElementEmailAddress creates a new PassportElementEmailAddress

@param emailAddress Email address

func (*PassportElementEmailAddress) GetPassportElementEnum

func (passportElementEmailAddress *PassportElementEmailAddress) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementEmailAddress) MessageType

func (passportElementEmailAddress *PassportElementEmailAddress) MessageType() string

MessageType return the string telegram-type of PassportElementEmailAddress

type PassportElementEnum

type PassportElementEnum string

PassportElementEnum Alias for abstract PassportElement 'Sub-Classes', used as constant-enum here

const (
	PassportElementPersonalDetailsType       PassportElementEnum = "passportElementPersonalDetails"
	PassportElementPassportType              PassportElementEnum = "passportElementPassport"
	PassportElementDriverLicenseType         PassportElementEnum = "passportElementDriverLicense"
	PassportElementIDentityCardType          PassportElementEnum = "passportElementIDentityCard"
	PassportElementInternalPassportType      PassportElementEnum = "passportElementInternalPassport"
	PassportElementAddressType               PassportElementEnum = "passportElementAddress"
	PassportElementUtilityBillType           PassportElementEnum = "passportElementUtilityBill"
	PassportElementBankStatementType         PassportElementEnum = "passportElementBankStatement"
	PassportElementRentalAgreementType       PassportElementEnum = "passportElementRentalAgreement"
	PassportElementPassportRegistrationType  PassportElementEnum = "passportElementPassportRegistration"
	PassportElementTemporaryRegistrationType PassportElementEnum = "passportElementTemporaryRegistration"
	PassportElementPhoneNumberType           PassportElementEnum = "passportElementPhoneNumber"
	PassportElementEmailAddressType          PassportElementEnum = "passportElementEmailAddress"
)

PassportElement enums

type PassportElementError

type PassportElementError struct {
	Type    PassportElementType        `json:"type"`    // Type of the Telegram Passport element which has the error
	Message string                     `json:"message"` // Error message
	Source  PassportElementErrorSource `json:"source"`  // Error source
	// contains filtered or unexported fields
}

PassportElementError Contains the description of an error in a Telegram Passport element

func NewPassportElementError

func NewPassportElementError(typeParam PassportElementType, message string, source PassportElementErrorSource) *PassportElementError

NewPassportElementError creates a new PassportElementError

@param typeParam Type of the Telegram Passport element which has the error @param message Error message @param source Error source

func (*PassportElementError) MessageType

func (passportElementError *PassportElementError) MessageType() string

MessageType return the string telegram-type of PassportElementError

func (*PassportElementError) UnmarshalJSON

func (passportElementError *PassportElementError) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type PassportElementErrorSource

type PassportElementErrorSource interface {
	GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum
}

PassportElementErrorSource Contains the description of an error in a Telegram Passport element

type PassportElementErrorSourceDataField

type PassportElementErrorSourceDataField struct {
	FieldName string `json:"field_name"` // Field name
	// contains filtered or unexported fields
}

PassportElementErrorSourceDataField One of the data fields contains an error. The error will be considered resolved when the value of the field changes

func NewPassportElementErrorSourceDataField

func NewPassportElementErrorSourceDataField(fieldName string) *PassportElementErrorSourceDataField

NewPassportElementErrorSourceDataField creates a new PassportElementErrorSourceDataField

@param fieldName Field name

func (*PassportElementErrorSourceDataField) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceDataField *PassportElementErrorSourceDataField) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceDataField) MessageType

func (passportElementErrorSourceDataField *PassportElementErrorSourceDataField) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceDataField

type PassportElementErrorSourceEnum

type PassportElementErrorSourceEnum string

PassportElementErrorSourceEnum Alias for abstract PassportElementErrorSource 'Sub-Classes', used as constant-enum here

const (
	PassportElementErrorSourceUnspecifiedType      PassportElementErrorSourceEnum = "passportElementErrorSourceUnspecified"
	PassportElementErrorSourceDataFieldType        PassportElementErrorSourceEnum = "passportElementErrorSourceDataField"
	PassportElementErrorSourceFrontSideType        PassportElementErrorSourceEnum = "passportElementErrorSourceFrontSide"
	PassportElementErrorSourceReverseSideType      PassportElementErrorSourceEnum = "passportElementErrorSourceReverseSide"
	PassportElementErrorSourceSelfieType           PassportElementErrorSourceEnum = "passportElementErrorSourceSelfie"
	PassportElementErrorSourceTranslationFileType  PassportElementErrorSourceEnum = "passportElementErrorSourceTranslationFile"
	PassportElementErrorSourceTranslationFilesType PassportElementErrorSourceEnum = "passportElementErrorSourceTranslationFiles"
	PassportElementErrorSourceFileType             PassportElementErrorSourceEnum = "passportElementErrorSourceFile"
	PassportElementErrorSourceFilesType            PassportElementErrorSourceEnum = "passportElementErrorSourceFiles"
)

PassportElementErrorSource enums

type PassportElementErrorSourceFile

type PassportElementErrorSourceFile struct {
	FileIndex int32 `json:"file_index"` // Index of a file with the error
	// contains filtered or unexported fields
}

PassportElementErrorSourceFile The file contains an error. The error will be considered resolved when the file changes

func NewPassportElementErrorSourceFile

func NewPassportElementErrorSourceFile(fileIndex int32) *PassportElementErrorSourceFile

NewPassportElementErrorSourceFile creates a new PassportElementErrorSourceFile

@param fileIndex Index of a file with the error

func (*PassportElementErrorSourceFile) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceFile *PassportElementErrorSourceFile) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceFile) MessageType

func (passportElementErrorSourceFile *PassportElementErrorSourceFile) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceFile

type PassportElementErrorSourceFiles

type PassportElementErrorSourceFiles struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceFiles The list of attached files contains an error. The error will be considered resolved when the list of files changes

func NewPassportElementErrorSourceFiles

func NewPassportElementErrorSourceFiles() *PassportElementErrorSourceFiles

NewPassportElementErrorSourceFiles creates a new PassportElementErrorSourceFiles

func (*PassportElementErrorSourceFiles) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceFiles *PassportElementErrorSourceFiles) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceFiles) MessageType

func (passportElementErrorSourceFiles *PassportElementErrorSourceFiles) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceFiles

type PassportElementErrorSourceFrontSide

type PassportElementErrorSourceFrontSide struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceFrontSide The front side of the document contains an error. The error will be considered resolved when the file with the front side changes

func NewPassportElementErrorSourceFrontSide

func NewPassportElementErrorSourceFrontSide() *PassportElementErrorSourceFrontSide

NewPassportElementErrorSourceFrontSide creates a new PassportElementErrorSourceFrontSide

func (*PassportElementErrorSourceFrontSide) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceFrontSide *PassportElementErrorSourceFrontSide) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceFrontSide) MessageType

func (passportElementErrorSourceFrontSide *PassportElementErrorSourceFrontSide) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceFrontSide

type PassportElementErrorSourceReverseSide

type PassportElementErrorSourceReverseSide struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceReverseSide The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes

func NewPassportElementErrorSourceReverseSide

func NewPassportElementErrorSourceReverseSide() *PassportElementErrorSourceReverseSide

NewPassportElementErrorSourceReverseSide creates a new PassportElementErrorSourceReverseSide

func (*PassportElementErrorSourceReverseSide) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceReverseSide *PassportElementErrorSourceReverseSide) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceReverseSide) MessageType

func (passportElementErrorSourceReverseSide *PassportElementErrorSourceReverseSide) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceReverseSide

type PassportElementErrorSourceSelfie

type PassportElementErrorSourceSelfie struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceSelfie The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes

func NewPassportElementErrorSourceSelfie

func NewPassportElementErrorSourceSelfie() *PassportElementErrorSourceSelfie

NewPassportElementErrorSourceSelfie creates a new PassportElementErrorSourceSelfie

func (*PassportElementErrorSourceSelfie) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceSelfie *PassportElementErrorSourceSelfie) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceSelfie) MessageType

func (passportElementErrorSourceSelfie *PassportElementErrorSourceSelfie) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceSelfie

type PassportElementErrorSourceTranslationFile

type PassportElementErrorSourceTranslationFile struct {
	FileIndex int32 `json:"file_index"` // Index of a file with the error
	// contains filtered or unexported fields
}

PassportElementErrorSourceTranslationFile One of files with the translation of the document contains an error. The error will be considered resolved when the file changes

func NewPassportElementErrorSourceTranslationFile

func NewPassportElementErrorSourceTranslationFile(fileIndex int32) *PassportElementErrorSourceTranslationFile

NewPassportElementErrorSourceTranslationFile creates a new PassportElementErrorSourceTranslationFile

@param fileIndex Index of a file with the error

func (*PassportElementErrorSourceTranslationFile) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceTranslationFile *PassportElementErrorSourceTranslationFile) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceTranslationFile) MessageType

func (passportElementErrorSourceTranslationFile *PassportElementErrorSourceTranslationFile) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceTranslationFile

type PassportElementErrorSourceTranslationFiles

type PassportElementErrorSourceTranslationFiles struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceTranslationFiles The translation of the document contains an error. The error will be considered resolved when the list of translation files changes

func NewPassportElementErrorSourceTranslationFiles

func NewPassportElementErrorSourceTranslationFiles() *PassportElementErrorSourceTranslationFiles

NewPassportElementErrorSourceTranslationFiles creates a new PassportElementErrorSourceTranslationFiles

func (*PassportElementErrorSourceTranslationFiles) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceTranslationFiles *PassportElementErrorSourceTranslationFiles) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceTranslationFiles) MessageType

func (passportElementErrorSourceTranslationFiles *PassportElementErrorSourceTranslationFiles) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceTranslationFiles

type PassportElementErrorSourceUnspecified

type PassportElementErrorSourceUnspecified struct {
	// contains filtered or unexported fields
}

PassportElementErrorSourceUnspecified The element contains an error in an unspecified place. The error will be considered resolved when new data is added

func NewPassportElementErrorSourceUnspecified

func NewPassportElementErrorSourceUnspecified() *PassportElementErrorSourceUnspecified

NewPassportElementErrorSourceUnspecified creates a new PassportElementErrorSourceUnspecified

func (*PassportElementErrorSourceUnspecified) GetPassportElementErrorSourceEnum

func (passportElementErrorSourceUnspecified *PassportElementErrorSourceUnspecified) GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum

GetPassportElementErrorSourceEnum return the enum type of this object

func (*PassportElementErrorSourceUnspecified) MessageType

func (passportElementErrorSourceUnspecified *PassportElementErrorSourceUnspecified) MessageType() string

MessageType return the string telegram-type of PassportElementErrorSourceUnspecified

type PassportElementIDentityCard

type PassportElementIDentityCard struct {
	IDentityCard *IDentityDocument `json:"identity_card"` // Identity card
	// contains filtered or unexported fields
}

PassportElementIDentityCard A Telegram Passport element containing the user's identity card

func NewPassportElementIDentityCard

func NewPassportElementIDentityCard(iDentityCard *IDentityDocument) *PassportElementIDentityCard

NewPassportElementIDentityCard creates a new PassportElementIDentityCard

@param iDentityCard Identity card

func (*PassportElementIDentityCard) GetPassportElementEnum

func (passportElementIDentityCard *PassportElementIDentityCard) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementIDentityCard) MessageType

func (passportElementIDentityCard *PassportElementIDentityCard) MessageType() string

MessageType return the string telegram-type of PassportElementIDentityCard

type PassportElementInternalPassport

type PassportElementInternalPassport struct {
	InternalPassport *IDentityDocument `json:"internal_passport"` // Internal passport
	// contains filtered or unexported fields
}

PassportElementInternalPassport A Telegram Passport element containing the user's internal passport

func NewPassportElementInternalPassport

func NewPassportElementInternalPassport(internalPassport *IDentityDocument) *PassportElementInternalPassport

NewPassportElementInternalPassport creates a new PassportElementInternalPassport

@param internalPassport Internal passport

func (*PassportElementInternalPassport) GetPassportElementEnum

func (passportElementInternalPassport *PassportElementInternalPassport) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementInternalPassport) MessageType

func (passportElementInternalPassport *PassportElementInternalPassport) MessageType() string

MessageType return the string telegram-type of PassportElementInternalPassport

type PassportElementPassport

type PassportElementPassport struct {
	Passport *IDentityDocument `json:"passport"` // Passport
	// contains filtered or unexported fields
}

PassportElementPassport A Telegram Passport element containing the user's passport

func NewPassportElementPassport

func NewPassportElementPassport(passport *IDentityDocument) *PassportElementPassport

NewPassportElementPassport creates a new PassportElementPassport

@param passport Passport

func (*PassportElementPassport) GetPassportElementEnum

func (passportElementPassport *PassportElementPassport) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementPassport) MessageType

func (passportElementPassport *PassportElementPassport) MessageType() string

MessageType return the string telegram-type of PassportElementPassport

type PassportElementPassportRegistration

type PassportElementPassportRegistration struct {
	PassportRegistration *PersonalDocument `json:"passport_registration"` // Passport registration pages
	// contains filtered or unexported fields
}

PassportElementPassportRegistration A Telegram Passport element containing the user's passport registration pages

func NewPassportElementPassportRegistration

func NewPassportElementPassportRegistration(passportRegistration *PersonalDocument) *PassportElementPassportRegistration

NewPassportElementPassportRegistration creates a new PassportElementPassportRegistration

@param passportRegistration Passport registration pages

func (*PassportElementPassportRegistration) GetPassportElementEnum

func (passportElementPassportRegistration *PassportElementPassportRegistration) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementPassportRegistration) MessageType

func (passportElementPassportRegistration *PassportElementPassportRegistration) MessageType() string

MessageType return the string telegram-type of PassportElementPassportRegistration

type PassportElementPersonalDetails

type PassportElementPersonalDetails struct {
	PersonalDetails *PersonalDetails `json:"personal_details"` // Personal details of the user
	// contains filtered or unexported fields
}

PassportElementPersonalDetails A Telegram Passport element containing the user's personal details

func NewPassportElementPersonalDetails

func NewPassportElementPersonalDetails(personalDetails *PersonalDetails) *PassportElementPersonalDetails

NewPassportElementPersonalDetails creates a new PassportElementPersonalDetails

@param personalDetails Personal details of the user

func (*PassportElementPersonalDetails) GetPassportElementEnum

func (passportElementPersonalDetails *PassportElementPersonalDetails) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementPersonalDetails) MessageType

func (passportElementPersonalDetails *PassportElementPersonalDetails) MessageType() string

MessageType return the string telegram-type of PassportElementPersonalDetails

type PassportElementPhoneNumber

type PassportElementPhoneNumber struct {
	PhoneNumber string `json:"phone_number"` // Phone number
	// contains filtered or unexported fields
}

PassportElementPhoneNumber A Telegram Passport element containing the user's phone number

func NewPassportElementPhoneNumber

func NewPassportElementPhoneNumber(phoneNumber string) *PassportElementPhoneNumber

NewPassportElementPhoneNumber creates a new PassportElementPhoneNumber

@param phoneNumber Phone number

func (*PassportElementPhoneNumber) GetPassportElementEnum

func (passportElementPhoneNumber *PassportElementPhoneNumber) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementPhoneNumber) MessageType

func (passportElementPhoneNumber *PassportElementPhoneNumber) MessageType() string

MessageType return the string telegram-type of PassportElementPhoneNumber

type PassportElementRentalAgreement

type PassportElementRentalAgreement struct {
	RentalAgreement *PersonalDocument `json:"rental_agreement"` // Rental agreement
	// contains filtered or unexported fields
}

PassportElementRentalAgreement A Telegram Passport element containing the user's rental agreement

func NewPassportElementRentalAgreement

func NewPassportElementRentalAgreement(rentalAgreement *PersonalDocument) *PassportElementRentalAgreement

NewPassportElementRentalAgreement creates a new PassportElementRentalAgreement

@param rentalAgreement Rental agreement

func (*PassportElementRentalAgreement) GetPassportElementEnum

func (passportElementRentalAgreement *PassportElementRentalAgreement) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementRentalAgreement) MessageType

func (passportElementRentalAgreement *PassportElementRentalAgreement) MessageType() string

MessageType return the string telegram-type of PassportElementRentalAgreement

type PassportElementTemporaryRegistration

type PassportElementTemporaryRegistration struct {
	TemporaryRegistration *PersonalDocument `json:"temporary_registration"` // Temporary registration
	// contains filtered or unexported fields
}

PassportElementTemporaryRegistration A Telegram Passport element containing the user's temporary registration

func NewPassportElementTemporaryRegistration

func NewPassportElementTemporaryRegistration(temporaryRegistration *PersonalDocument) *PassportElementTemporaryRegistration

NewPassportElementTemporaryRegistration creates a new PassportElementTemporaryRegistration

@param temporaryRegistration Temporary registration

func (*PassportElementTemporaryRegistration) GetPassportElementEnum

func (passportElementTemporaryRegistration *PassportElementTemporaryRegistration) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementTemporaryRegistration) MessageType

func (passportElementTemporaryRegistration *PassportElementTemporaryRegistration) MessageType() string

MessageType return the string telegram-type of PassportElementTemporaryRegistration

type PassportElementType

type PassportElementType interface {
	GetPassportElementTypeEnum() PassportElementTypeEnum
}

PassportElementType Contains the type of a Telegram Passport element

type PassportElementTypeAddress

type PassportElementTypeAddress struct {
	// contains filtered or unexported fields
}

PassportElementTypeAddress A Telegram Passport element containing the user's address

func NewPassportElementTypeAddress

func NewPassportElementTypeAddress() *PassportElementTypeAddress

NewPassportElementTypeAddress creates a new PassportElementTypeAddress

func (*PassportElementTypeAddress) GetPassportElementTypeEnum

func (passportElementTypeAddress *PassportElementTypeAddress) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeAddress) MessageType

func (passportElementTypeAddress *PassportElementTypeAddress) MessageType() string

MessageType return the string telegram-type of PassportElementTypeAddress

type PassportElementTypeBankStatement

type PassportElementTypeBankStatement struct {
	// contains filtered or unexported fields
}

PassportElementTypeBankStatement A Telegram Passport element containing the user's bank statement

func NewPassportElementTypeBankStatement

func NewPassportElementTypeBankStatement() *PassportElementTypeBankStatement

NewPassportElementTypeBankStatement creates a new PassportElementTypeBankStatement

func (*PassportElementTypeBankStatement) GetPassportElementTypeEnum

func (passportElementTypeBankStatement *PassportElementTypeBankStatement) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeBankStatement) MessageType

func (passportElementTypeBankStatement *PassportElementTypeBankStatement) MessageType() string

MessageType return the string telegram-type of PassportElementTypeBankStatement

type PassportElementTypeDriverLicense

type PassportElementTypeDriverLicense struct {
	// contains filtered or unexported fields
}

PassportElementTypeDriverLicense A Telegram Passport element containing the user's driver license

func NewPassportElementTypeDriverLicense

func NewPassportElementTypeDriverLicense() *PassportElementTypeDriverLicense

NewPassportElementTypeDriverLicense creates a new PassportElementTypeDriverLicense

func (*PassportElementTypeDriverLicense) GetPassportElementTypeEnum

func (passportElementTypeDriverLicense *PassportElementTypeDriverLicense) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeDriverLicense) MessageType

func (passportElementTypeDriverLicense *PassportElementTypeDriverLicense) MessageType() string

MessageType return the string telegram-type of PassportElementTypeDriverLicense

type PassportElementTypeEmailAddress

type PassportElementTypeEmailAddress struct {
	// contains filtered or unexported fields
}

PassportElementTypeEmailAddress A Telegram Passport element containing the user's email address

func NewPassportElementTypeEmailAddress

func NewPassportElementTypeEmailAddress() *PassportElementTypeEmailAddress

NewPassportElementTypeEmailAddress creates a new PassportElementTypeEmailAddress

func (*PassportElementTypeEmailAddress) GetPassportElementTypeEnum

func (passportElementTypeEmailAddress *PassportElementTypeEmailAddress) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeEmailAddress) MessageType

func (passportElementTypeEmailAddress *PassportElementTypeEmailAddress) MessageType() string

MessageType return the string telegram-type of PassportElementTypeEmailAddress

type PassportElementTypeEnum

type PassportElementTypeEnum string

PassportElementTypeEnum Alias for abstract PassportElementType 'Sub-Classes', used as constant-enum here

const (
	PassportElementTypePersonalDetailsType       PassportElementTypeEnum = "passportElementTypePersonalDetails"
	PassportElementTypePassportType              PassportElementTypeEnum = "passportElementTypePassport"
	PassportElementTypeDriverLicenseType         PassportElementTypeEnum = "passportElementTypeDriverLicense"
	PassportElementTypeIDentityCardType          PassportElementTypeEnum = "passportElementTypeIDentityCard"
	PassportElementTypeInternalPassportType      PassportElementTypeEnum = "passportElementTypeInternalPassport"
	PassportElementTypeAddressType               PassportElementTypeEnum = "passportElementTypeAddress"
	PassportElementTypeUtilityBillType           PassportElementTypeEnum = "passportElementTypeUtilityBill"
	PassportElementTypeBankStatementType         PassportElementTypeEnum = "passportElementTypeBankStatement"
	PassportElementTypeRentalAgreementType       PassportElementTypeEnum = "passportElementTypeRentalAgreement"
	PassportElementTypePassportRegistrationType  PassportElementTypeEnum = "passportElementTypePassportRegistration"
	PassportElementTypeTemporaryRegistrationType PassportElementTypeEnum = "passportElementTypeTemporaryRegistration"
	PassportElementTypePhoneNumberType           PassportElementTypeEnum = "passportElementTypePhoneNumber"
	PassportElementTypeEmailAddressType          PassportElementTypeEnum = "passportElementTypeEmailAddress"
)

PassportElementType enums

type PassportElementTypeIDentityCard

type PassportElementTypeIDentityCard struct {
	// contains filtered or unexported fields
}

PassportElementTypeIDentityCard A Telegram Passport element containing the user's identity card

func NewPassportElementTypeIDentityCard

func NewPassportElementTypeIDentityCard() *PassportElementTypeIDentityCard

NewPassportElementTypeIDentityCard creates a new PassportElementTypeIDentityCard

func (*PassportElementTypeIDentityCard) GetPassportElementTypeEnum

func (passportElementTypeIDentityCard *PassportElementTypeIDentityCard) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeIDentityCard) MessageType

func (passportElementTypeIDentityCard *PassportElementTypeIDentityCard) MessageType() string

MessageType return the string telegram-type of PassportElementTypeIDentityCard

type PassportElementTypeInternalPassport

type PassportElementTypeInternalPassport struct {
	// contains filtered or unexported fields
}

PassportElementTypeInternalPassport A Telegram Passport element containing the user's internal passport

func NewPassportElementTypeInternalPassport

func NewPassportElementTypeInternalPassport() *PassportElementTypeInternalPassport

NewPassportElementTypeInternalPassport creates a new PassportElementTypeInternalPassport

func (*PassportElementTypeInternalPassport) GetPassportElementTypeEnum

func (passportElementTypeInternalPassport *PassportElementTypeInternalPassport) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeInternalPassport) MessageType

func (passportElementTypeInternalPassport *PassportElementTypeInternalPassport) MessageType() string

MessageType return the string telegram-type of PassportElementTypeInternalPassport

type PassportElementTypePassport

type PassportElementTypePassport struct {
	// contains filtered or unexported fields
}

PassportElementTypePassport A Telegram Passport element containing the user's passport

func NewPassportElementTypePassport

func NewPassportElementTypePassport() *PassportElementTypePassport

NewPassportElementTypePassport creates a new PassportElementTypePassport

func (*PassportElementTypePassport) GetPassportElementTypeEnum

func (passportElementTypePassport *PassportElementTypePassport) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypePassport) MessageType

func (passportElementTypePassport *PassportElementTypePassport) MessageType() string

MessageType return the string telegram-type of PassportElementTypePassport

type PassportElementTypePassportRegistration

type PassportElementTypePassportRegistration struct {
	// contains filtered or unexported fields
}

PassportElementTypePassportRegistration A Telegram Passport element containing the registration page of the user's passport

func NewPassportElementTypePassportRegistration

func NewPassportElementTypePassportRegistration() *PassportElementTypePassportRegistration

NewPassportElementTypePassportRegistration creates a new PassportElementTypePassportRegistration

func (*PassportElementTypePassportRegistration) GetPassportElementTypeEnum

func (passportElementTypePassportRegistration *PassportElementTypePassportRegistration) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypePassportRegistration) MessageType

func (passportElementTypePassportRegistration *PassportElementTypePassportRegistration) MessageType() string

MessageType return the string telegram-type of PassportElementTypePassportRegistration

type PassportElementTypePersonalDetails

type PassportElementTypePersonalDetails struct {
	// contains filtered or unexported fields
}

PassportElementTypePersonalDetails A Telegram Passport element containing the user's personal details

func NewPassportElementTypePersonalDetails

func NewPassportElementTypePersonalDetails() *PassportElementTypePersonalDetails

NewPassportElementTypePersonalDetails creates a new PassportElementTypePersonalDetails

func (*PassportElementTypePersonalDetails) GetPassportElementTypeEnum

func (passportElementTypePersonalDetails *PassportElementTypePersonalDetails) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypePersonalDetails) MessageType

func (passportElementTypePersonalDetails *PassportElementTypePersonalDetails) MessageType() string

MessageType return the string telegram-type of PassportElementTypePersonalDetails

type PassportElementTypePhoneNumber

type PassportElementTypePhoneNumber struct {
	// contains filtered or unexported fields
}

PassportElementTypePhoneNumber A Telegram Passport element containing the user's phone number

func NewPassportElementTypePhoneNumber

func NewPassportElementTypePhoneNumber() *PassportElementTypePhoneNumber

NewPassportElementTypePhoneNumber creates a new PassportElementTypePhoneNumber

func (*PassportElementTypePhoneNumber) GetPassportElementTypeEnum

func (passportElementTypePhoneNumber *PassportElementTypePhoneNumber) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypePhoneNumber) MessageType

func (passportElementTypePhoneNumber *PassportElementTypePhoneNumber) MessageType() string

MessageType return the string telegram-type of PassportElementTypePhoneNumber

type PassportElementTypeRentalAgreement

type PassportElementTypeRentalAgreement struct {
	// contains filtered or unexported fields
}

PassportElementTypeRentalAgreement A Telegram Passport element containing the user's rental agreement

func NewPassportElementTypeRentalAgreement

func NewPassportElementTypeRentalAgreement() *PassportElementTypeRentalAgreement

NewPassportElementTypeRentalAgreement creates a new PassportElementTypeRentalAgreement

func (*PassportElementTypeRentalAgreement) GetPassportElementTypeEnum

func (passportElementTypeRentalAgreement *PassportElementTypeRentalAgreement) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeRentalAgreement) MessageType

func (passportElementTypeRentalAgreement *PassportElementTypeRentalAgreement) MessageType() string

MessageType return the string telegram-type of PassportElementTypeRentalAgreement

type PassportElementTypeTemporaryRegistration

type PassportElementTypeTemporaryRegistration struct {
	// contains filtered or unexported fields
}

PassportElementTypeTemporaryRegistration A Telegram Passport element containing the user's temporary registration

func NewPassportElementTypeTemporaryRegistration

func NewPassportElementTypeTemporaryRegistration() *PassportElementTypeTemporaryRegistration

NewPassportElementTypeTemporaryRegistration creates a new PassportElementTypeTemporaryRegistration

func (*PassportElementTypeTemporaryRegistration) GetPassportElementTypeEnum

func (passportElementTypeTemporaryRegistration *PassportElementTypeTemporaryRegistration) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeTemporaryRegistration) MessageType

func (passportElementTypeTemporaryRegistration *PassportElementTypeTemporaryRegistration) MessageType() string

MessageType return the string telegram-type of PassportElementTypeTemporaryRegistration

type PassportElementTypeUtilityBill

type PassportElementTypeUtilityBill struct {
	// contains filtered or unexported fields
}

PassportElementTypeUtilityBill A Telegram Passport element containing the user's utility bill

func NewPassportElementTypeUtilityBill

func NewPassportElementTypeUtilityBill() *PassportElementTypeUtilityBill

NewPassportElementTypeUtilityBill creates a new PassportElementTypeUtilityBill

func (*PassportElementTypeUtilityBill) GetPassportElementTypeEnum

func (passportElementTypeUtilityBill *PassportElementTypeUtilityBill) GetPassportElementTypeEnum() PassportElementTypeEnum

GetPassportElementTypeEnum return the enum type of this object

func (*PassportElementTypeUtilityBill) MessageType

func (passportElementTypeUtilityBill *PassportElementTypeUtilityBill) MessageType() string

MessageType return the string telegram-type of PassportElementTypeUtilityBill

type PassportElementUtilityBill

type PassportElementUtilityBill struct {
	UtilityBill *PersonalDocument `json:"utility_bill"` // Utility bill
	// contains filtered or unexported fields
}

PassportElementUtilityBill A Telegram Passport element containing the user's utility bill

func NewPassportElementUtilityBill

func NewPassportElementUtilityBill(utilityBill *PersonalDocument) *PassportElementUtilityBill

NewPassportElementUtilityBill creates a new PassportElementUtilityBill

@param utilityBill Utility bill

func (*PassportElementUtilityBill) GetPassportElementEnum

func (passportElementUtilityBill *PassportElementUtilityBill) GetPassportElementEnum() PassportElementEnum

GetPassportElementEnum return the enum type of this object

func (*PassportElementUtilityBill) MessageType

func (passportElementUtilityBill *PassportElementUtilityBill) MessageType() string

MessageType return the string telegram-type of PassportElementUtilityBill

type PassportElements

type PassportElements struct {
	Elements []PassportElement `json:"elements"` // Telegram Passport elements
	// contains filtered or unexported fields
}

PassportElements Contains information about saved Telegram Passport elements

func NewPassportElements

func NewPassportElements(elements []PassportElement) *PassportElements

NewPassportElements creates a new PassportElements

@param elements Telegram Passport elements

func (*PassportElements) MessageType

func (passportElements *PassportElements) MessageType() string

MessageType return the string telegram-type of PassportElements

type PassportElementsWithErrors

type PassportElementsWithErrors struct {
	Elements []PassportElement      `json:"elements"` // Telegram Passport elements
	Errors   []PassportElementError `json:"errors"`   // Errors in the elements that are already available
	// contains filtered or unexported fields
}

PassportElementsWithErrors Contains information about a Telegram Passport elements and corresponding errors

func NewPassportElementsWithErrors

func NewPassportElementsWithErrors(elements []PassportElement, errors []PassportElementError) *PassportElementsWithErrors

NewPassportElementsWithErrors creates a new PassportElementsWithErrors

@param elements Telegram Passport elements @param errors Errors in the elements that are already available

func (*PassportElementsWithErrors) MessageType

func (passportElementsWithErrors *PassportElementsWithErrors) MessageType() string

MessageType return the string telegram-type of PassportElementsWithErrors

type PassportRequiredElement

type PassportRequiredElement struct {
	SuitableElements []PassportSuitableElement `json:"suitable_elements"` // List of Telegram Passport elements any of which is enough to provide
	// contains filtered or unexported fields
}

PassportRequiredElement Contains a description of the required Telegram Passport element that was requested by a service

func NewPassportRequiredElement

func NewPassportRequiredElement(suitableElements []PassportSuitableElement) *PassportRequiredElement

NewPassportRequiredElement creates a new PassportRequiredElement

@param suitableElements List of Telegram Passport elements any of which is enough to provide

func (*PassportRequiredElement) MessageType

func (passportRequiredElement *PassportRequiredElement) MessageType() string

MessageType return the string telegram-type of PassportRequiredElement

type PassportSuitableElement

type PassportSuitableElement struct {
	Type                  PassportElementType `json:"type"`                    // Type of the element
	IsSelfieRequired      bool                `json:"is_selfie_required"`      // True, if a selfie is required with the identity document
	IsTranslationRequired bool                `json:"is_translation_required"` // True, if a certified English translation is required with the document
	IsNativeNameRequired  bool                `json:"is_native_name_required"` // True, if personal details must include the user's name in the language of their country of residence
	// contains filtered or unexported fields
}

PassportSuitableElement Contains information about a Telegram Passport element that was requested by a service

func NewPassportSuitableElement

func NewPassportSuitableElement(typeParam PassportElementType, isSelfieRequired bool, isTranslationRequired bool, isNativeNameRequired bool) *PassportSuitableElement

NewPassportSuitableElement creates a new PassportSuitableElement

@param typeParam Type of the element @param isSelfieRequired True, if a selfie is required with the identity document @param isTranslationRequired True, if a certified English translation is required with the document @param isNativeNameRequired True, if personal details must include the user's name in the language of their country of residence

func (*PassportSuitableElement) MessageType

func (passportSuitableElement *PassportSuitableElement) MessageType() string

MessageType return the string telegram-type of PassportSuitableElement

func (*PassportSuitableElement) UnmarshalJSON

func (passportSuitableElement *PassportSuitableElement) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type PasswordState

type PasswordState struct {
	HasPassword                  bool                                `json:"has_password"`                     // True, if a 2-step verification password is set
	PasswordHint                 string                              `json:"password_hint"`                    // Hint for the password; may be empty
	HasRecoveryEmailAddress      bool                                `json:"has_recovery_email_address"`       // True, if a recovery email is set
	HasPassportData              bool                                `json:"has_passport_data"`                // True, if some Telegram Passport elements were saved
	RecoveryEmailAddressCodeInfo *EmailAddressAuthenticationCodeInfo `json:"recovery_email_address_code_info"` // Information about the recovery email address to which the confirmation email was sent; may be null
	// contains filtered or unexported fields
}

PasswordState Represents the current state of 2-step verification

func NewPasswordState

func NewPasswordState(hasPassword bool, passwordHint string, hasRecoveryEmailAddress bool, hasPassportData bool, recoveryEmailAddressCodeInfo *EmailAddressAuthenticationCodeInfo) *PasswordState

NewPasswordState creates a new PasswordState

@param hasPassword True, if a 2-step verification password is set @param passwordHint Hint for the password; may be empty @param hasRecoveryEmailAddress True, if a recovery email is set @param hasPassportData True, if some Telegram Passport elements were saved @param recoveryEmailAddressCodeInfo Information about the recovery email address to which the confirmation email was sent; may be null

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 PersonalDetails

type PersonalDetails struct {
	FirstName            string `json:"first_name"`             // First name of the user written in English; 1-255 characters
	MiddleName           string `json:"middle_name"`            // Middle name of the user written in English; 0-255 characters
	LastName             string `json:"last_name"`              // Last name of the user written in English; 1-255 characters
	NativeFirstName      string `json:"native_first_name"`      // Native first name of the user; 1-255 characters
	NativeMiddleName     string `json:"native_middle_name"`     // Native middle name of the user; 0-255 characters
	NativeLastName       string `json:"native_last_name"`       // Native last name of the user; 1-255 characters
	Birthdate            *Date  `json:"birthdate"`              // Birthdate of the user
	Gender               string `json:"gender"`                 // Gender of the user, "male" or "female"
	CountryCode          string `json:"country_code"`           // A two-letter ISO 3166-1 alpha-2 country code of the user's country
	ResidenceCountryCode string `json:"residence_country_code"` // A two-letter ISO 3166-1 alpha-2 country code of the user's residence country
	// contains filtered or unexported fields
}

PersonalDetails Contains the user's personal details

func NewPersonalDetails

func NewPersonalDetails(firstName string, middleName string, lastName string, nativeFirstName string, nativeMiddleName string, nativeLastName string, birthdate *Date, gender string, countryCode string, residenceCountryCode string) *PersonalDetails

NewPersonalDetails creates a new PersonalDetails

@param firstName First name of the user written in English; 1-255 characters @param middleName Middle name of the user written in English; 0-255 characters @param lastName Last name of the user written in English; 1-255 characters @param nativeFirstName Native first name of the user; 1-255 characters @param nativeMiddleName Native middle name of the user; 0-255 characters @param nativeLastName Native last name of the user; 1-255 characters @param birthdate Birthdate of the user @param gender Gender of the user, "male" or "female" @param countryCode A two-letter ISO 3166-1 alpha-2 country code of the user's country @param residenceCountryCode A two-letter ISO 3166-1 alpha-2 country code of the user's residence country

func (*PersonalDetails) MessageType

func (personalDetails *PersonalDetails) MessageType() string

MessageType return the string telegram-type of PersonalDetails

type PersonalDocument

type PersonalDocument struct {
	Files       []DatedFile `json:"files"`       // List of files containing the pages of the document
	Translation []DatedFile `json:"translation"` // List of files containing a certified English translation of the document
	// contains filtered or unexported fields
}

PersonalDocument A personal document, containing some information about a user

func NewPersonalDocument

func NewPersonalDocument(files []DatedFile, translation []DatedFile) *PersonalDocument

NewPersonalDocument creates a new PersonalDocument

@param files List of files containing the pages of the document @param translation List of files containing a certified English translation of the document

func (*PersonalDocument) MessageType

func (personalDocument *PersonalDocument) MessageType() string

MessageType return the string telegram-type of PersonalDocument

type Photo

type Photo struct {
	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

func NewPhoto(hasStickers bool, sizes []PhotoSize) *Photo

NewPhoto creates a new Photo

@param hasStickers True, if stickers were added to the photo @param sizes Available variants of the photo, in different sizes

func (*Photo) MessageType

func (photo *Photo) MessageType() string

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

func NewPhotoSize(typeParam string, photo *File, width int32, height int32) *PhotoSize

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

func (photoSize *PhotoSize) MessageType() string

MessageType return the string telegram-type of PhotoSize

type Poll

type Poll struct {
	ID              JSONInt64    `json:"id"`                // Unique poll identifier
	Question        string       `json:"question"`          // Poll question, 1-255 characters
	Options         []PollOption `json:"options"`           // List of poll answer options
	TotalVoterCount int32        `json:"total_voter_count"` // Total number of voters, participating in the poll
	IsClosed        bool         `json:"is_closed"`         // True, if the poll is closed
	// contains filtered or unexported fields
}

Poll Describes a poll

func NewPoll

func NewPoll(iD JSONInt64, question string, options []PollOption, totalVoterCount int32, isClosed bool) *Poll

NewPoll creates a new Poll

@param iD Unique poll identifier @param question Poll question, 1-255 characters @param options List of poll answer options @param totalVoterCount Total number of voters, participating in the poll @param isClosed True, if the poll is closed

func (*Poll) MessageType

func (poll *Poll) MessageType() string

MessageType return the string telegram-type of Poll

type PollOption

type PollOption struct {
	Text           string `json:"text"`            // Option text, 1-100 characters
	VoterCount     int32  `json:"voter_count"`     // Number of voters for this option, available only for closed or voted polls
	VotePercentage int32  `json:"vote_percentage"` // The percentage of votes for this option, 0-100
	IsChosen       bool   `json:"is_chosen"`       // True, if the option was chosen by the user
	IsBeingChosen  bool   `json:"is_being_chosen"` // True, if the option is being chosen by a pending setPollAnswer request
	// contains filtered or unexported fields
}

PollOption Describes one answer option of a poll

func NewPollOption

func NewPollOption(text string, voterCount int32, votePercentage int32, isChosen bool, isBeingChosen bool) *PollOption

NewPollOption creates a new PollOption

@param text Option text, 1-100 characters @param voterCount Number of voters for this option, available only for closed or voted polls @param votePercentage The percentage of votes for this option, 0-100 @param isChosen True, if the option was chosen by the user @param isBeingChosen True, if the option is being chosen by a pending setPollAnswer request

func (*PollOption) MessageType

func (pollOption *PollOption) MessageType() string

MessageType return the string telegram-type of PollOption

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 Proxies

type Proxies struct {
	Proxies []Proxy `json:"proxies"` // List of proxy servers
	// contains filtered or unexported fields
}

Proxies Represents a list of proxy servers

func NewProxies

func NewProxies(proxies []Proxy) *Proxies

NewProxies creates a new Proxies

@param proxies List of proxy servers

func (*Proxies) MessageType

func (proxies *Proxies) MessageType() string

MessageType return the string telegram-type of Proxies

type Proxy

type Proxy struct {
	ID           int32     `json:"id"`             // Unique identifier of the proxy
	Server       string    `json:"server"`         // Proxy server IP address
	Port         int32     `json:"port"`           // Proxy server port
	LastUsedDate int32     `json:"last_used_date"` // Point in time (Unix timestamp) when the proxy was last used; 0 if never
	IsEnabled    bool      `json:"is_enabled"`     // True, if the proxy is enabled now
	Type         ProxyType `json:"type"`           // Type of the proxy
	// contains filtered or unexported fields
}

Proxy Contains information about a proxy server

func NewProxy

func NewProxy(iD int32, server string, port int32, lastUsedDate int32, isEnabled bool, typeParam ProxyType) *Proxy

NewProxy creates a new Proxy

@param iD Unique identifier of the proxy @param server Proxy server IP address @param port Proxy server port @param lastUsedDate Point in time (Unix timestamp) when the proxy was last used; 0 if never @param isEnabled True, if the proxy is enabled now @param typeParam Type of the proxy

func (*Proxy) MessageType

func (proxy *Proxy) MessageType() string

MessageType return the string telegram-type of Proxy

func (*Proxy) UnmarshalJSON

func (proxy *Proxy) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type ProxyType

type ProxyType interface {
	GetProxyTypeEnum() ProxyTypeEnum
}

ProxyType Describes the type of the proxy server

type ProxyTypeEnum

type ProxyTypeEnum string

ProxyTypeEnum Alias for abstract ProxyType 'Sub-Classes', used as constant-enum here

const (
	ProxyTypeSocks5Type  ProxyTypeEnum = "proxyTypeSocks5"
	ProxyTypeHttpType    ProxyTypeEnum = "proxyTypeHttp"
	ProxyTypeMtprotoType ProxyTypeEnum = "proxyTypeMtproto"
)

ProxyType enums

type ProxyTypeHttp

type ProxyTypeHttp struct {
	Username string `json:"username"`  // Username for logging in; may be empty
	Password string `json:"password"`  // Password for logging in; may be empty
	HttpOnly bool   `json:"http_only"` // Pass true, if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method
	// contains filtered or unexported fields
}

ProxyTypeHttp A HTTP transparent proxy server

func NewProxyTypeHttp

func NewProxyTypeHttp(username string, password string, httpOnly bool) *ProxyTypeHttp

NewProxyTypeHttp creates a new ProxyTypeHttp

@param username Username for logging in; may be empty @param password Password for logging in; may be empty @param httpOnly Pass true, if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method

func (*ProxyTypeHttp) GetProxyTypeEnum

func (proxyTypeHttp *ProxyTypeHttp) GetProxyTypeEnum() ProxyTypeEnum

GetProxyTypeEnum return the enum type of this object

func (*ProxyTypeHttp) MessageType

func (proxyTypeHttp *ProxyTypeHttp) MessageType() string

MessageType return the string telegram-type of ProxyTypeHttp

type ProxyTypeMtproto

type ProxyTypeMtproto struct {
	Secret string `json:"secret"` // The proxy's secret in hexadecimal encoding
	// contains filtered or unexported fields
}

ProxyTypeMtproto An MTProto proxy server

func NewProxyTypeMtproto

func NewProxyTypeMtproto(secret string) *ProxyTypeMtproto

NewProxyTypeMtproto creates a new ProxyTypeMtproto

@param secret The proxy's secret in hexadecimal encoding

func (*ProxyTypeMtproto) GetProxyTypeEnum

func (proxyTypeMtproto *ProxyTypeMtproto) GetProxyTypeEnum() ProxyTypeEnum

GetProxyTypeEnum return the enum type of this object

func (*ProxyTypeMtproto) MessageType

func (proxyTypeMtproto *ProxyTypeMtproto) MessageType() string

MessageType return the string telegram-type of ProxyTypeMtproto

type ProxyTypeSocks5

type ProxyTypeSocks5 struct {
	Username string `json:"username"` // Username for logging in; may be empty
	Password string `json:"password"` // Password for logging in; may be empty
	// contains filtered or unexported fields
}

ProxyTypeSocks5 A SOCKS5 proxy server

func NewProxyTypeSocks5

func NewProxyTypeSocks5(username string, password string) *ProxyTypeSocks5

NewProxyTypeSocks5 creates a new ProxyTypeSocks5

@param username Username for logging in; may be empty @param password Password for logging in; may be empty

func (*ProxyTypeSocks5) GetProxyTypeEnum

func (proxyTypeSocks5 *ProxyTypeSocks5) GetProxyTypeEnum() ProxyTypeEnum

GetProxyTypeEnum return the enum type of this object

func (*ProxyTypeSocks5) MessageType

func (proxyTypeSocks5 *ProxyTypeSocks5) MessageType() string

MessageType return the string telegram-type of ProxyTypeSocks5

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(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 PushMessageContent

type PushMessageContent interface {
	GetPushMessageContentEnum() PushMessageContentEnum
}

PushMessageContent Contains content of a push message notification

type PushMessageContentAnimation

type PushMessageContentAnimation struct {
	Animation *Animation `json:"animation"` // Message content; may be null
	Caption   string     `json:"caption"`   // Animation caption
	IsPinned  bool       `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentAnimation An animation message (GIF-style)

func NewPushMessageContentAnimation

func NewPushMessageContentAnimation(animation *Animation, caption string, isPinned bool) *PushMessageContentAnimation

NewPushMessageContentAnimation creates a new PushMessageContentAnimation

@param animation Message content; may be null @param caption Animation caption @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentAnimation) GetPushMessageContentEnum

func (pushMessageContentAnimation *PushMessageContentAnimation) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentAnimation) MessageType

func (pushMessageContentAnimation *PushMessageContentAnimation) MessageType() string

MessageType return the string telegram-type of PushMessageContentAnimation

type PushMessageContentAudio

type PushMessageContentAudio struct {
	Audio    *Audio `json:"audio"`     // Message content; may be null
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentAudio An audio message

func NewPushMessageContentAudio

func NewPushMessageContentAudio(audio *Audio, isPinned bool) *PushMessageContentAudio

NewPushMessageContentAudio creates a new PushMessageContentAudio

@param audio Message content; may be null @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentAudio) GetPushMessageContentEnum

func (pushMessageContentAudio *PushMessageContentAudio) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentAudio) MessageType

func (pushMessageContentAudio *PushMessageContentAudio) MessageType() string

MessageType return the string telegram-type of PushMessageContentAudio

type PushMessageContentBasicGroupChatCreate

type PushMessageContentBasicGroupChatCreate struct {
	// contains filtered or unexported fields
}

PushMessageContentBasicGroupChatCreate A newly created basic group

func NewPushMessageContentBasicGroupChatCreate

func NewPushMessageContentBasicGroupChatCreate() *PushMessageContentBasicGroupChatCreate

NewPushMessageContentBasicGroupChatCreate creates a new PushMessageContentBasicGroupChatCreate

func (*PushMessageContentBasicGroupChatCreate) GetPushMessageContentEnum

func (pushMessageContentBasicGroupChatCreate *PushMessageContentBasicGroupChatCreate) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentBasicGroupChatCreate) MessageType

func (pushMessageContentBasicGroupChatCreate *PushMessageContentBasicGroupChatCreate) MessageType() string

MessageType return the string telegram-type of PushMessageContentBasicGroupChatCreate

type PushMessageContentChatAddMembers

type PushMessageContentChatAddMembers struct {
	MemberName    string `json:"member_name"`     // Name of the added member
	IsCurrentUser bool   `json:"is_current_user"` // True, if the current user was added to the group
	IsReturned    bool   `json:"is_returned"`     // True, if the user has returned to the group himself
	// contains filtered or unexported fields
}

PushMessageContentChatAddMembers New chat members were invited to a group

func NewPushMessageContentChatAddMembers

func NewPushMessageContentChatAddMembers(memberName string, isCurrentUser bool, isReturned bool) *PushMessageContentChatAddMembers

NewPushMessageContentChatAddMembers creates a new PushMessageContentChatAddMembers

@param memberName Name of the added member @param isCurrentUser True, if the current user was added to the group @param isReturned True, if the user has returned to the group himself

func (*PushMessageContentChatAddMembers) GetPushMessageContentEnum

func (pushMessageContentChatAddMembers *PushMessageContentChatAddMembers) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentChatAddMembers) MessageType

func (pushMessageContentChatAddMembers *PushMessageContentChatAddMembers) MessageType() string

MessageType return the string telegram-type of PushMessageContentChatAddMembers

type PushMessageContentChatChangePhoto

type PushMessageContentChatChangePhoto struct {
	// contains filtered or unexported fields
}

PushMessageContentChatChangePhoto A chat photo was edited

func NewPushMessageContentChatChangePhoto

func NewPushMessageContentChatChangePhoto() *PushMessageContentChatChangePhoto

NewPushMessageContentChatChangePhoto creates a new PushMessageContentChatChangePhoto

func (*PushMessageContentChatChangePhoto) GetPushMessageContentEnum

func (pushMessageContentChatChangePhoto *PushMessageContentChatChangePhoto) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentChatChangePhoto) MessageType

func (pushMessageContentChatChangePhoto *PushMessageContentChatChangePhoto) MessageType() string

MessageType return the string telegram-type of PushMessageContentChatChangePhoto

type PushMessageContentChatChangeTitle

type PushMessageContentChatChangeTitle struct {
	Title string `json:"title"` // New chat title
	// contains filtered or unexported fields
}

PushMessageContentChatChangeTitle A chat title was edited

func NewPushMessageContentChatChangeTitle

func NewPushMessageContentChatChangeTitle(title string) *PushMessageContentChatChangeTitle

NewPushMessageContentChatChangeTitle creates a new PushMessageContentChatChangeTitle

@param title New chat title

func (*PushMessageContentChatChangeTitle) GetPushMessageContentEnum

func (pushMessageContentChatChangeTitle *PushMessageContentChatChangeTitle) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentChatChangeTitle) MessageType

func (pushMessageContentChatChangeTitle *PushMessageContentChatChangeTitle) MessageType() string

MessageType return the string telegram-type of PushMessageContentChatChangeTitle

type PushMessageContentChatDeleteMember

type PushMessageContentChatDeleteMember struct {
	MemberName    string `json:"member_name"`     // Name of the deleted member
	IsCurrentUser bool   `json:"is_current_user"` // True, if the current user was deleted from the group
	IsLeft        bool   `json:"is_left"`         // True, if the user has left the group himself
	// contains filtered or unexported fields
}

PushMessageContentChatDeleteMember A chat member was deleted

func NewPushMessageContentChatDeleteMember

func NewPushMessageContentChatDeleteMember(memberName string, isCurrentUser bool, isLeft bool) *PushMessageContentChatDeleteMember

NewPushMessageContentChatDeleteMember creates a new PushMessageContentChatDeleteMember

@param memberName Name of the deleted member @param isCurrentUser True, if the current user was deleted from the group @param isLeft True, if the user has left the group himself

func (*PushMessageContentChatDeleteMember) GetPushMessageContentEnum

func (pushMessageContentChatDeleteMember *PushMessageContentChatDeleteMember) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentChatDeleteMember) MessageType

func (pushMessageContentChatDeleteMember *PushMessageContentChatDeleteMember) MessageType() string

MessageType return the string telegram-type of PushMessageContentChatDeleteMember

type PushMessageContentChatJoinByLink struct {
	// contains filtered or unexported fields
}

PushMessageContentChatJoinByLink A new member joined the chat by invite link

func NewPushMessageContentChatJoinByLink() *PushMessageContentChatJoinByLink

NewPushMessageContentChatJoinByLink creates a new PushMessageContentChatJoinByLink

func (*PushMessageContentChatJoinByLink) GetPushMessageContentEnum

func (pushMessageContentChatJoinByLink *PushMessageContentChatJoinByLink) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentChatJoinByLink) MessageType

func (pushMessageContentChatJoinByLink *PushMessageContentChatJoinByLink) MessageType() string

MessageType return the string telegram-type of PushMessageContentChatJoinByLink

type PushMessageContentContact

type PushMessageContentContact struct {
	Name     string `json:"name"`      // Contact's name
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentContact A message with a user contact

func NewPushMessageContentContact

func NewPushMessageContentContact(name string, isPinned bool) *PushMessageContentContact

NewPushMessageContentContact creates a new PushMessageContentContact

@param name Contact's name @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentContact) GetPushMessageContentEnum

func (pushMessageContentContact *PushMessageContentContact) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentContact) MessageType

func (pushMessageContentContact *PushMessageContentContact) MessageType() string

MessageType return the string telegram-type of PushMessageContentContact

type PushMessageContentContactRegistered

type PushMessageContentContactRegistered struct {
	// contains filtered or unexported fields
}

PushMessageContentContactRegistered A contact has registered with Telegram

func NewPushMessageContentContactRegistered

func NewPushMessageContentContactRegistered() *PushMessageContentContactRegistered

NewPushMessageContentContactRegistered creates a new PushMessageContentContactRegistered

func (*PushMessageContentContactRegistered) GetPushMessageContentEnum

func (pushMessageContentContactRegistered *PushMessageContentContactRegistered) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentContactRegistered) MessageType

func (pushMessageContentContactRegistered *PushMessageContentContactRegistered) MessageType() string

MessageType return the string telegram-type of PushMessageContentContactRegistered

type PushMessageContentDocument

type PushMessageContentDocument struct {
	Document *Document `json:"document"`  // Message content; may be null
	IsPinned bool      `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentDocument A document message (a general file)

func NewPushMessageContentDocument

func NewPushMessageContentDocument(document *Document, isPinned bool) *PushMessageContentDocument

NewPushMessageContentDocument creates a new PushMessageContentDocument

@param document Message content; may be null @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentDocument) GetPushMessageContentEnum

func (pushMessageContentDocument *PushMessageContentDocument) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentDocument) MessageType

func (pushMessageContentDocument *PushMessageContentDocument) MessageType() string

MessageType return the string telegram-type of PushMessageContentDocument

type PushMessageContentEnum

type PushMessageContentEnum string

PushMessageContentEnum Alias for abstract PushMessageContent 'Sub-Classes', used as constant-enum here

const (
	PushMessageContentHiddenType               PushMessageContentEnum = "pushMessageContentHidden"
	PushMessageContentAnimationType            PushMessageContentEnum = "pushMessageContentAnimation"
	PushMessageContentAudioType                PushMessageContentEnum = "pushMessageContentAudio"
	PushMessageContentContactType              PushMessageContentEnum = "pushMessageContentContact"
	PushMessageContentContactRegisteredType    PushMessageContentEnum = "pushMessageContentContactRegistered"
	PushMessageContentDocumentType             PushMessageContentEnum = "pushMessageContentDocument"
	PushMessageContentGameType                 PushMessageContentEnum = "pushMessageContentGame"
	PushMessageContentGameScoreType            PushMessageContentEnum = "pushMessageContentGameScore"
	PushMessageContentInvoiceType              PushMessageContentEnum = "pushMessageContentInvoice"
	PushMessageContentLocationType             PushMessageContentEnum = "pushMessageContentLocation"
	PushMessageContentPhotoType                PushMessageContentEnum = "pushMessageContentPhoto"
	PushMessageContentPollType                 PushMessageContentEnum = "pushMessageContentPoll"
	PushMessageContentScreenshotTakenType      PushMessageContentEnum = "pushMessageContentScreenshotTaken"
	PushMessageContentStickerType              PushMessageContentEnum = "pushMessageContentSticker"
	PushMessageContentTextType                 PushMessageContentEnum = "pushMessageContentText"
	PushMessageContentVideoType                PushMessageContentEnum = "pushMessageContentVideo"
	PushMessageContentVideoNoteType            PushMessageContentEnum = "pushMessageContentVideoNote"
	PushMessageContentVoiceNoteType            PushMessageContentEnum = "pushMessageContentVoiceNote"
	PushMessageContentBasicGroupChatCreateType PushMessageContentEnum = "pushMessageContentBasicGroupChatCreate"
	PushMessageContentChatAddMembersType       PushMessageContentEnum = "pushMessageContentChatAddMembers"
	PushMessageContentChatChangePhotoType      PushMessageContentEnum = "pushMessageContentChatChangePhoto"
	PushMessageContentChatChangeTitleType      PushMessageContentEnum = "pushMessageContentChatChangeTitle"
	PushMessageContentChatDeleteMemberType     PushMessageContentEnum = "pushMessageContentChatDeleteMember"
	PushMessageContentChatJoinByLinkType       PushMessageContentEnum = "pushMessageContentChatJoinByLink"
	PushMessageContentMessageForwardsType      PushMessageContentEnum = "pushMessageContentMessageForwards"
	PushMessageContentMediaAlbumType           PushMessageContentEnum = "pushMessageContentMediaAlbum"
)

PushMessageContent enums

type PushMessageContentGame

type PushMessageContentGame struct {
	Title    string `json:"title"`     // Game title, empty for pinned game message
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentGame A message with a game

func NewPushMessageContentGame

func NewPushMessageContentGame(title string, isPinned bool) *PushMessageContentGame

NewPushMessageContentGame creates a new PushMessageContentGame

@param title Game title, empty for pinned game message @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentGame) GetPushMessageContentEnum

func (pushMessageContentGame *PushMessageContentGame) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentGame) MessageType

func (pushMessageContentGame *PushMessageContentGame) MessageType() string

MessageType return the string telegram-type of PushMessageContentGame

type PushMessageContentGameScore

type PushMessageContentGameScore struct {
	Title    string `json:"title"`     // Game title, empty for pinned message
	Score    int32  `json:"score"`     // New score, 0 for pinned message
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentGameScore A new high score was achieved in a game

func NewPushMessageContentGameScore

func NewPushMessageContentGameScore(title string, score int32, isPinned bool) *PushMessageContentGameScore

NewPushMessageContentGameScore creates a new PushMessageContentGameScore

@param title Game title, empty for pinned message @param score New score, 0 for pinned message @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentGameScore) GetPushMessageContentEnum

func (pushMessageContentGameScore *PushMessageContentGameScore) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentGameScore) MessageType

func (pushMessageContentGameScore *PushMessageContentGameScore) MessageType() string

MessageType return the string telegram-type of PushMessageContentGameScore

type PushMessageContentHidden

type PushMessageContentHidden struct {
	IsPinned bool `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentHidden A general message with hidden content

func NewPushMessageContentHidden

func NewPushMessageContentHidden(isPinned bool) *PushMessageContentHidden

NewPushMessageContentHidden creates a new PushMessageContentHidden

@param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentHidden) GetPushMessageContentEnum

func (pushMessageContentHidden *PushMessageContentHidden) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentHidden) MessageType

func (pushMessageContentHidden *PushMessageContentHidden) MessageType() string

MessageType return the string telegram-type of PushMessageContentHidden

type PushMessageContentInvoice

type PushMessageContentInvoice struct {
	Price    string `json:"price"`     // Product price
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentInvoice A message with an invoice from a bot

func NewPushMessageContentInvoice

func NewPushMessageContentInvoice(price string, isPinned bool) *PushMessageContentInvoice

NewPushMessageContentInvoice creates a new PushMessageContentInvoice

@param price Product price @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentInvoice) GetPushMessageContentEnum

func (pushMessageContentInvoice *PushMessageContentInvoice) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentInvoice) MessageType

func (pushMessageContentInvoice *PushMessageContentInvoice) MessageType() string

MessageType return the string telegram-type of PushMessageContentInvoice

type PushMessageContentLocation

type PushMessageContentLocation struct {
	IsLive   bool `json:"is_live"`   // True, if the location is live
	IsPinned bool `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentLocation A message with a location

func NewPushMessageContentLocation

func NewPushMessageContentLocation(isLive bool, isPinned bool) *PushMessageContentLocation

NewPushMessageContentLocation creates a new PushMessageContentLocation

@param isLive True, if the location is live @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentLocation) GetPushMessageContentEnum

func (pushMessageContentLocation *PushMessageContentLocation) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentLocation) MessageType

func (pushMessageContentLocation *PushMessageContentLocation) MessageType() string

MessageType return the string telegram-type of PushMessageContentLocation

type PushMessageContentMediaAlbum

type PushMessageContentMediaAlbum struct {
	TotalCount int32 `json:"total_count"` // Number of messages in the album
	HasPhotos  bool  `json:"has_photos"`  // True, if the album has at least one photo
	HasVideos  bool  `json:"has_videos"`  // True, if the album has at least one video
	// contains filtered or unexported fields
}

PushMessageContentMediaAlbum A media album

func NewPushMessageContentMediaAlbum

func NewPushMessageContentMediaAlbum(totalCount int32, hasPhotos bool, hasVideos bool) *PushMessageContentMediaAlbum

NewPushMessageContentMediaAlbum creates a new PushMessageContentMediaAlbum

@param totalCount Number of messages in the album @param hasPhotos True, if the album has at least one photo @param hasVideos True, if the album has at least one video

func (*PushMessageContentMediaAlbum) GetPushMessageContentEnum

func (pushMessageContentMediaAlbum *PushMessageContentMediaAlbum) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentMediaAlbum) MessageType

func (pushMessageContentMediaAlbum *PushMessageContentMediaAlbum) MessageType() string

MessageType return the string telegram-type of PushMessageContentMediaAlbum

type PushMessageContentMessageForwards

type PushMessageContentMessageForwards struct {
	TotalCount int32 `json:"total_count"` // Number of forwarded messages
	// contains filtered or unexported fields
}

PushMessageContentMessageForwards A forwarded messages

func NewPushMessageContentMessageForwards

func NewPushMessageContentMessageForwards(totalCount int32) *PushMessageContentMessageForwards

NewPushMessageContentMessageForwards creates a new PushMessageContentMessageForwards

@param totalCount Number of forwarded messages

func (*PushMessageContentMessageForwards) GetPushMessageContentEnum

func (pushMessageContentMessageForwards *PushMessageContentMessageForwards) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentMessageForwards) MessageType

func (pushMessageContentMessageForwards *PushMessageContentMessageForwards) MessageType() string

MessageType return the string telegram-type of PushMessageContentMessageForwards

type PushMessageContentPhoto

type PushMessageContentPhoto struct {
	Photo    *Photo `json:"photo"`     // Message content; may be null
	Caption  string `json:"caption"`   // Photo caption
	IsSecret bool   `json:"is_secret"` // True, if the photo is secret
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentPhoto A photo message

func NewPushMessageContentPhoto

func NewPushMessageContentPhoto(photo *Photo, caption string, isSecret bool, isPinned bool) *PushMessageContentPhoto

NewPushMessageContentPhoto creates a new PushMessageContentPhoto

@param photo Message content; may be null @param caption Photo caption @param isSecret True, if the photo is secret @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentPhoto) GetPushMessageContentEnum

func (pushMessageContentPhoto *PushMessageContentPhoto) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentPhoto) MessageType

func (pushMessageContentPhoto *PushMessageContentPhoto) MessageType() string

MessageType return the string telegram-type of PushMessageContentPhoto

type PushMessageContentPoll

type PushMessageContentPoll struct {
	Question string `json:"question"`  // Poll question
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentPoll A message with a poll

func NewPushMessageContentPoll

func NewPushMessageContentPoll(question string, isPinned bool) *PushMessageContentPoll

NewPushMessageContentPoll creates a new PushMessageContentPoll

@param question Poll question @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentPoll) GetPushMessageContentEnum

func (pushMessageContentPoll *PushMessageContentPoll) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentPoll) MessageType

func (pushMessageContentPoll *PushMessageContentPoll) MessageType() string

MessageType return the string telegram-type of PushMessageContentPoll

type PushMessageContentScreenshotTaken

type PushMessageContentScreenshotTaken struct {
	// contains filtered or unexported fields
}

PushMessageContentScreenshotTaken A screenshot of a message in the chat has been taken

func NewPushMessageContentScreenshotTaken

func NewPushMessageContentScreenshotTaken() *PushMessageContentScreenshotTaken

NewPushMessageContentScreenshotTaken creates a new PushMessageContentScreenshotTaken

func (*PushMessageContentScreenshotTaken) GetPushMessageContentEnum

func (pushMessageContentScreenshotTaken *PushMessageContentScreenshotTaken) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentScreenshotTaken) MessageType

func (pushMessageContentScreenshotTaken *PushMessageContentScreenshotTaken) MessageType() string

MessageType return the string telegram-type of PushMessageContentScreenshotTaken

type PushMessageContentSticker

type PushMessageContentSticker struct {
	Sticker  *Sticker `json:"sticker"`   // Message content; may be null
	Emoji    string   `json:"emoji"`     // Emoji corresponding to the sticker; may be empty
	IsPinned bool     `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentSticker A message with a sticker

func NewPushMessageContentSticker

func NewPushMessageContentSticker(sticker *Sticker, emoji string, isPinned bool) *PushMessageContentSticker

NewPushMessageContentSticker creates a new PushMessageContentSticker

@param sticker Message content; may be null @param emoji Emoji corresponding to the sticker; may be empty @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentSticker) GetPushMessageContentEnum

func (pushMessageContentSticker *PushMessageContentSticker) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentSticker) MessageType

func (pushMessageContentSticker *PushMessageContentSticker) MessageType() string

MessageType return the string telegram-type of PushMessageContentSticker

type PushMessageContentText

type PushMessageContentText struct {
	Text     string `json:"text"`      // Message text
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentText A text message

func NewPushMessageContentText

func NewPushMessageContentText(text string, isPinned bool) *PushMessageContentText

NewPushMessageContentText creates a new PushMessageContentText

@param text Message text @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentText) GetPushMessageContentEnum

func (pushMessageContentText *PushMessageContentText) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentText) MessageType

func (pushMessageContentText *PushMessageContentText) MessageType() string

MessageType return the string telegram-type of PushMessageContentText

type PushMessageContentVideo

type PushMessageContentVideo struct {
	Video    *Video `json:"video"`     // Message content; may be null
	Caption  string `json:"caption"`   // Video caption
	IsSecret bool   `json:"is_secret"` // True, if the video is secret
	IsPinned bool   `json:"is_pinned"` // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentVideo A video message

func NewPushMessageContentVideo

func NewPushMessageContentVideo(video *Video, caption string, isSecret bool, isPinned bool) *PushMessageContentVideo

NewPushMessageContentVideo creates a new PushMessageContentVideo

@param video Message content; may be null @param caption Video caption @param isSecret True, if the video is secret @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentVideo) GetPushMessageContentEnum

func (pushMessageContentVideo *PushMessageContentVideo) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentVideo) MessageType

func (pushMessageContentVideo *PushMessageContentVideo) MessageType() string

MessageType return the string telegram-type of PushMessageContentVideo

type PushMessageContentVideoNote

type PushMessageContentVideoNote struct {
	VideoNote *VideoNote `json:"video_note"` // Message content; may be null
	IsPinned  bool       `json:"is_pinned"`  // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentVideoNote A video note message

func NewPushMessageContentVideoNote

func NewPushMessageContentVideoNote(videoNote *VideoNote, isPinned bool) *PushMessageContentVideoNote

NewPushMessageContentVideoNote creates a new PushMessageContentVideoNote

@param videoNote Message content; may be null @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentVideoNote) GetPushMessageContentEnum

func (pushMessageContentVideoNote *PushMessageContentVideoNote) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentVideoNote) MessageType

func (pushMessageContentVideoNote *PushMessageContentVideoNote) MessageType() string

MessageType return the string telegram-type of PushMessageContentVideoNote

type PushMessageContentVoiceNote

type PushMessageContentVoiceNote struct {
	VoiceNote *VoiceNote `json:"voice_note"` // Message content; may be null
	IsPinned  bool       `json:"is_pinned"`  // True, if the message is a pinned message with the specified content
	// contains filtered or unexported fields
}

PushMessageContentVoiceNote A voice note message

func NewPushMessageContentVoiceNote

func NewPushMessageContentVoiceNote(voiceNote *VoiceNote, isPinned bool) *PushMessageContentVoiceNote

NewPushMessageContentVoiceNote creates a new PushMessageContentVoiceNote

@param voiceNote Message content; may be null @param isPinned True, if the message is a pinned message with the specified content

func (*PushMessageContentVoiceNote) GetPushMessageContentEnum

func (pushMessageContentVoiceNote *PushMessageContentVoiceNote) GetPushMessageContentEnum() PushMessageContentEnum

GetPushMessageContentEnum return the enum type of this object

func (*PushMessageContentVoiceNote) MessageType

func (pushMessageContentVoiceNote *PushMessageContentVoiceNote) MessageType() string

MessageType return the string telegram-type of PushMessageContentVoiceNote

type PushReceiverID

type PushReceiverID struct {
	ID JSONInt64 `json:"id"` // The globally unique identifier of push notification subscription
	// contains filtered or unexported fields
}

PushReceiverID Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification

func NewPushReceiverID

func NewPushReceiverID(iD JSONInt64) *PushReceiverID

NewPushReceiverID creates a new PushReceiverID

@param iD The globally unique identifier of push notification subscription

func (*PushReceiverID) MessageType

func (pushReceiverID *PushReceiverID) MessageType() string

MessageType return the string telegram-type of PushReceiverID

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 RichTextAnchor

type RichTextAnchor struct {
	Text RichText `json:"text"` // Text
	Name string   `json:"name"` // Anchor name
	// contains filtered or unexported fields
}

RichTextAnchor A rich text anchor

func NewRichTextAnchor

func NewRichTextAnchor(text RichText, name string) *RichTextAnchor

NewRichTextAnchor creates a new RichTextAnchor

@param text Text @param name Anchor name

func (*RichTextAnchor) GetRichTextEnum

func (richTextAnchor *RichTextAnchor) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextAnchor) MessageType

func (richTextAnchor *RichTextAnchor) MessageType() string

MessageType return the string telegram-type of RichTextAnchor

func (*RichTextAnchor) UnmarshalJSON

func (richTextAnchor *RichTextAnchor) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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"
	RichTextSubscriptType     RichTextEnum = "richTextSubscript"
	RichTextSuperscriptType   RichTextEnum = "richTextSuperscript"
	RichTextMarkedType        RichTextEnum = "richTextMarked"
	RichTextPhoneNumberType   RichTextEnum = "richTextPhoneNumber"
	RichTextIconType          RichTextEnum = "richTextIcon"
	RichTextAnchorType        RichTextEnum = "richTextAnchor"
	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 RichTextIcon

type RichTextIcon struct {
	Document *Document `json:"document"` // The image represented as a document. The image can be in GIF, JPEG or PNG format
	Width    int32     `json:"width"`    // Width of a bounding box in which the image should be shown, 0 if unknown
	Height   int32     `json:"height"`   // Height of a bounding box in which the image should be shown, 0 if unknown
	// contains filtered or unexported fields
}

RichTextIcon A small image inside the text

func NewRichTextIcon

func NewRichTextIcon(document *Document, width int32, height int32) *RichTextIcon

NewRichTextIcon creates a new RichTextIcon

@param document The image represented as a document. The image can be in GIF, JPEG or PNG format @param width Width of a bounding box in which the image should be shown, 0 if unknown @param height Height of a bounding box in which the image should be shown, 0 if unknown

func (*RichTextIcon) GetRichTextEnum

func (richTextIcon *RichTextIcon) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextIcon) MessageType

func (richTextIcon *RichTextIcon) MessageType() string

MessageType return the string telegram-type of RichTextIcon

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 RichTextMarked

type RichTextMarked struct {
	Text RichText `json:"text"` // Text
	// contains filtered or unexported fields
}

RichTextMarked A marked rich text

func NewRichTextMarked

func NewRichTextMarked(text RichText) *RichTextMarked

NewRichTextMarked creates a new RichTextMarked

@param text Text

func (*RichTextMarked) GetRichTextEnum

func (richTextMarked *RichTextMarked) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextMarked) MessageType

func (richTextMarked *RichTextMarked) MessageType() string

MessageType return the string telegram-type of RichTextMarked

func (*RichTextMarked) UnmarshalJSON

func (richTextMarked *RichTextMarked) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type RichTextPhoneNumber

type RichTextPhoneNumber struct {
	Text        RichText `json:"text"`         // Text
	PhoneNumber string   `json:"phone_number"` // Phone number
	// contains filtered or unexported fields
}

RichTextPhoneNumber A rich text phone number

func NewRichTextPhoneNumber

func NewRichTextPhoneNumber(text RichText, phoneNumber string) *RichTextPhoneNumber

NewRichTextPhoneNumber creates a new RichTextPhoneNumber

@param text Text @param phoneNumber Phone number

func (*RichTextPhoneNumber) GetRichTextEnum

func (richTextPhoneNumber *RichTextPhoneNumber) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextPhoneNumber) MessageType

func (richTextPhoneNumber *RichTextPhoneNumber) MessageType() string

MessageType return the string telegram-type of RichTextPhoneNumber

func (*RichTextPhoneNumber) UnmarshalJSON

func (richTextPhoneNumber *RichTextPhoneNumber) 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 RichTextSubscript

type RichTextSubscript struct {
	Text RichText `json:"text"` // Text
	// contains filtered or unexported fields
}

RichTextSubscript A subscript rich text

func NewRichTextSubscript

func NewRichTextSubscript(text RichText) *RichTextSubscript

NewRichTextSubscript creates a new RichTextSubscript

@param text Text

func (*RichTextSubscript) GetRichTextEnum

func (richTextSubscript *RichTextSubscript) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextSubscript) MessageType

func (richTextSubscript *RichTextSubscript) MessageType() string

MessageType return the string telegram-type of RichTextSubscript

func (*RichTextSubscript) UnmarshalJSON

func (richTextSubscript *RichTextSubscript) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type RichTextSuperscript

type RichTextSuperscript struct {
	Text RichText `json:"text"` // Text
	// contains filtered or unexported fields
}

RichTextSuperscript A superscript rich text

func NewRichTextSuperscript

func NewRichTextSuperscript(text RichText) *RichTextSuperscript

NewRichTextSuperscript creates a new RichTextSuperscript

@param text Text

func (*RichTextSuperscript) GetRichTextEnum

func (richTextSuperscript *RichTextSuperscript) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextSuperscript) MessageType

func (richTextSuperscript *RichTextSuperscript) MessageType() string

MessageType return the string telegram-type of RichTextSuperscript

func (*RichTextSuperscript) UnmarshalJSON

func (richTextSuperscript *RichTextSuperscript) 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 NewRichTexts

func NewRichTexts(texts []RichText) *RichTexts

NewRichTexts creates a new RichTexts

@param texts Texts

func (*RichTexts) GetRichTextEnum

func (richTexts *RichTexts) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTexts) MessageType

func (richTexts *RichTexts) MessageType() string

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 ScopeNotificationSettings

type ScopeNotificationSettings struct {
	MuteFor                           int32  `json:"mute_for"`                             // Time left before notifications will be unmuted, in seconds
	Sound                             string `json:"sound"`                                // The name of an audio file to be used for notification sounds; only applies to iOS applications
	ShowPreview                       bool   `json:"show_preview"`                         // True, if message content should be displayed in notifications
	DisablePinnedMessageNotifications bool   `json:"disable_pinned_message_notifications"` // True, if notifications for incoming pinned messages will be created as for an ordinary unread message
	DisableMentionNotifications       bool   `json:"disable_mention_notifications"`        // True, if notifications for messages with mentions will be created as for an ordinary unread message
	// contains filtered or unexported fields
}

ScopeNotificationSettings Contains information about notification settings for several chats

func NewScopeNotificationSettings

func NewScopeNotificationSettings(muteFor int32, sound string, showPreview bool, disablePinnedMessageNotifications bool, disableMentionNotifications bool) *ScopeNotificationSettings

NewScopeNotificationSettings creates a new ScopeNotificationSettings

@param muteFor Time left before notifications will be unmuted, in seconds @param sound The name of an audio file to be used for notification sounds; only applies to iOS applications @param showPreview True, if message content should be displayed in notifications @param disablePinnedMessageNotifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message @param disableMentionNotifications True, if notifications for messages with mentions will be created as for an ordinary unread message

func (*ScopeNotificationSettings) MessageType

func (scopeNotificationSettings *ScopeNotificationSettings) MessageType() string

MessageType return the string telegram-type of ScopeNotificationSettings

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 Seconds

type Seconds struct {
	Seconds float64 `json:"seconds"` // Number of seconds
	// contains filtered or unexported fields
}

Seconds Contains a value representing a number of seconds

func NewSeconds

func NewSeconds(seconds float64) *Seconds

NewSeconds creates a new Seconds

@param seconds Number of seconds

func (*Seconds) MessageType

func (seconds *Seconds) MessageType() string

MessageType return the string telegram-type of Seconds

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
	IsPasswordPending     bool      `json:"is_password_pending"`     // True, if a password is needed to complete authorization of the 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. Sessions should be shown to the user in the returned order

func NewSession

func NewSession(iD JSONInt64, isCurrent bool, isPasswordPending 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 isPasswordPending True, if a password is needed to complete authorization of the 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

func (session *Session) MessageType() string

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 NewSessions

func NewSessions(sessions []Session) *Sessions

NewSessions creates a new Sessions

@param sessions List of sessions

func (*Sessions) MessageType

func (sessions *Sessions) MessageType() string

MessageType return the string telegram-type of Sessions

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

func (sticker *Sticker) MessageType() string

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 NewStickers

func NewStickers(stickers []Sticker) *Stickers

NewStickers creates a new Stickers

@param stickers List of stickers

func (*Stickers) MessageType

func (stickers *Stickers) MessageType() string

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
	LanguagePackDatabaseSize int64 `json:"language_pack_database_size"` // Size of the language pack database
	LogSize                  int64 `json:"log_size"`                    // Size of the TDLib internal log
	// 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, languagePackDatabaseSize int64, logSize 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 @param languagePackDatabaseSize Size of the language pack database @param logSize Size of the TDLib internal log

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
	CanViewStatistics        bool      `json:"can_view_statistics"`          // True, if the channel statistics is available through getChatStatisticsUrl
	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
	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, canViewStatistics bool, isAllHistoryAvailable bool, stickerSetID JSONInt64, inviteLink string, 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 canViewStatistics True, if the channel statistics is available through getChatStatisticsUrl @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 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

func (tMeURL *TMeURL) MessageType() string

MessageType return the string telegram-type of TMeURL

func (*TMeURL) UnmarshalJSON

func (tMeURL *TMeURL) UnmarshalJSON(b []byte) error

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 NewTMeURLs

func NewTMeURLs(uRLs []TMeURL) *TMeURLs

NewTMeURLs creates a new TMeURLs

@param uRLs List of URLs

func (*TMeURLs) MessageType

func (tMeURLs *TMeURLs) MessageType() string

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 TermsOfService

type TermsOfService struct {
	Text       *FormattedText `json:"text"`         // Text of the terms of service
	MinUserAge int32          `json:"min_user_age"` // Mininum age of a user to be able to accept the terms; 0 if any
	ShowPopup  bool           `json:"show_popup"`   // True, if a blocking popup with terms of service must be shown to the user
	// contains filtered or unexported fields
}

TermsOfService Contains Telegram terms of service

func NewTermsOfService

func NewTermsOfService(text *FormattedText, minUserAge int32, showPopup bool) *TermsOfService

NewTermsOfService creates a new TermsOfService

@param text Text of the terms of service @param minUserAge Mininum age of a user to be able to accept the terms; 0 if any @param showPopup True, if a blocking popup with terms of service must be shown to the user

func (*TermsOfService) MessageType

func (termsOfService *TermsOfService) MessageType() string

MessageType return the string telegram-type of TermsOfService

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 NewTestBytes

func NewTestBytes(value []byte) *TestBytes

NewTestBytes creates a new TestBytes

@param value Bytes

func (*TestBytes) MessageType

func (testBytes *TestBytes) MessageType() string

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 NewTestInt

func NewTestInt(value int32) *TestInt

NewTestInt creates a new TestInt

@param value Number

func (*TestInt) MessageType

func (testInt *TestInt) MessageType() string

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 NewText

func NewText(text string) *Text

NewText creates a new Text

@param text Text

func (*Text) MessageType

func (text *Text) MessageType() string

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"` // HTTP or tg:// 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 HTTP or tg:// 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 UpdateActiveNotifications

type UpdateActiveNotifications struct {
	Groups []NotificationGroup `json:"groups"` // Lists of active notification groups
	// contains filtered or unexported fields
}

UpdateActiveNotifications Contains active notifications that was shown on previous application launches. This update is sent only if a message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update

func NewUpdateActiveNotifications

func NewUpdateActiveNotifications(groups []NotificationGroup) *UpdateActiveNotifications

NewUpdateActiveNotifications creates a new UpdateActiveNotifications

@param groups Lists of active notification groups

func (*UpdateActiveNotifications) GetUpdateEnum

func (updateActiveNotifications *UpdateActiveNotifications) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateActiveNotifications) MessageType

func (updateActiveNotifications *UpdateActiveNotifications) MessageType() string

MessageType return the string telegram-type of UpdateActiveNotifications

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 UpdateChatDefaultDisableNotification

type UpdateChatDefaultDisableNotification struct {
	ChatID                     int64 `json:"chat_id"`                      // Chat identifier
	DefaultDisableNotification bool  `json:"default_disable_notification"` // The new default_disable_notification value
	// contains filtered or unexported fields
}

UpdateChatDefaultDisableNotification The value of the default disable_notification parameter, used when a message is sent to the chat, was changed

func NewUpdateChatDefaultDisableNotification

func NewUpdateChatDefaultDisableNotification(chatID int64, defaultDisableNotification bool) *UpdateChatDefaultDisableNotification

NewUpdateChatDefaultDisableNotification creates a new UpdateChatDefaultDisableNotification

@param chatID Chat identifier @param defaultDisableNotification The new default_disable_notification value

func (*UpdateChatDefaultDisableNotification) GetUpdateEnum

func (updateChatDefaultDisableNotification *UpdateChatDefaultDisableNotification) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatDefaultDisableNotification) MessageType

func (updateChatDefaultDisableNotification *UpdateChatDefaultDisableNotification) MessageType() string

MessageType return the string telegram-type of UpdateChatDefaultDisableNotification

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 chat 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 UpdateChatIsMarkedAsUnread

type UpdateChatIsMarkedAsUnread struct {
	ChatID           int64 `json:"chat_id"`             // Chat identifier
	IsMarkedAsUnread bool  `json:"is_marked_as_unread"` // New value of is_marked_as_unread
	// contains filtered or unexported fields
}

UpdateChatIsMarkedAsUnread A chat was marked as unread or was read

func NewUpdateChatIsMarkedAsUnread

func NewUpdateChatIsMarkedAsUnread(chatID int64, isMarkedAsUnread bool) *UpdateChatIsMarkedAsUnread

NewUpdateChatIsMarkedAsUnread creates a new UpdateChatIsMarkedAsUnread

@param chatID Chat identifier @param isMarkedAsUnread New value of is_marked_as_unread

func (*UpdateChatIsMarkedAsUnread) GetUpdateEnum

func (updateChatIsMarkedAsUnread *UpdateChatIsMarkedAsUnread) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatIsMarkedAsUnread) MessageType

func (updateChatIsMarkedAsUnread *UpdateChatIsMarkedAsUnread) MessageType() string

MessageType return the string telegram-type of UpdateChatIsMarkedAsUnread

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 UpdateChatIsSponsored

type UpdateChatIsSponsored struct {
	ChatID      int64     `json:"chat_id"`      // Chat identifier
	IsSponsored bool      `json:"is_sponsored"` // New value of is_sponsored
	Order       JSONInt64 `json:"order"`        // New value of chat order
	// contains filtered or unexported fields
}

UpdateChatIsSponsored A chat's is_sponsored field has changed

func NewUpdateChatIsSponsored

func NewUpdateChatIsSponsored(chatID int64, isSponsored bool, order JSONInt64) *UpdateChatIsSponsored

NewUpdateChatIsSponsored creates a new UpdateChatIsSponsored

@param chatID Chat identifier @param isSponsored New value of is_sponsored @param order New value of chat order

func (*UpdateChatIsSponsored) GetUpdateEnum

func (updateChatIsSponsored *UpdateChatIsSponsored) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatIsSponsored) MessageType

func (updateChatIsSponsored *UpdateChatIsSponsored) MessageType() string

MessageType return the string telegram-type of UpdateChatIsSponsored

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 UpdateChatNotificationSettings

type UpdateChatNotificationSettings struct {
	ChatID               int64                     `json:"chat_id"`               // Chat identifier
	NotificationSettings *ChatNotificationSettings `json:"notification_settings"` // The new notification settings
	// contains filtered or unexported fields
}

UpdateChatNotificationSettings Notification settings for a chat were changed

func NewUpdateChatNotificationSettings

func NewUpdateChatNotificationSettings(chatID int64, notificationSettings *ChatNotificationSettings) *UpdateChatNotificationSettings

NewUpdateChatNotificationSettings creates a new UpdateChatNotificationSettings

@param chatID Chat identifier @param notificationSettings The new notification settings

func (*UpdateChatNotificationSettings) GetUpdateEnum

func (updateChatNotificationSettings *UpdateChatNotificationSettings) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatNotificationSettings) MessageType

func (updateChatNotificationSettings *UpdateChatNotificationSettings) MessageType() string

MessageType return the string telegram-type of UpdateChatNotificationSettings

type UpdateChatOnlineMemberCount

type UpdateChatOnlineMemberCount struct {
	ChatID            int64 `json:"chat_id"`             // Identifier of the chat
	OnlineMemberCount int32 `json:"online_member_count"` // New number of online members in the chat, or 0 if unknown
	// contains filtered or unexported fields
}

UpdateChatOnlineMemberCount The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed

func NewUpdateChatOnlineMemberCount

func NewUpdateChatOnlineMemberCount(chatID int64, onlineMemberCount int32) *UpdateChatOnlineMemberCount

NewUpdateChatOnlineMemberCount creates a new UpdateChatOnlineMemberCount

@param chatID Identifier of the chat @param onlineMemberCount New number of online members in the chat, or 0 if unknown

func (*UpdateChatOnlineMemberCount) GetUpdateEnum

func (updateChatOnlineMemberCount *UpdateChatOnlineMemberCount) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatOnlineMemberCount) MessageType

func (updateChatOnlineMemberCount *UpdateChatOnlineMemberCount) MessageType() string

MessageType return the string telegram-type of UpdateChatOnlineMemberCount

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 chat 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 UpdateChatPinnedMessage

type UpdateChatPinnedMessage struct {
	ChatID          int64 `json:"chat_id"`           // Chat identifier
	PinnedMessageID int64 `json:"pinned_message_id"` // The new identifier of the pinned message; 0 if there is no pinned message in the chat
	// contains filtered or unexported fields
}

UpdateChatPinnedMessage The chat pinned message was changed

func NewUpdateChatPinnedMessage

func NewUpdateChatPinnedMessage(chatID int64, pinnedMessageID int64) *UpdateChatPinnedMessage

NewUpdateChatPinnedMessage creates a new UpdateChatPinnedMessage

@param chatID Chat identifier @param pinnedMessageID The new identifier of the pinned message; 0 if there is no pinned message in the chat

func (*UpdateChatPinnedMessage) GetUpdateEnum

func (updateChatPinnedMessage *UpdateChatPinnedMessage) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatPinnedMessage) MessageType

func (updateChatPinnedMessage *UpdateChatPinnedMessage) MessageType() string

MessageType return the string telegram-type of UpdateChatPinnedMessage

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 UpdateData

type UpdateData map[string]interface{}

UpdateData alias for use in UpdateMsg

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 inaccessible)
	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 inaccessible) @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"
	UpdateChatIsMarkedAsUnreadType           UpdateEnum = "updateChatIsMarkedAsUnread"
	UpdateChatIsSponsoredType                UpdateEnum = "updateChatIsSponsored"
	UpdateChatDefaultDisableNotificationType UpdateEnum = "updateChatDefaultDisableNotification"
	UpdateChatReadInboxType                  UpdateEnum = "updateChatReadInbox"
	UpdateChatReadOutboxType                 UpdateEnum = "updateChatReadOutbox"
	UpdateChatUnreadMentionCountType         UpdateEnum = "updateChatUnreadMentionCount"
	UpdateChatNotificationSettingsType       UpdateEnum = "updateChatNotificationSettings"
	UpdateScopeNotificationSettingsType      UpdateEnum = "updateScopeNotificationSettings"
	UpdateChatPinnedMessageType              UpdateEnum = "updateChatPinnedMessage"
	UpdateChatReplyMarkupType                UpdateEnum = "updateChatReplyMarkup"
	UpdateChatDraftMessageType               UpdateEnum = "updateChatDraftMessage"
	UpdateChatOnlineMemberCountType          UpdateEnum = "updateChatOnlineMemberCount"
	UpdateNotificationType                   UpdateEnum = "updateNotification"
	UpdateNotificationGroupType              UpdateEnum = "updateNotificationGroup"
	UpdateActiveNotificationsType            UpdateEnum = "updateActiveNotifications"
	UpdateHavePendingNotificationsType       UpdateEnum = "updateHavePendingNotifications"
	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"
	UpdateUnreadChatCountType                UpdateEnum = "updateUnreadChatCount"
	UpdateOptionType                         UpdateEnum = "updateOption"
	UpdateInstalledStickerSetsType           UpdateEnum = "updateInstalledStickerSets"
	UpdateTrendingStickerSetsType            UpdateEnum = "updateTrendingStickerSets"
	UpdateRecentStickersType                 UpdateEnum = "updateRecentStickers"
	UpdateFavoriteStickersType               UpdateEnum = "updateFavoriteStickers"
	UpdateSavedAnimationsType                UpdateEnum = "updateSavedAnimations"
	UpdateLanguagePackStringsType            UpdateEnum = "updateLanguagePackStrings"
	UpdateConnectionStateType                UpdateEnum = "updateConnectionState"
	UpdateTermsOfServiceType                 UpdateEnum = "updateTermsOfService"
	UpdateNewInlineQueryType                 UpdateEnum = "updateNewInlineQuery"
	UpdateNewChosenInlineResultType          UpdateEnum = "updateNewChosenInlineResult"
	UpdateNewCallbackQueryType               UpdateEnum = "updateNewCallbackQuery"
	UpdateNewInlineCallbackQueryType         UpdateEnum = "updateNewInlineCallbackQuery"
	UpdateNewShippingQueryType               UpdateEnum = "updateNewShippingQuery"
	UpdateNewPreCheckoutQueryType            UpdateEnum = "updateNewPreCheckoutQuery"
	UpdateNewCustomEventType                 UpdateEnum = "updateNewCustomEvent"
	UpdateNewCustomQueryType                 UpdateEnum = "updateNewCustomQuery"
	UpdatePollType                           UpdateEnum = "updatePoll"
)

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 an 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 an 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 UpdateHavePendingNotifications

type UpdateHavePendingNotifications struct {
	HaveDelayedNotifications    bool `json:"have_delayed_notifications"`    // True, if there are some delayed notification updates, which will be sent soon
	HaveUnreceivedNotifications bool `json:"have_unreceived_notifications"` // True, if there can be some yet unreceived notifications, which are being fetched from the server
	// contains filtered or unexported fields
}

UpdateHavePendingNotifications Describes, whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications

func NewUpdateHavePendingNotifications

func NewUpdateHavePendingNotifications(haveDelayedNotifications bool, haveUnreceivedNotifications bool) *UpdateHavePendingNotifications

NewUpdateHavePendingNotifications creates a new UpdateHavePendingNotifications

@param haveDelayedNotifications True, if there are some delayed notification updates, which will be sent soon @param haveUnreceivedNotifications True, if there can be some yet unreceived notifications, which are being fetched from the server

func (*UpdateHavePendingNotifications) GetUpdateEnum

func (updateHavePendingNotifications *UpdateHavePendingNotifications) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateHavePendingNotifications) MessageType

func (updateHavePendingNotifications *UpdateHavePendingNotifications) MessageType() string

MessageType return the string telegram-type of UpdateHavePendingNotifications

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 UpdateLanguagePackStrings

type UpdateLanguagePackStrings struct {
	LocalizationTarget string               `json:"localization_target"` // Localization target to which the language pack belongs
	LanguagePackID     string               `json:"language_pack_id"`    // Identifier of the updated language pack
	Strings            []LanguagePackString `json:"strings"`             // List of changed language pack strings
	// contains filtered or unexported fields
}

UpdateLanguagePackStrings Some language pack strings have been updated

func NewUpdateLanguagePackStrings

func NewUpdateLanguagePackStrings(localizationTarget string, languagePackID string, strings []LanguagePackString) *UpdateLanguagePackStrings

NewUpdateLanguagePackStrings creates a new UpdateLanguagePackStrings

@param localizationTarget Localization target to which the language pack belongs @param languagePackID Identifier of the updated language pack @param strings List of changed language pack strings

func (*UpdateLanguagePackStrings) GetUpdateEnum

func (updateLanguagePackStrings *UpdateLanguagePackStrings) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateLanguagePackStrings) MessageType

func (updateLanguagePackStrings *UpdateLanguagePackStrings) MessageType() string

MessageType return the string telegram-type of UpdateLanguagePackStrings

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
	// contains filtered or unexported fields
}

UpdateNewMessage A new message was received; can also be an outgoing message

func NewUpdateNewMessage

func NewUpdateNewMessage(message *Message) *UpdateNewMessage

NewUpdateNewMessage creates a new UpdateNewMessage

@param message The new message

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 *Address  `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 *Address) *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 UpdateNotification

type UpdateNotification struct {
	NotificationGroupID int32         `json:"notification_group_id"` // Unique notification group identifier
	Notification        *Notification `json:"notification"`          // Changed notification
	// contains filtered or unexported fields
}

UpdateNotification A notification was changed

func NewUpdateNotification

func NewUpdateNotification(notificationGroupID int32, notification *Notification) *UpdateNotification

NewUpdateNotification creates a new UpdateNotification

@param notificationGroupID Unique notification group identifier @param notification Changed notification

func (*UpdateNotification) GetUpdateEnum

func (updateNotification *UpdateNotification) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateNotification) MessageType

func (updateNotification *UpdateNotification) MessageType() string

MessageType return the string telegram-type of UpdateNotification

type UpdateNotificationGroup

type UpdateNotificationGroup struct {
	NotificationGroupID        int32                 `json:"notification_group_id"`         // Unique notification group identifier
	Type                       NotificationGroupType `json:"type"`                          // New type of the notification group
	ChatID                     int64                 `json:"chat_id"`                       // Identifier of a chat to which all notifications in the group belong
	NotificationSettingsChatID int64                 `json:"notification_settings_chat_id"` // Chat identifier, which notification settings must be applied to the added notifications
	IsSilent                   bool                  `json:"is_silent"`                     // True, if the notifications should be shown without sound
	TotalCount                 int32                 `json:"total_count"`                   // Total number of unread notifications in the group, can be bigger than number of active notifications
	AddedNotifications         []Notification        `json:"added_notifications"`           // List of added group notifications, sorted by notification ID
	RemovedNotificationIDs     []int32               `json:"removed_notification_ids"`      // Identifiers of removed group notifications, sorted by notification ID
	// contains filtered or unexported fields
}

UpdateNotificationGroup A list of active notifications in a notification group has changed

func NewUpdateNotificationGroup

func NewUpdateNotificationGroup(notificationGroupID int32, typeParam NotificationGroupType, chatID int64, notificationSettingsChatID int64, isSilent bool, totalCount int32, addedNotifications []Notification, removedNotificationIDs []int32) *UpdateNotificationGroup

NewUpdateNotificationGroup creates a new UpdateNotificationGroup

@param notificationGroupID Unique notification group identifier @param typeParam New type of the notification group @param chatID Identifier of a chat to which all notifications in the group belong @param notificationSettingsChatID Chat identifier, which notification settings must be applied to the added notifications @param isSilent True, if the notifications should be shown without sound @param totalCount Total number of unread notifications in the group, can be bigger than number of active notifications @param addedNotifications List of added group notifications, sorted by notification ID @param removedNotificationIDs Identifiers of removed group notifications, sorted by notification ID

func (*UpdateNotificationGroup) GetUpdateEnum

func (updateNotificationGroup *UpdateNotificationGroup) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateNotificationGroup) MessageType

func (updateNotificationGroup *UpdateNotificationGroup) MessageType() string

MessageType return the string telegram-type of UpdateNotificationGroup

func (*UpdateNotificationGroup) UnmarshalJSON

func (updateNotificationGroup *UpdateNotificationGroup) 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 UpdatePoll

type UpdatePoll struct {
	Poll *Poll `json:"poll"` // New data about the poll
	// contains filtered or unexported fields
}

UpdatePoll Information about a poll was updated; for bots only

func NewUpdatePoll

func NewUpdatePoll(poll *Poll) *UpdatePoll

NewUpdatePoll creates a new UpdatePoll

@param poll New data about the poll

func (*UpdatePoll) GetUpdateEnum

func (updatePoll *UpdatePoll) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdatePoll) MessageType

func (updatePoll *UpdatePoll) MessageType() string

MessageType return the string telegram-type of UpdatePoll

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 UpdateScopeNotificationSettings

type UpdateScopeNotificationSettings struct {
	Scope                NotificationSettingsScope  `json:"scope"`                 // Types of chats for which notification settings were updated
	NotificationSettings *ScopeNotificationSettings `json:"notification_settings"` // The new notification settings
	// contains filtered or unexported fields
}

UpdateScopeNotificationSettings Notification settings for some type of chats were updated

func NewUpdateScopeNotificationSettings

func NewUpdateScopeNotificationSettings(scope NotificationSettingsScope, notificationSettings *ScopeNotificationSettings) *UpdateScopeNotificationSettings

NewUpdateScopeNotificationSettings creates a new UpdateScopeNotificationSettings

@param scope Types of chats for which notification settings were updated @param notificationSettings The new notification settings

func (*UpdateScopeNotificationSettings) GetUpdateEnum

func (updateScopeNotificationSettings *UpdateScopeNotificationSettings) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateScopeNotificationSettings) MessageType

func (updateScopeNotificationSettings *UpdateScopeNotificationSettings) MessageType() string

MessageType return the string telegram-type of UpdateScopeNotificationSettings

func (*UpdateScopeNotificationSettings) UnmarshalJSON

func (updateScopeNotificationSettings *UpdateScopeNotificationSettings) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method
	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. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method @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 UpdateTermsOfService

type UpdateTermsOfService struct {
	TermsOfServiceID string          `json:"terms_of_service_id"` // Identifier of the terms of service
	TermsOfService   *TermsOfService `json:"terms_of_service"`    // The new terms of service
	// contains filtered or unexported fields
}

UpdateTermsOfService New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update"

func NewUpdateTermsOfService

func NewUpdateTermsOfService(termsOfServiceID string, termsOfService *TermsOfService) *UpdateTermsOfService

NewUpdateTermsOfService creates a new UpdateTermsOfService

@param termsOfServiceID Identifier of the terms of service @param termsOfService The new terms of service

func (*UpdateTermsOfService) GetUpdateEnum

func (updateTermsOfService *UpdateTermsOfService) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateTermsOfService) MessageType

func (updateTermsOfService *UpdateTermsOfService) MessageType() string

MessageType return the string telegram-type of UpdateTermsOfService

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 UpdateUnreadChatCount

type UpdateUnreadChatCount struct {
	UnreadCount                int32 `json:"unread_count"`                   // Total number of unread chats
	UnreadUnmutedCount         int32 `json:"unread_unmuted_count"`           // Total number of unread unmuted chats
	MarkedAsUnreadCount        int32 `json:"marked_as_unread_count"`         // Total number of chats marked as unread
	MarkedAsUnreadUnmutedCount int32 `json:"marked_as_unread_unmuted_count"` // Total number of unmuted chats marked as unread
	// contains filtered or unexported fields
}

UpdateUnreadChatCount Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if a message database is used

func NewUpdateUnreadChatCount

func NewUpdateUnreadChatCount(unreadCount int32, unreadUnmutedCount int32, markedAsUnreadCount int32, markedAsUnreadUnmutedCount int32) *UpdateUnreadChatCount

NewUpdateUnreadChatCount creates a new UpdateUnreadChatCount

@param unreadCount Total number of unread chats @param unreadUnmutedCount Total number of unread unmuted chats @param markedAsUnreadCount Total number of chats marked as unread @param markedAsUnreadUnmutedCount Total number of unmuted chats marked as unread

func (*UpdateUnreadChatCount) GetUpdateEnum

func (updateUnreadChatCount *UpdateUnreadChatCount) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateUnreadChatCount) MessageType

func (updateUnreadChatCount *UpdateUnreadChatCount) MessageType() string

MessageType return the string telegram-type of UpdateUnreadChatCount

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 Updates

type Updates struct {
	Updates []Update `json:"updates"` // List of updates
	// contains filtered or unexported fields
}

Updates Contains a list of updates

func NewUpdates

func NewUpdates(updates []Update) *Updates

NewUpdates creates a new Updates

@param updates List of updates

func (*Updates) MessageType

func (updates *Updates) MessageType() string

MessageType return the string telegram-type of Updates

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
	IsSupport         bool          `json:"is_support"`         // True, if the user is Telegram support account
	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, isSupport 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 isSupport True, if the user is Telegram support account @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

func (user *User) MessageType() string

MessageType return the string telegram-type of User

func (*User) UnmarshalJSON

func (user *User) UnmarshalJSON(b []byte) error

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
	ShareText          string   `json:"share_text"`            // For bots, the text that is included with the link when users share the bot
	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 UserPrivacySettingAllowPeerToPeerCalls

type UserPrivacySettingAllowPeerToPeerCalls struct {
	// contains filtered or unexported fields
}

UserPrivacySettingAllowPeerToPeerCalls A privacy setting for managing whether peer-to-peer connections can be used for calls

func NewUserPrivacySettingAllowPeerToPeerCalls

func NewUserPrivacySettingAllowPeerToPeerCalls() *UserPrivacySettingAllowPeerToPeerCalls

NewUserPrivacySettingAllowPeerToPeerCalls creates a new UserPrivacySettingAllowPeerToPeerCalls

func (*UserPrivacySettingAllowPeerToPeerCalls) GetUserPrivacySettingEnum

func (userPrivacySettingAllowPeerToPeerCalls *UserPrivacySettingAllowPeerToPeerCalls) GetUserPrivacySettingEnum() UserPrivacySettingEnum

GetUserPrivacySettingEnum return the enum type of this object

func (*UserPrivacySettingAllowPeerToPeerCalls) MessageType

func (userPrivacySettingAllowPeerToPeerCalls *UserPrivacySettingAllowPeerToPeerCalls) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingAllowPeerToPeerCalls

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"
	UserPrivacySettingAllowPeerToPeerCallsType UserPrivacySettingEnum = "userPrivacySettingAllowPeerToPeerCalls"
)

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 UserProfilePhoto

type UserProfilePhoto struct {
	ID        JSONInt64   `json:"id"`         // Unique user profile photo identifier
	AddedDate int32       `json:"added_date"` // Point in time (Unix timestamp) when the photo has been added
	Sizes     []PhotoSize `json:"sizes"`      // Available variants of the user photo, in different sizes
	// contains filtered or unexported fields
}

UserProfilePhoto Contains full information about a user profile photo

func NewUserProfilePhoto

func NewUserProfilePhoto(iD JSONInt64, addedDate int32, sizes []PhotoSize) *UserProfilePhoto

NewUserProfilePhoto creates a new UserProfilePhoto

@param iD Unique user profile photo identifier @param addedDate Point in time (Unix timestamp) when the photo has been added @param sizes Available variants of the user photo, in different sizes

func (*UserProfilePhoto) MessageType

func (userProfilePhoto *UserProfilePhoto) MessageType() string

MessageType return the string telegram-type of UserProfilePhoto

type UserProfilePhotos

type UserProfilePhotos struct {
	TotalCount int32              `json:"total_count"` // Total number of user profile photos
	Photos     []UserProfilePhoto `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 []UserProfilePhoto) *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

func NewUsers(totalCount int32, userIDs []int32) *Users

NewUsers creates a new Users

@param totalCount Approximate total count of users found @param userIDs A list of user identifiers

func (*Users) MessageType

func (users *Users) MessageType() string

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
	Type     string    `json:"type"`     // Type of the venue in the provider database; as defined by the sender
	// contains filtered or unexported fields
}

Venue Describes a venue

func NewVenue

func NewVenue(location *Location, title string, address string, provider string, iD string, typeParam string) *Venue

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 @param typeParam Type of the venue in the provider database; as defined by the sender

func (*Venue) MessageType

func (venue *Venue) MessageType() string

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

func (video *Video) MessageType() string

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

func NewVideoNote(duration int32, length int32, thumbnail *PhotoSize, video *File) *VideoNote

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

func (videoNote *VideoNote) MessageType() string

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

func NewVoiceNote(duration int32, waveform []byte, mimeType string, voice *File) *VoiceNote

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

func (voiceNote *VoiceNote) MessageType() string

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

func NewWallpaper(iD int32, sizes []PhotoSize, color int32) *Wallpaper

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

func (wallpaper *Wallpaper) MessageType() string

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
	InstantViewVersion int32      `json:"instant_view_version"` // Version of instant view, available for the web page (currently can be 1 or 2), 0 if none
	// 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, instantViewVersion int32) *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 instantViewVersion Version of instant view, available for the web page (currently can be 1 or 2), 0 if none

func (*WebPage) MessageType

func (webPage *WebPage) MessageType() string

MessageType return the string telegram-type of WebPage

type WebPageInstantView

type WebPageInstantView struct {
	PageBlocks []PageBlock `json:"page_blocks"` // Content of the web page
	Version    int32       `json:"version"`     // Version of the instant view, currently can be 1 or 2
	URL        string      `json:"url"`         // Instant view URL; may be different from WebPage.url and must be used for the correct anchors handling
	IsRtl      bool        `json:"is_rtl"`      // True, if the instant view must be shown from right to left
	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, version int32, uRL string, isRtl bool, isFull bool) *WebPageInstantView

NewWebPageInstantView creates a new WebPageInstantView

@param pageBlocks Content of the web page @param version Version of the instant view, currently can be 1 or 2 @param uRL Instant view URL; may be different from WebPage.url and must be used for the correct anchors handling @param isRtl True, if the instant view must be shown from right to left @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

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL