tdlib

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

README

go-tdlib

All Contributors

Golang Telegram TdLib JSON bindings

Introduction

Telegram Tdlib is a complete library for creating telegram clients, it also 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 out 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:

xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gperf cmake openssl
git clone https://github.com/tdlib/td.git
cd td
rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
cmake --build . --target install
cd ..
cd ..
ls -l /usr/local

If hit any build errors, refer to Tdlib build instructions

This fork is modified to be built on Apple Silicon because of different homebrew path.

Example

Here is a simple example for authorization and fetching updates:

package main

import (
	"fmt"

	"github.com/radozd/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
	rawUpdates := client.GetRawUpdatesChannel(100)
        for update := range rawUpdates {
		// Show all updates
		fmt.Println(update.Data)
		fmt.Print("\n\n")
	}

}

More examples can be found on examples folder

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Aleksandr Zelenin

💡

for

🐛

Ahmadreza Zibaei

💻

Max

💻

Ruben Vermeersch

🐛

Alexander Shelepenok

💻 🚧 ⚠️

Karim Nahas

💻 🚧 🐛

Wachiu Siu

💡 🐛 📖

motylkov

💻

Juliia-b

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

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 AnimatedChatPhoto

type AnimatedChatPhoto struct {
	Length             int32   `json:"length"`               // Animation width and height
	File               *File   `json:"file"`                 // Information about the animation file
	MainFrameTimestamp float64 `json:"main_frame_timestamp"` // Timestamp of the frame, used as a static chat photo
	// contains filtered or unexported fields
}

AnimatedChatPhoto Animated variant of a chat photo in MPEG4 format

func NewAnimatedChatPhoto

func NewAnimatedChatPhoto(length int32, file *File, mainFrameTimestamp float64) *AnimatedChatPhoto

NewAnimatedChatPhoto creates a new AnimatedChatPhoto

@param length Animation width and height @param file Information about the animation file @param mainFrameTimestamp Timestamp of the frame, used as a static chat photo

func (*AnimatedChatPhoto) MessageType

func (animatedChatPhoto *AnimatedChatPhoto) MessageType() string

MessageType return the string telegram-type of AnimatedChatPhoto

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"
	HasStickers   bool           `json:"has_stickers"`  // True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets
	Minithumbnail *Minithumbnail `json:"minithumbnail"` // Animation minithumbnail; may be null
	Thumbnail     *Thumbnail     `json:"thumbnail"`     // Animation thumbnail in JPEG or MPEG4 format; 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, hasStickers bool, minithumbnail *Minithumbnail, thumbnail *Thumbnail, 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 hasStickers True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets @param minithumbnail Animation minithumbnail; may be null @param thumbnail Animation thumbnail in JPEG or MPEG4 format; 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
	AlbumCoverMinithumbnail *Minithumbnail `json:"album_cover_minithumbnail"` // The minithumbnail of the album cover; may be null
	AlbumCoverThumbnail     *Thumbnail     `json:"album_cover_thumbnail"`     // The thumbnail of the album cover in JPEG format; 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 or M4A format

func NewAudio

func NewAudio(duration int32, title string, performer string, fileName string, mimeType string, albumCoverMinithumbnail *Minithumbnail, albumCoverThumbnail *Thumbnail, 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 albumCoverMinithumbnail The minithumbnail of the album cover; may be null @param albumCoverThumbnail The thumbnail of the album cover in JPEG format; 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 from another active session

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 TDLib 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"
	AuthorizationStateWaitOtherDeviceConfirmationType AuthorizationStateEnum = "authorizationStateWaitOtherDeviceConfirmation"
	AuthorizationStateWaitRegistrationType            AuthorizationStateEnum = "authorizationStateWaitRegistration"
	AuthorizationStateWaitPasswordType                AuthorizationStateEnum = "authorizationStateWaitPassword"
	AuthorizationStateReadyType                       AuthorizationStateEnum = "authorizationStateReady"
	AuthorizationStateLoggingOutType                  AuthorizationStateEnum = "authorizationStateLoggingOut"
	AuthorizationStateClosingType                     AuthorizationStateEnum = "authorizationStateClosing"
	AuthorizationStateClosedType                      AuthorizationStateEnum = "authorizationStateClosed"
)

AuthorizationState enums

type AuthorizationStateLoggingOut

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

AuthorizationStateLoggingOut The user is currently logging out

func NewAuthorizationStateLoggingOut

func NewAuthorizationStateLoggingOut() *AuthorizationStateLoggingOut

NewAuthorizationStateLoggingOut creates a new AuthorizationStateLoggingOut

func (*AuthorizationStateLoggingOut) GetAuthorizationStateEnum

func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) GetAuthorizationStateEnum() AuthorizationStateEnum

GetAuthorizationStateEnum return the enum type of this object

func (*AuthorizationStateLoggingOut) MessageType

func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) MessageType() string

MessageType return the string telegram-type of AuthorizationStateLoggingOut

type AuthorizationStateReady

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

AuthorizationStateReady The user has been successfully authorized. TDLib is now ready to answer queries

func NewAuthorizationStateReady

func NewAuthorizationStateReady() *AuthorizationStateReady

NewAuthorizationStateReady creates a new AuthorizationStateReady

func (*AuthorizationStateReady) GetAuthorizationStateEnum

func (authorizationStateReady *AuthorizationStateReady) GetAuthorizationStateEnum() AuthorizationStateEnum

GetAuthorizationStateEnum return the enum type of this object

func (*AuthorizationStateReady) MessageType

func (authorizationStateReady *AuthorizationStateReady) MessageType() string

MessageType return the string telegram-type of AuthorizationStateReady

type AuthorizationStateWaitCode

type AuthorizationStateWaitCode struct {
	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 authorize

func NewAuthorizationStateWaitCode

func NewAuthorizationStateWaitCode(codeInfo *AuthenticationCodeInfo) *AuthorizationStateWaitCode

NewAuthorizationStateWaitCode creates a new AuthorizationStateWaitCode

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

type AuthorizationStateWaitOtherDeviceConfirmation struct {
	Link string `json:"link"` // A tg:// URL for the QR code. The link will be updated frequently
	// contains filtered or unexported fields
}

AuthorizationStateWaitOtherDeviceConfirmation The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link

func NewAuthorizationStateWaitOtherDeviceConfirmation

func NewAuthorizationStateWaitOtherDeviceConfirmation(link string) *AuthorizationStateWaitOtherDeviceConfirmation

NewAuthorizationStateWaitOtherDeviceConfirmation creates a new AuthorizationStateWaitOtherDeviceConfirmation

@param link A tg:// URL for the QR code. The link will be updated frequently

func (*AuthorizationStateWaitOtherDeviceConfirmation) GetAuthorizationStateEnum

func (authorizationStateWaitOtherDeviceConfirmation *AuthorizationStateWaitOtherDeviceConfirmation) GetAuthorizationStateEnum() AuthorizationStateEnum

GetAuthorizationStateEnum return the enum type of this object

func (*AuthorizationStateWaitOtherDeviceConfirmation) MessageType

func (authorizationStateWaitOtherDeviceConfirmation *AuthorizationStateWaitOtherDeviceConfirmation) MessageType() string

MessageType return the string telegram-type of AuthorizationStateWaitOtherDeviceConfirmation

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. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options

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

AuthorizationStateWaitRegistration 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

NewAuthorizationStateWaitRegistration creates a new AuthorizationStateWaitRegistration

@param termsOfService Telegram terms of service

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 AutoDownloadSettings

type AutoDownloadSettings struct {
	IsAutoDownloadEnabled bool  `json:"is_auto_download_enabled"` // True, if the auto-download is enabled
	MaxPhotoFileSize      int32 `json:"max_photo_file_size"`      // The maximum size of a photo file to be auto-downloaded
	MaxVideoFileSize      int32 `json:"max_video_file_size"`      // The maximum size of a video file to be auto-downloaded
	MaxOtherFileSize      int32 `json:"max_other_file_size"`      // The maximum size of other file types to be auto-downloaded
	VideoUploadBitrate    int32 `json:"video_upload_bitrate"`     // The maximum suggested bitrate for uploaded videos
	PreloadLargeVideos    bool  `json:"preload_large_videos"`     // True, if the beginning of video files needs to be preloaded for instant playback
	PreloadNextAudio      bool  `json:"preload_next_audio"`       // True, if the next audio track needs to be preloaded while the user is listening to an audio file
	UseLessDataForCalls   bool  `json:"use_less_data_for_calls"`  // True, if "use less data for calls" option needs to be enabled
	// contains filtered or unexported fields
}

AutoDownloadSettings Contains auto-download settings

func NewAutoDownloadSettings

func NewAutoDownloadSettings(isAutoDownloadEnabled bool, maxPhotoFileSize int32, maxVideoFileSize int32, maxOtherFileSize int32, videoUploadBitrate int32, preloadLargeVideos bool, preloadNextAudio bool, useLessDataForCalls bool) *AutoDownloadSettings

NewAutoDownloadSettings creates a new AutoDownloadSettings

@param isAutoDownloadEnabled True, if the auto-download is enabled @param maxPhotoFileSize The maximum size of a photo file to be auto-downloaded @param maxVideoFileSize The maximum size of a video file to be auto-downloaded @param maxOtherFileSize The maximum size of other file types to be auto-downloaded @param videoUploadBitrate The maximum suggested bitrate for uploaded videos @param preloadLargeVideos True, if the beginning of video files needs to be preloaded for instant playback @param preloadNextAudio True, if the next audio track needs to be preloaded while the user is listening to an audio file @param useLessDataForCalls True, if "use less data for calls" option needs to be enabled

func (*AutoDownloadSettings) MessageType

func (autoDownloadSettings *AutoDownloadSettings) MessageType() string

MessageType return the string telegram-type of AutoDownloadSettings

type AutoDownloadSettingsPresets

type AutoDownloadSettingsPresets struct {
	Low    *AutoDownloadSettings `json:"low"`    // Preset with lowest settings; supposed to be used by default when roaming
	Medium *AutoDownloadSettings `json:"medium"` // Preset with medium settings; supposed to be used by default when using mobile data
	High   *AutoDownloadSettings `json:"high"`   // Preset with highest settings; supposed to be used by default when connected on Wi-Fi
	// contains filtered or unexported fields
}

AutoDownloadSettingsPresets Contains auto-download settings presets for the user

func NewAutoDownloadSettingsPresets

func NewAutoDownloadSettingsPresets(low *AutoDownloadSettings, medium *AutoDownloadSettings, high *AutoDownloadSettings) *AutoDownloadSettingsPresets

NewAutoDownloadSettingsPresets creates a new AutoDownloadSettingsPresets

@param low Preset with lowest settings; supposed to be used by default when roaming @param medium Preset with medium settings; supposed to be used by default when using mobile data @param high Preset with highest settings; supposed to be used by default when connected on Wi-Fi

func (*AutoDownloadSettingsPresets) MessageType

func (autoDownloadSettingsPresets *AutoDownloadSettingsPresets) MessageType() string

MessageType return the string telegram-type of AutoDownloadSettingsPresets

type Background

type Background struct {
	ID        JSONInt64      `json:"id"`         // Unique background identifier
	IsDefault bool           `json:"is_default"` // True, if this is one of default backgrounds
	IsDark    bool           `json:"is_dark"`    // True, if the background is dark and is recommended to be used with dark theme
	Name      string         `json:"name"`       // Unique background name
	Document  *Document      `json:"document"`   // Document with the background; may be null. Null only for filled backgrounds
	Type      BackgroundType `json:"type"`       // Type of the background
	// contains filtered or unexported fields
}

Background Describes a chat background

func NewBackground

func NewBackground(iD JSONInt64, isDefault bool, isDark bool, name string, document *Document, typeParam BackgroundType) *Background

NewBackground creates a new Background

@param iD Unique background identifier @param isDefault True, if this is one of default backgrounds @param isDark True, if the background is dark and is recommended to be used with dark theme @param name Unique background name @param document Document with the background; may be null. Null only for filled backgrounds @param typeParam Type of the background

func (*Background) MessageType

func (background *Background) MessageType() string

MessageType return the string telegram-type of Background

func (*Background) UnmarshalJSON

func (background *Background) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type BackgroundFill

type BackgroundFill interface {
	GetBackgroundFillEnum() BackgroundFillEnum
}

BackgroundFill Describes a fill of a background

type BackgroundFillEnum

type BackgroundFillEnum string

BackgroundFillEnum Alias for abstract BackgroundFill 'Sub-Classes', used as constant-enum here

const (
	BackgroundFillSolidType    BackgroundFillEnum = "backgroundFillSolid"
	BackgroundFillGradientType BackgroundFillEnum = "backgroundFillGradient"
)

BackgroundFill enums

type BackgroundFillGradient

type BackgroundFillGradient struct {
	TopColor      int32 `json:"top_color"`      // A top color of the background in the RGB24 format
	BottomColor   int32 `json:"bottom_color"`   // A bottom color of the background in the RGB24 format
	RotationAngle int32 `json:"rotation_angle"` // Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45
	// contains filtered or unexported fields
}

BackgroundFillGradient Describes a gradient fill of a background

func NewBackgroundFillGradient

func NewBackgroundFillGradient(topColor int32, bottomColor int32, rotationAngle int32) *BackgroundFillGradient

NewBackgroundFillGradient creates a new BackgroundFillGradient

@param topColor A top color of the background in the RGB24 format @param bottomColor A bottom color of the background in the RGB24 format @param rotationAngle Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45

func (*BackgroundFillGradient) GetBackgroundFillEnum

func (backgroundFillGradient *BackgroundFillGradient) GetBackgroundFillEnum() BackgroundFillEnum

GetBackgroundFillEnum return the enum type of this object

func (*BackgroundFillGradient) MessageType

func (backgroundFillGradient *BackgroundFillGradient) MessageType() string

MessageType return the string telegram-type of BackgroundFillGradient

type BackgroundFillSolid

type BackgroundFillSolid struct {
	Color int32 `json:"color"` // A color of the background in the RGB24 format
	// contains filtered or unexported fields
}

BackgroundFillSolid Describes a solid fill of a background

func NewBackgroundFillSolid

func NewBackgroundFillSolid(color int32) *BackgroundFillSolid

NewBackgroundFillSolid creates a new BackgroundFillSolid

@param color A color of the background in the RGB24 format

func (*BackgroundFillSolid) GetBackgroundFillEnum

func (backgroundFillSolid *BackgroundFillSolid) GetBackgroundFillEnum() BackgroundFillEnum

GetBackgroundFillEnum return the enum type of this object

func (*BackgroundFillSolid) MessageType

func (backgroundFillSolid *BackgroundFillSolid) MessageType() string

MessageType return the string telegram-type of BackgroundFillSolid

type BackgroundType

type BackgroundType interface {
	GetBackgroundTypeEnum() BackgroundTypeEnum
}

BackgroundType Describes the type of a background

type BackgroundTypeEnum

type BackgroundTypeEnum string

BackgroundTypeEnum Alias for abstract BackgroundType 'Sub-Classes', used as constant-enum here

const (
	BackgroundTypeWallpaperType BackgroundTypeEnum = "backgroundTypeWallpaper"
	BackgroundTypePatternType   BackgroundTypeEnum = "backgroundTypePattern"
	BackgroundTypeFillType      BackgroundTypeEnum = "backgroundTypeFill"
)

BackgroundType enums

type BackgroundTypeFill

type BackgroundTypeFill struct {
	Fill BackgroundFill `json:"fill"` // Description of the background fill
	// contains filtered or unexported fields
}

BackgroundTypeFill A filled background

func NewBackgroundTypeFill

func NewBackgroundTypeFill(fill BackgroundFill) *BackgroundTypeFill

NewBackgroundTypeFill creates a new BackgroundTypeFill

@param fill Description of the background fill

func (*BackgroundTypeFill) GetBackgroundTypeEnum

func (backgroundTypeFill *BackgroundTypeFill) GetBackgroundTypeEnum() BackgroundTypeEnum

GetBackgroundTypeEnum return the enum type of this object

func (*BackgroundTypeFill) MessageType

func (backgroundTypeFill *BackgroundTypeFill) MessageType() string

MessageType return the string telegram-type of BackgroundTypeFill

func (*BackgroundTypeFill) UnmarshalJSON

func (backgroundTypeFill *BackgroundTypeFill) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type BackgroundTypePattern

type BackgroundTypePattern struct {
	Fill      BackgroundFill `json:"fill"`      // Description of the background fill
	Intensity int32          `json:"intensity"` // Intensity of the pattern when it is shown above the filled background; 0-100
	IsMoving  bool           `json:"is_moving"` // True, if the background needs to be slightly moved when device is tilted
	// contains filtered or unexported fields
}

BackgroundTypePattern A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user

func NewBackgroundTypePattern

func NewBackgroundTypePattern(fill BackgroundFill, intensity int32, isMoving bool) *BackgroundTypePattern

NewBackgroundTypePattern creates a new BackgroundTypePattern

@param fill Description of the background fill @param intensity Intensity of the pattern when it is shown above the filled background; 0-100 @param isMoving True, if the background needs to be slightly moved when device is tilted

func (*BackgroundTypePattern) GetBackgroundTypeEnum

func (backgroundTypePattern *BackgroundTypePattern) GetBackgroundTypeEnum() BackgroundTypeEnum

GetBackgroundTypeEnum return the enum type of this object

func (*BackgroundTypePattern) MessageType

func (backgroundTypePattern *BackgroundTypePattern) MessageType() string

MessageType return the string telegram-type of BackgroundTypePattern

func (*BackgroundTypePattern) UnmarshalJSON

func (backgroundTypePattern *BackgroundTypePattern) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type BackgroundTypeWallpaper

type BackgroundTypeWallpaper struct {
	IsBlurred bool `json:"is_blurred"` // True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12
	IsMoving  bool `json:"is_moving"`  // True, if the background needs to be slightly moved when device is tilted
	// contains filtered or unexported fields
}

BackgroundTypeWallpaper A wallpaper in JPEG format

func NewBackgroundTypeWallpaper

func NewBackgroundTypeWallpaper(isBlurred bool, isMoving bool) *BackgroundTypeWallpaper

NewBackgroundTypeWallpaper creates a new BackgroundTypeWallpaper

@param isBlurred True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12 @param isMoving True, if the background needs to be slightly moved when device is tilted

func (*BackgroundTypeWallpaper) GetBackgroundTypeEnum

func (backgroundTypeWallpaper *BackgroundTypeWallpaper) GetBackgroundTypeEnum() BackgroundTypeEnum

GetBackgroundTypeEnum return the enum type of this object

func (*BackgroundTypeWallpaper) MessageType

func (backgroundTypeWallpaper *BackgroundTypeWallpaper) MessageType() string

MessageType return the string telegram-type of BackgroundTypeWallpaper

type Backgrounds

type Backgrounds struct {
	Backgrounds []Background `json:"backgrounds"` // A list of backgrounds
	// contains filtered or unexported fields
}

Backgrounds Contains a list of backgrounds

func NewBackgrounds

func NewBackgrounds(backgrounds []Background) *Backgrounds

NewBackgrounds creates a new Backgrounds

@param backgrounds A list of backgrounds

func (*Backgrounds) MessageType

func (backgrounds *Backgrounds) MessageType() string

MessageType return the string telegram-type of Backgrounds

type BankCardActionOpenURL

type BankCardActionOpenURL struct {
	Text string `json:"text"` // Action text
	URL  string `json:"url"`  // The URL to be opened
	// contains filtered or unexported fields
}

BankCardActionOpenURL Describes an action associated with a bank card number

func NewBankCardActionOpenURL

func NewBankCardActionOpenURL(text string, uRL string) *BankCardActionOpenURL

NewBankCardActionOpenURL creates a new BankCardActionOpenURL

@param text Action text @param uRL The URL to be opened

func (*BankCardActionOpenURL) MessageType

func (bankCardActionOpenURL *BankCardActionOpenURL) MessageType() string

MessageType return the string telegram-type of BankCardActionOpenURL

type BankCardInfo

type BankCardInfo struct {
	Title   string                  `json:"title"`   // Title of the bank card description
	Actions []BankCardActionOpenURL `json:"actions"` // Actions that can be done with the bank card number
	// contains filtered or unexported fields
}

BankCardInfo Information about a bank card

func NewBankCardInfo

func NewBankCardInfo(title string, actions []BankCardActionOpenURL) *BankCardInfo

NewBankCardInfo creates a new BankCardInfo

@param title Title of the bank card description @param actions Actions that can be done with the bank card number

func (*BankCardInfo) MessageType

func (bankCardInfo *BankCardInfo) MessageType() string

MessageType return the string telegram-type of BankCardInfo

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
	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, 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 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 {
	Photo         *ChatPhoto      `json:"photo"`           // Chat photo; may be null
	Description   string          `json:"description"`     //
	CreatorUserID int32           `json:"creator_user_id"` // User identifier of the creator of the group; 0 if unknown
	Members       []ChatMember    `json:"members"`         // Group members
	InviteLink    *ChatInviteLink `json:"invite_link"`     // Permanent invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened
	// contains filtered or unexported fields
}

BasicGroupFullInfo Contains full information about a basic group

func NewBasicGroupFullInfo

func NewBasicGroupFullInfo(photo *ChatPhoto, description string, creatorUserID int32, members []ChatMember, inviteLink *ChatInviteLink) *BasicGroupFullInfo

NewBasicGroupFullInfo creates a new BasicGroupFullInfo

@param photo Chat photo; may be null @param description @param creatorUserID User identifier of the creator of the group; 0 if unknown @param members Group members @param inviteLink Permanent invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened

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 a command 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
	IsVideo    bool      `json:"is_video"`    // True, if the call is a video call
	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, isVideo 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 isVideo True, if the call is a video call @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 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 CallProblem

type CallProblem interface {
	GetCallProblemEnum() CallProblemEnum
}

CallProblem Describes the exact type of a problem with a call

type CallProblemDistortedSpeech

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

CallProblemDistortedSpeech The speech was distorted

func NewCallProblemDistortedSpeech

func NewCallProblemDistortedSpeech() *CallProblemDistortedSpeech

NewCallProblemDistortedSpeech creates a new CallProblemDistortedSpeech

func (*CallProblemDistortedSpeech) GetCallProblemEnum

func (callProblemDistortedSpeech *CallProblemDistortedSpeech) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemDistortedSpeech) MessageType

func (callProblemDistortedSpeech *CallProblemDistortedSpeech) MessageType() string

MessageType return the string telegram-type of CallProblemDistortedSpeech

type CallProblemDistortedVideo

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

CallProblemDistortedVideo The video was distorted

func NewCallProblemDistortedVideo

func NewCallProblemDistortedVideo() *CallProblemDistortedVideo

NewCallProblemDistortedVideo creates a new CallProblemDistortedVideo

func (*CallProblemDistortedVideo) GetCallProblemEnum

func (callProblemDistortedVideo *CallProblemDistortedVideo) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemDistortedVideo) MessageType

func (callProblemDistortedVideo *CallProblemDistortedVideo) MessageType() string

MessageType return the string telegram-type of CallProblemDistortedVideo

type CallProblemDropped

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

CallProblemDropped The call ended unexpectedly

func NewCallProblemDropped

func NewCallProblemDropped() *CallProblemDropped

NewCallProblemDropped creates a new CallProblemDropped

func (*CallProblemDropped) GetCallProblemEnum

func (callProblemDropped *CallProblemDropped) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemDropped) MessageType

func (callProblemDropped *CallProblemDropped) MessageType() string

MessageType return the string telegram-type of CallProblemDropped

type CallProblemEcho

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

CallProblemEcho The user heard their own voice

func NewCallProblemEcho

func NewCallProblemEcho() *CallProblemEcho

NewCallProblemEcho creates a new CallProblemEcho

func (*CallProblemEcho) GetCallProblemEnum

func (callProblemEcho *CallProblemEcho) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemEcho) MessageType

func (callProblemEcho *CallProblemEcho) MessageType() string

MessageType return the string telegram-type of CallProblemEcho

type CallProblemEnum

type CallProblemEnum string

CallProblemEnum Alias for abstract CallProblem 'Sub-Classes', used as constant-enum here

const (
	CallProblemEchoType            CallProblemEnum = "callProblemEcho"
	CallProblemNoiseType           CallProblemEnum = "callProblemNoise"
	CallProblemInterruptionsType   CallProblemEnum = "callProblemInterruptions"
	CallProblemDistortedSpeechType CallProblemEnum = "callProblemDistortedSpeech"
	CallProblemSilentLocalType     CallProblemEnum = "callProblemSilentLocal"
	CallProblemSilentRemoteType    CallProblemEnum = "callProblemSilentRemote"
	CallProblemDroppedType         CallProblemEnum = "callProblemDropped"
	CallProblemDistortedVideoType  CallProblemEnum = "callProblemDistortedVideo"
	CallProblemPixelatedVideoType  CallProblemEnum = "callProblemPixelatedVideo"
)

CallProblem enums

type CallProblemInterruptions

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

CallProblemInterruptions The other side kept disappearing

func NewCallProblemInterruptions

func NewCallProblemInterruptions() *CallProblemInterruptions

NewCallProblemInterruptions creates a new CallProblemInterruptions

func (*CallProblemInterruptions) GetCallProblemEnum

func (callProblemInterruptions *CallProblemInterruptions) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemInterruptions) MessageType

func (callProblemInterruptions *CallProblemInterruptions) MessageType() string

MessageType return the string telegram-type of CallProblemInterruptions

type CallProblemNoise

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

CallProblemNoise The user heard background noise

func NewCallProblemNoise

func NewCallProblemNoise() *CallProblemNoise

NewCallProblemNoise creates a new CallProblemNoise

func (*CallProblemNoise) GetCallProblemEnum

func (callProblemNoise *CallProblemNoise) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemNoise) MessageType

func (callProblemNoise *CallProblemNoise) MessageType() string

MessageType return the string telegram-type of CallProblemNoise

type CallProblemPixelatedVideo

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

CallProblemPixelatedVideo The video was pixelated

func NewCallProblemPixelatedVideo

func NewCallProblemPixelatedVideo() *CallProblemPixelatedVideo

NewCallProblemPixelatedVideo creates a new CallProblemPixelatedVideo

func (*CallProblemPixelatedVideo) GetCallProblemEnum

func (callProblemPixelatedVideo *CallProblemPixelatedVideo) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemPixelatedVideo) MessageType

func (callProblemPixelatedVideo *CallProblemPixelatedVideo) MessageType() string

MessageType return the string telegram-type of CallProblemPixelatedVideo

type CallProblemSilentLocal

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

CallProblemSilentLocal The user couldn't hear the other side

func NewCallProblemSilentLocal

func NewCallProblemSilentLocal() *CallProblemSilentLocal

NewCallProblemSilentLocal creates a new CallProblemSilentLocal

func (*CallProblemSilentLocal) GetCallProblemEnum

func (callProblemSilentLocal *CallProblemSilentLocal) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemSilentLocal) MessageType

func (callProblemSilentLocal *CallProblemSilentLocal) MessageType() string

MessageType return the string telegram-type of CallProblemSilentLocal

type CallProblemSilentRemote

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

CallProblemSilentRemote The other side couldn't hear the user

func NewCallProblemSilentRemote

func NewCallProblemSilentRemote() *CallProblemSilentRemote

NewCallProblemSilentRemote creates a new CallProblemSilentRemote

func (*CallProblemSilentRemote) GetCallProblemEnum

func (callProblemSilentRemote *CallProblemSilentRemote) GetCallProblemEnum() CallProblemEnum

GetCallProblemEnum return the enum type of this object

func (*CallProblemSilentRemote) MessageType

func (callProblemSilentRemote *CallProblemSilentRemote) MessageType() string

MessageType return the string telegram-type of CallProblemSilentRemote

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"`        // The minimum supported API layer; use 65
	MaxLayer        int32    `json:"max_layer"`        // The maximum supported API layer; use 65
	LibraryVersions []string `json:"library_versions"` // List of supported tgcalls versions
	// contains filtered or unexported fields
}

CallProtocol Specifies the supported call protocols

func NewCallProtocol

func NewCallProtocol(uDPP2p bool, uDPReflector bool, minLayer int32, maxLayer int32, libraryVersions []string) *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 The minimum supported API layer; use 65 @param maxLayer The maximum supported API layer; use 65 @param libraryVersions List of supported tgcalls versions

func (*CallProtocol) MessageType

func (callProtocol *CallProtocol) MessageType() string

MessageType return the string telegram-type of CallProtocol

type CallServer

type CallServer struct {
	ID          JSONInt64      `json:"id"`           // Server identifier
	IPAddress   string         `json:"ip_address"`   // Server IPv4 address
	IPv6Address string         `json:"ipv6_address"` // Server IPv6 address
	Port        int32          `json:"port"`         // Server port number
	Type        CallServerType `json:"type"`         // Server type
	// contains filtered or unexported fields
}

CallServer Describes a server for relaying call data

func NewCallServer

func NewCallServer(iD JSONInt64, iPAddress string, iPv6Address string, port int32, typeParam CallServerType) *CallServer

NewCallServer creates a new CallServer

@param iD Server identifier @param iPAddress Server IPv4 address @param iPv6Address Server IPv6 address @param port Server port number @param typeParam Server type

func (*CallServer) MessageType

func (callServer *CallServer) MessageType() string

MessageType return the string telegram-type of CallServer

func (*CallServer) UnmarshalJSON

func (callServer *CallServer) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type CallServerType

type CallServerType interface {
	GetCallServerTypeEnum() CallServerTypeEnum
}

CallServerType Describes the type of a call server

type CallServerTypeEnum

type CallServerTypeEnum string

CallServerTypeEnum Alias for abstract CallServerType 'Sub-Classes', used as constant-enum here

const (
	CallServerTypeTelegramReflectorType CallServerTypeEnum = "callServerTypeTelegramReflector"
	CallServerTypeWebrtcType            CallServerTypeEnum = "callServerTypeWebrtc"
)

CallServerType enums

type CallServerTypeTelegramReflector

type CallServerTypeTelegramReflector struct {
	PeerTag []byte `json:"peer_tag"` // A peer tag to be used with the reflector
	// contains filtered or unexported fields
}

CallServerTypeTelegramReflector A Telegram call reflector

func NewCallServerTypeTelegramReflector

func NewCallServerTypeTelegramReflector(peerTag []byte) *CallServerTypeTelegramReflector

NewCallServerTypeTelegramReflector creates a new CallServerTypeTelegramReflector

@param peerTag A peer tag to be used with the reflector

func (*CallServerTypeTelegramReflector) GetCallServerTypeEnum

func (callServerTypeTelegramReflector *CallServerTypeTelegramReflector) GetCallServerTypeEnum() CallServerTypeEnum

GetCallServerTypeEnum return the enum type of this object

func (*CallServerTypeTelegramReflector) MessageType

func (callServerTypeTelegramReflector *CallServerTypeTelegramReflector) MessageType() string

MessageType return the string telegram-type of CallServerTypeTelegramReflector

type CallServerTypeWebrtc

type CallServerTypeWebrtc struct {
	Username     string `json:"username"`      // Username to be used for authentication
	Password     string `json:"password"`      // Authentication password
	SupportsTurn bool   `json:"supports_turn"` // True, if the server supports TURN
	SupportsStun bool   `json:"supports_stun"` // True, if the server supports STUN
	// contains filtered or unexported fields
}

CallServerTypeWebrtc A WebRTC server

func NewCallServerTypeWebrtc

func NewCallServerTypeWebrtc(username string, password string, supportsTurn bool, supportsStun bool) *CallServerTypeWebrtc

NewCallServerTypeWebrtc creates a new CallServerTypeWebrtc

@param username Username to be used for authentication @param password Authentication password @param supportsTurn True, if the server supports TURN @param supportsStun True, if the server supports STUN

func (*CallServerTypeWebrtc) GetCallServerTypeEnum

func (callServerTypeWebrtc *CallServerTypeWebrtc) GetCallServerTypeEnum() CallServerTypeEnum

GetCallServerTypeEnum return the enum type of this object

func (*CallServerTypeWebrtc) MessageType

func (callServerTypeWebrtc *CallServerTypeWebrtc) MessageType() string

MessageType return the string telegram-type of CallServerTypeWebrtc

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
	Servers       []CallServer  `json:"servers"`        // List of available call servers
	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, servers []CallServer, config string, encryptionKey []byte, emojis []string, allowP2p bool) *CallStateReady

NewCallStateReady creates a new CallStateReady

@param protocol Call protocols supported by the peer @param servers List of available call servers @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 for 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 CallbackQueryPayloadDataWithPassword

type CallbackQueryPayloadDataWithPassword struct {
	Password string `json:"password"` // The password for the current user
	Data     []byte `json:"data"`     // Data that was attached to the callback button
	// contains filtered or unexported fields
}

CallbackQueryPayloadDataWithPassword The payload for a callback button requiring password

func NewCallbackQueryPayloadDataWithPassword

func NewCallbackQueryPayloadDataWithPassword(password string, data []byte) *CallbackQueryPayloadDataWithPassword

NewCallbackQueryPayloadDataWithPassword creates a new CallbackQueryPayloadDataWithPassword

@param password The password for the current user @param data Data that was attached to the callback button

func (*CallbackQueryPayloadDataWithPassword) GetCallbackQueryPayloadEnum

func (callbackQueryPayloadDataWithPassword *CallbackQueryPayloadDataWithPassword) GetCallbackQueryPayloadEnum() CallbackQueryPayloadEnum

GetCallbackQueryPayloadEnum return the enum type of this object

func (*CallbackQueryPayloadDataWithPassword) MessageType

func (callbackQueryPayloadDataWithPassword *CallbackQueryPayloadDataWithPassword) MessageType() string

MessageType return the string telegram-type of CallbackQueryPayloadDataWithPassword

type CallbackQueryPayloadEnum

type CallbackQueryPayloadEnum string

CallbackQueryPayloadEnum Alias for abstract CallbackQueryPayload 'Sub-Classes', used as constant-enum here

const (
	CallbackQueryPayloadDataType             CallbackQueryPayloadEnum = "callbackQueryPayloadData"
	CallbackQueryPayloadDataWithPasswordType CallbackQueryPayloadEnum = "callbackQueryPayloadDataWithPassword"
	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 for 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 CanTransferOwnershipResult

type CanTransferOwnershipResult interface {
	GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum
}

CanTransferOwnershipResult Represents result of checking whether the current session can be used to transfer a chat ownership to another user

type CanTransferOwnershipResultEnum

type CanTransferOwnershipResultEnum string

CanTransferOwnershipResultEnum Alias for abstract CanTransferOwnershipResult 'Sub-Classes', used as constant-enum here

const (
	CanTransferOwnershipResultOkType               CanTransferOwnershipResultEnum = "canTransferOwnershipResultOk"
	CanTransferOwnershipResultPasswordNeededType   CanTransferOwnershipResultEnum = "canTransferOwnershipResultPasswordNeeded"
	CanTransferOwnershipResultPasswordTooFreshType CanTransferOwnershipResultEnum = "canTransferOwnershipResultPasswordTooFresh"
	CanTransferOwnershipResultSessionTooFreshType  CanTransferOwnershipResultEnum = "canTransferOwnershipResultSessionTooFresh"
)

CanTransferOwnershipResult enums

type CanTransferOwnershipResultOk

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

CanTransferOwnershipResultOk The session can be used

func NewCanTransferOwnershipResultOk

func NewCanTransferOwnershipResultOk() *CanTransferOwnershipResultOk

NewCanTransferOwnershipResultOk creates a new CanTransferOwnershipResultOk

func (*CanTransferOwnershipResultOk) GetCanTransferOwnershipResultEnum

func (canTransferOwnershipResultOk *CanTransferOwnershipResultOk) GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum

GetCanTransferOwnershipResultEnum return the enum type of this object

func (*CanTransferOwnershipResultOk) MessageType

func (canTransferOwnershipResultOk *CanTransferOwnershipResultOk) MessageType() string

MessageType return the string telegram-type of CanTransferOwnershipResultOk

type CanTransferOwnershipResultPasswordNeeded

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

CanTransferOwnershipResultPasswordNeeded The 2-step verification needs to be enabled first

func NewCanTransferOwnershipResultPasswordNeeded

func NewCanTransferOwnershipResultPasswordNeeded() *CanTransferOwnershipResultPasswordNeeded

NewCanTransferOwnershipResultPasswordNeeded creates a new CanTransferOwnershipResultPasswordNeeded

func (*CanTransferOwnershipResultPasswordNeeded) GetCanTransferOwnershipResultEnum

func (canTransferOwnershipResultPasswordNeeded *CanTransferOwnershipResultPasswordNeeded) GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum

GetCanTransferOwnershipResultEnum return the enum type of this object

func (*CanTransferOwnershipResultPasswordNeeded) MessageType

func (canTransferOwnershipResultPasswordNeeded *CanTransferOwnershipResultPasswordNeeded) MessageType() string

MessageType return the string telegram-type of CanTransferOwnershipResultPasswordNeeded

type CanTransferOwnershipResultPasswordTooFresh

type CanTransferOwnershipResultPasswordTooFresh struct {
	RetryAfter int32 `json:"retry_after"` // Time left before the session can be used to transfer ownership of a chat, in seconds
	// contains filtered or unexported fields
}

CanTransferOwnershipResultPasswordTooFresh The 2-step verification was enabled recently, user needs to wait

func NewCanTransferOwnershipResultPasswordTooFresh

func NewCanTransferOwnershipResultPasswordTooFresh(retryAfter int32) *CanTransferOwnershipResultPasswordTooFresh

NewCanTransferOwnershipResultPasswordTooFresh creates a new CanTransferOwnershipResultPasswordTooFresh

@param retryAfter Time left before the session can be used to transfer ownership of a chat, in seconds

func (*CanTransferOwnershipResultPasswordTooFresh) GetCanTransferOwnershipResultEnum

func (canTransferOwnershipResultPasswordTooFresh *CanTransferOwnershipResultPasswordTooFresh) GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum

GetCanTransferOwnershipResultEnum return the enum type of this object

func (*CanTransferOwnershipResultPasswordTooFresh) MessageType

func (canTransferOwnershipResultPasswordTooFresh *CanTransferOwnershipResultPasswordTooFresh) MessageType() string

MessageType return the string telegram-type of CanTransferOwnershipResultPasswordTooFresh

type CanTransferOwnershipResultSessionTooFresh

type CanTransferOwnershipResultSessionTooFresh struct {
	RetryAfter int32 `json:"retry_after"` // Time left before the session can be used to transfer ownership of a chat, in seconds
	// contains filtered or unexported fields
}

CanTransferOwnershipResultSessionTooFresh The session was created recently, user needs to wait

func NewCanTransferOwnershipResultSessionTooFresh

func NewCanTransferOwnershipResultSessionTooFresh(retryAfter int32) *CanTransferOwnershipResultSessionTooFresh

NewCanTransferOwnershipResultSessionTooFresh creates a new CanTransferOwnershipResultSessionTooFresh

@param retryAfter Time left before the session can be used to transfer ownership of a chat, in seconds

func (*CanTransferOwnershipResultSessionTooFresh) GetCanTransferOwnershipResultEnum

func (canTransferOwnershipResultSessionTooFresh *CanTransferOwnershipResultSessionTooFresh) GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum

GetCanTransferOwnershipResultEnum return the enum type of this object

func (*CanTransferOwnershipResultSessionTooFresh) MessageType

func (canTransferOwnershipResultSessionTooFresh *CanTransferOwnershipResultSessionTooFresh) MessageType() string

MessageType return the string telegram-type of CanTransferOwnershipResultSessionTooFresh

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                      *ChatPhotoInfo            `json:"photo"`                        // Chat photo; may be null
	Permissions                *ChatPermissions          `json:"permissions"`                  // Actions that non-administrator chat members are allowed to take in the chat
	LastMessage                *Message                  `json:"last_message"`                 // Last message in the chat; may be null
	Positions                  []ChatPosition            `json:"positions"`                    // Positions of the chat in chat lists
	IsMarkedAsUnread           bool                      `json:"is_marked_as_unread"`          // True, if the chat is marked as unread
	IsBlocked                  bool                      `json:"is_blocked"`                   // True, if the chat is blocked by the current user and private messages from the chat can't be received
	HasScheduledMessages       bool                      `json:"has_scheduled_messages"`       // True, if the chat has scheduled messages
	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
	ActionBar                  ChatActionBar             `json:"action_bar"`                   // Describes actions which should be possible to do through a chat action bar; may be null
	VoiceChatGroupCallID       int32                     `json:"voice_chat_group_call_id"`     // Group call identifier of an active voice chat; 0 if none or unknown. The voice chat can be received through the method getGroupCall
	IsVoiceChatEmpty           bool                      `json:"is_voice_chat_empty"`          // True, if an active voice chat is empty
	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 application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the 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 *ChatPhotoInfo, permissions *ChatPermissions, lastMessage *Message, positions []ChatPosition, isMarkedAsUnread bool, isBlocked bool, hasScheduledMessages bool, canBeDeletedOnlyForSelf bool, canBeDeletedForAllUsers bool, canBeReported bool, defaultDisableNotification bool, unreadCount int32, lastReadInboxMessageID int64, lastReadOutboxMessageID int64, unreadMentionCount int32, notificationSettings *ChatNotificationSettings, actionBar ChatActionBar, voiceChatGroupCallID int32, isVoiceChatEmpty bool, 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 permissions Actions that non-administrator chat members are allowed to take in the chat @param lastMessage Last message in the chat; may be null @param positions Positions of the chat in chat lists @param isMarkedAsUnread True, if the chat is marked as unread @param isBlocked True, if the chat is blocked by the current user and private messages from the chat can't be received @param hasScheduledMessages True, if the chat has scheduled messages @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 actionBar Describes actions which should be possible to do through a chat action bar; may be null @param voiceChatGroupCallID Group call identifier of an active voice chat; 0 if none or unknown. The voice chat can be received through the method getGroupCall @param isVoiceChatEmpty True, if an active voice chat is empty @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 application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the 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 ChatActionBar

type ChatActionBar interface {
	GetChatActionBarEnum() ChatActionBarEnum
}

ChatActionBar Describes actions which should be possible to do through a chat action bar

type ChatActionBarAddContact

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

ChatActionBarAddContact The chat is a private or secret chat and the other user can be added to the contact list using the method addContact

func NewChatActionBarAddContact

func NewChatActionBarAddContact() *ChatActionBarAddContact

NewChatActionBarAddContact creates a new ChatActionBarAddContact

func (*ChatActionBarAddContact) GetChatActionBarEnum

func (chatActionBarAddContact *ChatActionBarAddContact) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarAddContact) MessageType

func (chatActionBarAddContact *ChatActionBarAddContact) MessageType() string

MessageType return the string telegram-type of ChatActionBarAddContact

type ChatActionBarEnum

type ChatActionBarEnum string

ChatActionBarEnum Alias for abstract ChatActionBar 'Sub-Classes', used as constant-enum here

const (
	ChatActionBarReportSpamType              ChatActionBarEnum = "chatActionBarReportSpam"
	ChatActionBarReportUnrelatedLocationType ChatActionBarEnum = "chatActionBarReportUnrelatedLocation"
	ChatActionBarInviteMembersType           ChatActionBarEnum = "chatActionBarInviteMembers"
	ChatActionBarReportAddBlockType          ChatActionBarEnum = "chatActionBarReportAddBlock"
	ChatActionBarAddContactType              ChatActionBarEnum = "chatActionBarAddContact"
	ChatActionBarSharePhoneNumberType        ChatActionBarEnum = "chatActionBarSharePhoneNumber"
)

ChatActionBar enums

type ChatActionBarInviteMembers

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

ChatActionBarInviteMembers The chat is a recently created group chat, to which new members can be invited

func NewChatActionBarInviteMembers

func NewChatActionBarInviteMembers() *ChatActionBarInviteMembers

NewChatActionBarInviteMembers creates a new ChatActionBarInviteMembers

func (*ChatActionBarInviteMembers) GetChatActionBarEnum

func (chatActionBarInviteMembers *ChatActionBarInviteMembers) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarInviteMembers) MessageType

func (chatActionBarInviteMembers *ChatActionBarInviteMembers) MessageType() string

MessageType return the string telegram-type of ChatActionBarInviteMembers

type ChatActionBarReportAddBlock

type ChatActionBarReportAddBlock struct {
	CanUnarchive bool  `json:"can_unarchive"` // If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
	Distance     int32 `json:"distance"`      // If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users
	// contains filtered or unexported fields
}

ChatActionBarReportAddBlock The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method blockUser, or the other user can be added to the contact list using the method addContact

func NewChatActionBarReportAddBlock

func NewChatActionBarReportAddBlock(canUnarchive bool, distance int32) *ChatActionBarReportAddBlock

NewChatActionBarReportAddBlock creates a new ChatActionBarReportAddBlock

@param canUnarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings @param distance If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users

func (*ChatActionBarReportAddBlock) GetChatActionBarEnum

func (chatActionBarReportAddBlock *ChatActionBarReportAddBlock) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarReportAddBlock) MessageType

func (chatActionBarReportAddBlock *ChatActionBarReportAddBlock) MessageType() string

MessageType return the string telegram-type of ChatActionBarReportAddBlock

type ChatActionBarReportSpam

type ChatActionBarReportSpam struct {
	CanUnarchive bool `json:"can_unarchive"` // If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
	// contains filtered or unexported fields
}

ChatActionBarReportSpam The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam

func NewChatActionBarReportSpam

func NewChatActionBarReportSpam(canUnarchive bool) *ChatActionBarReportSpam

NewChatActionBarReportSpam creates a new ChatActionBarReportSpam

@param canUnarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings

func (*ChatActionBarReportSpam) GetChatActionBarEnum

func (chatActionBarReportSpam *ChatActionBarReportSpam) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarReportSpam) MessageType

func (chatActionBarReportSpam *ChatActionBarReportSpam) MessageType() string

MessageType return the string telegram-type of ChatActionBarReportSpam

type ChatActionBarReportUnrelatedLocation

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

ChatActionBarReportUnrelatedLocation The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation

func NewChatActionBarReportUnrelatedLocation

func NewChatActionBarReportUnrelatedLocation() *ChatActionBarReportUnrelatedLocation

NewChatActionBarReportUnrelatedLocation creates a new ChatActionBarReportUnrelatedLocation

func (*ChatActionBarReportUnrelatedLocation) GetChatActionBarEnum

func (chatActionBarReportUnrelatedLocation *ChatActionBarReportUnrelatedLocation) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarReportUnrelatedLocation) MessageType

func (chatActionBarReportUnrelatedLocation *ChatActionBarReportUnrelatedLocation) MessageType() string

MessageType return the string telegram-type of ChatActionBarReportUnrelatedLocation

type ChatActionBarSharePhoneNumber

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

ChatActionBarSharePhoneNumber The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber

func NewChatActionBarSharePhoneNumber

func NewChatActionBarSharePhoneNumber() *ChatActionBarSharePhoneNumber

NewChatActionBarSharePhoneNumber creates a new ChatActionBarSharePhoneNumber

func (*ChatActionBarSharePhoneNumber) GetChatActionBarEnum

func (chatActionBarSharePhoneNumber *ChatActionBarSharePhoneNumber) GetChatActionBarEnum() ChatActionBarEnum

GetChatActionBarEnum return the enum type of this object

func (*ChatActionBarSharePhoneNumber) MessageType

func (chatActionBarSharePhoneNumber *ChatActionBarSharePhoneNumber) MessageType() string

MessageType return the string telegram-type of ChatActionBarSharePhoneNumber

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 ChatAdministrator

type ChatAdministrator struct {
	UserID      int32  `json:"user_id"`      // User identifier of the administrator
	CustomTitle string `json:"custom_title"` // Custom title of the administrator
	IsOwner     bool   `json:"is_owner"`     // True, if the user is the owner of the chat
	// contains filtered or unexported fields
}

ChatAdministrator Contains information about a chat administrator

func NewChatAdministrator

func NewChatAdministrator(userID int32, customTitle string, isOwner bool) *ChatAdministrator

NewChatAdministrator creates a new ChatAdministrator

@param userID User identifier of the administrator @param customTitle Custom title of the administrator @param isOwner True, if the user is the owner of the chat

func (*ChatAdministrator) MessageType

func (chatAdministrator *ChatAdministrator) MessageType() string

MessageType return the string telegram-type of ChatAdministrator

type ChatAdministrators

type ChatAdministrators struct {
	Administrators []ChatAdministrator `json:"administrators"` // A list of chat administrators
	// contains filtered or unexported fields
}

ChatAdministrators Represents a list of chat administrators

func NewChatAdministrators

func NewChatAdministrators(administrators []ChatAdministrator) *ChatAdministrators

NewChatAdministrators creates a new ChatAdministrators

@param administrators A list of chat administrators

func (*ChatAdministrators) MessageType

func (chatAdministrators *ChatAdministrators) MessageType() string

MessageType return the string telegram-type of ChatAdministrators

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"
	ChatEventPollStoppedType                         ChatEventActionEnum = "chatEventPollStopped"
	ChatEventMessagePinnedType                       ChatEventActionEnum = "chatEventMessagePinned"
	ChatEventMessageUnpinnedType                     ChatEventActionEnum = "chatEventMessageUnpinned"
	ChatEventMemberJoinedType                        ChatEventActionEnum = "chatEventMemberJoined"
	ChatEventMemberLeftType                          ChatEventActionEnum = "chatEventMemberLeft"
	ChatEventMemberInvitedType                       ChatEventActionEnum = "chatEventMemberInvited"
	ChatEventMemberPromotedType                      ChatEventActionEnum = "chatEventMemberPromoted"
	ChatEventMemberRestrictedType                    ChatEventActionEnum = "chatEventMemberRestricted"
	ChatEventTitleChangedType                        ChatEventActionEnum = "chatEventTitleChanged"
	ChatEventPermissionsChangedType                  ChatEventActionEnum = "chatEventPermissionsChanged"
	ChatEventDescriptionChangedType                  ChatEventActionEnum = "chatEventDescriptionChanged"
	ChatEventUsernameChangedType                     ChatEventActionEnum = "chatEventUsernameChanged"
	ChatEventPhotoChangedType                        ChatEventActionEnum = "chatEventPhotoChanged"
	ChatEventInvitesToggledType                      ChatEventActionEnum = "chatEventInvitesToggled"
	ChatEventLinkedChatChangedType                   ChatEventActionEnum = "chatEventLinkedChatChanged"
	ChatEventSlowModeDelayChangedType                ChatEventActionEnum = "chatEventSlowModeDelayChanged"
	ChatEventSignMessagesToggledType                 ChatEventActionEnum = "chatEventSignMessagesToggled"
	ChatEventStickerSetChangedType                   ChatEventActionEnum = "chatEventStickerSetChanged"
	ChatEventLocationChangedType                     ChatEventActionEnum = "chatEventLocationChanged"
	ChatEventIsAllHistoryAvailableToggledType        ChatEventActionEnum = "chatEventIsAllHistoryAvailableToggled"
	ChatEventVoiceChatCreatedType                    ChatEventActionEnum = "chatEventVoiceChatCreated"
	ChatEventVoiceChatDiscardedType                  ChatEventActionEnum = "chatEventVoiceChatDiscarded"
	ChatEventVoiceChatParticipantIsMutedToggledType  ChatEventActionEnum = "chatEventVoiceChatParticipantIsMutedToggled"
	ChatEventVoiceChatMuteNewParticipantsToggledType ChatEventActionEnum = "chatEventVoiceChatMuteNewParticipantsToggled"
)

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 {
	CanInviteUsers bool `json:"can_invite_users"` // New value of can_invite_users permission
	// contains filtered or unexported fields
}

ChatEventInvitesToggled The can_invite_users permission of a supergroup chat was toggled

func NewChatEventInvitesToggled

func NewChatEventInvitesToggled(canInviteUsers bool) *ChatEventInvitesToggled

NewChatEventInvitesToggled creates a new ChatEventInvitesToggled

@param canInviteUsers New value of can_invite_users permission

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 ChatEventLinkedChatChanged

type ChatEventLinkedChatChanged struct {
	OldLinkedChatID int64 `json:"old_linked_chat_id"` // Previous supergroup linked chat identifier
	NewLinkedChatID int64 `json:"new_linked_chat_id"` // New supergroup linked chat identifier
	// contains filtered or unexported fields
}

ChatEventLinkedChatChanged The linked chat of a supergroup was changed

func NewChatEventLinkedChatChanged

func NewChatEventLinkedChatChanged(oldLinkedChatID int64, newLinkedChatID int64) *ChatEventLinkedChatChanged

NewChatEventLinkedChatChanged creates a new ChatEventLinkedChatChanged

@param oldLinkedChatID Previous supergroup linked chat identifier @param newLinkedChatID New supergroup linked chat identifier

func (*ChatEventLinkedChatChanged) GetChatEventActionEnum

func (chatEventLinkedChatChanged *ChatEventLinkedChatChanged) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventLinkedChatChanged) MessageType

func (chatEventLinkedChatChanged *ChatEventLinkedChatChanged) MessageType() string

MessageType return the string telegram-type of ChatEventLinkedChatChanged

type ChatEventLocationChanged

type ChatEventLocationChanged struct {
	OldLocation *ChatLocation `json:"old_location"` // Previous location; may be null
	NewLocation *ChatLocation `json:"new_location"` // New location; may be null
	// contains filtered or unexported fields
}

ChatEventLocationChanged The supergroup location was changed

func NewChatEventLocationChanged

func NewChatEventLocationChanged(oldLocation *ChatLocation, newLocation *ChatLocation) *ChatEventLocationChanged

NewChatEventLocationChanged creates a new ChatEventLocationChanged

@param oldLocation Previous location; may be null @param newLocation New location; may be null

func (*ChatEventLocationChanged) GetChatEventActionEnum

func (chatEventLocationChanged *ChatEventLocationChanged) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventLocationChanged) MessageType

func (chatEventLocationChanged *ChatEventLocationChanged) MessageType() string

MessageType return the string telegram-type of ChatEventLocationChanged

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
	VoiceChatChanges   bool `json:"voice_chat_changes"`  // True, if voice chat actions 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, voiceChatChanges 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 @param voiceChatChanges True, if voice chat actions 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 {
	Message *Message `json:"message"` // Unpinned message
	// contains filtered or unexported fields
}

ChatEventMessageUnpinned A message was unpinned

func NewChatEventMessageUnpinned

func NewChatEventMessageUnpinned(message *Message) *ChatEventMessageUnpinned

NewChatEventMessageUnpinned creates a new ChatEventMessageUnpinned

@param message Unpinned message

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 ChatEventPermissionsChanged

type ChatEventPermissionsChanged struct {
	OldPermissions *ChatPermissions `json:"old_permissions"` // Previous chat permissions
	NewPermissions *ChatPermissions `json:"new_permissions"` // New chat permissions
	// contains filtered or unexported fields
}

ChatEventPermissionsChanged The chat permissions was changed

func NewChatEventPermissionsChanged

func NewChatEventPermissionsChanged(oldPermissions *ChatPermissions, newPermissions *ChatPermissions) *ChatEventPermissionsChanged

NewChatEventPermissionsChanged creates a new ChatEventPermissionsChanged

@param oldPermissions Previous chat permissions @param newPermissions New chat permissions

func (*ChatEventPermissionsChanged) GetChatEventActionEnum

func (chatEventPermissionsChanged *ChatEventPermissionsChanged) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventPermissionsChanged) MessageType

func (chatEventPermissionsChanged *ChatEventPermissionsChanged) MessageType() string

MessageType return the string telegram-type of ChatEventPermissionsChanged

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 ChatEventPollStopped

type ChatEventPollStopped struct {
	Message *Message `json:"message"` // The message with the poll
	// contains filtered or unexported fields
}

ChatEventPollStopped A poll in a message was stopped

func NewChatEventPollStopped

func NewChatEventPollStopped(message *Message) *ChatEventPollStopped

NewChatEventPollStopped creates a new ChatEventPollStopped

@param message The message with the poll

func (*ChatEventPollStopped) GetChatEventActionEnum

func (chatEventPollStopped *ChatEventPollStopped) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventPollStopped) MessageType

func (chatEventPollStopped *ChatEventPollStopped) MessageType() string

MessageType return the string telegram-type of ChatEventPollStopped

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 ChatEventSlowModeDelayChanged

type ChatEventSlowModeDelayChanged struct {
	OldSlowModeDelay int32 `json:"old_slow_mode_delay"` // Previous value of slow_mode_delay
	NewSlowModeDelay int32 `json:"new_slow_mode_delay"` // New value of slow_mode_delay
	// contains filtered or unexported fields
}

ChatEventSlowModeDelayChanged The slow_mode_delay setting of a supergroup was changed

func NewChatEventSlowModeDelayChanged

func NewChatEventSlowModeDelayChanged(oldSlowModeDelay int32, newSlowModeDelay int32) *ChatEventSlowModeDelayChanged

NewChatEventSlowModeDelayChanged creates a new ChatEventSlowModeDelayChanged

@param oldSlowModeDelay Previous value of slow_mode_delay @param newSlowModeDelay New value of slow_mode_delay

func (*ChatEventSlowModeDelayChanged) GetChatEventActionEnum

func (chatEventSlowModeDelayChanged *ChatEventSlowModeDelayChanged) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventSlowModeDelayChanged) MessageType

func (chatEventSlowModeDelayChanged *ChatEventSlowModeDelayChanged) MessageType() string

MessageType return the string telegram-type of ChatEventSlowModeDelayChanged

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 ChatEventVoiceChatCreated

type ChatEventVoiceChatCreated struct {
	GroupCallID int32 `json:"group_call_id"` // Identifier of the voice chat. The voice chat can be received through the method getGroupCall
	// contains filtered or unexported fields
}

ChatEventVoiceChatCreated A voice chat was created

func NewChatEventVoiceChatCreated

func NewChatEventVoiceChatCreated(groupCallID int32) *ChatEventVoiceChatCreated

NewChatEventVoiceChatCreated creates a new ChatEventVoiceChatCreated

@param groupCallID Identifier of the voice chat. The voice chat can be received through the method getGroupCall

func (*ChatEventVoiceChatCreated) GetChatEventActionEnum

func (chatEventVoiceChatCreated *ChatEventVoiceChatCreated) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventVoiceChatCreated) MessageType

func (chatEventVoiceChatCreated *ChatEventVoiceChatCreated) MessageType() string

MessageType return the string telegram-type of ChatEventVoiceChatCreated

type ChatEventVoiceChatDiscarded

type ChatEventVoiceChatDiscarded struct {
	GroupCallID int32 `json:"group_call_id"` // Identifier of the voice chat. The voice chat can be received through the method getGroupCall
	// contains filtered or unexported fields
}

ChatEventVoiceChatDiscarded A voice chat was discarded

func NewChatEventVoiceChatDiscarded

func NewChatEventVoiceChatDiscarded(groupCallID int32) *ChatEventVoiceChatDiscarded

NewChatEventVoiceChatDiscarded creates a new ChatEventVoiceChatDiscarded

@param groupCallID Identifier of the voice chat. The voice chat can be received through the method getGroupCall

func (*ChatEventVoiceChatDiscarded) GetChatEventActionEnum

func (chatEventVoiceChatDiscarded *ChatEventVoiceChatDiscarded) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventVoiceChatDiscarded) MessageType

func (chatEventVoiceChatDiscarded *ChatEventVoiceChatDiscarded) MessageType() string

MessageType return the string telegram-type of ChatEventVoiceChatDiscarded

type ChatEventVoiceChatMuteNewParticipantsToggled

type ChatEventVoiceChatMuteNewParticipantsToggled struct {
	MuteNewParticipants bool `json:"mute_new_participants"` // New value of the mute_new_participants setting
	// contains filtered or unexported fields
}

ChatEventVoiceChatMuteNewParticipantsToggled The mute_new_participants setting of a voice chat was toggled

func NewChatEventVoiceChatMuteNewParticipantsToggled

func NewChatEventVoiceChatMuteNewParticipantsToggled(muteNewParticipants bool) *ChatEventVoiceChatMuteNewParticipantsToggled

NewChatEventVoiceChatMuteNewParticipantsToggled creates a new ChatEventVoiceChatMuteNewParticipantsToggled

@param muteNewParticipants New value of the mute_new_participants setting

func (*ChatEventVoiceChatMuteNewParticipantsToggled) GetChatEventActionEnum

func (chatEventVoiceChatMuteNewParticipantsToggled *ChatEventVoiceChatMuteNewParticipantsToggled) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventVoiceChatMuteNewParticipantsToggled) MessageType

func (chatEventVoiceChatMuteNewParticipantsToggled *ChatEventVoiceChatMuteNewParticipantsToggled) MessageType() string

MessageType return the string telegram-type of ChatEventVoiceChatMuteNewParticipantsToggled

type ChatEventVoiceChatParticipantIsMutedToggled

type ChatEventVoiceChatParticipantIsMutedToggled struct {
	UserID  int32 `json:"user_id"`  // Identifier of the affected user
	IsMuted bool  `json:"is_muted"` // New value of is_muted
	// contains filtered or unexported fields
}

ChatEventVoiceChatParticipantIsMutedToggled A voice chat participant was muted or unmuted

func NewChatEventVoiceChatParticipantIsMutedToggled

func NewChatEventVoiceChatParticipantIsMutedToggled(userID int32, isMuted bool) *ChatEventVoiceChatParticipantIsMutedToggled

NewChatEventVoiceChatParticipantIsMutedToggled creates a new ChatEventVoiceChatParticipantIsMutedToggled

@param userID Identifier of the affected user @param isMuted New value of is_muted

func (*ChatEventVoiceChatParticipantIsMutedToggled) GetChatEventActionEnum

func (chatEventVoiceChatParticipantIsMutedToggled *ChatEventVoiceChatParticipantIsMutedToggled) GetChatEventActionEnum() ChatEventActionEnum

GetChatEventActionEnum return the enum type of this object

func (*ChatEventVoiceChatParticipantIsMutedToggled) MessageType

func (chatEventVoiceChatParticipantIsMutedToggled *ChatEventVoiceChatParticipantIsMutedToggled) MessageType() string

MessageType return the string telegram-type of ChatEventVoiceChatParticipantIsMutedToggled

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 ChatFilter

type ChatFilter struct {
	Title              string  `json:"title"`                // The title of the filter; 1-12 characters without line feeds
	IconName           string  `json:"icon_name"`            // The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work".
	PinnedChatIDs      []int64 `json:"pinned_chat_ids"`      // The chat identifiers of pinned chats in the filtered chat list
	IncludedChatIDs    []int64 `json:"included_chat_ids"`    // The chat identifiers of always included chats in the filtered chat list
	ExcludedChatIDs    []int64 `json:"excluded_chat_ids"`    // The chat identifiers of always excluded chats in the filtered chat list
	ExcludeMuted       bool    `json:"exclude_muted"`        // True, if muted chats need to be excluded
	ExcludeRead        bool    `json:"exclude_read"`         // True, if read chats need to be excluded
	ExcludeArchived    bool    `json:"exclude_archived"`     // True, if archived chats need to be excluded
	IncludeContacts    bool    `json:"include_contacts"`     // True, if contacts need to be included
	IncludeNonContacts bool    `json:"include_non_contacts"` // True, if non-contact users need to be included
	IncludeBots        bool    `json:"include_bots"`         // True, if bots need to be included
	IncludeGroups      bool    `json:"include_groups"`       // True, if basic groups and supergroups need to be included
	IncludeChannels    bool    `json:"include_channels"`     // True, if channels need to be included
	// contains filtered or unexported fields
}

ChatFilter Represents a filter of user chats

func NewChatFilter

func NewChatFilter(title string, iconName string, pinnedChatIDs []int64, includedChatIDs []int64, excludedChatIDs []int64, excludeMuted bool, excludeRead bool, excludeArchived bool, includeContacts bool, includeNonContacts bool, includeBots bool, includeGroups bool, includeChannels bool) *ChatFilter

NewChatFilter creates a new ChatFilter

@param title The title of the filter; 1-12 characters without line feeds @param iconName The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". @param pinnedChatIDs The chat identifiers of pinned chats in the filtered chat list @param includedChatIDs The chat identifiers of always included chats in the filtered chat list @param excludedChatIDs The chat identifiers of always excluded chats in the filtered chat list @param excludeMuted True, if muted chats need to be excluded @param excludeRead True, if read chats need to be excluded @param excludeArchived True, if archived chats need to be excluded @param includeContacts True, if contacts need to be included @param includeNonContacts True, if non-contact users need to be included @param includeBots True, if bots need to be included @param includeGroups True, if basic groups and supergroups need to be included @param includeChannels True, if channels need to be included

func (*ChatFilter) MessageType

func (chatFilter *ChatFilter) MessageType() string

MessageType return the string telegram-type of ChatFilter

type ChatFilterInfo

type ChatFilterInfo struct {
	ID       int32  `json:"id"`        // Unique chat filter identifier
	Title    string `json:"title"`     // The title of the filter; 1-12 characters without line feeds
	IconName string `json:"icon_name"` // The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"
	// contains filtered or unexported fields
}

ChatFilterInfo Contains basic information about a chat filter

func NewChatFilterInfo

func NewChatFilterInfo(iD int32, title string, iconName string) *ChatFilterInfo

NewChatFilterInfo creates a new ChatFilterInfo

@param iD Unique chat filter identifier @param title The title of the filter; 1-12 characters without line feeds @param iconName The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"

func (*ChatFilterInfo) MessageType

func (chatFilterInfo *ChatFilterInfo) MessageType() string

MessageType return the string telegram-type of ChatFilterInfo

type ChatInviteLink struct {
	InviteLink          string `json:"invite_link"`           // Chat invite link
	AdministratorUserID int32  `json:"administrator_user_id"` // User identifier of an administrator created the link
	Date                int32  `json:"date"`                  // Point in time (Unix timestamp) when the link was created
	EditDate            int32  `json:"edit_date"`             // Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown
	ExpireDate          int32  `json:"expire_date"`           // Point in time (Unix timestamp) when the link will expire; 0 if never
	MemberLimit         int32  `json:"member_limit"`          // Maximum number of members, which can join the chat using the link simultaneously; 0 if not limited
	MemberCount         int32  `json:"member_count"`          // Number of chat members, which joined the chat using the link
	IsPermanent         bool   `json:"is_permanent"`          // True, if the link is permanent. Permanent invite link can't have expire date or usage limit. There is exactly one permanent invite link for each administrator with can_invite_users right at a given time
	IsExpired           bool   `json:"is_expired"`            // True, if the link is already expired
	IsRevoked           bool   `json:"is_revoked"`            // True, if the link was revoked
	// contains filtered or unexported fields
}

ChatInviteLink Contains a chat invite link

func NewChatInviteLink(inviteLink string, administratorUserID int32, date int32, editDate int32, expireDate int32, memberLimit int32, memberCount int32, isPermanent bool, isExpired bool, isRevoked bool) *ChatInviteLink

NewChatInviteLink creates a new ChatInviteLink

@param inviteLink Chat invite link @param administratorUserID User identifier of an administrator created the link @param date Point in time (Unix timestamp) when the link was created @param editDate Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown @param expireDate Point in time (Unix timestamp) when the link will expire; 0 if never @param memberLimit Maximum number of members, which can join the chat using the link simultaneously; 0 if not limited @param memberCount Number of chat members, which joined the chat using the link @param isPermanent True, if the link is permanent. Permanent invite link can't have expire date or usage limit. There is exactly one permanent invite link for each administrator with can_invite_users right at a given time @param isExpired True, if the link is already expired @param isRevoked True, if the link was revoked

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 has no access to the chat before joining
	AccessibleFor int32          `json:"accessible_for"`  // If non-zero, the amount of time for which read access to the chat will remain available, in seconds
	Type          ChatType       `json:"type"`            // Contains information about the type of the chat
	Title         string         `json:"title"`           // Title of the chat
	Photo         *ChatPhotoInfo `json:"photo"`           // Chat photo; may be null
	MemberCount   int32          `json:"member_count"`    // Number of members in the chat
	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, i.e. it has a username or it is a location-based supergroup
	// contains filtered or unexported fields
}

ChatInviteLinkInfo Contains information about a chat invite link

func NewChatInviteLinkInfo

func NewChatInviteLinkInfo(chatID int64, accessibleFor int32, typeParam ChatType, title string, photo *ChatPhotoInfo, memberCount int32, memberUserIDs []int32, isPublic bool) *ChatInviteLinkInfo

NewChatInviteLinkInfo creates a new ChatInviteLinkInfo

@param chatID Chat identifier of the invite link; 0 if the user has no access to the chat before joining @param accessibleFor If non-zero, the amount of time for which read access to the chat will remain available, in seconds @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 in the chat @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, i.e. it has a username or it is a location-based supergroup

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 ChatInviteLinkMember

type ChatInviteLinkMember struct {
	UserID         int32 `json:"user_id"`          // User identifier
	JoinedChatDate int32 `json:"joined_chat_date"` // Point in time (Unix timestamp) when the user joined the chat
	// contains filtered or unexported fields
}

ChatInviteLinkMember Describes a chat member joined a chat by an invite link

func NewChatInviteLinkMember

func NewChatInviteLinkMember(userID int32, joinedChatDate int32) *ChatInviteLinkMember

NewChatInviteLinkMember creates a new ChatInviteLinkMember

@param userID User identifier @param joinedChatDate Point in time (Unix timestamp) when the user joined the chat

func (*ChatInviteLinkMember) MessageType

func (chatInviteLinkMember *ChatInviteLinkMember) MessageType() string

MessageType return the string telegram-type of ChatInviteLinkMember

type ChatInviteLinkMembers

type ChatInviteLinkMembers struct {
	TotalCount int32                  `json:"total_count"` // Approximate total count of chat members found
	Members    []ChatInviteLinkMember `json:"members"`     // List of chat members, joined a chat by an invite link
	// contains filtered or unexported fields
}

ChatInviteLinkMembers Contains a list of chat members joined a chat by an invite link

func NewChatInviteLinkMembers

func NewChatInviteLinkMembers(totalCount int32, members []ChatInviteLinkMember) *ChatInviteLinkMembers

NewChatInviteLinkMembers creates a new ChatInviteLinkMembers

@param totalCount Approximate total count of chat members found @param members List of chat members, joined a chat by an invite link

func (*ChatInviteLinkMembers) MessageType

func (chatInviteLinkMembers *ChatInviteLinkMembers) MessageType() string

MessageType return the string telegram-type of ChatInviteLinkMembers

type ChatInviteLinks struct {
	TotalCount  int32            `json:"total_count"`  // Approximate total count of chat invite links found
	InviteLinks []ChatInviteLink `json:"invite_links"` // List of invite links
	// contains filtered or unexported fields
}

ChatInviteLinks Contains a list of chat invite links

func NewChatInviteLinks(totalCount int32, inviteLinks []ChatInviteLink) *ChatInviteLinks

NewChatInviteLinks creates a new ChatInviteLinks

@param totalCount Approximate total count of chat invite links found @param inviteLinks List of invite links

func (*ChatInviteLinks) MessageType

func (chatInviteLinks *ChatInviteLinks) MessageType() string

MessageType return the string telegram-type of ChatInviteLinks

type ChatList

type ChatList interface {
	GetChatListEnum() ChatListEnum
}

ChatList Describes a list of chats

type ChatListArchive

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

ChatListArchive A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives

func NewChatListArchive

func NewChatListArchive() *ChatListArchive

NewChatListArchive creates a new ChatListArchive

func (*ChatListArchive) GetChatListEnum

func (chatListArchive *ChatListArchive) GetChatListEnum() ChatListEnum

GetChatListEnum return the enum type of this object

func (*ChatListArchive) MessageType

func (chatListArchive *ChatListArchive) MessageType() string

MessageType return the string telegram-type of ChatListArchive

type ChatListEnum

type ChatListEnum string

ChatListEnum Alias for abstract ChatList 'Sub-Classes', used as constant-enum here

const (
	ChatListMainType    ChatListEnum = "chatListMain"
	ChatListArchiveType ChatListEnum = "chatListArchive"
	ChatListFilterType  ChatListEnum = "chatListFilter"
)

ChatList enums

type ChatListFilter

type ChatListFilter struct {
	ChatFilterID int32 `json:"chat_filter_id"` // Chat filter identifier
	// contains filtered or unexported fields
}

ChatListFilter A list of chats belonging to a chat filter

func NewChatListFilter

func NewChatListFilter(chatFilterID int32) *ChatListFilter

NewChatListFilter creates a new ChatListFilter

@param chatFilterID Chat filter identifier

func (*ChatListFilter) GetChatListEnum

func (chatListFilter *ChatListFilter) GetChatListEnum() ChatListEnum

GetChatListEnum return the enum type of this object

func (*ChatListFilter) MessageType

func (chatListFilter *ChatListFilter) MessageType() string

MessageType return the string telegram-type of ChatListFilter

type ChatListMain

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

ChatListMain A main list of chats

func NewChatListMain

func NewChatListMain() *ChatListMain

NewChatListMain creates a new ChatListMain

func (*ChatListMain) GetChatListEnum

func (chatListMain *ChatListMain) GetChatListEnum() ChatListEnum

GetChatListEnum return the enum type of this object

func (*ChatListMain) MessageType

func (chatListMain *ChatListMain) MessageType() string

MessageType return the string telegram-type of ChatListMain

type ChatLists

type ChatLists struct {
	ChatLists []ChatList `json:"chat_lists"` // List of chat lists
	// contains filtered or unexported fields
}

ChatLists Contains a list of chat lists

func NewChatLists

func NewChatLists(chatLists []ChatList) *ChatLists

NewChatLists creates a new ChatLists

@param chatLists List of chat lists

func (*ChatLists) MessageType

func (chatLists *ChatLists) MessageType() string

MessageType return the string telegram-type of ChatLists

type ChatLocation

type ChatLocation struct {
	Location *Location `json:"location"` // The location
	Address  string    `json:"address"`  // Location address; 1-64 characters, as defined by the chat owner
	// contains filtered or unexported fields
}

ChatLocation Represents a location to which a chat is connected

func NewChatLocation

func NewChatLocation(location *Location, address string) *ChatLocation

NewChatLocation creates a new ChatLocation

@param location The location @param address Location address; 1-64 characters, as defined by the chat owner

func (*ChatLocation) MessageType

func (chatLocation *ChatLocation) MessageType() string

MessageType return the string telegram-type of ChatLocation

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 the 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 the 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 the 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 the 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 {
	CustomTitle         string `json:"custom_title"`           // A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
	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 their own privileges or demote administrators that were directly or indirectly promoted by them
	CanManageVoiceChats bool   `json:"can_manage_voice_chats"` // True, if the administrator can manage voice chats; applicable to groups only
	IsAnonymous         bool   `json:"is_anonymous"`           // True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
	// 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, ban unprivileged members, and manage voice chats. In supergroups and channels, there are more detailed options for administrator privileges

func NewChatMemberStatusAdministrator

func NewChatMemberStatusAdministrator(customTitle string, canBeEdited bool, canChangeInfo bool, canPostMessages bool, canEditMessages bool, canDeleteMessages bool, canInviteUsers bool, canRestrictMembers bool, canPinMessages bool, canPromoteMembers bool, canManageVoiceChats bool, isAnonymous bool) *ChatMemberStatusAdministrator

NewChatMemberStatusAdministrator creates a new ChatMemberStatusAdministrator

@param customTitle A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only @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 their own privileges or demote administrators that were directly or indirectly promoted by them @param canManageVoiceChats True, if the administrator can manage voice chats; applicable to groups only @param isAnonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only

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. Always 0 in basic groups
	// 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. Always 0 in basic groups

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 {
	CustomTitle string `json:"custom_title"` // A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only
	IsAnonymous bool   `json:"is_anonymous"` // True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
	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 owner of a chat and has all the administrator privileges

func NewChatMemberStatusCreator

func NewChatMemberStatusCreator(customTitle string, isAnonymous bool, isMember bool) *ChatMemberStatusCreator

NewChatMemberStatusCreator creates a new ChatMemberStatusCreator

@param customTitle A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only @param isAnonymous True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only @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
	Permissions         *ChatPermissions `json:"permissions"`           // User permissions in the chat
	// 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, permissions *ChatPermissions) *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 permissions User permissions in the chat

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

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

ChatMembersFilterContacts Returns contacts of the user

func NewChatMembersFilterContacts

func NewChatMembersFilterContacts() *ChatMembersFilterContacts

NewChatMembersFilterContacts creates a new ChatMembersFilterContacts

func (*ChatMembersFilterContacts) GetChatMembersFilterEnum

func (chatMembersFilterContacts *ChatMembersFilterContacts) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterContacts) MessageType

func (chatMembersFilterContacts *ChatMembersFilterContacts) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterContacts

type ChatMembersFilterEnum

type ChatMembersFilterEnum string

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

const (
	ChatMembersFilterContactsType       ChatMembersFilterEnum = "chatMembersFilterContacts"
	ChatMembersFilterAdministratorsType ChatMembersFilterEnum = "chatMembersFilterAdministrators"
	ChatMembersFilterMembersType        ChatMembersFilterEnum = "chatMembersFilterMembers"
	ChatMembersFilterMentionType        ChatMembersFilterEnum = "chatMembersFilterMention"
	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 ChatMembersFilterMention

type ChatMembersFilterMention struct {
	MessageThreadID int64 `json:"message_thread_id"` // If non-zero, the identifier of the current message thread
	// contains filtered or unexported fields
}

ChatMembersFilterMention Returns users which can be mentioned in the chat

func NewChatMembersFilterMention

func NewChatMembersFilterMention(messageThreadID int64) *ChatMembersFilterMention

NewChatMembersFilterMention creates a new ChatMembersFilterMention

@param messageThreadID If non-zero, the identifier of the current message thread

func (*ChatMembersFilterMention) GetChatMembersFilterEnum

func (chatMembersFilterMention *ChatMembersFilterMention) GetChatMembersFilterEnum() ChatMembersFilterEnum

GetChatMembersFilterEnum return the enum type of this object

func (*ChatMembersFilterMention) MessageType

func (chatMembersFilterMention *ChatMembersFilterMention) MessageType() string

MessageType return the string telegram-type of ChatMembersFilterMention

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 ChatNearby

type ChatNearby struct {
	ChatID   int64 `json:"chat_id"`  // Chat identifier
	Distance int32 `json:"distance"` // Distance to the chat location, in meters
	// contains filtered or unexported fields
}

ChatNearby Describes a chat located nearby

func NewChatNearby

func NewChatNearby(chatID int64, distance int32) *ChatNearby

NewChatNearby creates a new ChatNearby

@param chatID Chat identifier @param distance Distance to the chat location, in meters

func (*ChatNearby) MessageType

func (chatNearby *ChatNearby) MessageType() string

MessageType return the string telegram-type of ChatNearby

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 ChatPermissions

type ChatPermissions struct {
	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
	CanSendPolls          bool `json:"can_send_polls"`            // True, if the user can send polls. Implies can_send_messages permissions
	CanSendOtherMessages  bool `json:"can_send_other_messages"`   // True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions
	CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` // True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
	CanChangeInfo         bool `json:"can_change_info"`           // True, if the user can change the chat title, photo, and other settings
	CanInviteUsers        bool `json:"can_invite_users"`          // True, if the user can invite new users to the chat
	CanPinMessages        bool `json:"can_pin_messages"`          // True, if the user can pin messages
	// contains filtered or unexported fields
}

ChatPermissions Describes actions that a user is allowed to take in a chat

func NewChatPermissions

func NewChatPermissions(canSendMessages bool, canSendMediaMessages bool, canSendPolls bool, canSendOtherMessages bool, canAddWebPagePreviews bool, canChangeInfo bool, canInviteUsers bool, canPinMessages bool) *ChatPermissions

NewChatPermissions creates a new ChatPermissions

@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 canSendPolls True, if the user can send polls. Implies can_send_messages permissions @param canSendOtherMessages True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions @param canAddWebPagePreviews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions @param canChangeInfo True, if the user can change the chat title, photo, and other settings @param canInviteUsers True, if the user can invite new users to the chat @param canPinMessages True, if the user can pin messages

func (*ChatPermissions) MessageType

func (chatPermissions *ChatPermissions) MessageType() string

MessageType return the string telegram-type of ChatPermissions

type ChatPhoto

type ChatPhoto struct {
	ID            JSONInt64          `json:"id"`            // Unique photo identifier
	AddedDate     int32              `json:"added_date"`    // Point in time (Unix timestamp) when the photo has been added
	Minithumbnail *Minithumbnail     `json:"minithumbnail"` // Photo minithumbnail; may be null
	Sizes         []PhotoSize        `json:"sizes"`         // Available variants of the photo in JPEG format, in different size
	Animation     *AnimatedChatPhoto `json:"animation"`     // Animated variant of the photo in MPEG4 format; may be null
	// contains filtered or unexported fields
}

ChatPhoto Describes a chat or user profile photo

func NewChatPhoto

func NewChatPhoto(iD JSONInt64, addedDate int32, minithumbnail *Minithumbnail, sizes []PhotoSize, animation *AnimatedChatPhoto) *ChatPhoto

NewChatPhoto creates a new ChatPhoto

@param iD Unique photo identifier @param addedDate Point in time (Unix timestamp) when the photo has been added @param minithumbnail Photo minithumbnail; may be null @param sizes Available variants of the photo in JPEG format, in different size @param animation Animated variant of the photo in MPEG4 format; may be null

func (*ChatPhoto) MessageType

func (chatPhoto *ChatPhoto) MessageType() string

MessageType return the string telegram-type of ChatPhoto

type ChatPhotoInfo

type ChatPhotoInfo struct {
	Small        *File `json:"small"`         // A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed
	Big          *File `json:"big"`           // A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed
	HasAnimation bool  `json:"has_animation"` // True, if the photo has animated variant
	// contains filtered or unexported fields
}

ChatPhotoInfo Contains basic information about the photo of a chat

func NewChatPhotoInfo

func NewChatPhotoInfo(small *File, big *File, hasAnimation bool) *ChatPhotoInfo

NewChatPhotoInfo creates a new ChatPhotoInfo

@param small A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed @param big A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed @param hasAnimation True, if the photo has animated variant

func (*ChatPhotoInfo) MessageType

func (chatPhotoInfo *ChatPhotoInfo) MessageType() string

MessageType return the string telegram-type of ChatPhotoInfo

type ChatPhotos

type ChatPhotos struct {
	TotalCount int32       `json:"total_count"` // Total number of photos
	Photos     []ChatPhoto `json:"photos"`      // List of photos
	// contains filtered or unexported fields
}

ChatPhotos Contains a list of chat or user profile photos

func NewChatPhotos

func NewChatPhotos(totalCount int32, photos []ChatPhoto) *ChatPhotos

NewChatPhotos creates a new ChatPhotos

@param totalCount Total number of photos @param photos List of photos

func (*ChatPhotos) MessageType

func (chatPhotos *ChatPhotos) MessageType() string

MessageType return the string telegram-type of ChatPhotos

type ChatPosition

type ChatPosition struct {
	List     ChatList   `json:"list"`      // The chat list
	Order    JSONInt64  `json:"order"`     // A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order
	IsPinned bool       `json:"is_pinned"` // True, if the chat is pinned in the chat list
	Source   ChatSource `json:"source"`    // Source of the chat in the chat list; may be null
	// contains filtered or unexported fields
}

ChatPosition Describes a position of a chat in a chat list

func NewChatPosition

func NewChatPosition(list ChatList, order JSONInt64, isPinned bool, source ChatSource) *ChatPosition

NewChatPosition creates a new ChatPosition

@param list The chat list @param order A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order @param isPinned True, if the chat is pinned in the chat list @param source Source of the chat in the chat list; may be null

func (*ChatPosition) MessageType

func (chatPosition *ChatPosition) MessageType() string

MessageType return the string telegram-type of ChatPosition

func (*ChatPosition) UnmarshalJSON

func (chatPosition *ChatPosition) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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"
	ChatReportReasonUnrelatedLocationType ChatReportReasonEnum = "chatReportReasonUnrelatedLocation"
	ChatReportReasonFakeType              ChatReportReasonEnum = "chatReportReasonFake"
	ChatReportReasonCustomType            ChatReportReasonEnum = "chatReportReasonCustom"
)

ChatReportReason enums

type ChatReportReasonFake

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

ChatReportReasonFake The chat represents a fake account

func NewChatReportReasonFake

func NewChatReportReasonFake() *ChatReportReasonFake

NewChatReportReasonFake creates a new ChatReportReasonFake

func (*ChatReportReasonFake) GetChatReportReasonEnum

func (chatReportReasonFake *ChatReportReasonFake) GetChatReportReasonEnum() ChatReportReasonEnum

GetChatReportReasonEnum return the enum type of this object

func (*ChatReportReasonFake) MessageType

func (chatReportReasonFake *ChatReportReasonFake) MessageType() string

MessageType return the string telegram-type of ChatReportReasonFake

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 ChatReportReasonUnrelatedLocation

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

ChatReportReasonUnrelatedLocation The location-based chat is unrelated to its stated location

func NewChatReportReasonUnrelatedLocation

func NewChatReportReasonUnrelatedLocation() *ChatReportReasonUnrelatedLocation

NewChatReportReasonUnrelatedLocation creates a new ChatReportReasonUnrelatedLocation

func (*ChatReportReasonUnrelatedLocation) GetChatReportReasonEnum

func (chatReportReasonUnrelatedLocation *ChatReportReasonUnrelatedLocation) GetChatReportReasonEnum() ChatReportReasonEnum

GetChatReportReasonEnum return the enum type of this object

func (*ChatReportReasonUnrelatedLocation) MessageType

func (chatReportReasonUnrelatedLocation *ChatReportReasonUnrelatedLocation) MessageType() string

MessageType return the string telegram-type of ChatReportReasonUnrelatedLocation

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 ChatSource

type ChatSource interface {
	GetChatSourceEnum() ChatSourceEnum
}

ChatSource Describes a reason why an external chat is shown in a chat list

type ChatSourceEnum

type ChatSourceEnum string

ChatSourceEnum Alias for abstract ChatSource 'Sub-Classes', used as constant-enum here

const (
	ChatSourceMtprotoProxyType              ChatSourceEnum = "chatSourceMtprotoProxy"
	ChatSourcePublicServiceAnnouncementType ChatSourceEnum = "chatSourcePublicServiceAnnouncement"
)

ChatSource enums

type ChatSourceMtprotoProxy

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

ChatSourceMtprotoProxy The chat is sponsored by the user's MTProxy server

func NewChatSourceMtprotoProxy

func NewChatSourceMtprotoProxy() *ChatSourceMtprotoProxy

NewChatSourceMtprotoProxy creates a new ChatSourceMtprotoProxy

func (*ChatSourceMtprotoProxy) GetChatSourceEnum

func (chatSourceMtprotoProxy *ChatSourceMtprotoProxy) GetChatSourceEnum() ChatSourceEnum

GetChatSourceEnum return the enum type of this object

func (*ChatSourceMtprotoProxy) MessageType

func (chatSourceMtprotoProxy *ChatSourceMtprotoProxy) MessageType() string

MessageType return the string telegram-type of ChatSourceMtprotoProxy

type ChatSourcePublicServiceAnnouncement

type ChatSourcePublicServiceAnnouncement struct {
	Type string `json:"type"` // The type of the announcement
	Text string `json:"text"` // The text of the announcement
	// contains filtered or unexported fields
}

ChatSourcePublicServiceAnnouncement The chat contains a public service announcement

func NewChatSourcePublicServiceAnnouncement

func NewChatSourcePublicServiceAnnouncement(typeParam string, text string) *ChatSourcePublicServiceAnnouncement

NewChatSourcePublicServiceAnnouncement creates a new ChatSourcePublicServiceAnnouncement

@param typeParam The type of the announcement @param text The text of the announcement

func (*ChatSourcePublicServiceAnnouncement) GetChatSourceEnum

func (chatSourcePublicServiceAnnouncement *ChatSourcePublicServiceAnnouncement) GetChatSourceEnum() ChatSourceEnum

GetChatSourceEnum return the enum type of this object

func (*ChatSourcePublicServiceAnnouncement) MessageType

func (chatSourcePublicServiceAnnouncement *ChatSourcePublicServiceAnnouncement) MessageType() string

MessageType return the string telegram-type of ChatSourcePublicServiceAnnouncement

type ChatStatistics

type ChatStatistics interface {
	GetChatStatisticsEnum() ChatStatisticsEnum
}

ChatStatistics Contains a detailed statistics about a chat

type ChatStatisticsAdministratorActionsInfo

type ChatStatisticsAdministratorActionsInfo struct {
	UserID              int32 `json:"user_id"`               // Administrator user identifier
	DeletedMessageCount int32 `json:"deleted_message_count"` // Number of messages deleted by the administrator
	BannedUserCount     int32 `json:"banned_user_count"`     // Number of users banned by the administrator
	RestrictedUserCount int32 `json:"restricted_user_count"` // Number of users restricted by the administrator
	// contains filtered or unexported fields
}

ChatStatisticsAdministratorActionsInfo Contains statistics about administrator actions done by a user

func NewChatStatisticsAdministratorActionsInfo

func NewChatStatisticsAdministratorActionsInfo(userID int32, deletedMessageCount int32, bannedUserCount int32, restrictedUserCount int32) *ChatStatisticsAdministratorActionsInfo

NewChatStatisticsAdministratorActionsInfo creates a new ChatStatisticsAdministratorActionsInfo

@param userID Administrator user identifier @param deletedMessageCount Number of messages deleted by the administrator @param bannedUserCount Number of users banned by the administrator @param restrictedUserCount Number of users restricted by the administrator

func (*ChatStatisticsAdministratorActionsInfo) MessageType

func (chatStatisticsAdministratorActionsInfo *ChatStatisticsAdministratorActionsInfo) MessageType() string

MessageType return the string telegram-type of ChatStatisticsAdministratorActionsInfo

type ChatStatisticsChannel

type ChatStatisticsChannel struct {
	Period                         *DateRange                             `json:"period"`                           // A period to which the statistics applies
	MemberCount                    *StatisticalValue                      `json:"member_count"`                     // Number of members in the chat
	MeanViewCount                  *StatisticalValue                      `json:"mean_view_count"`                  // Mean number of times the recently sent messages was viewed
	MeanShareCount                 *StatisticalValue                      `json:"mean_share_count"`                 // Mean number of times the recently sent messages was shared
	EnabledNotificationsPercentage float64                                `json:"enabled_notifications_percentage"` // A percentage of users with enabled notifications for the chat
	MemberCountGraph               StatisticalGraph                       `json:"member_count_graph"`               // A graph containing number of members in the chat
	JoinGraph                      StatisticalGraph                       `json:"join_graph"`                       // A graph containing number of members joined and left the chat
	MuteGraph                      StatisticalGraph                       `json:"mute_graph"`                       // A graph containing number of members muted and unmuted the chat
	ViewCountByHourGraph           StatisticalGraph                       `json:"view_count_by_hour_graph"`         // A graph containing number of message views in a given hour in the last two weeks
	ViewCountBySourceGraph         StatisticalGraph                       `json:"view_count_by_source_graph"`       // A graph containing number of message views per source
	JoinBySourceGraph              StatisticalGraph                       `json:"join_by_source_graph"`             // A graph containing number of new member joins per source
	LanguageGraph                  StatisticalGraph                       `json:"language_graph"`                   // A graph containing number of users viewed chat messages per language
	MessageInteractionGraph        StatisticalGraph                       `json:"message_interaction_graph"`        // A graph containing number of chat message views and shares
	InstantViewInteractionGraph    StatisticalGraph                       `json:"instant_view_interaction_graph"`   // A graph containing number of views of associated with the chat instant views
	RecentMessageInteractions      []ChatStatisticsMessageInteractionInfo `json:"recent_message_interactions"`      // Detailed statistics about number of views and shares of recently sent messages
	// contains filtered or unexported fields
}

ChatStatisticsChannel A detailed statistics about a channel chat

func NewChatStatisticsChannel

func NewChatStatisticsChannel(period *DateRange, memberCount *StatisticalValue, meanViewCount *StatisticalValue, meanShareCount *StatisticalValue, enabledNotificationsPercentage float64, memberCountGraph StatisticalGraph, joinGraph StatisticalGraph, muteGraph StatisticalGraph, viewCountByHourGraph StatisticalGraph, viewCountBySourceGraph StatisticalGraph, joinBySourceGraph StatisticalGraph, languageGraph StatisticalGraph, messageInteractionGraph StatisticalGraph, instantViewInteractionGraph StatisticalGraph, recentMessageInteractions []ChatStatisticsMessageInteractionInfo) *ChatStatisticsChannel

NewChatStatisticsChannel creates a new ChatStatisticsChannel

@param period A period to which the statistics applies @param memberCount Number of members in the chat @param meanViewCount Mean number of times the recently sent messages was viewed @param meanShareCount Mean number of times the recently sent messages was shared @param enabledNotificationsPercentage A percentage of users with enabled notifications for the chat @param memberCountGraph A graph containing number of members in the chat @param joinGraph A graph containing number of members joined and left the chat @param muteGraph A graph containing number of members muted and unmuted the chat @param viewCountByHourGraph A graph containing number of message views in a given hour in the last two weeks @param viewCountBySourceGraph A graph containing number of message views per source @param joinBySourceGraph A graph containing number of new member joins per source @param languageGraph A graph containing number of users viewed chat messages per language @param messageInteractionGraph A graph containing number of chat message views and shares @param instantViewInteractionGraph A graph containing number of views of associated with the chat instant views @param recentMessageInteractions Detailed statistics about number of views and shares of recently sent messages

func (*ChatStatisticsChannel) GetChatStatisticsEnum

func (chatStatisticsChannel *ChatStatisticsChannel) GetChatStatisticsEnum() ChatStatisticsEnum

GetChatStatisticsEnum return the enum type of this object

func (*ChatStatisticsChannel) MessageType

func (chatStatisticsChannel *ChatStatisticsChannel) MessageType() string

MessageType return the string telegram-type of ChatStatisticsChannel

func (*ChatStatisticsChannel) UnmarshalJSON

func (chatStatisticsChannel *ChatStatisticsChannel) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type ChatStatisticsEnum

type ChatStatisticsEnum string

ChatStatisticsEnum Alias for abstract ChatStatistics 'Sub-Classes', used as constant-enum here

const (
	ChatStatisticsSupergroupType ChatStatisticsEnum = "chatStatisticsSupergroup"
	ChatStatisticsChannelType    ChatStatisticsEnum = "chatStatisticsChannel"
)

ChatStatistics enums

type ChatStatisticsInviterInfo

type ChatStatisticsInviterInfo struct {
	UserID           int32 `json:"user_id"`            // User identifier
	AddedMemberCount int32 `json:"added_member_count"` // Number of new members invited by the user
	// contains filtered or unexported fields
}

ChatStatisticsInviterInfo Contains statistics about number of new members invited by a user

func NewChatStatisticsInviterInfo

func NewChatStatisticsInviterInfo(userID int32, addedMemberCount int32) *ChatStatisticsInviterInfo

NewChatStatisticsInviterInfo creates a new ChatStatisticsInviterInfo

@param userID User identifier @param addedMemberCount Number of new members invited by the user

func (*ChatStatisticsInviterInfo) MessageType

func (chatStatisticsInviterInfo *ChatStatisticsInviterInfo) MessageType() string

MessageType return the string telegram-type of ChatStatisticsInviterInfo

type ChatStatisticsMessageInteractionInfo

type ChatStatisticsMessageInteractionInfo struct {
	MessageID    int64 `json:"message_id"`    // Message identifier
	ViewCount    int32 `json:"view_count"`    // Number of times the message was viewed
	ForwardCount int32 `json:"forward_count"` // Number of times the message was forwarded
	// contains filtered or unexported fields
}

ChatStatisticsMessageInteractionInfo Contains statistics about interactions with a message

func NewChatStatisticsMessageInteractionInfo

func NewChatStatisticsMessageInteractionInfo(messageID int64, viewCount int32, forwardCount int32) *ChatStatisticsMessageInteractionInfo

NewChatStatisticsMessageInteractionInfo creates a new ChatStatisticsMessageInteractionInfo

@param messageID Message identifier @param viewCount Number of times the message was viewed @param forwardCount Number of times the message was forwarded

func (*ChatStatisticsMessageInteractionInfo) MessageType

func (chatStatisticsMessageInteractionInfo *ChatStatisticsMessageInteractionInfo) MessageType() string

MessageType return the string telegram-type of ChatStatisticsMessageInteractionInfo

type ChatStatisticsMessageSenderInfo

type ChatStatisticsMessageSenderInfo struct {
	UserID                int32 `json:"user_id"`                 // User identifier
	SentMessageCount      int32 `json:"sent_message_count"`      // Number of sent messages
	AverageCharacterCount int32 `json:"average_character_count"` // Average number of characters in sent messages
	// contains filtered or unexported fields
}

ChatStatisticsMessageSenderInfo Contains statistics about messages sent by a user

func NewChatStatisticsMessageSenderInfo

func NewChatStatisticsMessageSenderInfo(userID int32, sentMessageCount int32, averageCharacterCount int32) *ChatStatisticsMessageSenderInfo

NewChatStatisticsMessageSenderInfo creates a new ChatStatisticsMessageSenderInfo

@param userID User identifier @param sentMessageCount Number of sent messages @param averageCharacterCount Average number of characters in sent messages

func (*ChatStatisticsMessageSenderInfo) MessageType

func (chatStatisticsMessageSenderInfo *ChatStatisticsMessageSenderInfo) MessageType() string

MessageType return the string telegram-type of ChatStatisticsMessageSenderInfo

type ChatStatisticsSupergroup

type ChatStatisticsSupergroup struct {
	Period              *DateRange                               `json:"period"`                // A period to which the statistics applies
	MemberCount         *StatisticalValue                        `json:"member_count"`          // Number of members in the chat
	MessageCount        *StatisticalValue                        `json:"message_count"`         // Number of messages sent to the chat
	ViewerCount         *StatisticalValue                        `json:"viewer_count"`          // Number of users who viewed messages in the chat
	SenderCount         *StatisticalValue                        `json:"sender_count"`          // Number of users who sent messages to the chat
	MemberCountGraph    StatisticalGraph                         `json:"member_count_graph"`    // A graph containing number of members in the chat
	JoinGraph           StatisticalGraph                         `json:"join_graph"`            // A graph containing number of members joined and left the chat
	JoinBySourceGraph   StatisticalGraph                         `json:"join_by_source_graph"`  // A graph containing number of new member joins per source
	LanguageGraph       StatisticalGraph                         `json:"language_graph"`        // A graph containing distribution of active users per language
	MessageContentGraph StatisticalGraph                         `json:"message_content_graph"` // A graph containing distribution of sent messages by content type
	ActionGraph         StatisticalGraph                         `json:"action_graph"`          // A graph containing number of different actions in the chat
	DayGraph            StatisticalGraph                         `json:"day_graph"`             // A graph containing distribution of message views per hour
	WeekGraph           StatisticalGraph                         `json:"week_graph"`            // A graph containing distribution of message views per day of week
	TopSenders          []ChatStatisticsMessageSenderInfo        `json:"top_senders"`           // List of users sent most messages in the last week
	TopAdministrators   []ChatStatisticsAdministratorActionsInfo `json:"top_administrators"`    // List of most active administrators in the last week
	TopInviters         []ChatStatisticsInviterInfo              `json:"top_inviters"`          // List of most active inviters of new members in the last week
	// contains filtered or unexported fields
}

ChatStatisticsSupergroup A detailed statistics about a supergroup chat

func NewChatStatisticsSupergroup

func NewChatStatisticsSupergroup(period *DateRange, memberCount *StatisticalValue, messageCount *StatisticalValue, viewerCount *StatisticalValue, senderCount *StatisticalValue, memberCountGraph StatisticalGraph, joinGraph StatisticalGraph, joinBySourceGraph StatisticalGraph, languageGraph StatisticalGraph, messageContentGraph StatisticalGraph, actionGraph StatisticalGraph, dayGraph StatisticalGraph, weekGraph StatisticalGraph, topSenders []ChatStatisticsMessageSenderInfo, topAdministrators []ChatStatisticsAdministratorActionsInfo, topInviters []ChatStatisticsInviterInfo) *ChatStatisticsSupergroup

NewChatStatisticsSupergroup creates a new ChatStatisticsSupergroup

@param period A period to which the statistics applies @param memberCount Number of members in the chat @param messageCount Number of messages sent to the chat @param viewerCount Number of users who viewed messages in the chat @param senderCount Number of users who sent messages to the chat @param memberCountGraph A graph containing number of members in the chat @param joinGraph A graph containing number of members joined and left the chat @param joinBySourceGraph A graph containing number of new member joins per source @param languageGraph A graph containing distribution of active users per language @param messageContentGraph A graph containing distribution of sent messages by content type @param actionGraph A graph containing number of different actions in the chat @param dayGraph A graph containing distribution of message views per hour @param weekGraph A graph containing distribution of message views per day of week @param topSenders List of users sent most messages in the last week @param topAdministrators List of most active administrators in the last week @param topInviters List of most active inviters of new members in the last week

func (*ChatStatisticsSupergroup) GetChatStatisticsEnum

func (chatStatisticsSupergroup *ChatStatisticsSupergroup) GetChatStatisticsEnum() ChatStatisticsEnum

GetChatStatisticsEnum return the enum type of this object

func (*ChatStatisticsSupergroup) MessageType

func (chatStatisticsSupergroup *ChatStatisticsSupergroup) MessageType() string

MessageType return the string telegram-type of ChatStatisticsSupergroup

func (*ChatStatisticsSupergroup) UnmarshalJSON

func (chatStatisticsSupergroup *ChatStatisticsSupergroup) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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 {
	TotalCount int32   `json:"total_count"` // Approximate total count of chats found
	ChatIDs    []int64 `json:"chat_ids"`    // List of chat identifiers
	// contains filtered or unexported fields
}

Chats Represents a list of chats

func NewChats

func NewChats(totalCount int32, chatIDs []int64) *Chats

NewChats creates a new Chats

@param totalCount Approximate total count of chats found @param chatIDs List of chat identifiers

func (*Chats) MessageType

func (chats *Chats) MessageType() string

MessageType return the string telegram-type of Chats

type ChatsNearby

type ChatsNearby struct {
	UsersNearby       []ChatNearby `json:"users_nearby"`       // List of users nearby
	SupergroupsNearby []ChatNearby `json:"supergroups_nearby"` // List of location-based supergroups nearby
	// contains filtered or unexported fields
}

ChatsNearby Represents a list of chats located nearby

func NewChatsNearby

func NewChatsNearby(usersNearby []ChatNearby, supergroupsNearby []ChatNearby) *ChatsNearby

NewChatsNearby creates a new ChatsNearby

@param usersNearby List of users nearby @param supergroupsNearby List of location-based supergroups nearby

func (*ChatsNearby) MessageType

func (chatsNearby *ChatsNearby) MessageType() string

MessageType return the string telegram-type of ChatsNearby

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 chats with username, 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 application

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 int64, forwardLimit int32) (*Ok, error)

AddChatMember Adds a new member to a chat. Members can't be added to private or secret chats @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 []int64) (*Ok, error)

AddChatMembers Adds multiple new members to a chat. Currently this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members @param chatID Chat identifier @param userIDs Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels

func (*Client) AddChatToList

func (client *Client) AddChatToList(chatID int64, chatList ChatList) (*Ok, error)

AddChatToList Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed @param chatID Chat identifier @param chatList The chat list. Use getChatListsToAddChat to get suitable chat lists

func (*Client) AddContact

func (client *Client) AddContact(contact *Contact, sharePhoneNumber bool) (*Ok, error)

AddContact Adds a user to the contact list or edits an existing contact by their user identifier @param contact The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored @param sharePhoneNumber True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number

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, sender MessageSender, 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 sender The sender sender of the message @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. Can be called synchronously @param verbosityLevel The 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 int64, 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) BanChatMember

func (client *Client) BanChatMember(chatID int64, userID int64, bannedUntilDate int32, revokeMessages bool) (*Ok, error)

BanChatMember Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first @param chatID Chat identifier @param userID Identifier of the user @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. Ignored in basic groups @param revokeMessages Pass true to delete all messages in the chat for the user. Always true for supergroups and channels

func (*Client) BlockMessageSenderFromReplies

func (client *Client) BlockMessageSenderFromReplies(messageID int64, deleteMessage bool, deleteAllMessages bool, reportSpam bool) (*Ok, error)

BlockMessageSenderFromReplies Blocks an original sender of a message in the Replies chat @param messageID The identifier of an incoming message in the Replies chat @param deleteMessage Pass true if the message must be deleted @param deleteAllMessages Pass true if all messages from the same sender must be deleted @param reportSpam Pass true if the sender must be reported to the Telegram moderators

func (*Client) CanTransferOwnership

func (client *Client) CanTransferOwnership() (CanTransferOwnershipResult, error)

CanTransferOwnership Checks whether the current session can be used to transfer a chat ownership to another user

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

func (client *Client) ChangeImportedContacts(contacts []Contact) (*ImportedContacts, error)

ChangeImportedContacts Changes imported contacts using the list of 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, settings *PhoneNumberAuthenticationSettings) (*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 settings Settings for the authentication of the user's phone number

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

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; must 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) CheckCreatedPublicChatsLimit

func (client *Client) CheckCreatedPublicChatsLimit(typeParam PublicChatType) (*Ok, error)

CheckCreatedPublicChatsLimit Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached @param typeParam Type of the public chats, for which to check the limit

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

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 transferring its state to secretChatStateClosed @param secretChatID Secret chat identifier

func (*Client) ConfirmQrCodeAuthentication

func (client *Client) ConfirmQrCodeAuthentication(link string) (*Session, error)

ConfirmQrCodeAuthentication Confirms QR code authentication on another device. Returns created session on success @param link A link from a QR code. The link must be scanned by the in-app camera

func (*Client) CreateBasicGroupChat

func (client *Client) CreateBasicGroupChat(basicGroupID int64, 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 int64, protocol *CallProtocol, isVideo bool) (*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 application @param isVideo True, if a video call needs to be created

func (*Client) CreateChatFilter

func (client *Client) CreateChatFilter(filter *ChatFilter) (*ChatFilterInfo, error)

CreateChatFilter Creates new chat filter. Returns information about the created chat filter @param filter Chat filter

func (*Client) CreateNewBasicGroupChat

func (client *Client) CreateNewBasicGroupChat(userIDs []int64, 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 int64) (*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 int64, 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. Animated stickers can't be masks @param stickers List of stickers to be added to the set; must be non-empty. All stickers must be of the same type

func (*Client) CreateNewSupergroupChat

func (client *Client) CreateNewSupergroupChat(title string, isChannel bool, description string, location *ChatLocation, forImport bool) (*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 needs to be created @param description @param location Chat location if a location-based supergroup is being created @param forImport True, if the supergroup is created for importing messages using importMessage

func (*Client) CreatePrivateChat

func (client *Client) CreatePrivateChat(userID int64, 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 int64, 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) CreateVoiceChat

func (client *Client) CreateVoiceChat(chatID int64) (*GroupCallID, error)

CreateVoiceChat Creates a voice chat (a group call bound to a chat). Available only for basic groups and supergroups; requires can_manage_voice_chats rights @param chatID Chat identifier

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

func (client *Client) DeleteAllCallMessages(revoke bool) (*Ok, error)

DeleteAllCallMessages Deletes all call messages @param revoke Pass true to delete the messages for all users

func (*Client) DeleteChat

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

DeleteChat Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @param chatID Chat identifier

func (*Client) DeleteChatFilter

func (client *Client) DeleteChatFilter(chatFilterID int32) (*Ok, error)

DeleteChatFilter Deletes existing chat filter @param chatFilterID Chat filter identifier

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

DeleteChatMessagesFromUser Deletes all messages sent by the specified user to a chat. Supported only for 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 @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) 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. Can be called before authorization

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, isVideo bool, 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 isVideo True, if the call was a video call @param connectionID Identifier of the connection used during the call

func (*Client) DiscardGroupCall

func (client *Client) DiscardGroupCall(groupCallID int32) (*Ok, error)

DiscardGroupCall Discards a group call. Requires groupCall.can_be_managed @param groupCallID Group call identifier

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

func (client *Client) EditChatFilter(chatFilterID int32, filter *ChatFilter) (*ChatFilterInfo, error)

EditChatFilter Edits existing chat filter. Returns information about the edited chat filter @param chatFilterID Chat filter identifier @param filter The edited chat filter

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, heading int32, proximityAlertRadius int32) (*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 @param heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown @param proximityAlertRadius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled

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, heading int32, proximityAlertRadius int32) (*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 @param heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown @param proximityAlertRadius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled

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

func (client *Client) EditMessageSchedulingState(chatID int64, messageID int64, schedulingState MessageSchedulingState) (*Ok, error)

EditMessageSchedulingState Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed @param chatID The chat the message belongs to @param messageID Identifier of the message @param schedulingState The new message scheduling state. Pass null to send the message immediately

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, options *MessageSendOptions, sendCopy bool, removeCaption 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. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously @param options Options to be used to send the messages @param sendCopy True, if content of the messages needs to be copied without links to the original messages. Always true if the messages are forwarded to a secret chat @param removeCaption True, if media caption of message copies needs to be removed. Ignored if send_copy is false

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 application. 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 The 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. Can be called before initialization

func (*Client) GetAutoDownloadSettingsPresets

func (client *Client) GetAutoDownloadSettingsPresets() (*AutoDownloadSettingsPresets, error)

GetAutoDownloadSettingsPresets Returns auto-download settings presets for the current user

func (*Client) GetBackgroundURL

func (client *Client) GetBackgroundURL(name string, typeParam BackgroundType) (*HttpURL, error)

GetBackgroundURL Constructs a persistent HTTP URL for a background @param name Background name @param typeParam Background type

func (*Client) GetBackgrounds

func (client *Client) GetBackgrounds(forDarkTheme bool) (*Backgrounds, error)

GetBackgrounds Returns backgrounds installed by the user @param forDarkTheme True, if the backgrounds must be ordered for dark theme

func (*Client) GetBankCardInfo

func (client *Client) GetBankCardInfo(bankCardNumber string) (*BankCardInfo, error)

GetBankCardInfo Returns information about a bank card @param bankCardNumber The bank card number

func (*Client) GetBasicGroup

func (client *Client) GetBasicGroup(basicGroupID int64) (*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 int64) (*BasicGroupFullInfo, error)

GetBasicGroupFullInfo Returns full information about a basic group by its identifier @param basicGroupID Basic group identifier

func (*Client) GetBlockedMessageSenders

func (client *Client) GetBlockedMessageSenders(offset int32, limit int32) (*MessageSenders, error)

GetBlockedMessageSenders Returns users and chats that were blocked by the current user @param offset Number of users and chats to skip in the result; must be non-negative @param limit The maximum number of users and chats 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) GetCallbackQueryMessage

func (client *Client) GetCallbackQueryMessage(chatID int64, messageID int64, callbackQueryID JSONInt64) (*Message, error)

GetCallbackQueryMessage Returns information about a message with the callback button that originated a callback query; for bots only @param chatID Identifier of the chat the message belongs to @param messageID Message identifier @param callbackQueryID Identifier of the callback query

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

GetChatAdministrators Returns a list of administrators of the chat with their custom titles @param chatID Chat identifier

func (*Client) GetChatEventLog

func (client *Client) GetChatEventLog(chatID int64, query string, fromEventID JSONInt64, limit int32, filters *ChatEventLogFilters, userIDs []int64) (*ChatEvents, error)

GetChatEventLog Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for 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 The 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) GetChatFilter

func (client *Client) GetChatFilter(chatFilterID int32) (*ChatFilter, error)

GetChatFilter Returns information about a chat filter by its identifier @param chatFilterID Chat filter identifier

func (*Client) GetChatFilterDefaultIconName

func (client *Client) GetChatFilterDefaultIconName(filter *ChatFilter) (*Text, error)

GetChatFilterDefaultIconName Returns default icon name for a filter. Can be called synchronously @param filter Chat filter

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

func (client *Client) GetChatListsToAddChat(chatID int64) (*ChatLists, error)

GetChatListsToAddChat Returns chat lists to which the chat can be added. This is an offline request @param chatID Chat identifier

func (*Client) GetChatMember

func (client *Client) GetChatMember(chatID int64, userID int64) (*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 newest pinned message in the chat @param chatID Identifier of the chat the message belongs to

func (*Client) GetChatScheduledMessages

func (client *Client) GetChatScheduledMessages(chatID int64) (*Messages, error)

GetChatScheduledMessages Returns all scheduled 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

func (*Client) GetChatStatistics

func (client *Client) GetChatStatistics(chatID int64, isDark bool) (ChatStatistics, error)

GetChatStatistics Returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.can_get_statistics == true @param chatID Chat identifier @param isDark Pass true if a dark theme is used by the application

func (*Client) GetChatStatisticsURL

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

GetChatStatisticsURL Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future @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(chatList ChatList, offsetOrder JSONInt64, offsetChatID int64, limit int32) (*Chats, error)

GetChats Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending 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 chatList The chat list in which to return chats @param offsetOrder Chat order to return chats from @param offsetChatID Chat identifier to return chats from @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) GetCountries

func (client *Client) GetCountries() (*Countries, error)

GetCountries Returns information about existing countries. Can be called before authorization

func (*Client) GetCountryCode

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

GetCountryCode Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization

func (*Client) GetCreatedPublicChats

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

GetCreatedPublicChats Returns a list of public chats of the specified type, owned by the user @param typeParam Type of the public chats to return

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 useful if TDLib is run in a separate process. Can be called before initialization

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

func (client *Client) GetEmojiSuggestionsURL(languageCode string) (*HttpURL, error)

GetEmojiSuggestionsURL Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation @param languageCode Language code for which the emoji replacements will be suggested

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. 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. 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 int64) (*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) GetGroupCall

func (client *Client) GetGroupCall(groupCallID int32) (*GroupCall, error)

GetGroupCall Returns information about a group call @param groupCallID Group call identifier

func (*Client) GetGroupsInCommon

func (client *Client) GetGroupsInCommon(userID int64, 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 The 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) GetInactiveSupergroupChats

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

GetInactiveSupergroupChats Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error

func (*Client) GetInlineGameHighScores

func (client *Client) GetInlineGameHighScores(inlineMessageID string, userID int64) (*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 int64, 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. Can be called synchronously @param jsonValue The JsonValue object

func (*Client) GetJsonValue

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

GetJsonValue Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously @param jsonstring 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. 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. 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. 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"]. Can be called synchronously

func (*Client) GetLogVerbosityLevel

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

GetLogVerbosityLevel Returns current verbosity level of the internal logging of TDLib. Can be called synchronously

func (*Client) GetLoginURL

func (client *Client) GetLoginURL(chatID int64, messageID int64, buttonID int32, allowWriteAccess bool) (*HttpURL, error)

GetLoginURL Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. @param chatID Chat identifier of the message with the button @param messageID Message identifier of the message with the button @param buttonID Button identifier @param allowWriteAccess True, if the user allowed the bot to send them messages

func (*Client) GetLoginURLInfo

func (client *Client) GetLoginURLInfo(chatID int64, messageID int64, buttonID int32) (LoginURLInfo, error)

GetLoginURLInfo Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button @param chatID Chat identifier of the message with the button @param messageID Message identifier of the message with the button @param buttonID Button identifier

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

func (client *Client) GetMarkdownText(text *FormattedText) (*FormattedText, error)

GetMarkdownText Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously @param text The text

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

func (client *Client) GetMessageEmbeddingCode(chatID int64, messageID int64, forAlbum bool) (*Text, error)

GetMessageEmbeddingCode Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message @param forAlbum Pass true to return an HTML code for embedding of the whole media album

func (*Client) GetMessageFileType

func (client *Client) GetMessageFileType(messageFileHead string) (MessageFileType, error)

GetMessageFileType Returns information about a file with messages exported from another app @param messageFileHead Beginning of the message file; up to 100 first lines

func (client *Client) GetMessageLink(chatID int64, messageID int64, forAlbum bool, forComment bool) (*MessageLink, error)

GetMessageLink Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. This is an offline request @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message @param forAlbum Pass true to create a link for the whole media album @param forComment Pass true to create a link to the message as a channel post comment, or from a message thread

func (*Client) GetMessageLinkInfo

func (client *Client) GetMessageLinkInfo(uRL string) (*MessageLinkInfo, error)

GetMessageLinkInfo Returns information about a public or private message link @param uRL The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or "https://t.me/username/...", or "tg://resolve?..."

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

func (client *Client) GetMessagePublicForwards(chatID int64, messageID int64, offset string, limit int32) (*FoundMessages, error)

GetMessagePublicForwards Returns forwarded copies of a channel message to different public channels. For optimal performance the number of returned messages is chosen by the library @param chatID Chat identifier of the message @param messageID Message identifier @param offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached

func (*Client) GetMessageStatistics

func (client *Client) GetMessageStatistics(chatID int64, messageID int64, isDark bool) (*MessageStatistics, error)

GetMessageStatistics Returns detailed statistics about a message. Can be used only if Message.can_get_statistics == true @param chatID Chat identifier @param messageID Message identifier @param isDark Pass true if a dark theme is used by the application

func (*Client) GetMessageThread

func (client *Client) GetMessageThread(chatID int64, messageID int64) (*MessageThreadInfo, error)

GetMessageThread Returns information about a message thread. Can be used only if message.can_get_message_thread == true @param chatID Chat identifier @param messageID Identifier of the message

func (*Client) GetMessageThreadHistory

func (client *Client) GetMessageThreadHistory(chatID int64, messageID int64, fromMessageID int64, offset int32, limit int32) (*Messages, error)

GetMessageThreadHistory Returns messages in a message thread of a message. Can be used only if message.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. @param chatID Chat identifier @param messageID Message identifier, which thread history needs to be returned @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 than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message thread history has not been reached

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 int64, 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) GetPhoneNumberInfo

func (client *Client) GetPhoneNumberInfo(phoneNumberPrefix string) (*PhoneNumberInfo, error)

GetPhoneNumberInfo Returns information about a phone number by its prefix. Can be called before authorization @param phoneNumberPrefix The phone number prefix

func (*Client) GetPollVoters

func (client *Client) GetPollVoters(chatID int64, messageID int64, optionID int32, offset int32, limit int32) (*Users, error)

GetPollVoters Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param optionID 0-based identifier of the answer option @param offset Number of users to skip in the result; must be non-negative @param limit The maximum number of users to be returned; must be positive and can't be greater than 50. Fewer users may be returned than specified by the limit, even if the end of the voter list has not been reached

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

func (client *Client) GetRecommendedChatFilters() (*RecommendedChatFilters, error)

GetRecommendedChatFilters Returns recommended chat filters for the current 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. Even the request succeeds, the file can be used only if it is still accessible to the user. @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 a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message reply to which to 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) GetStatisticalGraph

func (client *Client) GetStatisticalGraph(chatID int64, token string, x int64) (StatisticalGraph, error)

GetStatisticalGraph Loads an asynchronous or a zoomed in statistical graph @param chatID Chat identifier @param token The token for graph loading @param x X-value for zoomed in graph or 0 otherwise

func (*Client) GetStickerEmojis

func (client *Client) GetStickerEmojis(sticker InputFile) (*Emojis, error)

GetStickerEmojis Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object @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 The 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 The 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) GetSuitableDiscussionChats

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

GetSuitableDiscussionChats Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first

func (*Client) GetSupergroup

func (client *Client) GetSupergroup(supergroupID int64) (*Supergroup, error)

GetSupergroup Returns information about a supergroup or a 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 int64) (*SupergroupFullInfo, error)

GetSupergroupFullInfo Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @param supergroupID Supergroup or channel identifier

func (*Client) GetSupergroupMembers

func (client *Client) GetSupergroupMembers(supergroupID int64, 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, supergroupMembersFilterRecent @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, bank card numbers, URLs, and email addresses) contained in the text. 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 The maximum number of chats to be returned; up to 30

func (*Client) GetTrendingStickerSets

func (client *Client) GetTrendingStickerSets(offset int32, limit int32) (*StickerSets, error)

GetTrendingStickerSets Returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library @param offset The offset from which to return the sticker sets; must be non-negative @param limit The maximum number of sticker sets to be returned; must be non-negative. Fewer sticker sets may be returned than specified by the limit, even if the end of the list has not been reached

func (*Client) GetUser

func (client *Client) GetUser(userID int64) (*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 int64) (*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 int64, offset int32, limit int32) (*ChatPhotos, 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 The maximum number of photos to be returned; up to 100

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

func (client *Client) HideSuggestedAction(action SuggestedAction) (*Ok, error)

HideSuggestedAction Hides a suggested action @param action Suggested action to hide

func (*Client) ImportContacts

func (client *Client) ImportContacts(contacts []Contact) (*ImportedContacts, error)

ImportContacts Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored @param contacts The list of contacts to import or edit; contacts' vCard are ignored and are not imported

func (*Client) ImportMessages

func (client *Client) ImportMessages(chatID int64, messageFile InputFile, attachedFiles []InputFile) (*Ok, error)

ImportMessages Imports messages exported from another app @param chatID Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right @param messageFile File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded @param attachedFiles Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded

func (*Client) InviteGroupCallParticipants

func (client *Client) InviteGroupCallParticipants(groupCallID int32, userIDs []int64) (*Ok, error)

InviteGroupCallParticipants Invites users to a group call. Sends a service message of type messageInviteToGroupCall for voice chats @param groupCallID Group call identifier @param userIDs User identifiers. At most 10 users can be invited simultaneously

func (*Client) JoinChat

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

JoinChat Adds the 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 @param inviteLink Invite link to import; must begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"

func (*Client) JoinGroupCall

func (client *Client) JoinGroupCall(groupCallID int32, payload *GroupCallPayload, source int32, isMuted bool) (*GroupCallJoinResponse, error)

JoinGroupCall Joins a group call @param groupCallID Group call identifier @param payload Group join payload, received from tgcalls. Use null to cancel previous joinGroupCall request @param source Caller synchronization source identifier; received from tgcalls @param isMuted True, if the user's microphone is muted

func (*Client) LeaveChat

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

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

func (*Client) LeaveGroupCall

func (client *Client) LeaveGroupCall(groupCallID int32) (*Ok, error)

LeaveGroupCall Leaves a group call @param groupCallID Group call identifier

func (*Client) LoadGroupCallParticipants

func (client *Client) LoadGroupCallParticipants(groupCallID int32, limit int32) (*Ok, error)

LoadGroupCallParticipants Loads more group call participants. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants has already been loaded @param groupCallID Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined @param limit Maximum number of participants to load

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, returnDeletedFileStatistics bool, 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 returnDeletedFileStatistics Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics @param chatLimit Same as in getStorageStatistics. Affects only returned statistics

func (*Client) ParseMarkdown

func (client *Client) ParseMarkdown(text *FormattedText) (*FormattedText, error)

ParseMarkdown Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously @param text The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**"

func (*Client) ParseTextEntities

func (client *Client) ParseTextEntities(text string, parseMode TextParseMode) (*FormattedText, error)

ParseTextEntities Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously @param text The text to parse @param parseMode Text parse mode

func (*Client) PinChatMessage

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

PinChatMessage Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the 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. Notifications are always disabled in channels and private chats @param onlyForSelf True, if the message needs to be pinned for one side only; private chats only

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 application 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 []int64) (*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 application

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 @param firstName The first name of the user; 1-64 characters @param lastName The last name of the user; 0-64 characters

func (*Client) RemoveBackground

func (client *Client) RemoveBackground(backgroundID JSONInt64) (*Ok, error)

RemoveBackground Removes background from the list of installed backgrounds @param backgroundID The background identifier

func (*Client) RemoveChatActionBar

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

RemoveChatActionBar Removes a chat action bar without any other action @param chatID Chat identifier

func (*Client) RemoveContacts

func (client *Client) RemoveContacts(userIDs []int64) (*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 The 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) ReorderChatFilters

func (client *Client) ReorderChatFilters(chatFilterIDs []int32) (*Ok, error)

ReorderChatFilters Changes the order of chat filters @param chatFilterIDs Identifiers of chat filters in the new correct order

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 *Client) ReplacePermanentChatInviteLink(chatID int64) (*ChatInviteLink, error)

ReplacePermanentChatInviteLink Replaces current permanent invite link for a chat with a new permanent invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @param chatID Chat identifier

func (*Client) ReportChat

func (client *Client) ReportChat(chatID int64, reason ChatReportReason, messageIDs []int64) (*Ok, error)

ReportChat Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chat with a bot, a private chat with a user sharing their location, a supergroup, or a channel, 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 int64, userID int64, 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) RequestQrCodeAuthentication

func (client *Client) RequestQrCodeAuthentication(otherUserIDs []int64) (*Ok, error)

RequestQrCodeAuthentication Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, @param otherUserIDs List of user identifiers of other users currently using the application

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

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

ResendMessages Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. @param chatID Identifier of the chat to send messages @param messageIDs Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order

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

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

ResetBackgrounds Resets list of installed backgrounds to its default value

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

func (client *Client) SearchBackground(name string) (*Background, error)

SearchBackground Searches for a background by its name @param name The name of the background

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, sender MessageSender, fromMessageID int64, offset int32, limit int32, filter SearchMessagesFilter, messageThreadID int64) (*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 sender If not null, only messages sent by the specified sender 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 @param messageThreadID If not 0, only messages in the specified thread will be returned; supergroups only

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 The 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 main chat list @param query Query to search for. If the query is empty, returns up to 20 recently found chats @param limit The maximum number of chats to be returned

func (*Client) SearchChatsNearby

func (client *Client) SearchChatsNearby(location *Location) (*ChatsNearby, error)

SearchChatsNearby Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats @param location Current user location

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 main chat list @param query Query to search for @param limit The 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 The maximum number of users to be returned

func (*Client) SearchEmojis

func (client *Client) SearchEmojis(text string, exactMatch bool, inputLanguageCodes []string) (*Emojis, error)

SearchEmojis Searches for emojis by keywords. Supported only if the file database is enabled @param text Text to search for @param exactMatch True, if only emojis, which exactly match text needs to be returned @param inputLanguageCodes List of possible IETF language tags of the user's input language; may be empty if unknown

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 The 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 The maximum number of sticker sets to return

func (*Client) SearchMessages

func (client *Client) SearchMessages(chatList ChatList, query string, offsetDate int32, offsetChatID int64, offsetMessageID int64, limit int32, filter SearchMessagesFilter, minDate int32, maxDate 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 chatList Chat list in which to search messages; pass null to search in all chats regardless of their chat list @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 @param filter Filter for message content in the search results; searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterFailedToSend and searchMessagesFilterPinned are unsupported in this function @param minDate If not 0, the minimum date of the messages to return @param maxDate If not 0, the maximum date of the messages to return

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, offset string, 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 offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results @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 filter A filter for message content 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 The 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 int64, 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://core.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, problems []CallProblem) (*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 @param problems List of the exact types of problems with the call, specified by the user

func (*Client) SendCallSignalingData

func (client *Client) SendCallSignalingData(callID int32, data []byte) (*Ok, error)

SendCallSignalingData Sends call signaling data @param callID Call identifier @param data The data

func (*Client) SendChatAction

func (client *Client) SendChatAction(chatID int64, messageThreadID int64, action ChatAction) (*Ok, error)

SendChatAction Sends a notification about user activity in a chat @param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the action was performed @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, messageThreadID int64, replyToMessageID int64, options *MessageSendOptions, 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 messageThreadID If not 0, a message thread identifier in which the message will be sent @param replyToMessageID Identifier of a message to reply to or 0 @param options Options to be used to send the message @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, messageThreadID int64, replyToMessageID int64, options *MessageSendOptions, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) (*Message, error)

SendMessage Sends a message. Returns the sent message @param chatID Target chat @param messageThreadID If not 0, a message thread identifier in which the message will be sent @param replyToMessageID Identifier of the message to reply to or 0 @param options Options to be used to send the message @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, messageThreadID int64, replyToMessageID int64, options *MessageSendOptions, inputMessageContents []InputMessageContent) (*Messages, error)

SendMessageAlbum Sends 2-10 messages grouped together into an album. Currently only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages @param chatID Target chat @param messageThreadID If not 0, a message thread identifier in which the messages will be sent @param replyToMessageID Identifier of a message to reply to or 0 @param options Options to be used to send the messages @param inputMessageContents Contents of messages to be sent. At most 10 messages can be added to an album

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 are going to be reused @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, settings *PhoneNumberAuthenticationSettings) (*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 settings Settings for the authentication of the user's phone number

func (*Client) SendPhoneNumberVerificationCode

func (client *Client) SendPhoneNumberVerificationCode(phoneNumber string, settings *PhoneNumberAuthenticationSettings) (*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 settings Settings for the authentication of the user's phone number

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 initialization @param seconds Number of seconds before the function returns

func (*Client) SetAuthenticationPhoneNumber

func (client *Client) SetAuthenticationPhoneNumber(phoneNumber string, settings *PhoneNumberAuthenticationSettings) (*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 settings Settings for the authentication of the user's phone number

func (*Client) SetAutoDownloadSettings

func (client *Client) SetAutoDownloadSettings(settings *AutoDownloadSettings, typeParam NetworkType) (*Ok, error)

SetAutoDownloadSettings Sets auto-download settings @param settings New user auto-download settings @param typeParam Type of the network for which the new settings are applied

func (*Client) SetBackground

func (client *Client) SetBackground(background InputBackground, typeParam BackgroundType, forDarkTheme bool) (*Background, error)

SetBackground Changes the background selected by the user; adds background to the list of installed backgrounds @param background The input background to use, null for filled backgrounds @param typeParam Background type; null for default background. The method will return error 404 if type is null @param forDarkTheme True, if the background is chosen for dark theme

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 application-specific data associated with a chat @param chatID Chat identifier @param clientData New value of client_data

func (*Client) SetChatDescription

func (client *Client) SetChatDescription(chatID int64, description string) (*Ok, error)

SetChatDescription Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @param chatID Identifier of the chat @param description

func (*Client) SetChatDiscussionGroup

func (client *Client) SetChatDiscussionGroup(chatID int64, discussionChatID int64) (*Ok, error)

SetChatDiscussionGroup Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified @param chatID Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup) @param discussionChatID Identifier of a new channel's discussion group. Use 0 to remove the discussion group.

func (*Client) SetChatDraftMessage

func (client *Client) SetChatDraftMessage(chatID int64, messageThreadID int64, draftMessage *DraftMessage) (*Ok, error)

SetChatDraftMessage Changes the draft message in a chat @param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the draft was changed @param draftMessage New draft message; may be null

func (*Client) SetChatLocation

func (client *Client) SetChatLocation(chatID int64, location *ChatLocation) (*Ok, error)

SetChatLocation Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @param chatID Chat identifier @param location New location for the chat; must be valid and not null

func (*Client) SetChatMemberStatus

func (client *Client) SetChatMemberStatus(chatID int64, userID int64, 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 and transferring chat ownership; instead, use addChatMember or transferChatOwnership @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. Notification settings of a chat with the current user (Saved Messages) can't be changed @param chatID Chat identifier @param notificationSettings New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever

func (*Client) SetChatPermissions

func (client *Client) SetChatPermissions(chatID int64, permissions *ChatPermissions) (*Ok, error)

SetChatPermissions Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right @param chatID Chat identifier @param permissions New non-administrator members permissions in the chat

func (*Client) SetChatPhoto

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

SetChatPhoto Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right @param chatID Chat identifier @param photo New chat photo. Pass null to delete the chat photo

func (*Client) SetChatSlowModeDelay

func (client *Client) SetChatSlowModeDelay(chatID int64, slowModeDelay int32) (*Ok, error)

SetChatSlowModeDelay Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights @param chatID Chat identifier @param slowModeDelay New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600

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 can_change_info administrator right @param chatID Chat identifier @param title New title of the chat; 1-128 characters

func (*Client) SetCommands

func (client *Client) SetCommands(commands []BotCommand) (*Ok, error)

SetCommands Sets the list of commands supported by the bot; for bots only @param commands List of the bot's commands

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 progress @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 int64, 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) SetGroupCallParticipantIsSpeaking

func (client *Client) SetGroupCallParticipantIsSpeaking(groupCallID int32, source int32, isSpeaking bool) (*Ok, error)

SetGroupCallParticipantIsSpeaking Informs TDLib that a group call participant speaking state has changed @param groupCallID Group call identifier @param source Group call participant's synchronization source identifier, or 0 for the current user @param isSpeaking True, if the user is speaking

func (*Client) SetGroupCallParticipantVolumeLevel

func (client *Client) SetGroupCallParticipantVolumeLevel(groupCallID int32, userID int64, volumeLevel int32) (*Ok, error)

SetGroupCallParticipantVolumeLevel Changes a group call participant's volume level. If the current user can manage the group call, then the participant's volume level will be changed for all users with default volume level @param groupCallID Group call identifier @param userID User identifier @param volumeLevel New participant's volume level; 1-20000 in hundreds of percents

func (*Client) SetInlineGameScore

func (client *Client) SetInlineGameScore(inlineMessageID string, editMessage bool, userID int64, 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) SetLocation

func (client *Client) SetLocation(location *Location) (*Ok, error)

SetLocation Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @param location The new location of the user

func (*Client) SetLogStream

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

SetLogStream Sets new log stream for internal logging of TDLib. 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. 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. 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 @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 int64, 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(chatList ChatList, chatIDs []int64) (*Ok, error)

SetPinnedChats Changes the order of pinned chats @param chatList Chat list in which to change 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 the user answer to a poll. A poll in quiz mode can be answered only once @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 answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers

func (*Client) SetProfilePhoto

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

SetProfilePhoto Changes a profile photo for the current user @param photo Profile photo to set

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

func (client *Client) SetStickerSetThumbnail(userID int64, name string, thumbnail InputFile) (*StickerSet, error)

SetStickerSetThumbnail Sets a sticker set thumbnail; for bots only. Returns the sticker set @param userID Sticker set owner @param name Sticker set name @param thumbnail Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail

func (*Client) SetSupergroupStickerSet

func (client *Client) SetSupergroupStickerSet(supergroupID int64, stickerSetID JSONInt64) (*Ok, error)

SetSupergroupStickerSet Changes the sticker set of a supergroup; requires can_change_info administrator right @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 int64, username string) (*Ok, error)

SetSupergroupUsername Changes the username of a supergroup or channel, requires owner 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 @param username The new value of the username. Use an empty string to remove the username

func (*Client) SharePhoneNumber

func (client *Client) SharePhoneNumber(userID int64) (*Ok, error)

SharePhoneNumber Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @param userID Identifier of the user with whom to share the phone number. The user must be a mutual contact

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 shouldn't 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) TestProxy

func (client *Client) TestProxy(server string, port int32, typeParam ProxyType, dcID int32, timeout float64) (*Ok, error)

TestProxy Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @param server Proxy server IP address @param port Proxy server port @param typeParam Proxy type @param dcID Identifier of a datacenter, with which to test connection @param timeout The maximum overall timeout for the request

func (*Client) TestReturnError

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

TestReturnError Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously @param error The error to be returned

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) 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) 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(chatList ChatList, chatID int64, isPinned bool) (*Ok, error)

ToggleChatIsPinned Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list @param chatList Chat list in which to change the pinned state of the chat @param chatID Chat identifier @param isPinned True, if the chat is pinned

func (*Client) ToggleGroupCallMuteNewParticipants

func (client *Client) ToggleGroupCallMuteNewParticipants(groupCallID int32, muteNewParticipants bool) (*Ok, error)

ToggleGroupCallMuteNewParticipants Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_change_mute_new_participants group call flag @param groupCallID Group call identifier @param muteNewParticipants New value of the mute_new_participants setting

func (*Client) ToggleGroupCallParticipantIsMuted

func (client *Client) ToggleGroupCallParticipantIsMuted(groupCallID int32, userID int64, isMuted bool) (*Ok, error)

ToggleGroupCallParticipantIsMuted Toggles whether a group call participant is muted, unmuted, or allowed to unmute themself @param groupCallID Group call identifier @param userID User identifier @param isMuted Pass true if the user must be muted and false otherwise

func (*Client) ToggleMessageSenderIsBlocked

func (client *Client) ToggleMessageSenderIsBlocked(sender MessageSender, isBlocked bool) (*Ok, error)

ToggleMessageSenderIsBlocked Changes the block state of a message sender. Currently, only users and supergroup chats can be blocked @param sender Message Sender @param isBlocked New value of is_blocked

func (*Client) ToggleSupergroupIsAllHistoryAvailable

func (client *Client) ToggleSupergroupIsAllHistoryAvailable(supergroupID int64, isAllHistoryAvailable bool) (*Ok, error)

ToggleSupergroupIsAllHistoryAvailable Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @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 int64, signMessages bool) (*Ok, error)

ToggleSupergroupSignMessages Toggles sender signatures messages sent in a channel; requires can_change_info administrator right @param supergroupID Identifier of the channel @param signMessages New value of sign_messages

func (*Client) TransferChatOwnership

func (client *Client) TransferChatOwnership(chatID int64, userID int64, password string) (*Ok, error)

TransferChatOwnership Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats @param chatID Chat identifier @param userID Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user @param password The password of the current user

func (*Client) UnpinAllChatMessages

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

UnpinAllChatMessages Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @param chatID Identifier of the chat

func (*Client) UnpinChatMessage

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

UnpinChatMessage Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @param chatID Identifier of the chat @param messageID Identifier of the removed pinned message

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; requires creator privileges. 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 int64, 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, messageThreadID 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 messageThreadID If not 0, a message thread identifier in which the messages are being viewed @param messageIDs The identifiers of the messages being viewed @param forceRead True, if messages in closed chats should be marked as read by the request

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

type ClosedVectorPath struct {
	Commands []VectorPathCommand `json:"commands"` // List of vector path commands
	// contains filtered or unexported fields
}

ClosedVectorPath Represents a closed vector path. The path begins at the end point of the last command

func NewClosedVectorPath

func NewClosedVectorPath(commands []VectorPathCommand) *ClosedVectorPath

NewClosedVectorPath creates a new ClosedVectorPath

@param commands List of vector path commands

func (*ClosedVectorPath) MessageType

func (closedVectorPath *ClosedVectorPath) MessageType() string

MessageType return the string telegram-type of ClosedVectorPath

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

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

type Countries struct {
	Countries []CountryInfo `json:"countries"` // The list of countries
	// contains filtered or unexported fields
}

Countries Contains information about countries

func NewCountries

func NewCountries(countries []CountryInfo) *Countries

NewCountries creates a new Countries

@param countries The list of countries

func (*Countries) MessageType

func (countries *Countries) MessageType() string

MessageType return the string telegram-type of Countries

type CountryInfo

type CountryInfo struct {
	CountryCode  string   `json:"country_code"`  // A two-letter ISO 3166-1 alpha-2 country code
	Name         string   `json:"name"`          // Native name of the country
	EnglishName  string   `json:"english_name"`  // English name of the country
	IsHidden     bool     `json:"is_hidden"`     // True, if the country should be hidden from the list of all countries
	CallingCodes []string `json:"calling_codes"` // List of country calling codes
	// contains filtered or unexported fields
}

CountryInfo Contains information about a country

func NewCountryInfo

func NewCountryInfo(countryCode string, name string, englishName string, isHidden bool, callingCodes []string) *CountryInfo

NewCountryInfo creates a new CountryInfo

@param countryCode A two-letter ISO 3166-1 alpha-2 country code @param name Native name of the country @param englishName English name of the country @param isHidden True, if the country should be hidden from the list of all countries @param callingCodes List of country calling codes

func (*CountryInfo) MessageType

func (countryInfo *CountryInfo) MessageType() string

MessageType return the string telegram-type of CountryInfo

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 DateRange

type DateRange struct {
	StartDate int32 `json:"start_date"` // Point in time (Unix timestamp) at which the date range begins
	EndDate   int32 `json:"end_date"`   // Point in time (Unix timestamp) at which the date range ends
	// contains filtered or unexported fields
}

DateRange Represents a date range

func NewDateRange

func NewDateRange(startDate int32, endDate int32) *DateRange

NewDateRange creates a new DateRange

@param startDate Point in time (Unix timestamp) at which the date range begins @param endDate Point in time (Unix timestamp) at which the date range ends

func (*DateRange) MessageType

func (dateRange *DateRange) MessageType() string

MessageType return the string telegram-type of DateRange

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, the correct application platform must be specified and a valid server authentication data must be uploaded 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 DiceStickers

type DiceStickers interface {
	GetDiceStickersEnum() DiceStickersEnum
}

DiceStickers Contains animated stickers which should be used for dice animation rendering

type DiceStickersEnum

type DiceStickersEnum string

DiceStickersEnum Alias for abstract DiceStickers 'Sub-Classes', used as constant-enum here

const (
	DiceStickersRegularType     DiceStickersEnum = "diceStickersRegular"
	DiceStickersSlotMachineType DiceStickersEnum = "diceStickersSlotMachine"
)

DiceStickers enums

type DiceStickersRegular

type DiceStickersRegular struct {
	Sticker *Sticker `json:"sticker"` // The animated sticker with the dice animation
	// contains filtered or unexported fields
}

DiceStickersRegular A regular animated sticker

func NewDiceStickersRegular

func NewDiceStickersRegular(sticker *Sticker) *DiceStickersRegular

NewDiceStickersRegular creates a new DiceStickersRegular

@param sticker The animated sticker with the dice animation

func (*DiceStickersRegular) GetDiceStickersEnum

func (diceStickersRegular *DiceStickersRegular) GetDiceStickersEnum() DiceStickersEnum

GetDiceStickersEnum return the enum type of this object

func (*DiceStickersRegular) MessageType

func (diceStickersRegular *DiceStickersRegular) MessageType() string

MessageType return the string telegram-type of DiceStickersRegular

type DiceStickersSlotMachine

type DiceStickersSlotMachine struct {
	Background *Sticker `json:"background"`  // The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish
	Lever      *Sticker `json:"lever"`       // The animated sticker with the lever animation. The lever animation must play once in the initial dice state
	LeftReel   *Sticker `json:"left_reel"`   // The animated sticker with the left reel
	CenterReel *Sticker `json:"center_reel"` // The animated sticker with the center reel
	RightReel  *Sticker `json:"right_reel"`  // The animated sticker with the right reel
	// contains filtered or unexported fields
}

DiceStickersSlotMachine Animated stickers to be combined into a slot machine

func NewDiceStickersSlotMachine

func NewDiceStickersSlotMachine(background *Sticker, lever *Sticker, leftReel *Sticker, centerReel *Sticker, rightReel *Sticker) *DiceStickersSlotMachine

NewDiceStickersSlotMachine creates a new DiceStickersSlotMachine

@param background The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish @param lever The animated sticker with the lever animation. The lever animation must play once in the initial dice state @param leftReel The animated sticker with the left reel @param centerReel The animated sticker with the center reel @param rightReel The animated sticker with the right reel

func (*DiceStickersSlotMachine) GetDiceStickersEnum

func (diceStickersSlotMachine *DiceStickersSlotMachine) GetDiceStickersEnum() DiceStickersEnum

GetDiceStickersEnum return the enum type of this object

func (*DiceStickersSlotMachine) MessageType

func (diceStickersSlotMachine *DiceStickersSlotMachine) MessageType() string

MessageType return the string telegram-type of DiceStickersSlotMachine

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
	Minithumbnail *Minithumbnail `json:"minithumbnail"` // Document minithumbnail; may be null
	Thumbnail     *Thumbnail     `json:"thumbnail"`     // Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); 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, minithumbnail *Minithumbnail, thumbnail *Thumbnail, 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 minithumbnail Document minithumbnail; may be null @param thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); 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
	Date             int32               `json:"date"`                // Point in time (Unix timestamp) when the draft was created
	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, date int32, inputMessageText InputMessageContent) *DraftMessage

NewDraftMessage creates a new DraftMessage

@param replyToMessageID Identifier of the message to reply to; 0 if none @param date Point in time (Unix timestamp) when the draft was created @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 Emojis

type Emojis struct {
	Emojis []string `json:"emojis"` // List of emojis
	// contains filtered or unexported fields
}

Emojis Represents a list of emoji

func NewEmojis

func NewEmojis(emojis []string) *Emojis

NewEmojis creates a new Emojis

@param emojis List of emojis

func (*Emojis) MessageType

func (emojis *Emojis) MessageType() string

MessageType return the string telegram-type of Emojis

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 or a background pattern

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. Entities can be nested, but must not mutually intersect with each other.
	// 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. Entities can be nested, but must not mutually intersect with each other.

func (*FormattedText) MessageType

func (formattedText *FormattedText) MessageType() string

MessageType return the string telegram-type of FormattedText

type FoundMessages

type FoundMessages struct {
	TotalCount int32     `json:"total_count"` // Approximate total count of messages found; -1 if unknown
	Messages   []Message `json:"messages"`    // List of messages
	NextOffset string    `json:"next_offset"` // The offset for the next request. If empty, there are no more results
	// contains filtered or unexported fields
}

FoundMessages Contains a list of messages found by a search

func NewFoundMessages

func NewFoundMessages(totalCount int32, messages []Message, nextOffset string) *FoundMessages

NewFoundMessages creates a new FoundMessages

@param totalCount Approximate total count of messages found; -1 if unknown @param messages List of messages @param nextOffset The offset for the next request. If empty, there are no 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 GroupCall

type GroupCall struct {
	ID                           int32                    `json:"id"`                               // Group call identifier
	IsActive                     bool                     `json:"is_active"`                        // True, if the call is active
	IsJoined                     bool                     `json:"is_joined"`                        // True, if the call is joined
	NeedRejoin                   bool                     `json:"need_rejoin"`                      // True, if user was kicked from the call because of network loss and the call needs to be rejoined
	CanUnmuteSelf                bool                     `json:"can_unmute_self"`                  // True, if the current user can unmute themself
	CanBeManaged                 bool                     `json:"can_be_managed"`                   // True, if the current user can manage the group call
	ParticipantCount             int32                    `json:"participant_count"`                // Number of participants in the group call
	LoadedAllParticipants        bool                     `json:"loaded_all_participants"`          // True, if all group call participants are loaded
	RecentSpeakers               []GroupCallRecentSpeaker `json:"recent_speakers"`                  // Recently speaking users in the group call
	MuteNewParticipants          bool                     `json:"mute_new_participants"`            // True, if only group call administrators can unmute new participants
	CanChangeMuteNewParticipants bool                     `json:"can_change_mute_new_participants"` // True, if the current user can enable or disable mute_new_participants setting
	Duration                     int32                    `json:"duration"`                         // Call duration; for ended calls only
	// contains filtered or unexported fields
}

GroupCall Describes a group call

func NewGroupCall

func NewGroupCall(iD int32, isActive bool, isJoined bool, needRejoin bool, canUnmuteSelf bool, canBeManaged bool, participantCount int32, loadedAllParticipants bool, recentSpeakers []GroupCallRecentSpeaker, muteNewParticipants bool, canChangeMuteNewParticipants bool, duration int32) *GroupCall

NewGroupCall creates a new GroupCall

@param iD Group call identifier @param isActive True, if the call is active @param isJoined True, if the call is joined @param needRejoin True, if user was kicked from the call because of network loss and the call needs to be rejoined @param canUnmuteSelf True, if the current user can unmute themself @param canBeManaged True, if the current user can manage the group call @param participantCount Number of participants in the group call @param loadedAllParticipants True, if all group call participants are loaded @param recentSpeakers Recently speaking users in the group call @param muteNewParticipants True, if only group call administrators can unmute new participants @param canChangeMuteNewParticipants True, if the current user can enable or disable mute_new_participants setting @param duration Call duration; for ended calls only

func (*GroupCall) MessageType

func (groupCall *GroupCall) MessageType() string

MessageType return the string telegram-type of GroupCall

type GroupCallID

type GroupCallID struct {
	ID int32 `json:"id"` // Group call identifier
	// contains filtered or unexported fields
}

GroupCallID Contains the group call identifier

func NewGroupCallID

func NewGroupCallID(iD int32) *GroupCallID

NewGroupCallID creates a new GroupCallID

@param iD Group call identifier

func (*GroupCallID) MessageType

func (groupCallID *GroupCallID) MessageType() string

MessageType return the string telegram-type of GroupCallID

type GroupCallJoinResponse

type GroupCallJoinResponse struct {
	Payload    *GroupCallPayload                `json:"payload"`    // Join response payload to pass to tgcalls
	Candidates []GroupCallJoinResponseCandidate `json:"candidates"` // Join response candidates to pass to tgcalls
	// contains filtered or unexported fields
}

GroupCallJoinResponse Describes a join response for interaction with tgcalls

func NewGroupCallJoinResponse

func NewGroupCallJoinResponse(payload *GroupCallPayload, candidates []GroupCallJoinResponseCandidate) *GroupCallJoinResponse

NewGroupCallJoinResponse creates a new GroupCallJoinResponse

@param payload Join response payload to pass to tgcalls @param candidates Join response candidates to pass to tgcalls

func (*GroupCallJoinResponse) MessageType

func (groupCallJoinResponse *GroupCallJoinResponse) MessageType() string

MessageType return the string telegram-type of GroupCallJoinResponse

type GroupCallJoinResponseCandidate

type GroupCallJoinResponseCandidate struct {
	Port       string `json:"port"`       // Value of the field port
	Protocol   string `json:"protocol"`   // Value of the field protocol
	Network    string `json:"network"`    // Value of the field network
	Generation string `json:"generation"` // Value of the field generation
	ID         string `json:"id"`         // Value of the field id
	Component  string `json:"component"`  // Value of the field component
	Foundation string `json:"foundation"` // Value of the field foundation
	Priority   string `json:"priority"`   // Value of the field priority
	IP         string `json:"ip"`         // Value of the field ip
	Type       string `json:"type"`       // Value of the field type
	TcpType    string `json:"tcp_type"`   // Value of the field tcp_type
	RelAddr    string `json:"rel_addr"`   // Value of the field rel_addr
	RelPort    string `json:"rel_port"`   // Value of the field rel_port
	// contains filtered or unexported fields
}

GroupCallJoinResponseCandidate Describes a join response candidate for interaction with tgcalls

func NewGroupCallJoinResponseCandidate

func NewGroupCallJoinResponseCandidate(port string, protocol string, network string, generation string, iD string, component string, foundation string, priority string, iP string, typeParam string, tcpType string, relAddr string, relPort string) *GroupCallJoinResponseCandidate

NewGroupCallJoinResponseCandidate creates a new GroupCallJoinResponseCandidate

@param port Value of the field port @param protocol Value of the field protocol @param network Value of the field network @param generation Value of the field generation @param iD Value of the field id @param component Value of the field component @param foundation Value of the field foundation @param priority Value of the field priority @param iP Value of the field ip @param typeParam Value of the field type @param tcpType Value of the field tcp_type @param relAddr Value of the field rel_addr @param relPort Value of the field rel_port

func (*GroupCallJoinResponseCandidate) MessageType

func (groupCallJoinResponseCandidate *GroupCallJoinResponseCandidate) MessageType() string

MessageType return the string telegram-type of GroupCallJoinResponseCandidate

type GroupCallParticipant

type GroupCallParticipant struct {
	UserID                     int32     `json:"user_id"`                         // Identifier of the user
	Source                     int32     `json:"source"`                          // User's synchronization source
	IsSpeaking                 bool      `json:"is_speaking"`                     // True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking
	CanBeMutedForAllUsers      bool      `json:"can_be_muted_for_all_users"`      // True, if the current user can mute the participant for all other group call participants
	CanBeUnmutedForAllUsers    bool      `json:"can_be_unmuted_for_all_users"`    // True, if the current user can allow the participant to unmute themself or unmute the participant (if the participant is the current user)
	CanBeMutedForCurrentUser   bool      `json:"can_be_muted_for_current_user"`   // True, if the current user can mute the participant only for self
	CanBeUnmutedForCurrentUser bool      `json:"can_be_unmuted_for_current_user"` // True, if the current user can unmute the participant for self
	IsMutedForAllUsers         bool      `json:"is_muted_for_all_users"`          // True, if the participant is muted for all users
	IsMutedForCurrentUser      bool      `json:"is_muted_for_current_user"`       // True, if the participant is muted for the current user
	CanUnmuteSelf              bool      `json:"can_unmute_self"`                 // True, if the participant is muted for all users, but can unmute themself
	VolumeLevel                int32     `json:"volume_level"`                    // Participant's volume level; 1-20000 in hundreds of percents
	Order                      JSONInt64 `json:"order"`                           // User's order in the group call participant list. The bigger is order, the higher is user in the list. If order is 0, the user must be removed from the participant list
	// contains filtered or unexported fields
}

GroupCallParticipant Represents a group call participant

func NewGroupCallParticipant

func NewGroupCallParticipant(userID int32, source int32, isSpeaking bool, canBeMutedForAllUsers bool, canBeUnmutedForAllUsers bool, canBeMutedForCurrentUser bool, canBeUnmutedForCurrentUser bool, isMutedForAllUsers bool, isMutedForCurrentUser bool, canUnmuteSelf bool, volumeLevel int32, order JSONInt64) *GroupCallParticipant

NewGroupCallParticipant creates a new GroupCallParticipant

@param userID Identifier of the user @param source User's synchronization source @param isSpeaking True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking @param canBeMutedForAllUsers True, if the current user can mute the participant for all other group call participants @param canBeUnmutedForAllUsers True, if the current user can allow the participant to unmute themself or unmute the participant (if the participant is the current user) @param canBeMutedForCurrentUser True, if the current user can mute the participant only for self @param canBeUnmutedForCurrentUser True, if the current user can unmute the participant for self @param isMutedForAllUsers True, if the participant is muted for all users @param isMutedForCurrentUser True, if the participant is muted for the current user @param canUnmuteSelf True, if the participant is muted for all users, but can unmute themself @param volumeLevel Participant's volume level; 1-20000 in hundreds of percents @param order User's order in the group call participant list. The bigger is order, the higher is user in the list. If order is 0, the user must be removed from the participant list

func (*GroupCallParticipant) MessageType

func (groupCallParticipant *GroupCallParticipant) MessageType() string

MessageType return the string telegram-type of GroupCallParticipant

type GroupCallPayload

type GroupCallPayload struct {
	Ufrag        string                        `json:"ufrag"`        // Value of the field ufrag
	Pwd          string                        `json:"pwd"`          // Value of the field pwd
	Fingerprints []GroupCallPayloadFingerprint `json:"fingerprints"` // The list of fingerprints
	// contains filtered or unexported fields
}

GroupCallPayload Describes a payload for interaction with tgcalls

func NewGroupCallPayload

func NewGroupCallPayload(ufrag string, pwd string, fingerprints []GroupCallPayloadFingerprint) *GroupCallPayload

NewGroupCallPayload creates a new GroupCallPayload

@param ufrag Value of the field ufrag @param pwd Value of the field pwd @param fingerprints The list of fingerprints

func (*GroupCallPayload) MessageType

func (groupCallPayload *GroupCallPayload) MessageType() string

MessageType return the string telegram-type of GroupCallPayload

type GroupCallPayloadFingerprint

type GroupCallPayloadFingerprint struct {
	Hash        string `json:"hash"`        // Value of the field hash
	Setup       string `json:"setup"`       // Value of the field setup
	Fingerprint string `json:"fingerprint"` // Value of the field fingerprint
	// contains filtered or unexported fields
}

GroupCallPayloadFingerprint Describes a payload fingerprint for interaction with tgcalls

func NewGroupCallPayloadFingerprint

func NewGroupCallPayloadFingerprint(hash string, setup string, fingerprint string) *GroupCallPayloadFingerprint

NewGroupCallPayloadFingerprint creates a new GroupCallPayloadFingerprint

@param hash Value of the field hash @param setup Value of the field setup @param fingerprint Value of the field fingerprint

func (*GroupCallPayloadFingerprint) MessageType

func (groupCallPayloadFingerprint *GroupCallPayloadFingerprint) MessageType() string

MessageType return the string telegram-type of GroupCallPayloadFingerprint

type GroupCallRecentSpeaker

type GroupCallRecentSpeaker struct {
	UserID     int32 `json:"user_id"`     // User identifier
	IsSpeaking bool  `json:"is_speaking"` // True, is the user has spoken recently
	// contains filtered or unexported fields
}

GroupCallRecentSpeaker Describes a recently speaking user in a group call

func NewGroupCallRecentSpeaker

func NewGroupCallRecentSpeaker(userID int32, isSpeaking bool) *GroupCallRecentSpeaker

NewGroupCallRecentSpeaker creates a new GroupCallRecentSpeaker

@param userID User identifier @param isSpeaking True, is the user has spoken recently

func (*GroupCallRecentSpeaker) MessageType

func (groupCallRecentSpeaker *GroupCallRecentSpeaker) MessageType() string

MessageType return the string telegram-type of GroupCallRecentSpeaker

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

type InlineKeyboardButtonTypeCallbackWithPassword struct {
	Data []byte `json:"data"` // Data to be sent to the bot via a callback query
	// contains filtered or unexported fields
}

InlineKeyboardButtonTypeCallbackWithPassword A button that asks for password of the current user and then sends a callback query to a bot

func NewInlineKeyboardButtonTypeCallbackWithPassword

func NewInlineKeyboardButtonTypeCallbackWithPassword(data []byte) *InlineKeyboardButtonTypeCallbackWithPassword

NewInlineKeyboardButtonTypeCallbackWithPassword creates a new InlineKeyboardButtonTypeCallbackWithPassword

@param data Data to be sent to the bot via a callback query

func (*InlineKeyboardButtonTypeCallbackWithPassword) GetInlineKeyboardButtonTypeEnum

func (inlineKeyboardButtonTypeCallbackWithPassword *InlineKeyboardButtonTypeCallbackWithPassword) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum

GetInlineKeyboardButtonTypeEnum return the enum type of this object

func (*InlineKeyboardButtonTypeCallbackWithPassword) MessageType

func (inlineKeyboardButtonTypeCallbackWithPassword *InlineKeyboardButtonTypeCallbackWithPassword) MessageType() string

MessageType return the string telegram-type of InlineKeyboardButtonTypeCallbackWithPassword

type InlineKeyboardButtonTypeEnum

type InlineKeyboardButtonTypeEnum string

InlineKeyboardButtonTypeEnum Alias for abstract InlineKeyboardButtonType 'Sub-Classes', used as constant-enum here

const (
	InlineKeyboardButtonTypeURLType                  InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeURL"
	InlineKeyboardButtonTypeLoginURLType             InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeLoginURL"
	InlineKeyboardButtonTypeCallbackType             InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallback"
	InlineKeyboardButtonTypeCallbackWithPasswordType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallbackWithPassword"
	InlineKeyboardButtonTypeCallbackGameType         InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallbackGame"
	InlineKeyboardButtonTypeSwitchInlineType         InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeSwitchInline"
	InlineKeyboardButtonTypeBuyType                  InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeBuy"
)

InlineKeyboardButtonType enums

type InlineKeyboardButtonTypeLoginURL

type InlineKeyboardButtonTypeLoginURL struct {
	URL         string `json:"url"`          // An HTTP URL to open
	ID          int32  `json:"id"`           // Unique button identifier
	ForwardText string `json:"forward_text"` // If non-empty, new text of the button in forwarded messages
	// contains filtered or unexported fields
}

InlineKeyboardButtonTypeLoginURL A button that opens a specified URL and automatically authorize the current user if allowed to do so

func NewInlineKeyboardButtonTypeLoginURL

func NewInlineKeyboardButtonTypeLoginURL(uRL string, iD int32, forwardText string) *InlineKeyboardButtonTypeLoginURL

NewInlineKeyboardButtonTypeLoginURL creates a new InlineKeyboardButtonTypeLoginURL

@param uRL An HTTP URL to open @param iD Unique button identifier @param forwardText If non-empty, new text of the button in forwarded messages

func (*InlineKeyboardButtonTypeLoginURL) GetInlineKeyboardButtonTypeEnum

func (inlineKeyboardButtonTypeLoginURL *InlineKeyboardButtonTypeLoginURL) GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum

GetInlineKeyboardButtonTypeEnum return the enum type of this object

func (*InlineKeyboardButtonTypeLoginURL) MessageType

func (inlineKeyboardButtonTypeLoginURL *InlineKeyboardButtonTypeLoginURL) MessageType() string

MessageType return the string telegram-type of InlineKeyboardButtonTypeLoginURL

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   *Thumbnail `json:"thumbnail"`   // Result thumbnail in JPEG format; 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 *Thumbnail) *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 in JPEG format; 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 *Thumbnail `json:"thumbnail"` // Result thumbnail in JPEG format; may be null
	// contains filtered or unexported fields
}

InlineQueryResultContact Represents a user contact

func NewInlineQueryResultContact

func NewInlineQueryResultContact(iD string, contact *Contact, thumbnail *Thumbnail) *InlineQueryResultContact

NewInlineQueryResultContact creates a new InlineQueryResultContact

@param iD Unique identifier of the query result @param contact A user contact @param thumbnail Result thumbnail in JPEG format; 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 *Thumbnail `json:"thumbnail"` // Result thumbnail in JPEG format; 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 *Thumbnail) *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 in JPEG format; 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 *Thumbnail `json:"thumbnail"` // Result thumbnail in JPEG format; may be null
	// contains filtered or unexported fields
}

InlineQueryResultVenue Represents information about a venue

func NewInlineQueryResultVenue

func NewInlineQueryResultVenue(iD string, venue *Venue, thumbnail *Thumbnail) *InlineQueryResultVenue

NewInlineQueryResultVenue creates a new InlineQueryResultVenue

@param iD Unique identifier of the query result @param venue Venue result @param thumbnail Result thumbnail in JPEG format; 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 InputBackground

type InputBackground interface {
	GetInputBackgroundEnum() InputBackgroundEnum
}

InputBackground Contains information about background to set

type InputBackgroundEnum

type InputBackgroundEnum string

InputBackgroundEnum Alias for abstract InputBackground 'Sub-Classes', used as constant-enum here

const (
	InputBackgroundLocalType  InputBackgroundEnum = "inputBackgroundLocal"
	InputBackgroundRemoteType InputBackgroundEnum = "inputBackgroundRemote"
)

InputBackground enums

type InputBackgroundLocal

type InputBackgroundLocal struct {
	Background InputFile `json:"background"` // Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns
	// contains filtered or unexported fields
}

InputBackgroundLocal A background from a local file

func NewInputBackgroundLocal

func NewInputBackgroundLocal(background InputFile) *InputBackgroundLocal

NewInputBackgroundLocal creates a new InputBackgroundLocal

@param background Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns

func (*InputBackgroundLocal) GetInputBackgroundEnum

func (inputBackgroundLocal *InputBackgroundLocal) GetInputBackgroundEnum() InputBackgroundEnum

GetInputBackgroundEnum return the enum type of this object

func (*InputBackgroundLocal) MessageType

func (inputBackgroundLocal *InputBackgroundLocal) MessageType() string

MessageType return the string telegram-type of InputBackgroundLocal

func (*InputBackgroundLocal) UnmarshalJSON

func (inputBackgroundLocal *InputBackgroundLocal) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputBackgroundRemote

type InputBackgroundRemote struct {
	BackgroundID JSONInt64 `json:"background_id"` // The background identifier
	// contains filtered or unexported fields
}

InputBackgroundRemote A background from the server

func NewInputBackgroundRemote

func NewInputBackgroundRemote(backgroundID JSONInt64) *InputBackgroundRemote

NewInputBackgroundRemote creates a new InputBackgroundRemote

@param backgroundID The background identifier

func (*InputBackgroundRemote) GetInputBackgroundEnum

func (inputBackgroundRemote *InputBackgroundRemote) GetInputBackgroundEnum() InputBackgroundEnum

GetInputBackgroundEnum return the enum type of this object

func (*InputBackgroundRemote) MessageType

func (inputBackgroundRemote *InputBackgroundRemote) MessageType() string

MessageType return the string telegram-type of InputBackgroundRemote

type InputChatPhoto

type InputChatPhoto interface {
	GetInputChatPhotoEnum() InputChatPhotoEnum
}

InputChatPhoto Describes a photo to be set as a user profile or chat photo

type InputChatPhotoAnimation

type InputChatPhotoAnimation struct {
	Animation          InputFile `json:"animation"`            // Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
	MainFrameTimestamp float64   `json:"main_frame_timestamp"` // Timestamp of the frame, which will be used as static chat photo
	// contains filtered or unexported fields
}

InputChatPhotoAnimation An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size

func NewInputChatPhotoAnimation

func NewInputChatPhotoAnimation(animation InputFile, mainFrameTimestamp float64) *InputChatPhotoAnimation

NewInputChatPhotoAnimation creates a new InputChatPhotoAnimation

@param animation Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed @param mainFrameTimestamp Timestamp of the frame, which will be used as static chat photo

func (*InputChatPhotoAnimation) GetInputChatPhotoEnum

func (inputChatPhotoAnimation *InputChatPhotoAnimation) GetInputChatPhotoEnum() InputChatPhotoEnum

GetInputChatPhotoEnum return the enum type of this object

func (*InputChatPhotoAnimation) MessageType

func (inputChatPhotoAnimation *InputChatPhotoAnimation) MessageType() string

MessageType return the string telegram-type of InputChatPhotoAnimation

func (*InputChatPhotoAnimation) UnmarshalJSON

func (inputChatPhotoAnimation *InputChatPhotoAnimation) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputChatPhotoEnum

type InputChatPhotoEnum string

InputChatPhotoEnum Alias for abstract InputChatPhoto 'Sub-Classes', used as constant-enum here

const (
	InputChatPhotoPreviousType  InputChatPhotoEnum = "inputChatPhotoPrevious"
	InputChatPhotoStaticType    InputChatPhotoEnum = "inputChatPhotoStatic"
	InputChatPhotoAnimationType InputChatPhotoEnum = "inputChatPhotoAnimation"
)

InputChatPhoto enums

type InputChatPhotoPrevious

type InputChatPhotoPrevious struct {
	ChatPhotoID JSONInt64 `json:"chat_photo_id"` // Identifier of the profile photo to reuse
	// contains filtered or unexported fields
}

InputChatPhotoPrevious A previously used profile photo of the current user

func NewInputChatPhotoPrevious

func NewInputChatPhotoPrevious(chatPhotoID JSONInt64) *InputChatPhotoPrevious

NewInputChatPhotoPrevious creates a new InputChatPhotoPrevious

@param chatPhotoID Identifier of the profile photo to reuse

func (*InputChatPhotoPrevious) GetInputChatPhotoEnum

func (inputChatPhotoPrevious *InputChatPhotoPrevious) GetInputChatPhotoEnum() InputChatPhotoEnum

GetInputChatPhotoEnum return the enum type of this object

func (*InputChatPhotoPrevious) MessageType

func (inputChatPhotoPrevious *InputChatPhotoPrevious) MessageType() string

MessageType return the string telegram-type of InputChatPhotoPrevious

type InputChatPhotoStatic

type InputChatPhotoStatic struct {
	Photo InputFile `json:"photo"` // Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
	// contains filtered or unexported fields
}

InputChatPhotoStatic A static photo in JPEG format

func NewInputChatPhotoStatic

func NewInputChatPhotoStatic(photo InputFile) *InputChatPhotoStatic

NewInputChatPhotoStatic creates a new InputChatPhotoStatic

@param photo Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed

func (*InputChatPhotoStatic) GetInputChatPhotoEnum

func (inputChatPhotoStatic *InputChatPhotoStatic) GetInputChatPhotoEnum() InputChatPhotoEnum

GetInputChatPhotoEnum return the enum type of this object

func (*InputChatPhotoStatic) MessageType

func (inputChatPhotoStatic *InputChatPhotoStatic) MessageType() string

MessageType return the string telegram-type of InputChatPhotoStatic

func (*InputChatPhotoStatic) UnmarshalJSON

func (inputChatPhotoStatic *InputChatPhotoStatic) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputCredentials

type InputCredentials interface {
	GetInputCredentialsEnum() InputCredentialsEnum
}

InputCredentials Contains information about the payment method chosen by the user

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"
	InputCredentialsApplePayType  InputCredentialsEnum = "inputCredentialsApplePay"
	InputCredentialsGooglePayType InputCredentialsEnum = "inputCredentialsGooglePay"
)

InputCredentials enums

type InputCredentialsGooglePay

type InputCredentialsGooglePay struct {
	Data string `json:"data"` // JSON-encoded data with the credential identifier
	// contains filtered or unexported fields
}

InputCredentialsGooglePay Applies if a user enters new credentials using Google Pay

func NewInputCredentialsGooglePay

func NewInputCredentialsGooglePay(data string) *InputCredentialsGooglePay

NewInputCredentialsGooglePay creates a new InputCredentialsGooglePay

@param data JSON-encoded data with the credential identifier

func (*InputCredentialsGooglePay) GetInputCredentialsEnum

func (inputCredentialsGooglePay *InputCredentialsGooglePay) GetInputCredentialsEnum() InputCredentialsEnum

GetInputCredentialsEnum return the enum type of this object

func (*InputCredentialsGooglePay) MessageType

func (inputCredentialsGooglePay *InputCredentialsGooglePay) MessageType() string

MessageType return the string telegram-type of InputCredentialsGooglePay

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 application

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. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.

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 InputInlineQueryResultAnimation

type InputInlineQueryResultAnimation 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 result thumbnail (JPEG, GIF, or MPEG4), if it exists
	ThumbnailMimeType   string              `json:"thumbnail_mime_type"`   // MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"
	VideoURL            string              `json:"video_url"`             // The URL of the video file (file size must not exceed 1MB)
	VideoMimeType       string              `json:"video_mime_type"`       // MIME type of the video file. Must be one of "image/gif" and "video/mp4"
	VideoDuration       int32               `json:"video_duration"`        // Duration of the video, in seconds
	VideoWidth          int32               `json:"video_width"`           // Width of the video
	VideoHeight         int32               `json:"video_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
}

InputInlineQueryResultAnimation Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video

func NewInputInlineQueryResultAnimation

func NewInputInlineQueryResultAnimation(iD string, title string, thumbnailURL string, thumbnailMimeType string, videoURL string, videoMimeType string, videoDuration int32, videoWidth int32, videoHeight int32, replyMarkup ReplyMarkup, inputMessageContent InputMessageContent) *InputInlineQueryResultAnimation

NewInputInlineQueryResultAnimation creates a new InputInlineQueryResultAnimation

@param iD Unique identifier of the query result @param title Title of the query result @param thumbnailURL URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists @param thumbnailMimeType MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4" @param videoURL The URL of the video file (file size must not exceed 1MB) @param videoMimeType MIME type of the video file. Must be one of "image/gif" and "video/mp4" @param videoDuration Duration of the video, in seconds @param videoWidth Width of the video @param videoHeight 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 (*InputInlineQueryResultAnimation) GetInputInlineQueryResultEnum

func (inputInlineQueryResultAnimation *InputInlineQueryResultAnimation) GetInputInlineQueryResultEnum() InputInlineQueryResultEnum

GetInputInlineQueryResultEnum return the enum type of this object

func (*InputInlineQueryResultAnimation) MessageType

func (inputInlineQueryResultAnimation *InputInlineQueryResultAnimation) MessageType() string

MessageType return the string telegram-type of InputInlineQueryResultAnimation

func (*InputInlineQueryResultAnimation) UnmarshalJSON

func (inputInlineQueryResultAnimation *InputInlineQueryResultAnimation) 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 (
	InputInlineQueryResultAnimationType InputInlineQueryResultEnum = "inputInlineQueryResultAnimation"
	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 or TGS 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 or TGS 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 or TGS 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
	AddedStickerFileIDs []int32         `json:"added_sticker_file_ids"` // File identifiers of the stickers added to the animation, if applicable
	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, addedStickerFileIDs []int32, 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 addedStickerFileIDs File identifiers of the stickers added to the animation, if applicable @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"
	InputMessageDiceType      InputMessageContentEnum = "inputMessageDice"
	InputMessageGameType      InputMessageContentEnum = "inputMessageGame"
	InputMessageInvoiceType   InputMessageContentEnum = "inputMessageInvoice"
	InputMessagePollType      InputMessageContentEnum = "inputMessagePoll"
	InputMessageForwardedType InputMessageContentEnum = "inputMessageForwarded"
)

InputMessageContent enums

type InputMessageDice

type InputMessageDice struct {
	Emoji      string `json:"emoji"`       // Emoji on which the dice throw animation is based
	ClearDraft bool   `json:"clear_draft"` // True, if a chat message draft should be deleted
	// contains filtered or unexported fields
}

InputMessageDice A dice message

func NewInputMessageDice

func NewInputMessageDice(emoji string, clearDraft bool) *InputMessageDice

NewInputMessageDice creates a new InputMessageDice

@param emoji Emoji on which the dice throw animation is based @param clearDraft True, if a chat message draft should be deleted

func (*InputMessageDice) GetInputMessageContentEnum

func (inputMessageDice *InputMessageDice) GetInputMessageContentEnum() InputMessageContentEnum

GetInputMessageContentEnum return the enum type of this object

func (*InputMessageDice) MessageType

func (inputMessageDice *InputMessageDice) MessageType() string

MessageType return the string telegram-type of InputMessageDice

type InputMessageDocument

type InputMessageDocument struct {
	Document                    InputFile       `json:"document"`                       // Document to be sent
	Thumbnail                   *InputThumbnail `json:"thumbnail"`                      // Document thumbnail, if available
	DisableContentTypeDetection bool            `json:"disable_content_type_detection"` // If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats
	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, disableContentTypeDetection bool, caption *FormattedText) *InputMessageDocument

NewInputMessageDocument creates a new InputMessageDocument

@param document Document to be sent @param thumbnail Document thumbnail, if available @param disableContentTypeDetection If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats @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
	CopyOptions *MessageCopyOptions `json:"copy_options"`  // Options to be used to copy content of the message without a link to the original message
	// contains filtered or unexported fields
}

InputMessageForwarded A forwarded message

func NewInputMessageForwarded

func NewInputMessageForwarded(fromChatID int64, messageID int64, inGameShare bool, copyOptions *MessageCopyOptions) *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 @param copyOptions Options to be used to copy content of the message without a link to the original message

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 be between 60 and 86400 for a live location and 0 otherwise
	Heading              int32     `json:"heading"`                // For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown
	ProximityAlertRadius int32     `json:"proximity_alert_radius"` // For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages
	// contains filtered or unexported fields
}

InputMessageLocation A message with a location

func NewInputMessageLocation

func NewInputMessageLocation(location *Location, livePeriod int32, heading int32, proximityAlertRadius 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 be between 60 and 86400 for a live location and 0 otherwise @param heading For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown @param proximityAlertRadius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages

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 (up to 300 characters for bots)
	Options     []string `json:"options"`      // List of poll answer options, 2-10 strings 1-100 characters each
	IsAnonymous bool     `json:"is_anonymous"` // True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
	Type        PollType `json:"type"`         // Type of the poll
	OpenPeriod  int32    `json:"open_period"`  // Amount of time the poll will be active after creation, in seconds; for bots only
	CloseDate   int32    `json:"close_date"`   // Point in time (Unix timestamp) when the poll will be automatically closed; for bots only
	IsClosed    bool     `json:"is_closed"`    // True, if the poll needs to be sent already closed; for bots only
	// contains filtered or unexported fields
}

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

func NewInputMessagePoll

func NewInputMessagePoll(question string, options []string, isAnonymous bool, typeParam PollType, openPeriod int32, closeDate int32, isClosed bool) *InputMessagePoll

NewInputMessagePoll creates a new InputMessagePoll

@param question Poll question; 1-255 characters (up to 300 characters for bots) @param options List of poll answer options, 2-10 strings 1-100 characters each @param isAnonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels @param typeParam Type of the poll @param openPeriod Amount of time the poll will be active after creation, in seconds; for bots only @param closeDate Point in time (Unix timestamp) when the poll will be automatically closed; for bots only @param isClosed True, if the poll needs to be sent already closed; for bots only

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

func (*InputMessagePoll) UnmarshalJSON

func (inputMessagePoll *InputMessagePoll) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputMessageSticker

type InputMessageSticker struct {
	Sticker   InputFile       `json:"sticker"`   // Sticker to be sent
	Thumbnail *InputThumbnail `json:"thumbnail"` // Sticker thumbnail, if available
	Width     int32           `json:"width"`     // Sticker width
	Height    int32           `json:"height"`    // Sticker height
	Emoji     string          `json:"emoji"`     // Emoji used to choose the sticker
	// contains filtered or unexported fields
}

InputMessageSticker A sticker message

func NewInputMessageSticker

func NewInputMessageSticker(sticker InputFile, thumbnail *InputThumbnail, width int32, height int32, emoji string) *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 @param emoji Emoji used to choose the sticker

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, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName 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, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName 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 interface {
	GetInputStickerEnum() InputStickerEnum
}

InputSticker Describes a sticker that needs to be added to a sticker set

type InputStickerAnimated

type InputStickerAnimated struct {
	Sticker InputFile `json:"sticker"` // File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
	Emojis  string    `json:"emojis"`  // Emojis corresponding to the sticker
	// contains filtered or unexported fields
}

InputStickerAnimated An animated sticker in TGS format

func NewInputStickerAnimated

func NewInputStickerAnimated(sticker InputFile, emojis string) *InputStickerAnimated

NewInputStickerAnimated creates a new InputStickerAnimated

@param sticker File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements @param emojis Emojis corresponding to the sticker

func (*InputStickerAnimated) GetInputStickerEnum

func (inputStickerAnimated *InputStickerAnimated) GetInputStickerEnum() InputStickerEnum

GetInputStickerEnum return the enum type of this object

func (*InputStickerAnimated) MessageType

func (inputStickerAnimated *InputStickerAnimated) MessageType() string

MessageType return the string telegram-type of InputStickerAnimated

func (*InputStickerAnimated) UnmarshalJSON

func (inputStickerAnimated *InputStickerAnimated) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type InputStickerEnum

type InputStickerEnum string

InputStickerEnum Alias for abstract InputSticker 'Sub-Classes', used as constant-enum here

const (
	InputStickerStaticType   InputStickerEnum = "inputStickerStatic"
	InputStickerAnimatedType InputStickerEnum = "inputStickerAnimated"
)

InputSticker enums

type InputStickerStatic

type InputStickerStatic struct {
	Sticker      InputFile     `json:"sticker"`       // PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square
	Emojis       string        `json:"emojis"`        // Emojis 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
}

InputStickerStatic A static sticker in PNG format, which will be converted to WEBP server-side

func NewInputStickerStatic

func NewInputStickerStatic(sticker InputFile, emojis string, maskPosition *MaskPosition) *InputStickerStatic

NewInputStickerStatic creates a new InputStickerStatic

@param sticker PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square @param emojis Emojis corresponding to the sticker @param maskPosition For masks, position where the mask should be placed; may be null

func (*InputStickerStatic) GetInputStickerEnum

func (inputStickerStatic *InputStickerStatic) GetInputStickerEnum() InputStickerEnum

GetInputStickerEnum return the enum type of this object

func (*InputStickerStatic) MessageType

func (inputStickerStatic *InputStickerStatic) MessageType() string

MessageType return the string telegram-type of InputStickerStatic

func (*InputStickerStatic) UnmarshalJSON

func (inputStickerStatic *InputStickerStatic) 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; must 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"
	KeyboardButtonTypeRequestPollType        KeyboardButtonTypeEnum = "keyboardButtonTypeRequestPoll"
)

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 KeyboardButtonTypeRequestPoll

type KeyboardButtonTypeRequestPoll struct {
	ForceRegular bool `json:"force_regular"` // If true, only regular polls must be allowed to create
	ForceQuiz    bool `json:"force_quiz"`    // If true, only polls in quiz mode must be allowed to create
	// contains filtered or unexported fields
}

KeyboardButtonTypeRequestPoll A button that allows the user to create and send a poll when pressed; available only in private chats

func NewKeyboardButtonTypeRequestPoll

func NewKeyboardButtonTypeRequestPoll(forceRegular bool, forceQuiz bool) *KeyboardButtonTypeRequestPoll

NewKeyboardButtonTypeRequestPoll creates a new KeyboardButtonTypeRequestPoll

@param forceRegular If true, only regular polls must be allowed to create @param forceQuiz If true, only polls in quiz mode must be allowed to create

func (*KeyboardButtonTypeRequestPoll) GetKeyboardButtonTypeEnum

func (keyboardButtonTypeRequestPoll *KeyboardButtonTypeRequestPoll) GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum

GetKeyboardButtonTypeEnum return the enum type of this object

func (*KeyboardButtonTypeRequestPoll) MessageType

func (keyboardButtonTypeRequestPoll *KeyboardButtonTypeRequestPoll) MessageType() string

MessageType return the string telegram-type of KeyboardButtonTypeRequestPoll

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 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
	HorizontalAccuracy float64 `json:"horizontal_accuracy"` // The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown
	// contains filtered or unexported fields
}

Location Describes a location on planet Earth

func NewLocation

func NewLocation(latitude float64, longitude float64, horizontalAccuracy 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 @param horizontalAccuracy The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown

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"`   // The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated
	RedirectStderr bool   `json:"redirect_stderr"` // Pass true to additionally redirect stderr to the log file. Ignored on Windows
	// contains filtered or unexported fields
}

LogStreamFile The log is written to a file

func NewLogStreamFile

func NewLogStreamFile(path string, maxFileSize int64, redirectStderr bool) *LogStreamFile

NewLogStreamFile creates a new LogStreamFile

@param path Path to the file to where the internal TDLib log will be written @param maxFileSize The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated @param redirectStderr Pass true to additionally redirect stderr to the log file. Ignored on Windows

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 LoginURLInfo

type LoginURLInfo interface {
	GetLoginURLInfoEnum() LoginURLInfoEnum
}

LoginURLInfo Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl

type LoginURLInfoEnum

type LoginURLInfoEnum string

LoginURLInfoEnum Alias for abstract LoginURLInfo 'Sub-Classes', used as constant-enum here

const (
	LoginURLInfoOpenType                LoginURLInfoEnum = "loginURLInfoOpen"
	LoginURLInfoRequestConfirmationType LoginURLInfoEnum = "loginURLInfoRequestConfirmation"
)

LoginURLInfo enums

type LoginURLInfoOpen

type LoginURLInfoOpen struct {
	URL         string `json:"url"`          // The URL to open
	SkipConfirm bool   `json:"skip_confirm"` // True, if there is no need to show an ordinary open URL confirm
	// contains filtered or unexported fields
}

LoginURLInfoOpen An HTTP url needs to be open

func NewLoginURLInfoOpen

func NewLoginURLInfoOpen(uRL string, skipConfirm bool) *LoginURLInfoOpen

NewLoginURLInfoOpen creates a new LoginURLInfoOpen

@param uRL The URL to open @param skipConfirm True, if there is no need to show an ordinary open URL confirm

func (*LoginURLInfoOpen) GetLoginURLInfoEnum

func (loginURLInfoOpen *LoginURLInfoOpen) GetLoginURLInfoEnum() LoginURLInfoEnum

GetLoginURLInfoEnum return the enum type of this object

func (*LoginURLInfoOpen) MessageType

func (loginURLInfoOpen *LoginURLInfoOpen) MessageType() string

MessageType return the string telegram-type of LoginURLInfoOpen

type LoginURLInfoRequestConfirmation

type LoginURLInfoRequestConfirmation struct {
	URL                string `json:"url"`                  // An HTTP URL to be opened
	Domain             string `json:"domain"`               // A domain of the URL
	BotUserID          int32  `json:"bot_user_id"`          // User identifier of a bot linked with the website
	RequestWriteAccess bool   `json:"request_write_access"` // True, if the user needs to be requested to give the permission to the bot to send them messages
	// contains filtered or unexported fields
}

LoginURLInfoRequestConfirmation An authorization confirmation dialog needs to be shown to the user

func NewLoginURLInfoRequestConfirmation

func NewLoginURLInfoRequestConfirmation(uRL string, domain string, botUserID int32, requestWriteAccess bool) *LoginURLInfoRequestConfirmation

NewLoginURLInfoRequestConfirmation creates a new LoginURLInfoRequestConfirmation

@param uRL An HTTP URL to be opened @param domain A domain of the URL @param botUserID User identifier of a bot linked with the website @param requestWriteAccess True, if the user needs to be requested to give the permission to the bot to send them messages

func (*LoginURLInfoRequestConfirmation) GetLoginURLInfoEnum

func (loginURLInfoRequestConfirmation *LoginURLInfoRequestConfirmation) GetLoginURLInfoEnum() LoginURLInfoEnum

GetLoginURLInfoEnum return the enum type of this object

func (*LoginURLInfoRequestConfirmation) MessageType

func (loginURLInfoRequestConfirmation *LoginURLInfoRequestConfirmation) MessageType() string

MessageType return the string telegram-type of LoginURLInfoRequestConfirmation

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
	Sender                  MessageSender           `json:"sender"`                       // The sender of the message
	ChatID                  int64                   `json:"chat_id"`                      // Chat identifier
	SendingState            MessageSendingState     `json:"sending_state"`                // Information about the sending state of the message; may be null
	SchedulingState         MessageSchedulingState  `json:"scheduling_state"`             // Information about the scheduling state of the message; may be null
	IsOutgoing              bool                    `json:"is_outgoing"`                  // True, if the message is outgoing
	IsPinned                bool                    `json:"is_pinned"`                    // True, if the message is pinned
	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 application
	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
	CanGetStatistics        bool                    `json:"can_get_statistics"`           // True, if the message statistics are available
	CanGetMessageThread     bool                    `json:"can_get_message_thread"`       // True, if the message thread info is available
	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
	InteractionInfo         *MessageInteractionInfo `json:"interaction_info"`             // Information about interactions with the message; may be null
	ReplyInChatID           int64                   `json:"reply_in_chat_id"`             // If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id
	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
	MessageThreadID         int64                   `json:"message_thread_id"`            // If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
	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 and anonymous group messages, optional author signature
	MediaAlbumID            JSONInt64               `json:"media_album_id"`               // Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
	RestrictionReason       string                  `json:"restriction_reason"`           // If non-empty, contains a human-readable description of the reason why access to this message must be restricted
	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, sender MessageSender, chatID int64, sendingState MessageSendingState, schedulingState MessageSchedulingState, isOutgoing bool, isPinned bool, canBeEdited bool, canBeForwarded bool, canBeDeletedOnlyForSelf bool, canBeDeletedForAllUsers bool, canGetStatistics bool, canGetMessageThread bool, isChannelPost bool, containsUnreadMention bool, date int32, editDate int32, forwardInfo *MessageForwardInfo, interactionInfo *MessageInteractionInfo, replyInChatID int64, replyToMessageID int64, messageThreadID int64, tTL int32, tTLExpiresIn float64, viaBotUserID int32, authorSignature string, mediaAlbumID JSONInt64, restrictionReason string, content MessageContent, replyMarkup ReplyMarkup) *Message

NewMessage creates a new Message

@param iD Message identifier; unique for the chat to which the message belongs @param sender The sender of the message @param chatID Chat identifier @param sendingState Information about the sending state of the message; may be null @param schedulingState Information about the scheduling state of the message; may be null @param isOutgoing True, if the message is outgoing @param isPinned True, if the message is pinned @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 application @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 canGetStatistics True, if the message statistics are available @param canGetMessageThread True, if the message thread info is available @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 interactionInfo Information about interactions with the message; may be null @param replyInChatID If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id @param replyToMessageID If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message @param messageThreadID If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs @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 and anonymous group messages, optional author signature @param mediaAlbumID Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums @param restrictionReason If non-empty, contains a human-readable description of the reason why access to this message must be restricted @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"` // The animation description
	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 The animation description @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"`   // The audio description
	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 The audio description @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 {
	IsVideo       bool              `json:"is_video"`       // True, if the call was a video call
	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(isVideo bool, discardReason CallDiscardReason, duration int32) *MessageCall

NewMessageCall creates a new MessageCall

@param isVideo True, if the call was a video call @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 *ChatPhoto `json:"photo"` // New chat photo
	// contains filtered or unexported fields
}

MessageChatChangePhoto An updated chat photo

func NewMessageChatChangePhoto

func NewMessageChatChangePhoto(photo *ChatPhoto) *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"` // The contact description
	// 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 The contact description

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"
	MessageDiceType                        MessageContentEnum = "messageDice"
	MessageGameType                        MessageContentEnum = "messageGame"
	MessagePollType                        MessageContentEnum = "messagePoll"
	MessageInvoiceType                     MessageContentEnum = "messageInvoice"
	MessageCallType                        MessageContentEnum = "messageCall"
	MessageVoiceChatStartedType            MessageContentEnum = "messageVoiceChatStarted"
	MessageVoiceChatEndedType              MessageContentEnum = "messageVoiceChatEnded"
	MessageInviteVoiceChatParticipantsType MessageContentEnum = "messageInviteVoiceChatParticipants"
	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"
	MessageProximityAlertTriggeredType     MessageContentEnum = "messageProximityAlertTriggered"
	MessageUnsupportedType                 MessageContentEnum = "messageUnsupported"
)

MessageContent enums

type MessageCopyOptions

type MessageCopyOptions struct {
	SendCopy       bool           `json:"send_copy"`       // True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat
	ReplaceCaption bool           `json:"replace_caption"` // True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
	NewCaption     *FormattedText `json:"new_caption"`     // New message caption. Ignored if replace_caption is false
	// contains filtered or unexported fields
}

MessageCopyOptions Options to be used when a message content is copied without a link to the original message

func NewMessageCopyOptions

func NewMessageCopyOptions(sendCopy bool, replaceCaption bool, newCaption *FormattedText) *MessageCopyOptions

NewMessageCopyOptions creates a new MessageCopyOptions

@param sendCopy True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat @param replaceCaption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false @param newCaption New message caption. Ignored if replace_caption is false

func (*MessageCopyOptions) MessageType

func (messageCopyOptions *MessageCopyOptions) MessageType() string

MessageType return the string telegram-type of MessageCopyOptions

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 MessageDice

type MessageDice struct {
	InitialState                DiceStickers `json:"initial_state"`                  // The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known
	FinalState                  DiceStickers `json:"final_state"`                    // The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known
	Emoji                       string       `json:"emoji"`                          // Emoji on which the dice throw animation is based
	Value                       int32        `json:"value"`                          // The dice value. If the value is 0, the dice don't have final state yet
	SuccessAnimationFrameNumber int32        `json:"success_animation_frame_number"` // Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded
	// contains filtered or unexported fields
}

MessageDice A dice message. The dice value is randomly generated by the server

func NewMessageDice

func NewMessageDice(initialState DiceStickers, finalState DiceStickers, emoji string, value int32, successAnimationFrameNumber int32) *MessageDice

NewMessageDice creates a new MessageDice

@param initialState The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known @param finalState The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known @param emoji Emoji on which the dice throw animation is based @param value The dice value. If the value is 0, the dice don't have final state yet @param successAnimationFrameNumber Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded

func (*MessageDice) GetMessageContentEnum

func (messageDice *MessageDice) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessageDice) MessageType

func (messageDice *MessageDice) MessageType() string

MessageType return the string telegram-type of MessageDice

func (*MessageDice) UnmarshalJSON

func (messageDice *MessageDice) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type MessageDocument

type MessageDocument struct {
	Document *Document      `json:"document"` // The document description
	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 The document description @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 MessageFileType

type MessageFileType interface {
	GetMessageFileTypeEnum() MessageFileTypeEnum
}

MessageFileType Contains information about a file with messages exported from another app

type MessageFileTypeEnum

type MessageFileTypeEnum string

MessageFileTypeEnum Alias for abstract MessageFileType 'Sub-Classes', used as constant-enum here

const (
	MessageFileTypePrivateType MessageFileTypeEnum = "messageFileTypePrivate"
	MessageFileTypeGroupType   MessageFileTypeEnum = "messageFileTypeGroup"
	MessageFileTypeUnknownType MessageFileTypeEnum = "messageFileTypeUnknown"
)

MessageFileType enums

type MessageFileTypeGroup

type MessageFileTypeGroup struct {
	Title string `json:"title"` // Title of the group chat; may be empty if unrecognized
	// contains filtered or unexported fields
}

MessageFileTypeGroup The messages was exported from a group chat

func NewMessageFileTypeGroup

func NewMessageFileTypeGroup(title string) *MessageFileTypeGroup

NewMessageFileTypeGroup creates a new MessageFileTypeGroup

@param title Title of the group chat; may be empty if unrecognized

func (*MessageFileTypeGroup) GetMessageFileTypeEnum

func (messageFileTypeGroup *MessageFileTypeGroup) GetMessageFileTypeEnum() MessageFileTypeEnum

GetMessageFileTypeEnum return the enum type of this object

func (*MessageFileTypeGroup) MessageType

func (messageFileTypeGroup *MessageFileTypeGroup) MessageType() string

MessageType return the string telegram-type of MessageFileTypeGroup

type MessageFileTypePrivate

type MessageFileTypePrivate struct {
	Name string `json:"name"` // Name of the other party; may be empty if unrecognized
	// contains filtered or unexported fields
}

MessageFileTypePrivate The messages was exported from a private chat

func NewMessageFileTypePrivate

func NewMessageFileTypePrivate(name string) *MessageFileTypePrivate

NewMessageFileTypePrivate creates a new MessageFileTypePrivate

@param name Name of the other party; may be empty if unrecognized

func (*MessageFileTypePrivate) GetMessageFileTypeEnum

func (messageFileTypePrivate *MessageFileTypePrivate) GetMessageFileTypeEnum() MessageFileTypeEnum

GetMessageFileTypeEnum return the enum type of this object

func (*MessageFileTypePrivate) MessageType

func (messageFileTypePrivate *MessageFileTypePrivate) MessageType() string

MessageType return the string telegram-type of MessageFileTypePrivate

type MessageFileTypeUnknown

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

MessageFileTypeUnknown The messages was exported from a chat of unknown type

func NewMessageFileTypeUnknown

func NewMessageFileTypeUnknown() *MessageFileTypeUnknown

NewMessageFileTypeUnknown creates a new MessageFileTypeUnknown

func (*MessageFileTypeUnknown) GetMessageFileTypeEnum

func (messageFileTypeUnknown *MessageFileTypeUnknown) GetMessageFileTypeEnum() MessageFileTypeEnum

GetMessageFileTypeEnum return the enum type of this object

func (*MessageFileTypeUnknown) MessageType

func (messageFileTypeUnknown *MessageFileTypeUnknown) MessageType() string

MessageType return the string telegram-type of MessageFileTypeUnknown

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
	PublicServiceAnnouncementType string               `json:"public_service_announcement_type"` // The type of a public service announcement for the forwarded message
	FromChatID                    int64                `json:"from_chat_id"`                     // For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, 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), to the Replies bot chat, or to the channel's discussion group, 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, publicServiceAnnouncementType string, 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 publicServiceAnnouncementType The type of a public service announcement for the forwarded message @param fromChatID For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, 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), to the Replies bot chat, or to the channel's discussion group, 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
	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 @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 MessageForwardOriginChat

type MessageForwardOriginChat struct {
	SenderChatID    int64  `json:"sender_chat_id"`   // Identifier of the chat that originally sent the message
	AuthorSignature string `json:"author_signature"` // Original message author signature
	// contains filtered or unexported fields
}

MessageForwardOriginChat The message was originally sent by an anonymous chat administrator on behalf of the chat

func NewMessageForwardOriginChat

func NewMessageForwardOriginChat(senderChatID int64, authorSignature string) *MessageForwardOriginChat

NewMessageForwardOriginChat creates a new MessageForwardOriginChat

@param senderChatID Identifier of the chat that originally sent the message @param authorSignature Original message author signature

func (*MessageForwardOriginChat) GetMessageForwardOriginEnum

func (messageForwardOriginChat *MessageForwardOriginChat) GetMessageForwardOriginEnum() MessageForwardOriginEnum

GetMessageForwardOriginEnum return the enum type of this object

func (*MessageForwardOriginChat) MessageType

func (messageForwardOriginChat *MessageForwardOriginChat) MessageType() string

MessageType return the string telegram-type of MessageForwardOriginChat

type MessageForwardOriginEnum

type MessageForwardOriginEnum string

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

const (
	MessageForwardOriginUserType          MessageForwardOriginEnum = "messageForwardOriginUser"
	MessageForwardOriginChatType          MessageForwardOriginEnum = "messageForwardOriginChat"
	MessageForwardOriginHiddenUserType    MessageForwardOriginEnum = "messageForwardOriginHiddenUser"
	MessageForwardOriginChannelType       MessageForwardOriginEnum = "messageForwardOriginChannel"
	MessageForwardOriginMessageImportType MessageForwardOriginEnum = "messageForwardOriginMessageImport"
)

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 sent by a user, which is hidden by their 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 MessageForwardOriginMessageImport

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

MessageForwardOriginMessageImport The message was imported from an exported message history

func NewMessageForwardOriginMessageImport

func NewMessageForwardOriginMessageImport(senderName string) *MessageForwardOriginMessageImport

NewMessageForwardOriginMessageImport creates a new MessageForwardOriginMessageImport

@param senderName Name of the sender

func (*MessageForwardOriginMessageImport) GetMessageForwardOriginEnum

func (messageForwardOriginMessageImport *MessageForwardOriginMessageImport) GetMessageForwardOriginEnum() MessageForwardOriginEnum

GetMessageForwardOriginEnum return the enum type of this object

func (*MessageForwardOriginMessageImport) MessageType

func (messageForwardOriginMessageImport *MessageForwardOriginMessageImport) MessageType() string

MessageType return the string telegram-type of MessageForwardOriginMessageImport

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 sent 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"` // The game description
	// 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 The game description

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 MessageInteractionInfo

type MessageInteractionInfo struct {
	ViewCount    int32             `json:"view_count"`    // Number of times the message was viewed
	ForwardCount int32             `json:"forward_count"` // Number of times the message was forwarded
	ReplyInfo    *MessageReplyInfo `json:"reply_info"`    // Contains information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself
	// contains filtered or unexported fields
}

MessageInteractionInfo Contains information about interactions with a message

func NewMessageInteractionInfo

func NewMessageInteractionInfo(viewCount int32, forwardCount int32, replyInfo *MessageReplyInfo) *MessageInteractionInfo

NewMessageInteractionInfo creates a new MessageInteractionInfo

@param viewCount Number of times the message was viewed @param forwardCount Number of times the message was forwarded @param replyInfo Contains information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself

func (*MessageInteractionInfo) MessageType

func (messageInteractionInfo *MessageInteractionInfo) MessageType() string

MessageType return the string telegram-type of MessageInteractionInfo

type MessageInviteVoiceChatParticipants

type MessageInviteVoiceChatParticipants struct {
	GroupCallID int32   `json:"group_call_id"` // Identifier of the voice chat. The voice chat can be received through the method getGroupCall
	UserIDs     []int32 `json:"user_ids"`      // Invited user identifiers
	// contains filtered or unexported fields
}

MessageInviteVoiceChatParticipants A message with information about an invite to a voice chat

func NewMessageInviteVoiceChatParticipants

func NewMessageInviteVoiceChatParticipants(groupCallID int32, userIDs []int32) *MessageInviteVoiceChatParticipants

NewMessageInviteVoiceChatParticipants creates a new MessageInviteVoiceChatParticipants

@param groupCallID Identifier of the voice chat. The voice chat can be received through the method getGroupCall @param userIDs Invited user identifiers

func (*MessageInviteVoiceChatParticipants) GetMessageContentEnum

func (messageInviteVoiceChatParticipants *MessageInviteVoiceChatParticipants) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessageInviteVoiceChatParticipants) MessageType

func (messageInviteVoiceChatParticipants *MessageInviteVoiceChatParticipants) MessageType() string

MessageType return the string telegram-type of MessageInviteVoiceChatParticipants

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 MessageLink struct {
	Link     string `json:"link"`      // Message link
	IsPublic bool   `json:"is_public"` // True, if the link will work for non-members of the chat
	// contains filtered or unexported fields
}

MessageLink Contains an HTTPS link to a message in a supergroup or channel

func NewMessageLink(link string, isPublic bool) *MessageLink

NewMessageLink creates a new MessageLink

@param link Message link @param isPublic True, if the link will work for non-members of the chat

func (*MessageLink) MessageType

func (messageLink *MessageLink) MessageType() string

MessageType return the string telegram-type of MessageLink

type MessageLinkInfo

type MessageLinkInfo struct {
	IsPublic   bool     `json:"is_public"`   // True, if the link is a public link for a message in a chat
	ChatID     int64    `json:"chat_id"`     // If found, identifier of the chat to which the message belongs, 0 otherwise
	Message    *Message `json:"message"`     // If found, the linked message; may be null
	ForAlbum   bool     `json:"for_album"`   // True, if the whole media album to which the message belongs is linked
	ForComment bool     `json:"for_comment"` // True, if the message is linked as a channel post comment or from a message thread
	// contains filtered or unexported fields
}

MessageLinkInfo Contains information about a link to a message in a chat

func NewMessageLinkInfo

func NewMessageLinkInfo(isPublic bool, chatID int64, message *Message, forAlbum bool, forComment bool) *MessageLinkInfo

NewMessageLinkInfo creates a new MessageLinkInfo

@param isPublic True, if the link is a public link for a message in a chat @param chatID If found, identifier of the chat to which the message belongs, 0 otherwise @param message If found, the linked message; may be null @param forAlbum True, if the whole media album to which the message belongs is linked @param forComment True, if the message is linked as a channel post comment or from a message thread

func (*MessageLinkInfo) MessageType

func (messageLinkInfo *MessageLinkInfo) MessageType() string

MessageType return the string telegram-type of MessageLinkInfo

type MessageLocation

type MessageLocation struct {
	Location             *Location `json:"location"`               // The location description
	LivePeriod           int32     `json:"live_period"`            // Time relative to the message send date, for 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
	Heading              int32     `json:"heading"`                // For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown
	ProximityAlertRadius int32     `json:"proximity_alert_radius"` // For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender
	// contains filtered or unexported fields
}

MessageLocation A message with a location

func NewMessageLocation

func NewMessageLocation(location *Location, livePeriod int32, expiresIn int32, heading int32, proximityAlertRadius int32) *MessageLocation

NewMessageLocation creates a new MessageLocation

@param location The location description @param livePeriod Time relative to the message send date, for 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 @param heading For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown @param proximityAlertRadius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender

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"`     // The photo description
	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 The photo description @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"` // The poll description
	// 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 The poll description

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 MessageProximityAlertTriggered

type MessageProximityAlertTriggered struct {
	Traveler MessageSender `json:"traveler"` // The user or chat, which triggered the proximity alert
	Watcher  MessageSender `json:"watcher"`  // The user or chat, which subscribed for the proximity alert
	Distance int32         `json:"distance"` // The distance between the users
	// contains filtered or unexported fields
}

MessageProximityAlertTriggered A user in the chat came within proximity alert range

func NewMessageProximityAlertTriggered

func NewMessageProximityAlertTriggered(traveler MessageSender, watcher MessageSender, distance int32) *MessageProximityAlertTriggered

NewMessageProximityAlertTriggered creates a new MessageProximityAlertTriggered

@param traveler The user or chat, which triggered the proximity alert @param watcher The user or chat, which subscribed for the proximity alert @param distance The distance between the users

func (*MessageProximityAlertTriggered) GetMessageContentEnum

func (messageProximityAlertTriggered *MessageProximityAlertTriggered) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessageProximityAlertTriggered) MessageType

func (messageProximityAlertTriggered *MessageProximityAlertTriggered) MessageType() string

MessageType return the string telegram-type of MessageProximityAlertTriggered

func (*MessageProximityAlertTriggered) UnmarshalJSON

func (messageProximityAlertTriggered *MessageProximityAlertTriggered) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type MessageReplyInfo

type MessageReplyInfo struct {
	ReplyCount              int32           `json:"reply_count"`                 // Number of times the message was directly or indirectly replied
	RecentRepliers          []MessageSender `json:"recent_repliers"`             // Recent repliers to the message; available in channels with a discussion supergroup
	LastReadInboxMessageID  int64           `json:"last_read_inbox_message_id"`  // Identifier of the last read incoming reply to the message
	LastReadOutboxMessageID int64           `json:"last_read_outbox_message_id"` // Identifier of the last read outgoing reply to the message
	LastMessageID           int64           `json:"last_message_id"`             // Identifier of the last reply to the message
	// contains filtered or unexported fields
}

MessageReplyInfo Contains information about replies to a message

func NewMessageReplyInfo

func NewMessageReplyInfo(replyCount int32, recentRepliers []MessageSender, lastReadInboxMessageID int64, lastReadOutboxMessageID int64, lastMessageID int64) *MessageReplyInfo

NewMessageReplyInfo creates a new MessageReplyInfo

@param replyCount Number of times the message was directly or indirectly replied @param recentRepliers Recent repliers to the message; available in channels with a discussion supergroup @param lastReadInboxMessageID Identifier of the last read incoming reply to the message @param lastReadOutboxMessageID Identifier of the last read outgoing reply to the message @param lastMessageID Identifier of the last reply to the message

func (*MessageReplyInfo) MessageType

func (messageReplyInfo *MessageReplyInfo) MessageType() string

MessageType return the string telegram-type of MessageReplyInfo

func (*MessageReplyInfo) UnmarshalJSON

func (messageReplyInfo *MessageReplyInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal to json

type MessageSchedulingState

type MessageSchedulingState interface {
	GetMessageSchedulingStateEnum() MessageSchedulingStateEnum
}

MessageSchedulingState Contains information about the time when a scheduled message will be sent

type MessageSchedulingStateEnum

type MessageSchedulingStateEnum string

MessageSchedulingStateEnum Alias for abstract MessageSchedulingState 'Sub-Classes', used as constant-enum here

const (
	MessageSchedulingStateSendAtDateType     MessageSchedulingStateEnum = "messageSchedulingStateSendAtDate"
	MessageSchedulingStateSendWhenOnlineType MessageSchedulingStateEnum = "messageSchedulingStateSendWhenOnline"
)

MessageSchedulingState enums

type MessageSchedulingStateSendAtDate

type MessageSchedulingStateSendAtDate struct {
	SendDate int32 `json:"send_date"` // Date the message will be sent. The date must be within 367 days in the future
	// contains filtered or unexported fields
}

MessageSchedulingStateSendAtDate The message will be sent at the specified date

func NewMessageSchedulingStateSendAtDate

func NewMessageSchedulingStateSendAtDate(sendDate int32) *MessageSchedulingStateSendAtDate

NewMessageSchedulingStateSendAtDate creates a new MessageSchedulingStateSendAtDate

@param sendDate Date the message will be sent. The date must be within 367 days in the future

func (*MessageSchedulingStateSendAtDate) GetMessageSchedulingStateEnum

func (messageSchedulingStateSendAtDate *MessageSchedulingStateSendAtDate) GetMessageSchedulingStateEnum() MessageSchedulingStateEnum

GetMessageSchedulingStateEnum return the enum type of this object

func (*MessageSchedulingStateSendAtDate) MessageType

func (messageSchedulingStateSendAtDate *MessageSchedulingStateSendAtDate) MessageType() string

MessageType return the string telegram-type of MessageSchedulingStateSendAtDate

type MessageSchedulingStateSendWhenOnline

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

MessageSchedulingStateSendWhenOnline The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known

func NewMessageSchedulingStateSendWhenOnline

func NewMessageSchedulingStateSendWhenOnline() *MessageSchedulingStateSendWhenOnline

NewMessageSchedulingStateSendWhenOnline creates a new MessageSchedulingStateSendWhenOnline

func (*MessageSchedulingStateSendWhenOnline) GetMessageSchedulingStateEnum

func (messageSchedulingStateSendWhenOnline *MessageSchedulingStateSendWhenOnline) GetMessageSchedulingStateEnum() MessageSchedulingStateEnum

GetMessageSchedulingStateEnum return the enum type of this object

func (*MessageSchedulingStateSendWhenOnline) MessageType

func (messageSchedulingStateSendWhenOnline *MessageSchedulingStateSendWhenOnline) MessageType() string

MessageType return the string telegram-type of MessageSchedulingStateSendWhenOnline

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 MessageSendOptions

type MessageSendOptions struct {
	DisableNotification bool                   `json:"disable_notification"` // Pass true to disable notification for the message
	FromBackground      bool                   `json:"from_background"`      // Pass true if the message is sent from the background
	SchedulingState     MessageSchedulingState `json:"scheduling_state"`     // Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
	// contains filtered or unexported fields
}

MessageSendOptions Options to be used when a message is sent

func NewMessageSendOptions

func NewMessageSendOptions(disableNotification bool, fromBackground bool, schedulingState MessageSchedulingState) *MessageSendOptions

NewMessageSendOptions creates a new MessageSendOptions

@param disableNotification Pass true to disable notification for the message @param fromBackground Pass true if the message is sent from the background @param schedulingState Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled

func (*MessageSendOptions) MessageType

func (messageSendOptions *MessageSendOptions) MessageType() string

MessageType return the string telegram-type of MessageSendOptions

func (*MessageSendOptions) UnmarshalJSON

func (messageSendOptions *MessageSendOptions) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type MessageSender

type MessageSender interface {
	GetMessageSenderEnum() MessageSenderEnum
}

MessageSender Contains information about the sender of a message

type MessageSenderChat

type MessageSenderChat struct {
	ChatID int64 `json:"chat_id"` // Identifier of the chat that sent the message
	// contains filtered or unexported fields
}

MessageSenderChat The message was sent on behalf of a chat

func NewMessageSenderChat

func NewMessageSenderChat(chatID int64) *MessageSenderChat

NewMessageSenderChat creates a new MessageSenderChat

@param chatID Identifier of the chat that sent the message

func (*MessageSenderChat) GetMessageSenderEnum

func (messageSenderChat *MessageSenderChat) GetMessageSenderEnum() MessageSenderEnum

GetMessageSenderEnum return the enum type of this object

func (*MessageSenderChat) MessageType

func (messageSenderChat *MessageSenderChat) MessageType() string

MessageType return the string telegram-type of MessageSenderChat

type MessageSenderEnum

type MessageSenderEnum string

MessageSenderEnum Alias for abstract MessageSender 'Sub-Classes', used as constant-enum here

const (
	MessageSenderUserType MessageSenderEnum = "messageSenderUser"
	MessageSenderChatType MessageSenderEnum = "messageSenderChat"
)

MessageSender enums

type MessageSenderUser

type MessageSenderUser struct {
	UserID int32 `json:"user_id"` // Identifier of the user that sent the message
	// contains filtered or unexported fields
}

MessageSenderUser The message was sent by a known user

func NewMessageSenderUser

func NewMessageSenderUser(userID int32) *MessageSenderUser

NewMessageSenderUser creates a new MessageSenderUser

@param userID Identifier of the user that sent the message

func (*MessageSenderUser) GetMessageSenderEnum

func (messageSenderUser *MessageSenderUser) GetMessageSenderEnum() MessageSenderEnum

GetMessageSenderEnum return the enum type of this object

func (*MessageSenderUser) MessageType

func (messageSenderUser *MessageSenderUser) MessageType() string

MessageType return the string telegram-type of MessageSenderUser

type MessageSenders

type MessageSenders struct {
	TotalCount int32           `json:"total_count"` // Approximate total count of messages senders found
	Senders    []MessageSender `json:"senders"`     // List of message senders
	// contains filtered or unexported fields
}

MessageSenders Represents a list of message senders

func NewMessageSenders

func NewMessageSenders(totalCount int32, senders []MessageSender) *MessageSenders

NewMessageSenders creates a new MessageSenders

@param totalCount Approximate total count of messages senders found @param senders List of message senders

func (*MessageSenders) MessageType

func (messageSenders *MessageSenders) MessageType() string

MessageType return the string telegram-type of MessageSenders

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 {
	ErrorCode    int32   `json:"error_code"`    // An error code; 0 if unknown
	ErrorMessage string  `json:"error_message"` // Error message
	CanRetry     bool    `json:"can_retry"`     // True, if the message can be re-sent
	RetryAfter   float64 `json:"retry_after"`   // Time left before the message can be re-sent, in seconds. No update is sent when this field changes
	// contains filtered or unexported fields
}

MessageSendingStateFailed The message failed to be sent

func NewMessageSendingStateFailed

func NewMessageSendingStateFailed(errorCode int32, errorMessage string, canRetry bool, retryAfter float64) *MessageSendingStateFailed

NewMessageSendingStateFailed creates a new MessageSendingStateFailed

@param errorCode An error code; 0 if unknown @param errorMessage Error message @param canRetry True, if the message can be re-sent @param retryAfter Time left before the message can be re-sent, in seconds. No update is sent when this field changes

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 MessageStatistics

type MessageStatistics struct {
	MessageInteractionGraph StatisticalGraph `json:"message_interaction_graph"` // A graph containing number of message views and shares
	// contains filtered or unexported fields
}

MessageStatistics A detailed statistics about a message

func NewMessageStatistics

func NewMessageStatistics(messageInteractionGraph StatisticalGraph) *MessageStatistics

NewMessageStatistics creates a new MessageStatistics

@param messageInteractionGraph A graph containing number of message views and shares

func (*MessageStatistics) MessageType

func (messageStatistics *MessageStatistics) MessageType() string

MessageType return the string telegram-type of MessageStatistics

func (*MessageStatistics) UnmarshalJSON

func (messageStatistics *MessageStatistics) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type MessageSticker

type MessageSticker struct {
	Sticker *Sticker `json:"sticker"` // The sticker description
	// contains filtered or unexported fields
}

MessageSticker A sticker message

func NewMessageSticker

func NewMessageSticker(sticker *Sticker) *MessageSticker

NewMessageSticker creates a new MessageSticker

@param sticker The sticker description

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 MessageThreadInfo

type MessageThreadInfo struct {
	ChatID          int64             `json:"chat_id"`           // Identifier of the chat to which the message thread belongs
	MessageThreadID int64             `json:"message_thread_id"` // Message thread identifier, unique within the chat
	ReplyInfo       *MessageReplyInfo `json:"reply_info"`        // Contains information about the message thread
	Messages        []Message         `json:"messages"`          // The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
	DraftMessage    *DraftMessage     `json:"draft_message"`     // A draft of a message in the message thread; may be null
	// contains filtered or unexported fields
}

MessageThreadInfo Contains information about a message thread

func NewMessageThreadInfo

func NewMessageThreadInfo(chatID int64, messageThreadID int64, replyInfo *MessageReplyInfo, messages []Message, draftMessage *DraftMessage) *MessageThreadInfo

NewMessageThreadInfo creates a new MessageThreadInfo

@param chatID Identifier of the chat to which the message thread belongs @param messageThreadID Message thread identifier, unique within the chat @param replyInfo Contains information about the message thread @param messages The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) @param draftMessage A draft of a message in the message thread; may be null

func (*MessageThreadInfo) MessageType

func (messageThreadInfo *MessageThreadInfo) MessageType() string

MessageType return the string telegram-type of MessageThreadInfo

type MessageUnsupported

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

MessageUnsupported Message content that is not supported in the current TDLib version

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"` // The venue description
	// 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 The venue description

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"`     // The video description
	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 The video description @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"` // The video note description
	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 The video note description @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 MessageVoiceChatEnded

type MessageVoiceChatEnded struct {
	Duration int32 `json:"duration"` // Call duration
	// contains filtered or unexported fields
}

MessageVoiceChatEnded A message with information about an ended voice chat

func NewMessageVoiceChatEnded

func NewMessageVoiceChatEnded(duration int32) *MessageVoiceChatEnded

NewMessageVoiceChatEnded creates a new MessageVoiceChatEnded

@param duration Call duration

func (*MessageVoiceChatEnded) GetMessageContentEnum

func (messageVoiceChatEnded *MessageVoiceChatEnded) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessageVoiceChatEnded) MessageType

func (messageVoiceChatEnded *MessageVoiceChatEnded) MessageType() string

MessageType return the string telegram-type of MessageVoiceChatEnded

type MessageVoiceChatStarted

type MessageVoiceChatStarted struct {
	GroupCallID int32 `json:"group_call_id"` // Identifier of the voice chat. The voice chat can be received through the method getGroupCall
	// contains filtered or unexported fields
}

MessageVoiceChatStarted A newly created voice chat

func NewMessageVoiceChatStarted

func NewMessageVoiceChatStarted(groupCallID int32) *MessageVoiceChatStarted

NewMessageVoiceChatStarted creates a new MessageVoiceChatStarted

@param groupCallID Identifier of the voice chat. The voice chat can be received through the method getGroupCall

func (*MessageVoiceChatStarted) GetMessageContentEnum

func (messageVoiceChatStarted *MessageVoiceChatStarted) GetMessageContentEnum() MessageContentEnum

GetMessageContentEnum return the enum type of this object

func (*MessageVoiceChatStarted) MessageType

func (messageVoiceChatStarted *MessageVoiceChatStarted) MessageType() string

MessageType return the string telegram-type of MessageVoiceChatStarted

type MessageVoiceNote

type MessageVoiceNote struct {
	VoiceNote  *VoiceNote     `json:"voice_note"`  // The voice note description
	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 The voice note description @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 Minithumbnail

type Minithumbnail struct {
	Width  int32  `json:"width"`  // Thumbnail width, usually doesn't exceed 40
	Height int32  `json:"height"` // Thumbnail height, usually doesn't exceed 40
	Data   []byte `json:"data"`   // The thumbnail in JPEG format
	// contains filtered or unexported fields
}

Minithumbnail Thumbnail image of a very poor quality and low resolution

func NewMinithumbnail

func NewMinithumbnail(width int32, height int32, data []byte) *Minithumbnail

NewMinithumbnail creates a new Minithumbnail

@param width Thumbnail width, usually doesn't exceed 40 @param height Thumbnail height, usually doesn't exceed 40 @param data The thumbnail in JPEG format

func (*Minithumbnail) MessageType

func (minithumbnail *Minithumbnail) MessageType() string

MessageType return the string telegram-type of Minithumbnail

type NetworkStatistics

type NetworkStatistics struct {
	SinceDate int32                    `json:"since_date"` // Point in time (Unix timestamp) from which the statistics are collected
	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) from which the statistics are collected @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
	IsSilent bool             `json:"is_silent"` // True, if the notification was initially silent
	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, isSilent bool, typeParam NotificationType) *Notification

NewNotification creates a new Notification

@param iD Unique persistent identifier of this notification @param date Notification date @param isSilent True, if the notification was initially silent @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 the type of notifications in a notification 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, or as reply_to_message_id
	Sender     MessageSender      `json:"sender"`      // The sender of the message. Corresponding user or chat may be inaccessible
	SenderName string             `json:"sender_name"` // Name of the sender
	IsOutgoing bool               `json:"is_outgoing"` // True, if the message is outgoing
	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, sender MessageSender, senderName string, isOutgoing bool, 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, or as reply_to_message_id @param sender The sender of the message. Corresponding user or chat may be inaccessible @param senderName Name of the sender @param isOutgoing True, if the message is outgoing @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 JSONInt64 `json:"value"` // The value of the option
	// contains filtered or unexported fields
}

OptionValueInteger Represents an integer option

func NewOptionValueInteger

func NewOptionValueInteger(value JSONInt64) *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    *ChatPhotoInfo `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 *ChatPhotoInfo, 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; may be null
	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; may be null @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"
	PageBlockVoiceNoteType       PageBlockEnum = "pageBlockVoiceNote"
	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; may be null. If the text is null, then the cell should be invisible
	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; may be null. If the text is null, then the cell should be invisible @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 PageBlockVoiceNote

type PageBlockVoiceNote struct {
	VoiceNote *VoiceNote        `json:"voice_note"` // Voice note; may be null
	Caption   *PageBlockCaption `json:"caption"`    // Voice note caption
	// contains filtered or unexported fields
}

PageBlockVoiceNote A voice note

func NewPageBlockVoiceNote

func NewPageBlockVoiceNote(voiceNote *VoiceNote, caption *PageBlockCaption) *PageBlockVoiceNote

NewPageBlockVoiceNote creates a new PageBlockVoiceNote

@param voiceNote Voice note; may be null @param caption Voice note caption

func (*PageBlockVoiceNote) GetPageBlockEnum

func (pageBlockVoiceNote *PageBlockVoiceNote) GetPageBlockEnum() PageBlockEnum

GetPageBlockEnum return the enum type of this object

func (*PageBlockVoiceNote) MessageType

func (pageBlockVoiceNote *PageBlockVoiceNote) MessageType() string

MessageType return the string telegram-type of PageBlockVoiceNote

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

type PhoneNumberAuthenticationSettings struct {
	AllowFlashCall       bool `json:"allow_flash_call"`        // Pass true if the authentication code may be sent via flash call to the specified phone number
	IsCurrentPhoneNumber bool `json:"is_current_phone_number"` // Pass true if the authenticated phone number is used on the current device
	AllowSmsRetrieverAPI bool `json:"allow_sms_retriever_api"` // For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details
	// contains filtered or unexported fields
}

PhoneNumberAuthenticationSettings Contains settings for the authentication of the user's phone number

func NewPhoneNumberAuthenticationSettings

func NewPhoneNumberAuthenticationSettings(allowFlashCall bool, isCurrentPhoneNumber bool, allowSmsRetrieverAPI bool) *PhoneNumberAuthenticationSettings

NewPhoneNumberAuthenticationSettings creates a new PhoneNumberAuthenticationSettings

@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 authenticated phone number is used on the current device @param allowSmsRetrieverAPI For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details

func (*PhoneNumberAuthenticationSettings) MessageType

func (phoneNumberAuthenticationSettings *PhoneNumberAuthenticationSettings) MessageType() string

MessageType return the string telegram-type of PhoneNumberAuthenticationSettings

type PhoneNumberInfo

type PhoneNumberInfo struct {
	Country              *CountryInfo `json:"country"`                // Information about the country to which the phone number belongs; may be null
	CountryCallingCode   string       `json:"country_calling_code"`   // The part of the phone number denoting country calling code or its part
	FormattedPhoneNumber string       `json:"formatted_phone_number"` // The phone number without country calling code formatted accordingly to local rules
	// contains filtered or unexported fields
}

PhoneNumberInfo Contains information about a phone number

func NewPhoneNumberInfo

func NewPhoneNumberInfo(country *CountryInfo, countryCallingCode string, formattedPhoneNumber string) *PhoneNumberInfo

NewPhoneNumberInfo creates a new PhoneNumberInfo

@param country Information about the country to which the phone number belongs; may be null @param countryCallingCode The part of the phone number denoting country calling code or its part @param formattedPhoneNumber The phone number without country calling code formatted accordingly to local rules

func (*PhoneNumberInfo) MessageType

func (phoneNumberInfo *PhoneNumberInfo) MessageType() string

MessageType return the string telegram-type of PhoneNumberInfo

type Photo

type Photo struct {
	HasStickers   bool           `json:"has_stickers"`  // True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets
	Minithumbnail *Minithumbnail `json:"minithumbnail"` // Photo minithumbnail; may be null
	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, minithumbnail *Minithumbnail, sizes []PhotoSize) *Photo

NewPhoto creates a new Photo

@param hasStickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets @param minithumbnail Photo minithumbnail; may be null @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"`              // Image type (see https://core.telegram.org/constructor/photoSize)
	Photo            *File   `json:"photo"`             // Information about the image file
	Width            int32   `json:"width"`             // Image width
	Height           int32   `json:"height"`            // Image height
	ProgressiveSizes []int32 `json:"progressive_sizes"` // Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image
	// contains filtered or unexported fields
}

PhotoSize Describes an image in JPEG format

func NewPhotoSize

func NewPhotoSize(typeParam string, photo *File, width int32, height int32, progressiveSizes []int32) *PhotoSize

NewPhotoSize creates a new PhotoSize

@param typeParam Image type (see https://core.telegram.org/constructor/photoSize) @param photo Information about the image file @param width Image width @param height Image height @param progressiveSizes Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image

func (*PhotoSize) MessageType

func (photoSize *PhotoSize) MessageType() string

MessageType return the string telegram-type of PhotoSize

type Point

type Point struct {
	X float64 `json:"x"` // The point's first coordinate
	Y float64 `json:"y"` // The point's second coordinate
	// contains filtered or unexported fields
}

Point A point on a Cartesian plane

func NewPoint

func NewPoint(x float64, y float64) *Point

NewPoint creates a new Point

@param x The point's first coordinate @param y The point's second coordinate

func (*Point) MessageType

func (point *Point) MessageType() string

MessageType return the string telegram-type of Point

type Poll

type Poll struct {
	ID                 JSONInt64    `json:"id"`                    // Unique poll identifier
	Question           string       `json:"question"`              // Poll question; 1-300 characters
	Options            []PollOption `json:"options"`               // List of poll answer options
	TotalVoterCount    int32        `json:"total_voter_count"`     // Total number of voters, participating in the poll
	RecentVoterUserIDs []int32      `json:"recent_voter_user_ids"` // User identifiers of recent voters, if the poll is non-anonymous
	IsAnonymous        bool         `json:"is_anonymous"`          // True, if the poll is anonymous
	Type               PollType     `json:"type"`                  // Type of the poll
	OpenPeriod         int32        `json:"open_period"`           // Amount of time the poll will be active after creation, in seconds
	CloseDate          int32        `json:"close_date"`            // Point in time (Unix timestamp) when the poll will be automatically closed
	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, recentVoterUserIDs []int32, isAnonymous bool, typeParam PollType, openPeriod int32, closeDate int32, isClosed bool) *Poll

NewPoll creates a new Poll

@param iD Unique poll identifier @param question Poll question; 1-300 characters @param options List of poll answer options @param totalVoterCount Total number of voters, participating in the poll @param recentVoterUserIDs User identifiers of recent voters, if the poll is non-anonymous @param isAnonymous True, if the poll is anonymous @param typeParam Type of the poll @param openPeriod Amount of time the poll will be active after creation, in seconds @param closeDate Point in time (Unix timestamp) when the poll will be automatically closed @param isClosed True, if the poll is closed

func (*Poll) MessageType

func (poll *Poll) MessageType() string

MessageType return the string telegram-type of Poll

func (*Poll) UnmarshalJSON

func (poll *Poll) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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 PollType

type PollType interface {
	GetPollTypeEnum() PollTypeEnum
}

PollType Describes the type of a poll

type PollTypeEnum

type PollTypeEnum string

PollTypeEnum Alias for abstract PollType 'Sub-Classes', used as constant-enum here

const (
	PollTypeRegularType PollTypeEnum = "pollTypeRegular"
	PollTypeQuizType    PollTypeEnum = "pollTypeQuiz"
)

PollType enums

type PollTypeQuiz

type PollTypeQuiz struct {
	CorrectOptionID int32          `json:"correct_option_id"` // 0-based identifier of the correct answer option; -1 for a yet unanswered poll
	Explanation     *FormattedText `json:"explanation"`       // Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll
	// contains filtered or unexported fields
}

PollTypeQuiz A poll in quiz mode, which has exactly one correct answer option and can be answered only once

func NewPollTypeQuiz

func NewPollTypeQuiz(correctOptionID int32, explanation *FormattedText) *PollTypeQuiz

NewPollTypeQuiz creates a new PollTypeQuiz

@param correctOptionID 0-based identifier of the correct answer option; -1 for a yet unanswered poll @param explanation Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll

func (*PollTypeQuiz) GetPollTypeEnum

func (pollTypeQuiz *PollTypeQuiz) GetPollTypeEnum() PollTypeEnum

GetPollTypeEnum return the enum type of this object

func (*PollTypeQuiz) MessageType

func (pollTypeQuiz *PollTypeQuiz) MessageType() string

MessageType return the string telegram-type of PollTypeQuiz

type PollTypeRegular

type PollTypeRegular struct {
	AllowMultipleAnswers bool `json:"allow_multiple_answers"` // True, if multiple answer options can be chosen simultaneously
	// contains filtered or unexported fields
}

PollTypeRegular A regular poll

func NewPollTypeRegular

func NewPollTypeRegular(allowMultipleAnswers bool) *PollTypeRegular

NewPollTypeRegular creates a new PollTypeRegular

@param allowMultipleAnswers True, if multiple answer options can be chosen simultaneously

func (*PollTypeRegular) GetPollTypeEnum

func (pollTypeRegular *PollTypeRegular) GetPollTypeEnum() PollTypeEnum

GetPollTypeEnum return the enum type of this object

func (*PollTypeRegular) MessageType

func (pollTypeRegular *PollTypeRegular) MessageType() string

MessageType return the string telegram-type of PollTypeRegular

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 user profile photos
	Small        *File     `json:"small"`         // A small (160x160) user profile photo. The file can be downloaded only before the photo is changed
	Big          *File     `json:"big"`           // A big (640x640) user profile photo. The file can be downloaded only before the photo is changed
	HasAnimation bool      `json:"has_animation"` // True, if the photo has animated variant
	// contains filtered or unexported fields
}

ProfilePhoto Describes a user profile photo

func NewProfilePhoto

func NewProfilePhoto(iD JSONInt64, small *File, big *File, hasAnimation bool) *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 user profile photos @param small A small (160x160) user profile photo. The file can be downloaded only before the photo is changed @param big A big (640x640) user profile photo. The file can be downloaded only before the photo is changed @param hasAnimation True, if the photo has animated variant

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

type PublicChatType interface {
	GetPublicChatTypeEnum() PublicChatTypeEnum
}

PublicChatType Describes a type of public chats

type PublicChatTypeEnum

type PublicChatTypeEnum string

PublicChatTypeEnum Alias for abstract PublicChatType 'Sub-Classes', used as constant-enum here

const (
	PublicChatTypeHasUsernameType     PublicChatTypeEnum = "publicChatTypeHasUsername"
	PublicChatTypeIsLocationBasedType PublicChatTypeEnum = "publicChatTypeIsLocationBased"
)

PublicChatType enums

type PublicChatTypeHasUsername

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

PublicChatTypeHasUsername The chat is public, because it has username

func NewPublicChatTypeHasUsername

func NewPublicChatTypeHasUsername() *PublicChatTypeHasUsername

NewPublicChatTypeHasUsername creates a new PublicChatTypeHasUsername

func (*PublicChatTypeHasUsername) GetPublicChatTypeEnum

func (publicChatTypeHasUsername *PublicChatTypeHasUsername) GetPublicChatTypeEnum() PublicChatTypeEnum

GetPublicChatTypeEnum return the enum type of this object

func (*PublicChatTypeHasUsername) MessageType

func (publicChatTypeHasUsername *PublicChatTypeHasUsername) MessageType() string

MessageType return the string telegram-type of PublicChatTypeHasUsername

type PublicChatTypeIsLocationBased

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

PublicChatTypeIsLocationBased The chat is public, because it is a location-based supergroup

func NewPublicChatTypeIsLocationBased

func NewPublicChatTypeIsLocationBased() *PublicChatTypeIsLocationBased

NewPublicChatTypeIsLocationBased creates a new PublicChatTypeIsLocationBased

func (*PublicChatTypeIsLocationBased) GetPublicChatTypeEnum

func (publicChatTypeIsLocationBased *PublicChatTypeIsLocationBased) GetPublicChatTypeEnum() PublicChatTypeEnum

GetPublicChatTypeEnum return the enum type of this object

func (*PublicChatTypeIsLocationBased) MessageType

func (publicChatTypeIsLocationBased *PublicChatTypeIsLocationBased) MessageType() string

MessageType return the string telegram-type of PublicChatTypeIsLocationBased

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

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

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
	HasAudios    bool  `json:"has_audios"`    // True, if the album has at least one audio file
	HasDocuments bool  `json:"has_documents"` // True, if the album has at least one document
	// contains filtered or unexported fields
}

PushMessageContentMediaAlbum A media album

func NewPushMessageContentMediaAlbum

func NewPushMessageContentMediaAlbum(totalCount int32, hasPhotos bool, hasVideos bool, hasAudios bool, hasDocuments 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 @param hasAudios True, if the album has at least one audio file @param hasDocuments True, if the album has at least one document

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
	IsRegular bool   `json:"is_regular"` // True, if the poll is regular and not in quiz mode
	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, isRegular bool, isPinned bool) *PushMessageContentPoll

NewPushMessageContentPoll creates a new PushMessageContentPoll

@param question Poll question @param isRegular True, if the poll is regular and not in quiz mode @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 RecommendedChatFilter

type RecommendedChatFilter struct {
	Filter      *ChatFilter `json:"filter"`      // The chat filter
	Description string      `json:"description"` //
	// contains filtered or unexported fields
}

RecommendedChatFilter Describes a recommended chat filter

func NewRecommendedChatFilter

func NewRecommendedChatFilter(filter *ChatFilter, description string) *RecommendedChatFilter

NewRecommendedChatFilter creates a new RecommendedChatFilter

@param filter The chat filter @param description

func (*RecommendedChatFilter) MessageType

func (recommendedChatFilter *RecommendedChatFilter) MessageType() string

MessageType return the string telegram-type of RecommendedChatFilter

type RecommendedChatFilters

type RecommendedChatFilters struct {
	ChatFilters []RecommendedChatFilter `json:"chat_filters"` // List of recommended chat filters
	// contains filtered or unexported fields
}

RecommendedChatFilters Contains a list of recommended chat filters

func NewRecommendedChatFilters

func NewRecommendedChatFilters(chatFilters []RecommendedChatFilter) *RecommendedChatFilters

NewRecommendedChatFilters creates a new RecommendedChatFilters

@param chatFilters List of recommended chat filters

func (*RecommendedChatFilters) MessageType

func (recommendedChatFilters *RecommendedChatFilters) MessageType() string

MessageType return the string telegram-type of RecommendedChatFilters

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 by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.
	UniqueID             string `json:"unique_id"`              // Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
	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, uniqueID string, isUploadingActive bool, isUploadingCompleted bool, uploadedSize int32) *RemoteFile

NewRemoteFile creates a new RemoteFile

@param iD Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. @param uniqueID Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time @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 application 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 application 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 application needs to resize the keyboard vertically
	OneTime        bool               `json:"one_time"`        // True, if the application 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 application needs to resize the keyboard vertically @param oneTime True, if the application 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 {
	Name string `json:"name"` // Anchor name
	// contains filtered or unexported fields
}

RichTextAnchor An anchor

func NewRichTextAnchor

func NewRichTextAnchor(name string) *RichTextAnchor

NewRichTextAnchor creates a new RichTextAnchor

@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

type RichTextAnchorLink struct {
	Text       RichText `json:"text"`        // The link text
	AnchorName string   `json:"anchor_name"` // The anchor name. If the name is empty, the link should bring back to top
	URL        string   `json:"url"`         // An HTTP URL, opening the anchor
	// contains filtered or unexported fields
}

RichTextAnchorLink A link to an anchor on the same web page

func NewRichTextAnchorLink(text RichText, anchorName string, uRL string) *RichTextAnchorLink

NewRichTextAnchorLink creates a new RichTextAnchorLink

@param text The link text @param anchorName The anchor name. If the name is empty, the link should bring back to top @param uRL An HTTP URL, opening the anchor

func (*RichTextAnchorLink) GetRichTextEnum

func (richTextAnchorLink *RichTextAnchorLink) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextAnchorLink) MessageType

func (richTextAnchorLink *RichTextAnchorLink) MessageType() string

MessageType return the string telegram-type of RichTextAnchorLink

func (*RichTextAnchorLink) UnmarshalJSON

func (richTextAnchorLink *RichTextAnchorLink) 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"
	RichTextReferenceType     RichTextEnum = "richTextReference"
	RichTextAnchorType        RichTextEnum = "richTextAnchor"
	RichTextAnchorLinkType    RichTextEnum = "richTextAnchorLink"
	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 RichTextReference

type RichTextReference struct {
	Text       RichText `json:"text"`        // The text
	AnchorName string   `json:"anchor_name"` // The name of a richTextAnchor object, which is the first element of the target richTexts object
	URL        string   `json:"url"`         // An HTTP URL, opening the reference
	// contains filtered or unexported fields
}

RichTextReference A reference to a richTexts object on the same web page

func NewRichTextReference

func NewRichTextReference(text RichText, anchorName string, uRL string) *RichTextReference

NewRichTextReference creates a new RichTextReference

@param text The text @param anchorName The name of a richTextAnchor object, which is the first element of the target richTexts object @param uRL An HTTP URL, opening the reference

func (*RichTextReference) GetRichTextEnum

func (richTextReference *RichTextReference) GetRichTextEnum() RichTextEnum

GetRichTextEnum return the enum type of this object

func (*RichTextReference) MessageType

func (richTextReference *RichTextReference) MessageType() string

MessageType return the string telegram-type of RichTextReference

func (*RichTextReference) UnmarshalJSON

func (richTextReference *RichTextReference) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type RichTextStrikethrough

type RichTextStrikethrough struct {
	Text RichText `json:"text"` // Text
	// contains filtered or unexported fields
}

RichTextStrikethrough A strikethrough 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
	IsCached bool     `json:"is_cached"` // True, if the URL has cached instant view server-side
	// contains filtered or unexported fields
}

RichTextURL A rich text URL link

func NewRichTextURL

func NewRichTextURL(text RichText, uRL string, isCached bool) *RichTextURL

NewRichTextURL creates a new RichTextURL

@param text Text @param uRL URL @param isCached True, if the URL has cached instant view server-side

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"
	SearchMessagesFilterFailedToSendType      SearchMessagesFilterEnum = "searchMessagesFilterFailedToSend"
	SearchMessagesFilterPinnedType            SearchMessagesFilterEnum = "searchMessagesFilterPinned"
)

SearchMessagesFilter enums

type SearchMessagesFilterFailedToSend

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

SearchMessagesFilterFailedToSend Returns only failed to send messages. This filter can be used only if the message database is used

func NewSearchMessagesFilterFailedToSend

func NewSearchMessagesFilterFailedToSend() *SearchMessagesFilterFailedToSend

NewSearchMessagesFilterFailedToSend creates a new SearchMessagesFilterFailedToSend

func (*SearchMessagesFilterFailedToSend) GetSearchMessagesFilterEnum

func (searchMessagesFilterFailedToSend *SearchMessagesFilterFailedToSend) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum

GetSearchMessagesFilterEnum return the enum type of this object

func (*SearchMessagesFilterFailedToSend) MessageType

func (searchMessagesFilterFailedToSend *SearchMessagesFilterFailedToSend) MessageType() string

MessageType return the string telegram-type of SearchMessagesFilterFailedToSend

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 SearchMessagesFilterPinned

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

SearchMessagesFilterPinned Returns only pinned messages

func NewSearchMessagesFilterPinned

func NewSearchMessagesFilterPinned() *SearchMessagesFilterPinned

NewSearchMessagesFilterPinned creates a new SearchMessagesFilterPinned

func (*SearchMessagesFilterPinned) GetSearchMessagesFilterEnum

func (searchMessagesFilterPinned *SearchMessagesFilterPinned) GetSearchMessagesFilterEnum() SearchMessagesFilterEnum

GetSearchMessagesFilterEnum return the enum type of this object

func (*SearchMessagesFilterPinned) MessageType

func (searchMessagesFilterPinned *SearchMessagesFilterPinned) MessageType() string

MessageType return the string telegram-type of SearchMessagesFilterPinned

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, a message thread 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 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.
	Layer      int32           `json:"layer"`       // Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101
	// 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 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. @param layer Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101

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 StatisticalGraph

type StatisticalGraph interface {
	GetStatisticalGraphEnum() StatisticalGraphEnum
}

StatisticalGraph Describes a statistical graph

type StatisticalGraphAsync

type StatisticalGraphAsync struct {
	Token string `json:"token"` // The token to use for data loading
	// contains filtered or unexported fields
}

StatisticalGraphAsync The graph data to be asynchronously loaded through getStatisticalGraph

func NewStatisticalGraphAsync

func NewStatisticalGraphAsync(token string) *StatisticalGraphAsync

NewStatisticalGraphAsync creates a new StatisticalGraphAsync

@param token The token to use for data loading

func (*StatisticalGraphAsync) GetStatisticalGraphEnum

func (statisticalGraphAsync *StatisticalGraphAsync) GetStatisticalGraphEnum() StatisticalGraphEnum

GetStatisticalGraphEnum return the enum type of this object

func (*StatisticalGraphAsync) MessageType

func (statisticalGraphAsync *StatisticalGraphAsync) MessageType() string

MessageType return the string telegram-type of StatisticalGraphAsync

type StatisticalGraphData

type StatisticalGraphData struct {
	JsonData  string `json:"json_data"`  // Graph data in JSON format
	ZoomToken string `json:"zoom_token"` // If non-empty, a token which can be used to receive a zoomed in graph
	// contains filtered or unexported fields
}

StatisticalGraphData A graph data

func NewStatisticalGraphData

func NewStatisticalGraphData(jsonData string, zoomToken string) *StatisticalGraphData

NewStatisticalGraphData creates a new StatisticalGraphData

@param jsonData Graph data in JSON format @param zoomToken If non-empty, a token which can be used to receive a zoomed in graph

func (*StatisticalGraphData) GetStatisticalGraphEnum

func (statisticalGraphData *StatisticalGraphData) GetStatisticalGraphEnum() StatisticalGraphEnum

GetStatisticalGraphEnum return the enum type of this object

func (*StatisticalGraphData) MessageType

func (statisticalGraphData *StatisticalGraphData) MessageType() string

MessageType return the string telegram-type of StatisticalGraphData

type StatisticalGraphEnum

type StatisticalGraphEnum string

StatisticalGraphEnum Alias for abstract StatisticalGraph 'Sub-Classes', used as constant-enum here

const (
	StatisticalGraphDataType  StatisticalGraphEnum = "statisticalGraphData"
	StatisticalGraphAsyncType StatisticalGraphEnum = "statisticalGraphAsync"
	StatisticalGraphErrorType StatisticalGraphEnum = "statisticalGraphError"
)

StatisticalGraph enums

type StatisticalGraphError

type StatisticalGraphError struct {
	ErrorMessage string `json:"error_message"` // The error message
	// contains filtered or unexported fields
}

StatisticalGraphError An error message to be shown to the user instead of the graph

func NewStatisticalGraphError

func NewStatisticalGraphError(errorMessage string) *StatisticalGraphError

NewStatisticalGraphError creates a new StatisticalGraphError

@param errorMessage The error message

func (*StatisticalGraphError) GetStatisticalGraphEnum

func (statisticalGraphError *StatisticalGraphError) GetStatisticalGraphEnum() StatisticalGraphEnum

GetStatisticalGraphEnum return the enum type of this object

func (*StatisticalGraphError) MessageType

func (statisticalGraphError *StatisticalGraphError) MessageType() string

MessageType return the string telegram-type of StatisticalGraphError

type StatisticalValue

type StatisticalValue struct {
	Value                float64 `json:"value"`                  // The current value
	PreviousValue        float64 `json:"previous_value"`         // The value for the previous day
	GrowthRatePercentage float64 `json:"growth_rate_percentage"` // The growth rate of the value, as a percentage
	// contains filtered or unexported fields
}

StatisticalValue A value with information about its recent changes

func NewStatisticalValue

func NewStatisticalValue(value float64, previousValue float64, growthRatePercentage float64) *StatisticalValue

NewStatisticalValue creates a new StatisticalValue

@param value The current value @param previousValue The value for the previous day @param growthRatePercentage The growth rate of the value, as a percentage

func (*StatisticalValue) MessageType

func (statisticalValue *StatisticalValue) MessageType() string

MessageType return the string telegram-type of StatisticalValue

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
	IsAnimated   bool               `json:"is_animated"`   // True, if the sticker is an animated sticker in TGS format
	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
	Outline      []ClosedVectorPath `json:"outline"`       // Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	Thumbnail    *Thumbnail         `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, isAnimated bool, isMask bool, maskPosition *MaskPosition, outline []ClosedVectorPath, thumbnail *Thumbnail, 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 isAnimated True, if the sticker is an animated sticker in TGS format @param isMask True, if the sticker is a mask @param maskPosition Position where the mask should be placed; may be null @param outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner @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 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
	Thumbnail        *Thumbnail         `json:"thumbnail"`         // Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed
	ThumbnailOutline []ClosedVectorPath `json:"thumbnail_outline"` // Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	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
	IsAnimated       bool               `json:"is_animated"`       // True, is the stickers in the set are animated
	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           []Emojis           `json:"emojis"`            // A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
	// contains filtered or unexported fields
}

StickerSet Represents a sticker set

func NewStickerSet

func NewStickerSet(iD JSONInt64, title string, name string, thumbnail *Thumbnail, thumbnailOutline []ClosedVectorPath, isInstalled bool, isArchived bool, isOfficial bool, isAnimated bool, isMasks bool, isViewed bool, stickers []Sticker, emojis []Emojis) *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 thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed @param thumbnailOutline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner @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 isAnimated True, is the stickers in the set are animated @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. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object

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
	Thumbnail        *Thumbnail         `json:"thumbnail"`         // Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null
	ThumbnailOutline []ClosedVectorPath `json:"thumbnail_outline"` // Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	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
	IsAnimated       bool               `json:"is_animated"`       // True, is the stickers in the set are animated
	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 application 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, thumbnail *Thumbnail, thumbnailOutline []ClosedVectorPath, isInstalled bool, isArchived bool, isOfficial bool, isAnimated 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 thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null @param thumbnailOutline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner @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 isAnimated True, is the stickers in the set are animated @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 application 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 SuggestedAction

type SuggestedAction interface {
	GetSuggestedActionEnum() SuggestedActionEnum
}

SuggestedAction Describes an action suggested to the current user

type SuggestedActionCheckPhoneNumber

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

SuggestedActionCheckPhoneNumber Suggests the user to check authorization phone number and change the phone number if it is inaccessible

func NewSuggestedActionCheckPhoneNumber

func NewSuggestedActionCheckPhoneNumber() *SuggestedActionCheckPhoneNumber

NewSuggestedActionCheckPhoneNumber creates a new SuggestedActionCheckPhoneNumber

func (*SuggestedActionCheckPhoneNumber) GetSuggestedActionEnum

func (suggestedActionCheckPhoneNumber *SuggestedActionCheckPhoneNumber) GetSuggestedActionEnum() SuggestedActionEnum

GetSuggestedActionEnum return the enum type of this object

func (*SuggestedActionCheckPhoneNumber) MessageType

func (suggestedActionCheckPhoneNumber *SuggestedActionCheckPhoneNumber) MessageType() string

MessageType return the string telegram-type of SuggestedActionCheckPhoneNumber

type SuggestedActionEnableArchiveAndMuteNewChats

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

SuggestedActionEnableArchiveAndMuteNewChats Suggests the user to enable "archive_and_mute_new_chats_from_unknown_users" option

func NewSuggestedActionEnableArchiveAndMuteNewChats

func NewSuggestedActionEnableArchiveAndMuteNewChats() *SuggestedActionEnableArchiveAndMuteNewChats

NewSuggestedActionEnableArchiveAndMuteNewChats creates a new SuggestedActionEnableArchiveAndMuteNewChats

func (*SuggestedActionEnableArchiveAndMuteNewChats) GetSuggestedActionEnum

func (suggestedActionEnableArchiveAndMuteNewChats *SuggestedActionEnableArchiveAndMuteNewChats) GetSuggestedActionEnum() SuggestedActionEnum

GetSuggestedActionEnum return the enum type of this object

func (*SuggestedActionEnableArchiveAndMuteNewChats) MessageType

func (suggestedActionEnableArchiveAndMuteNewChats *SuggestedActionEnableArchiveAndMuteNewChats) MessageType() string

MessageType return the string telegram-type of SuggestedActionEnableArchiveAndMuteNewChats

type SuggestedActionEnum

type SuggestedActionEnum string

SuggestedActionEnum Alias for abstract SuggestedAction 'Sub-Classes', used as constant-enum here

const (
	SuggestedActionEnableArchiveAndMuteNewChatsType SuggestedActionEnum = "suggestedActionEnableArchiveAndMuteNewChats"
	SuggestedActionCheckPhoneNumberType             SuggestedActionEnum = "suggestedActionCheckPhoneNumber"
	SuggestedActionSeeTicksHintType                 SuggestedActionEnum = "suggestedActionSeeTicksHint"
)

SuggestedAction enums

type SuggestedActionSeeTicksHint

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

SuggestedActionSeeTicksHint Suggests the user to see a hint about meaning of one and two ticks on sent message

func NewSuggestedActionSeeTicksHint

func NewSuggestedActionSeeTicksHint() *SuggestedActionSeeTicksHint

NewSuggestedActionSeeTicksHint creates a new SuggestedActionSeeTicksHint

func (*SuggestedActionSeeTicksHint) GetSuggestedActionEnum

func (suggestedActionSeeTicksHint *SuggestedActionSeeTicksHint) GetSuggestedActionEnum() SuggestedActionEnum

GetSuggestedActionEnum return the enum type of this object

func (*SuggestedActionSeeTicksHint) MessageType

func (suggestedActionSeeTicksHint *SuggestedActionSeeTicksHint) MessageType() string

MessageType return the string telegram-type of SuggestedActionSeeTicksHint

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; custom title will be always empty
	MemberCount       int32            `json:"member_count"`         // Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules
	HasLinkedChat     bool             `json:"has_linked_chat"`      // True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
	HasLocation       bool             `json:"has_location"`         // True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
	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
	IsSlowModeEnabled bool             `json:"is_slow_mode_enabled"` // True, if the slow mode is enabled in the supergroup
	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 a human-readable description of the reason why access to this supergroup or channel must be restricted
	IsScam            bool             `json:"is_scam"`              // True, if many users reported this supergroup or channel as a scam
	IsFake            bool             `json:"is_fake"`              // True, if many users reported this supergroup or channel as a fake account
	// 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, hasLinkedChat bool, hasLocation bool, signMessages bool, isSlowModeEnabled bool, isChannel bool, isVerified bool, restrictionReason string, isScam bool, isFake bool) *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; custom title will be always empty @param memberCount Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules @param hasLinkedChat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel @param hasLocation True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup @param signMessages True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels @param isSlowModeEnabled True, if the slow mode is enabled in the supergroup @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 a human-readable description of the reason why access to this supergroup or channel must be restricted @param isScam True, if many users reported this supergroup or channel as a scam @param isFake True, if many users reported this supergroup or channel as a fake account

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 {
	Photo                    *ChatPhoto      `json:"photo"`                        // Chat photo; may be null
	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
	LinkedChatID             int64           `json:"linked_chat_id"`               // Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
	SlowModeDelay            int32           `json:"slow_mode_delay"`              // Delay between consecutive sent messages for non-administrator supergroup members, in seconds
	SlowModeDelayExpiresIn   float64         `json:"slow_mode_delay_expires_in"`   // Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
	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 username can be changed
	CanSetStickerSet         bool            `json:"can_set_sticker_set"`          // True, if the supergroup sticker set can be changed
	CanSetLocation           bool            `json:"can_set_location"`             // True, if the supergroup location can be changed
	CanGetStatistics         bool            `json:"can_get_statistics"`           // True, if the supergroup or channel statistics are available
	IsAllHistoryAvailable    bool            `json:"is_all_history_available"`     // True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. 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
	Location                 *ChatLocation   `json:"location"`                     // Location to which the supergroup is connected; may be null
	InviteLink               *ChatInviteLink `json:"invite_link"`                  // Permanent invite link for this chat; may be null. For chat administrators with can_invite_users right only
	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(photo *ChatPhoto, description string, memberCount int32, administratorCount int32, restrictedCount int32, bannedCount int32, linkedChatID int64, slowModeDelay int32, slowModeDelayExpiresIn float64, canGetMembers bool, canSetUsername bool, canSetStickerSet bool, canSetLocation bool, canGetStatistics bool, isAllHistoryAvailable bool, stickerSetID JSONInt64, location *ChatLocation, inviteLink *ChatInviteLink, upgradedFromBasicGroupID int32, upgradedFromMaxMessageID int64) *SupergroupFullInfo

NewSupergroupFullInfo creates a new SupergroupFullInfo

@param photo Chat photo; may be null @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 linkedChatID Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown @param slowModeDelay Delay between consecutive sent messages for non-administrator supergroup members, in seconds @param slowModeDelayExpiresIn Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero @param canGetMembers True, if members of the chat can be retrieved @param canSetUsername True, if the chat username can be changed @param canSetStickerSet True, if the supergroup sticker set can be changed @param canSetLocation True, if the supergroup location can be changed @param canGetStatistics True, if the supergroup or channel statistics are available @param isAllHistoryAvailable True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators @param stickerSetID Identifier of the supergroup sticker set; 0 if none @param location Location to which the supergroup is connected; may be null @param inviteLink Permanent invite link for this chat; may be null. For chat administrators with can_invite_users right only @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 owner 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 SupergroupMembersFilterContacts

type SupergroupMembersFilterContacts struct {
	Query string `json:"query"` // Query to search for
	// contains filtered or unexported fields
}

SupergroupMembersFilterContacts Returns contacts of the user, which are members of the supergroup or channel

func NewSupergroupMembersFilterContacts

func NewSupergroupMembersFilterContacts(query string) *SupergroupMembersFilterContacts

NewSupergroupMembersFilterContacts creates a new SupergroupMembersFilterContacts

@param query Query to search for

func (*SupergroupMembersFilterContacts) GetSupergroupMembersFilterEnum

func (supergroupMembersFilterContacts *SupergroupMembersFilterContacts) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum

GetSupergroupMembersFilterEnum return the enum type of this object

func (*SupergroupMembersFilterContacts) MessageType

func (supergroupMembersFilterContacts *SupergroupMembersFilterContacts) MessageType() string

MessageType return the string telegram-type of SupergroupMembersFilterContacts

type SupergroupMembersFilterEnum

type SupergroupMembersFilterEnum string

SupergroupMembersFilterEnum Alias for abstract SupergroupMembersFilter 'Sub-Classes', used as constant-enum here

const (
	SupergroupMembersFilterRecentType         SupergroupMembersFilterEnum = "supergroupMembersFilterRecent"
	SupergroupMembersFilterContactsType       SupergroupMembersFilterEnum = "supergroupMembersFilterContacts"
	SupergroupMembersFilterAdministratorsType SupergroupMembersFilterEnum = "supergroupMembersFilterAdministrators"
	SupergroupMembersFilterSearchType         SupergroupMembersFilterEnum = "supergroupMembersFilterSearch"
	SupergroupMembersFilterRestrictedType     SupergroupMembersFilterEnum = "supergroupMembersFilterRestricted"
	SupergroupMembersFilterBannedType         SupergroupMembersFilterEnum = "supergroupMembersFilterBanned"
	SupergroupMembersFilterMentionType        SupergroupMembersFilterEnum = "supergroupMembersFilterMention"
	SupergroupMembersFilterBotsType           SupergroupMembersFilterEnum = "supergroupMembersFilterBots"
)

SupergroupMembersFilter enums

type SupergroupMembersFilterMention

type SupergroupMembersFilterMention struct {
	Query           string `json:"query"`             // Query to search for
	MessageThreadID int64  `json:"message_thread_id"` // If non-zero, the identifier of the current message thread
	// contains filtered or unexported fields
}

SupergroupMembersFilterMention Returns users which can be mentioned in the supergroup

func NewSupergroupMembersFilterMention

func NewSupergroupMembersFilterMention(query string, messageThreadID int64) *SupergroupMembersFilterMention

NewSupergroupMembersFilterMention creates a new SupergroupMembersFilterMention

@param query Query to search for @param messageThreadID If non-zero, the identifier of the current message thread

func (*SupergroupMembersFilterMention) GetSupergroupMembersFilterEnum

func (supergroupMembersFilterMention *SupergroupMembersFilterMention) GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum

GetSupergroupMembersFilterEnum return the enum type of this object

func (*SupergroupMembersFilterMention) MessageType

func (supergroupMembersFilterMention *SupergroupMembersFilterMention) MessageType() string

MessageType return the string telegram-type of SupergroupMembersFilterMention

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. If empty, the version is automatically detected by TDLib
	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. If empty, the version is automatically detected by TDLib @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"` // The minimum 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 The minimum 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 units
	Length int32          `json:"length"` // Length of the entity, in UTF-16 code units
	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 units @param length Length of the entity, in UTF-16 code units @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 TextEntityTypeBankCardNumber

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

TextEntityTypeBankCardNumber A bank card number. The getBankCardInfo method can be used to get information about the bank card

func NewTextEntityTypeBankCardNumber

func NewTextEntityTypeBankCardNumber() *TextEntityTypeBankCardNumber

NewTextEntityTypeBankCardNumber creates a new TextEntityTypeBankCardNumber

func (*TextEntityTypeBankCardNumber) GetTextEntityTypeEnum

func (textEntityTypeBankCardNumber *TextEntityTypeBankCardNumber) GetTextEntityTypeEnum() TextEntityTypeEnum

GetTextEntityTypeEnum return the enum type of this object

func (*TextEntityTypeBankCardNumber) MessageType

func (textEntityTypeBankCardNumber *TextEntityTypeBankCardNumber) MessageType() string

MessageType return the string telegram-type of TextEntityTypeBankCardNumber

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"
	TextEntityTypePhoneNumberType    TextEntityTypeEnum = "textEntityTypePhoneNumber"
	TextEntityTypeBankCardNumberType TextEntityTypeEnum = "textEntityTypeBankCardNumber"
	TextEntityTypeBoldType           TextEntityTypeEnum = "textEntityTypeBold"
	TextEntityTypeItalicType         TextEntityTypeEnum = "textEntityTypeItalic"
	TextEntityTypeUnderlineType      TextEntityTypeEnum = "textEntityTypeUnderline"
	TextEntityTypeStrikethroughType  TextEntityTypeEnum = "textEntityTypeStrikethrough"
	TextEntityTypeCodeType           TextEntityTypeEnum = "textEntityTypeCode"
	TextEntityTypePreType            TextEntityTypeEnum = "textEntityTypePre"
	TextEntityTypePreCodeType        TextEntityTypeEnum = "textEntityTypePreCode"
	TextEntityTypeTextURLType        TextEntityTypeEnum = "textEntityTypeTextURL"
	TextEntityTypeMentionNameType    TextEntityTypeEnum = "textEntityTypeMentionName"
)

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 TextEntityTypeStrikethrough

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

TextEntityTypeStrikethrough A strikethrough text

func NewTextEntityTypeStrikethrough

func NewTextEntityTypeStrikethrough() *TextEntityTypeStrikethrough

NewTextEntityTypeStrikethrough creates a new TextEntityTypeStrikethrough

func (*TextEntityTypeStrikethrough) GetTextEntityTypeEnum

func (textEntityTypeStrikethrough *TextEntityTypeStrikethrough) GetTextEntityTypeEnum() TextEntityTypeEnum

GetTextEntityTypeEnum return the enum type of this object

func (*TextEntityTypeStrikethrough) MessageType

func (textEntityTypeStrikethrough *TextEntityTypeStrikethrough) MessageType() string

MessageType return the string telegram-type of TextEntityTypeStrikethrough

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 TextEntityTypeUnderline

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

TextEntityTypeUnderline An underlined text

func NewTextEntityTypeUnderline

func NewTextEntityTypeUnderline() *TextEntityTypeUnderline

NewTextEntityTypeUnderline creates a new TextEntityTypeUnderline

func (*TextEntityTypeUnderline) GetTextEntityTypeEnum

func (textEntityTypeUnderline *TextEntityTypeUnderline) GetTextEntityTypeEnum() TextEntityTypeEnum

GetTextEntityTypeEnum return the enum type of this object

func (*TextEntityTypeUnderline) MessageType

func (textEntityTypeUnderline *TextEntityTypeUnderline) MessageType() string

MessageType return the string telegram-type of TextEntityTypeUnderline

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 uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode

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 {
	Version int32 `json:"version"` // Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode
	// contains filtered or unexported fields
}

TextParseModeMarkdown The text uses Markdown-style formatting

func NewTextParseModeMarkdown

func NewTextParseModeMarkdown(version int32) *TextParseModeMarkdown

NewTextParseModeMarkdown creates a new TextParseModeMarkdown

@param version Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode

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 Thumbnail

type Thumbnail struct {
	Format ThumbnailFormat `json:"format"` // Thumbnail format
	Width  int32           `json:"width"`  // Thumbnail width
	Height int32           `json:"height"` // Thumbnail height
	File   *File           `json:"file"`   // The thumbnail
	// contains filtered or unexported fields
}

Thumbnail Represents a thumbnail

func NewThumbnail

func NewThumbnail(format ThumbnailFormat, width int32, height int32, file *File) *Thumbnail

NewThumbnail creates a new Thumbnail

@param format Thumbnail format @param width Thumbnail width @param height Thumbnail height @param file The thumbnail

func (*Thumbnail) MessageType

func (thumbnail *Thumbnail) MessageType() string

MessageType return the string telegram-type of Thumbnail

func (*Thumbnail) UnmarshalJSON

func (thumbnail *Thumbnail) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type ThumbnailFormat

type ThumbnailFormat interface {
	GetThumbnailFormatEnum() ThumbnailFormatEnum
}

ThumbnailFormat Describes format of the thumbnail

type ThumbnailFormatEnum

type ThumbnailFormatEnum string

ThumbnailFormatEnum Alias for abstract ThumbnailFormat 'Sub-Classes', used as constant-enum here

const (
	ThumbnailFormatJpegType  ThumbnailFormatEnum = "thumbnailFormatJpeg"
	ThumbnailFormatPngType   ThumbnailFormatEnum = "thumbnailFormatPng"
	ThumbnailFormatWebpType  ThumbnailFormatEnum = "thumbnailFormatWebp"
	ThumbnailFormatGifType   ThumbnailFormatEnum = "thumbnailFormatGif"
	ThumbnailFormatTgsType   ThumbnailFormatEnum = "thumbnailFormatTgs"
	ThumbnailFormatMpeg4Type ThumbnailFormatEnum = "thumbnailFormatMpeg4"
)

ThumbnailFormat enums

type ThumbnailFormatGif

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

ThumbnailFormatGif The thumbnail is in static GIF format. It will be used only for some bot inline results

func NewThumbnailFormatGif

func NewThumbnailFormatGif() *ThumbnailFormatGif

NewThumbnailFormatGif creates a new ThumbnailFormatGif

func (*ThumbnailFormatGif) GetThumbnailFormatEnum

func (thumbnailFormatGif *ThumbnailFormatGif) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatGif) MessageType

func (thumbnailFormatGif *ThumbnailFormatGif) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatGif

type ThumbnailFormatJpeg

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

ThumbnailFormatJpeg The thumbnail is in JPEG format

func NewThumbnailFormatJpeg

func NewThumbnailFormatJpeg() *ThumbnailFormatJpeg

NewThumbnailFormatJpeg creates a new ThumbnailFormatJpeg

func (*ThumbnailFormatJpeg) GetThumbnailFormatEnum

func (thumbnailFormatJpeg *ThumbnailFormatJpeg) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatJpeg) MessageType

func (thumbnailFormatJpeg *ThumbnailFormatJpeg) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatJpeg

type ThumbnailFormatMpeg4

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

ThumbnailFormatMpeg4 The thumbnail is in MPEG4 format. It will be used only for some animations and videos

func NewThumbnailFormatMpeg4

func NewThumbnailFormatMpeg4() *ThumbnailFormatMpeg4

NewThumbnailFormatMpeg4 creates a new ThumbnailFormatMpeg4

func (*ThumbnailFormatMpeg4) GetThumbnailFormatEnum

func (thumbnailFormatMpeg4 *ThumbnailFormatMpeg4) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatMpeg4) MessageType

func (thumbnailFormatMpeg4 *ThumbnailFormatMpeg4) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatMpeg4

type ThumbnailFormatPng

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

ThumbnailFormatPng The thumbnail is in PNG format. It will be used only for background patterns

func NewThumbnailFormatPng

func NewThumbnailFormatPng() *ThumbnailFormatPng

NewThumbnailFormatPng creates a new ThumbnailFormatPng

func (*ThumbnailFormatPng) GetThumbnailFormatEnum

func (thumbnailFormatPng *ThumbnailFormatPng) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatPng) MessageType

func (thumbnailFormatPng *ThumbnailFormatPng) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatPng

type ThumbnailFormatTgs

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

ThumbnailFormatTgs The thumbnail is in TGS format. It will be used only for animated sticker sets

func NewThumbnailFormatTgs

func NewThumbnailFormatTgs() *ThumbnailFormatTgs

NewThumbnailFormatTgs creates a new ThumbnailFormatTgs

func (*ThumbnailFormatTgs) GetThumbnailFormatEnum

func (thumbnailFormatTgs *ThumbnailFormatTgs) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatTgs) MessageType

func (thumbnailFormatTgs *ThumbnailFormatTgs) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatTgs

type ThumbnailFormatWebp

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

ThumbnailFormatWebp The thumbnail is in WEBP format. It will be used only for some stickers

func NewThumbnailFormatWebp

func NewThumbnailFormatWebp() *ThumbnailFormatWebp

NewThumbnailFormatWebp creates a new ThumbnailFormatWebp

func (*ThumbnailFormatWebp) GetThumbnailFormatEnum

func (thumbnailFormatWebp *ThumbnailFormatWebp) GetThumbnailFormatEnum() ThumbnailFormatEnum

GetThumbnailFormatEnum return the enum type of this object

func (*ThumbnailFormatWebp) MessageType

func (thumbnailFormatWebp *ThumbnailFormatWebp) MessageType() string

MessageType return the string telegram-type of ThumbnailFormatWebp

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"
	TopChatCategoryForwardChatsType TopChatCategoryEnum = "topChatCategoryForwardChats"
)

TopChatCategory enums

type TopChatCategoryForwardChats

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

TopChatCategoryForwardChats A category containing frequently used chats used to forward messages

func NewTopChatCategoryForwardChats

func NewTopChatCategoryForwardChats() *TopChatCategoryForwardChats

NewTopChatCategoryForwardChats creates a new TopChatCategoryForwardChats

func (*TopChatCategoryForwardChats) GetTopChatCategoryEnum

func (topChatCategoryForwardChats *TopChatCategoryForwardChats) GetTopChatCategoryEnum() TopChatCategoryEnum

GetTopChatCategoryEnum return the enum type of this object

func (*TopChatCategoryForwardChats) MessageType

func (topChatCategoryForwardChats *TopChatCategoryForwardChats) MessageType() string

MessageType return the string telegram-type of TopChatCategoryForwardChats

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

type UpdateAnimationSearchParameters struct {
	Provider string   `json:"provider"` // Name of the animation search provider
	Emojis   []string `json:"emojis"`   // The new list of emojis suggested for searching
	// contains filtered or unexported fields
}

UpdateAnimationSearchParameters The parameters of animation search through GetOption("animation_search_bot_username") bot has changed

func NewUpdateAnimationSearchParameters

func NewUpdateAnimationSearchParameters(provider string, emojis []string) *UpdateAnimationSearchParameters

NewUpdateAnimationSearchParameters creates a new UpdateAnimationSearchParameters

@param provider Name of the animation search provider @param emojis The new list of emojis suggested for searching

func (*UpdateAnimationSearchParameters) GetUpdateEnum

func (updateAnimationSearchParameters *UpdateAnimationSearchParameters) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateAnimationSearchParameters) MessageType

func (updateAnimationSearchParameters *UpdateAnimationSearchParameters) MessageType() string

MessageType return the string telegram-type of UpdateAnimationSearchParameters

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 application

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 UpdateChatActionBar

type UpdateChatActionBar struct {
	ChatID    int64         `json:"chat_id"`    // Chat identifier
	ActionBar ChatActionBar `json:"action_bar"` // The new value of the action bar; may be null
	// contains filtered or unexported fields
}

UpdateChatActionBar The chat action bar was changed

func NewUpdateChatActionBar

func NewUpdateChatActionBar(chatID int64, actionBar ChatActionBar) *UpdateChatActionBar

NewUpdateChatActionBar creates a new UpdateChatActionBar

@param chatID Chat identifier @param actionBar The new value of the action bar; may be null

func (*UpdateChatActionBar) GetUpdateEnum

func (updateChatActionBar *UpdateChatActionBar) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatActionBar) MessageType

func (updateChatActionBar *UpdateChatActionBar) MessageType() string

MessageType return the string telegram-type of UpdateChatActionBar

func (*UpdateChatActionBar) UnmarshalJSON

func (updateChatActionBar *UpdateChatActionBar) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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
	Positions    []ChatPosition `json:"positions"`     // The new chat positions in the chat lists
	// 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, positions []ChatPosition) *UpdateChatDraftMessage

NewUpdateChatDraftMessage creates a new UpdateChatDraftMessage

@param chatID Chat identifier @param draftMessage The new draft message; may be null @param positions The new chat positions in the chat lists

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 UpdateChatFilters

type UpdateChatFilters struct {
	ChatFilters []ChatFilterInfo `json:"chat_filters"` // The new list of chat filters
	// contains filtered or unexported fields
}

UpdateChatFilters The list of chat filters or a chat filter has changed

func NewUpdateChatFilters

func NewUpdateChatFilters(chatFilters []ChatFilterInfo) *UpdateChatFilters

NewUpdateChatFilters creates a new UpdateChatFilters

@param chatFilters The new list of chat filters

func (*UpdateChatFilters) GetUpdateEnum

func (updateChatFilters *UpdateChatFilters) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatFilters) MessageType

func (updateChatFilters *UpdateChatFilters) MessageType() string

MessageType return the string telegram-type of UpdateChatFilters

type UpdateChatHasScheduledMessages

type UpdateChatHasScheduledMessages struct {
	ChatID               int64 `json:"chat_id"`                // Chat identifier
	HasScheduledMessages bool  `json:"has_scheduled_messages"` // New value of has_scheduled_messages
	// contains filtered or unexported fields
}

UpdateChatHasScheduledMessages A chat's has_scheduled_messages field has changed

func NewUpdateChatHasScheduledMessages

func NewUpdateChatHasScheduledMessages(chatID int64, hasScheduledMessages bool) *UpdateChatHasScheduledMessages

NewUpdateChatHasScheduledMessages creates a new UpdateChatHasScheduledMessages

@param chatID Chat identifier @param hasScheduledMessages New value of has_scheduled_messages

func (*UpdateChatHasScheduledMessages) GetUpdateEnum

func (updateChatHasScheduledMessages *UpdateChatHasScheduledMessages) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatHasScheduledMessages) MessageType

func (updateChatHasScheduledMessages *UpdateChatHasScheduledMessages) MessageType() string

MessageType return the string telegram-type of UpdateChatHasScheduledMessages

type UpdateChatIsBlocked

type UpdateChatIsBlocked struct {
	ChatID    int64 `json:"chat_id"`    // Chat identifier
	IsBlocked bool  `json:"is_blocked"` // New value of is_blocked
	// contains filtered or unexported fields
}

UpdateChatIsBlocked A chat was blocked or unblocked

func NewUpdateChatIsBlocked

func NewUpdateChatIsBlocked(chatID int64, isBlocked bool) *UpdateChatIsBlocked

NewUpdateChatIsBlocked creates a new UpdateChatIsBlocked

@param chatID Chat identifier @param isBlocked New value of is_blocked

func (*UpdateChatIsBlocked) GetUpdateEnum

func (updateChatIsBlocked *UpdateChatIsBlocked) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatIsBlocked) MessageType

func (updateChatIsBlocked *UpdateChatIsBlocked) MessageType() string

MessageType return the string telegram-type of UpdateChatIsBlocked

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 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
	Positions   []ChatPosition `json:"positions"`    // The new chat positions in the chat lists
	// 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, positions []ChatPosition) *UpdateChatLastMessage

NewUpdateChatLastMessage creates a new UpdateChatLastMessage

@param chatID Chat identifier @param lastMessage The new last message in the chat; may be null @param positions The new chat positions in the chat lists

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 UpdateChatPermissions

type UpdateChatPermissions struct {
	ChatID      int64            `json:"chat_id"`     // Chat identifier
	Permissions *ChatPermissions `json:"permissions"` // The new chat permissions
	// contains filtered or unexported fields
}

UpdateChatPermissions Chat permissions was changed

func NewUpdateChatPermissions

func NewUpdateChatPermissions(chatID int64, permissions *ChatPermissions) *UpdateChatPermissions

NewUpdateChatPermissions creates a new UpdateChatPermissions

@param chatID Chat identifier @param permissions The new chat permissions

func (*UpdateChatPermissions) GetUpdateEnum

func (updateChatPermissions *UpdateChatPermissions) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatPermissions) MessageType

func (updateChatPermissions *UpdateChatPermissions) MessageType() string

MessageType return the string telegram-type of UpdateChatPermissions

type UpdateChatPhoto

type UpdateChatPhoto struct {
	ChatID int64          `json:"chat_id"` // Chat identifier
	Photo  *ChatPhotoInfo `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 *ChatPhotoInfo) *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 UpdateChatPosition

type UpdateChatPosition struct {
	ChatID   int64         `json:"chat_id"`  // Chat identifier
	Position *ChatPosition `json:"position"` // New chat position. If new order is 0, then the chat needs to be removed from the list
	// contains filtered or unexported fields
}

UpdateChatPosition The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent

func NewUpdateChatPosition

func NewUpdateChatPosition(chatID int64, position *ChatPosition) *UpdateChatPosition

NewUpdateChatPosition creates a new UpdateChatPosition

@param chatID Chat identifier @param position New chat position. If new order is 0, then the chat needs to be removed from the list

func (*UpdateChatPosition) GetUpdateEnum

func (updateChatPosition *UpdateChatPosition) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatPosition) MessageType

func (updateChatPosition *UpdateChatPosition) MessageType() string

MessageType return the string telegram-type of UpdateChatPosition

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 UpdateChatVoiceChat

type UpdateChatVoiceChat struct {
	ChatID               int64 `json:"chat_id"`                  // Chat identifier
	VoiceChatGroupCallID int32 `json:"voice_chat_group_call_id"` // New value of voice_chat_group_call_id
	IsVoiceChatEmpty     bool  `json:"is_voice_chat_empty"`      // New value of is_voice_chat_empty
	// contains filtered or unexported fields
}

UpdateChatVoiceChat A chat voice chat state has changed

func NewUpdateChatVoiceChat

func NewUpdateChatVoiceChat(chatID int64, voiceChatGroupCallID int32, isVoiceChatEmpty bool) *UpdateChatVoiceChat

NewUpdateChatVoiceChat creates a new UpdateChatVoiceChat

@param chatID Chat identifier @param voiceChatGroupCallID New value of voice_chat_group_call_id @param isVoiceChatEmpty New value of is_voice_chat_empty

func (*UpdateChatVoiceChat) GetUpdateEnum

func (updateChatVoiceChat *UpdateChatVoiceChat) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateChatVoiceChat) MessageType

func (updateChatVoiceChat *UpdateChatVoiceChat) MessageType() string

MessageType return the string telegram-type of UpdateChatVoiceChat

type UpdateConnectionState

type UpdateConnectionState struct {
	State ConnectionState `json:"state"` // The new connection state
	// contains filtered or unexported fields
}

UpdateConnectionState The connection state has changed. This update must be used only to show a human-readable description of the connection state

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 UpdateDiceEmojis

type UpdateDiceEmojis struct {
	Emojis []string `json:"emojis"` // The new list of supported dice emojis
	// contains filtered or unexported fields
}

UpdateDiceEmojis The list of supported dice emojis has changed

func NewUpdateDiceEmojis

func NewUpdateDiceEmojis(emojis []string) *UpdateDiceEmojis

NewUpdateDiceEmojis creates a new UpdateDiceEmojis

@param emojis The new list of supported dice emojis

func (*UpdateDiceEmojis) GetUpdateEnum

func (updateDiceEmojis *UpdateDiceEmojis) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateDiceEmojis) MessageType

func (updateDiceEmojis *UpdateDiceEmojis) MessageType() string

MessageType return the string telegram-type of UpdateDiceEmojis

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"
	UpdateMessageIsPinnedType                UpdateEnum = "updateMessageIsPinned"
	UpdateMessageInteractionInfoType         UpdateEnum = "updateMessageInteractionInfo"
	UpdateMessageContentOpenedType           UpdateEnum = "updateMessageContentOpened"
	UpdateMessageMentionReadType             UpdateEnum = "updateMessageMentionRead"
	UpdateMessageLiveLocationViewedType      UpdateEnum = "updateMessageLiveLocationViewed"
	UpdateNewChatType                        UpdateEnum = "updateNewChat"
	UpdateChatTitleType                      UpdateEnum = "updateChatTitle"
	UpdateChatPhotoType                      UpdateEnum = "updateChatPhoto"
	UpdateChatPermissionsType                UpdateEnum = "updateChatPermissions"
	UpdateChatLastMessageType                UpdateEnum = "updateChatLastMessage"
	UpdateChatPositionType                   UpdateEnum = "updateChatPosition"
	UpdateChatIsMarkedAsUnreadType           UpdateEnum = "updateChatIsMarkedAsUnread"
	UpdateChatIsBlockedType                  UpdateEnum = "updateChatIsBlocked"
	UpdateChatHasScheduledMessagesType       UpdateEnum = "updateChatHasScheduledMessages"
	UpdateChatVoiceChatType                  UpdateEnum = "updateChatVoiceChat"
	UpdateChatDefaultDisableNotificationType UpdateEnum = "updateChatDefaultDisableNotification"
	UpdateChatReadInboxType                  UpdateEnum = "updateChatReadInbox"
	UpdateChatReadOutboxType                 UpdateEnum = "updateChatReadOutbox"
	UpdateChatUnreadMentionCountType         UpdateEnum = "updateChatUnreadMentionCount"
	UpdateChatNotificationSettingsType       UpdateEnum = "updateChatNotificationSettings"
	UpdateScopeNotificationSettingsType      UpdateEnum = "updateScopeNotificationSettings"
	UpdateChatActionBarType                  UpdateEnum = "updateChatActionBar"
	UpdateChatReplyMarkupType                UpdateEnum = "updateChatReplyMarkup"
	UpdateChatDraftMessageType               UpdateEnum = "updateChatDraftMessage"
	UpdateChatFiltersType                    UpdateEnum = "updateChatFilters"
	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"
	UpdateGroupCallType                      UpdateEnum = "updateGroupCall"
	UpdateGroupCallParticipantType           UpdateEnum = "updateGroupCallParticipant"
	UpdateNewCallSignalingDataType           UpdateEnum = "updateNewCallSignalingData"
	UpdateUserPrivacySettingRulesType        UpdateEnum = "updateUserPrivacySettingRules"
	UpdateUnreadMessageCountType             UpdateEnum = "updateUnreadMessageCount"
	UpdateUnreadChatCountType                UpdateEnum = "updateUnreadChatCount"
	UpdateOptionType                         UpdateEnum = "updateOption"
	UpdateStickerSetType                     UpdateEnum = "updateStickerSet"
	UpdateInstalledStickerSetsType           UpdateEnum = "updateInstalledStickerSets"
	UpdateTrendingStickerSetsType            UpdateEnum = "updateTrendingStickerSets"
	UpdateRecentStickersType                 UpdateEnum = "updateRecentStickers"
	UpdateFavoriteStickersType               UpdateEnum = "updateFavoriteStickers"
	UpdateSavedAnimationsType                UpdateEnum = "updateSavedAnimations"
	UpdateSelectedBackgroundType             UpdateEnum = "updateSelectedBackground"
	UpdateLanguagePackStringsType            UpdateEnum = "updateLanguagePackStrings"
	UpdateConnectionStateType                UpdateEnum = "updateConnectionState"
	UpdateTermsOfServiceType                 UpdateEnum = "updateTermsOfService"
	UpdateUsersNearbyType                    UpdateEnum = "updateUsersNearby"
	UpdateDiceEmojisType                     UpdateEnum = "updateDiceEmojis"
	UpdateAnimationSearchParametersType      UpdateEnum = "updateAnimationSearchParameters"
	UpdateSuggestedActionsType               UpdateEnum = "updateSuggestedActions"
	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"
	UpdatePollAnswerType                     UpdateEnum = "updatePollAnswer"
)

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

UpdateFileGenerationStart The file generation process needs to be started by the application

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 application

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 UpdateGroupCall

type UpdateGroupCall struct {
	GroupCall *GroupCall `json:"group_call"` // New data about a group call
	// contains filtered or unexported fields
}

UpdateGroupCall Information about a group call was updated

func NewUpdateGroupCall

func NewUpdateGroupCall(groupCall *GroupCall) *UpdateGroupCall

NewUpdateGroupCall creates a new UpdateGroupCall

@param groupCall New data about a group call

func (*UpdateGroupCall) GetUpdateEnum

func (updateGroupCall *UpdateGroupCall) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateGroupCall) MessageType

func (updateGroupCall *UpdateGroupCall) MessageType() string

MessageType return the string telegram-type of UpdateGroupCall

type UpdateGroupCallParticipant

type UpdateGroupCallParticipant struct {
	GroupCallID int32                 `json:"group_call_id"` // Identifier of group call
	Participant *GroupCallParticipant `json:"participant"`   // New data about a participant
	// contains filtered or unexported fields
}

UpdateGroupCallParticipant Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined

func NewUpdateGroupCallParticipant

func NewUpdateGroupCallParticipant(groupCallID int32, participant *GroupCallParticipant) *UpdateGroupCallParticipant

NewUpdateGroupCallParticipant creates a new UpdateGroupCallParticipant

@param groupCallID Identifier of group call @param participant New data about a participant

func (*UpdateGroupCallParticipant) GetUpdateEnum

func (updateGroupCallParticipant *UpdateGroupCallParticipant) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateGroupCallParticipant) MessageType

func (updateGroupCallParticipant *UpdateGroupCallParticipant) MessageType() string

MessageType return the string telegram-type of UpdateGroupCallParticipant

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 UpdateMessageInteractionInfo

type UpdateMessageInteractionInfo struct {
	ChatID          int64                   `json:"chat_id"`          // Chat identifier
	MessageID       int64                   `json:"message_id"`       // Message identifier
	InteractionInfo *MessageInteractionInfo `json:"interaction_info"` // New information about interactions with the message; may be null
	// contains filtered or unexported fields
}

UpdateMessageInteractionInfo The information about interactions with a message has changed

func NewUpdateMessageInteractionInfo

func NewUpdateMessageInteractionInfo(chatID int64, messageID int64, interactionInfo *MessageInteractionInfo) *UpdateMessageInteractionInfo

NewUpdateMessageInteractionInfo creates a new UpdateMessageInteractionInfo

@param chatID Chat identifier @param messageID Message identifier @param interactionInfo New information about interactions with the message; may be null

func (*UpdateMessageInteractionInfo) GetUpdateEnum

func (updateMessageInteractionInfo *UpdateMessageInteractionInfo) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateMessageInteractionInfo) MessageType

func (updateMessageInteractionInfo *UpdateMessageInteractionInfo) MessageType() string

MessageType return the string telegram-type of UpdateMessageInteractionInfo

type UpdateMessageIsPinned

type UpdateMessageIsPinned struct {
	ChatID    int64 `json:"chat_id"`    // Chat identifier
	MessageID int64 `json:"message_id"` // The message identifier
	IsPinned  bool  `json:"is_pinned"`  // True, if the message is pinned
	// contains filtered or unexported fields
}

UpdateMessageIsPinned The message pinned state was changed

func NewUpdateMessageIsPinned

func NewUpdateMessageIsPinned(chatID int64, messageID int64, isPinned bool) *UpdateMessageIsPinned

NewUpdateMessageIsPinned creates a new UpdateMessageIsPinned

@param chatID Chat identifier @param messageID The message identifier @param isPinned True, if the message is pinned

func (*UpdateMessageIsPinned) GetUpdateEnum

func (updateMessageIsPinned *UpdateMessageIsPinned) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateMessageIsPinned) MessageType

func (updateMessageIsPinned *UpdateMessageIsPinned) MessageType() string

MessageType return the string telegram-type of UpdateMessageIsPinned

type UpdateMessageLiveLocationViewed

type UpdateMessageLiveLocationViewed struct {
	ChatID    int64 `json:"chat_id"`    // Identifier of the chat with the live location message
	MessageID int64 `json:"message_id"` // Identifier of the message with live location
	// contains filtered or unexported fields
}

UpdateMessageLiveLocationViewed A message with a live location was viewed. When the update is received, the application is supposed to update the live location

func NewUpdateMessageLiveLocationViewed

func NewUpdateMessageLiveLocationViewed(chatID int64, messageID int64) *UpdateMessageLiveLocationViewed

NewUpdateMessageLiveLocationViewed creates a new UpdateMessageLiveLocationViewed

@param chatID Identifier of the chat with the live location message @param messageID Identifier of the message with live location

func (*UpdateMessageLiveLocationViewed) GetUpdateEnum

func (updateMessageLiveLocationViewed *UpdateMessageLiveLocationViewed) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateMessageLiveLocationViewed) MessageType

func (updateMessageLiveLocationViewed *UpdateMessageLiveLocationViewed) MessageType() string

MessageType return the string telegram-type of UpdateMessageLiveLocationViewed

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

type UpdateMsg struct {
	Data UpdateData
	Raw  []byte
}

UpdateMsg is used to unmarshal received json strings into

type UpdateNewCallSignalingData

type UpdateNewCallSignalingData struct {
	CallID int32  `json:"call_id"` // The call identifier
	Data   []byte `json:"data"`    // The data
	// contains filtered or unexported fields
}

UpdateNewCallSignalingData New call signaling data arrived

func NewUpdateNewCallSignalingData

func NewUpdateNewCallSignalingData(callID int32, data []byte) *UpdateNewCallSignalingData

NewUpdateNewCallSignalingData creates a new UpdateNewCallSignalingData

@param callID The call identifier @param data The data

func (*UpdateNewCallSignalingData) GetUpdateEnum

func (updateNewCallSignalingData *UpdateNewCallSignalingData) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateNewCallSignalingData) MessageType

func (updateNewCallSignalingData *UpdateNewCallSignalingData) MessageType() string

MessageType return the string telegram-type of UpdateNewCallSignalingData

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 where 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 where 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 application. 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; 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; 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; may be null
	ChatType     ChatType  `json:"chat_type"`      // Contains information about the type of the chat, from which the query originated; may be null if unknown
	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, chatType ChatType, 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; may be null @param chatType Contains information about the type of the chat, from which the query originated; may be null if unknown @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

func (*UpdateNewInlineQuery) UnmarshalJSON

func (updateNewInlineQuery *UpdateNewInlineQuery) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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

type UpdatePollAnswer struct {
	PollID    JSONInt64 `json:"poll_id"`    // Unique poll identifier
	UserID    int32     `json:"user_id"`    // The user, who changed the answer to the poll
	OptionIDs []int32   `json:"option_ids"` // 0-based identifiers of answer options, chosen by the user
	// contains filtered or unexported fields
}

UpdatePollAnswer A user changed the answer to a poll; for bots only

func NewUpdatePollAnswer

func NewUpdatePollAnswer(pollID JSONInt64, userID int32, optionIDs []int32) *UpdatePollAnswer

NewUpdatePollAnswer creates a new UpdatePollAnswer

@param pollID Unique poll identifier @param userID The user, who changed the answer to the poll @param optionIDs 0-based identifiers of answer options, chosen by the user

func (*UpdatePollAnswer) GetUpdateEnum

func (updatePollAnswer *UpdatePollAnswer) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdatePollAnswer) MessageType

func (updatePollAnswer *UpdatePollAnswer) MessageType() string

MessageType return the string telegram-type of UpdatePollAnswer

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 application

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 UpdateSelectedBackground

type UpdateSelectedBackground struct {
	ForDarkTheme bool        `json:"for_dark_theme"` // True, if background for dark theme has changed
	Background   *Background `json:"background"`     // The new selected background; may be null
	// contains filtered or unexported fields
}

UpdateSelectedBackground The selected background has changed

func NewUpdateSelectedBackground

func NewUpdateSelectedBackground(forDarkTheme bool, background *Background) *UpdateSelectedBackground

NewUpdateSelectedBackground creates a new UpdateSelectedBackground

@param forDarkTheme True, if background for dark theme has changed @param background The new selected background; may be null

func (*UpdateSelectedBackground) GetUpdateEnum

func (updateSelectedBackground *UpdateSelectedBackground) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateSelectedBackground) MessageType

func (updateSelectedBackground *UpdateSelectedBackground) MessageType() string

MessageType return the string telegram-type of UpdateSelectedBackground

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

type UpdateStickerSet struct {
	StickerSet *StickerSet `json:"sticker_set"` // The sticker set
	// contains filtered or unexported fields
}

UpdateStickerSet A sticker set has changed

func NewUpdateStickerSet

func NewUpdateStickerSet(stickerSet *StickerSet) *UpdateStickerSet

NewUpdateStickerSet creates a new UpdateStickerSet

@param stickerSet The sticker set

func (*UpdateStickerSet) GetUpdateEnum

func (updateStickerSet *UpdateStickerSet) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateStickerSet) MessageType

func (updateStickerSet *UpdateStickerSet) MessageType() string

MessageType return the string telegram-type of UpdateStickerSet

type UpdateSuggestedActions

type UpdateSuggestedActions struct {
	AddedActions   []SuggestedAction `json:"added_actions"`   // Added suggested actions
	RemovedActions []SuggestedAction `json:"removed_actions"` // Removed suggested actions
	// contains filtered or unexported fields
}

UpdateSuggestedActions The list of suggested to the user actions has changed

func NewUpdateSuggestedActions

func NewUpdateSuggestedActions(addedActions []SuggestedAction, removedActions []SuggestedAction) *UpdateSuggestedActions

NewUpdateSuggestedActions creates a new UpdateSuggestedActions

@param addedActions Added suggested actions @param removedActions Removed suggested actions

func (*UpdateSuggestedActions) GetUpdateEnum

func (updateSuggestedActions *UpdateSuggestedActions) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateSuggestedActions) MessageType

func (updateSuggestedActions *UpdateSuggestedActions) MessageType() string

MessageType return the string telegram-type of UpdateSuggestedActions

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 application

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 prefix of the list of trending sticker sets with the newest 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 prefix of the list of trending sticker sets with the newest 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 {
	ChatList                   ChatList `json:"chat_list"`                      // The chat list with changed number of unread messages
	TotalCount                 int32    `json:"total_count"`                    // Approximate total number of chats in the chat list
	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 the message database is used

func NewUpdateUnreadChatCount

func NewUpdateUnreadChatCount(chatList ChatList, totalCount int32, unreadCount int32, unreadUnmutedCount int32, markedAsUnreadCount int32, markedAsUnreadUnmutedCount int32) *UpdateUnreadChatCount

NewUpdateUnreadChatCount creates a new UpdateUnreadChatCount

@param chatList The chat list with changed number of unread messages @param totalCount Approximate total number of chats in the chat list @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

func (*UpdateUnreadChatCount) UnmarshalJSON

func (updateUnreadChatCount *UpdateUnreadChatCount) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

type UpdateUnreadMessageCount

type UpdateUnreadMessageCount struct {
	ChatList           ChatList `json:"chat_list"`            // The chat list with changed number of unread messages
	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 in a chat list has changed. This update is sent only if the message database is used

func NewUpdateUnreadMessageCount

func NewUpdateUnreadMessageCount(chatList ChatList, unreadCount int32, unreadUnmutedCount int32) *UpdateUnreadMessageCount

NewUpdateUnreadMessageCount creates a new UpdateUnreadMessageCount

@param chatList The chat list with changed number of unread messages @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

func (*UpdateUnreadMessageCount) UnmarshalJSON

func (updateUnreadMessageCount *UpdateUnreadMessageCount) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal to json

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 application

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
	MessageThreadID int64      `json:"message_thread_id"` // If not 0, a message thread identifier in which the action was performed
	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, messageThreadID int64, userID int32, action ChatAction) *UpdateUserChatAction

NewUpdateUserChatAction creates a new UpdateUserChatAction

@param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the action was performed @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 UpdateUsersNearby

type UpdateUsersNearby struct {
	UsersNearby []ChatNearby `json:"users_nearby"` // The new list of users nearby
	// contains filtered or unexported fields
}

UpdateUsersNearby The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request

func NewUpdateUsersNearby

func NewUpdateUsersNearby(usersNearby []ChatNearby) *UpdateUsersNearby

NewUpdateUsersNearby creates a new UpdateUsersNearby

@param usersNearby The new list of users nearby

func (*UpdateUsersNearby) GetUpdateEnum

func (updateUsersNearby *UpdateUsersNearby) GetUpdateEnum() UpdateEnum

GetUpdateEnum return the enum type of this object

func (*UpdateUsersNearby) MessageType

func (updateUsersNearby *UpdateUsersNearby) MessageType() string

MessageType return the string telegram-type of UpdateUsersNearby

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
	IsContact         bool          `json:"is_contact"`         // The user is a contact of the current user
	IsMutualContact   bool          `json:"is_mutual_contact"`  // The user is a contact of the current user and the current user is a contact of the 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 a human-readable description of the reason why access to this user must be restricted
	IsScam            bool          `json:"is_scam"`            // True, if many users reported this user as a scam
	IsFake            bool          `json:"is_fake"`            // True, if many users reported this user as a fake account
	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, isContact bool, isMutualContact bool, isVerified bool, isSupport bool, restrictionReason string, isScam bool, isFake bool, 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 isContact The user is a contact of the current user @param isMutualContact The user is a contact of the current user and the current user is a contact of the 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 a human-readable description of the reason why access to this user must be restricted @param isScam True, if many users reported this user as a scam @param isFake True, if many users reported this user as a fake account @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 {
	Photo                           *ChatPhoto `json:"photo"`                               // User profile photo; may be null
	IsBlocked                       bool       `json:"is_blocked"`                          // True, if the user is blocked by the current user
	CanBeCalled                     bool       `json:"can_be_called"`                       // True, if the user can be called
	SupportsVideoCalls              bool       `json:"supports_video_calls"`                // True, if a video call can be created with the user
	HasPrivateCalls                 bool       `json:"has_private_calls"`                   // True, if the user can't be called due to their privacy settings
	NeedPhoneNumberPrivacyException bool       `json:"need_phone_number_privacy_exception"` // True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
	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

func NewUserFullInfo

func NewUserFullInfo(photo *ChatPhoto, isBlocked bool, canBeCalled bool, supportsVideoCalls bool, hasPrivateCalls bool, needPhoneNumberPrivacyException bool, bio string, shareText string, groupInCommonCount int32, botInfo *BotInfo) *UserFullInfo

NewUserFullInfo creates a new UserFullInfo

@param photo User profile photo; may be null @param isBlocked True, if the user is blocked by the current user @param canBeCalled True, if the user can be called @param supportsVideoCalls True, if a video call can be created with the user @param hasPrivateCalls True, if the user can't be called due to their privacy settings @param needPhoneNumberPrivacyException True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used @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 UserPrivacySettingAllowFindingByPhoneNumber

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

UserPrivacySettingAllowFindingByPhoneNumber A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"

func NewUserPrivacySettingAllowFindingByPhoneNumber

func NewUserPrivacySettingAllowFindingByPhoneNumber() *UserPrivacySettingAllowFindingByPhoneNumber

NewUserPrivacySettingAllowFindingByPhoneNumber creates a new UserPrivacySettingAllowFindingByPhoneNumber

func (*UserPrivacySettingAllowFindingByPhoneNumber) GetUserPrivacySettingEnum

func (userPrivacySettingAllowFindingByPhoneNumber *UserPrivacySettingAllowFindingByPhoneNumber) GetUserPrivacySettingEnum() UserPrivacySettingEnum

GetUserPrivacySettingEnum return the enum type of this object

func (*UserPrivacySettingAllowFindingByPhoneNumber) MessageType

func (userPrivacySettingAllowFindingByPhoneNumber *UserPrivacySettingAllowFindingByPhoneNumber) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingAllowFindingByPhoneNumber

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"
	UserPrivacySettingShowProfilePhotoType            UserPrivacySettingEnum = "userPrivacySettingShowProfilePhoto"
	UserPrivacySettingShowLinkInForwardedMessagesType UserPrivacySettingEnum = "userPrivacySettingShowLinkInForwardedMessages"
	UserPrivacySettingShowPhoneNumberType             UserPrivacySettingEnum = "userPrivacySettingShowPhoneNumber"
	UserPrivacySettingAllowChatInvitesType            UserPrivacySettingEnum = "userPrivacySettingAllowChatInvites"
	UserPrivacySettingAllowCallsType                  UserPrivacySettingEnum = "userPrivacySettingAllowCalls"
	UserPrivacySettingAllowPeerToPeerCallsType        UserPrivacySettingEnum = "userPrivacySettingAllowPeerToPeerCalls"
	UserPrivacySettingAllowFindingByPhoneNumberType   UserPrivacySettingEnum = "userPrivacySettingAllowFindingByPhoneNumber"
)

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 UserPrivacySettingRuleAllowChatMembers

type UserPrivacySettingRuleAllowChatMembers struct {
	ChatIDs []int64 `json:"chat_ids"` // The chat identifiers, total number of chats in all rules must not exceed 20
	// contains filtered or unexported fields
}

UserPrivacySettingRuleAllowChatMembers A rule to allow all members of certain specified basic groups and supergroups to doing something

func NewUserPrivacySettingRuleAllowChatMembers

func NewUserPrivacySettingRuleAllowChatMembers(chatIDs []int64) *UserPrivacySettingRuleAllowChatMembers

NewUserPrivacySettingRuleAllowChatMembers creates a new UserPrivacySettingRuleAllowChatMembers

@param chatIDs The chat identifiers, total number of chats in all rules must not exceed 20

func (*UserPrivacySettingRuleAllowChatMembers) GetUserPrivacySettingRuleEnum

func (userPrivacySettingRuleAllowChatMembers *UserPrivacySettingRuleAllowChatMembers) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum

GetUserPrivacySettingRuleEnum return the enum type of this object

func (*UserPrivacySettingRuleAllowChatMembers) MessageType

func (userPrivacySettingRuleAllowChatMembers *UserPrivacySettingRuleAllowChatMembers) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingRuleAllowChatMembers

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, total number of users in all rules must not exceed 1000
	// 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, total number of users in all rules must not exceed 1000

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"
	UserPrivacySettingRuleAllowChatMembersType    UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowChatMembers"
	UserPrivacySettingRuleRestrictAllType         UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictAll"
	UserPrivacySettingRuleRestrictContactsType    UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictContacts"
	UserPrivacySettingRuleRestrictUsersType       UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictUsers"
	UserPrivacySettingRuleRestrictChatMembersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictChatMembers"
)

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 UserPrivacySettingRuleRestrictChatMembers

type UserPrivacySettingRuleRestrictChatMembers struct {
	ChatIDs []int64 `json:"chat_ids"` // The chat identifiers, total number of chats in all rules must not exceed 20
	// contains filtered or unexported fields
}

UserPrivacySettingRuleRestrictChatMembers A rule to restrict all members of specified basic groups and supergroups from doing something

func NewUserPrivacySettingRuleRestrictChatMembers

func NewUserPrivacySettingRuleRestrictChatMembers(chatIDs []int64) *UserPrivacySettingRuleRestrictChatMembers

NewUserPrivacySettingRuleRestrictChatMembers creates a new UserPrivacySettingRuleRestrictChatMembers

@param chatIDs The chat identifiers, total number of chats in all rules must not exceed 20

func (*UserPrivacySettingRuleRestrictChatMembers) GetUserPrivacySettingRuleEnum

func (userPrivacySettingRuleRestrictChatMembers *UserPrivacySettingRuleRestrictChatMembers) GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum

GetUserPrivacySettingRuleEnum return the enum type of this object

func (*UserPrivacySettingRuleRestrictChatMembers) MessageType

func (userPrivacySettingRuleRestrictChatMembers *UserPrivacySettingRuleRestrictChatMembers) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingRuleRestrictChatMembers

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, total number of users in all rules must not exceed 1000
	// 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, total number of users in all rules must not exceed 1000

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 UserPrivacySettingShowLinkInForwardedMessages

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

UserPrivacySettingShowLinkInForwardedMessages A privacy setting for managing whether a link to the user's account is included in forwarded messages

func NewUserPrivacySettingShowLinkInForwardedMessages

func NewUserPrivacySettingShowLinkInForwardedMessages() *UserPrivacySettingShowLinkInForwardedMessages

NewUserPrivacySettingShowLinkInForwardedMessages creates a new UserPrivacySettingShowLinkInForwardedMessages

func (*UserPrivacySettingShowLinkInForwardedMessages) GetUserPrivacySettingEnum

func (userPrivacySettingShowLinkInForwardedMessages *UserPrivacySettingShowLinkInForwardedMessages) GetUserPrivacySettingEnum() UserPrivacySettingEnum

GetUserPrivacySettingEnum return the enum type of this object

func (*UserPrivacySettingShowLinkInForwardedMessages) MessageType

func (userPrivacySettingShowLinkInForwardedMessages *UserPrivacySettingShowLinkInForwardedMessages) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingShowLinkInForwardedMessages

type UserPrivacySettingShowPhoneNumber

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

UserPrivacySettingShowPhoneNumber A privacy setting for managing whether the user's phone number is visible

func NewUserPrivacySettingShowPhoneNumber

func NewUserPrivacySettingShowPhoneNumber() *UserPrivacySettingShowPhoneNumber

NewUserPrivacySettingShowPhoneNumber creates a new UserPrivacySettingShowPhoneNumber

func (*UserPrivacySettingShowPhoneNumber) GetUserPrivacySettingEnum

func (userPrivacySettingShowPhoneNumber *UserPrivacySettingShowPhoneNumber) GetUserPrivacySettingEnum() UserPrivacySettingEnum

GetUserPrivacySettingEnum return the enum type of this object

func (*UserPrivacySettingShowPhoneNumber) MessageType

func (userPrivacySettingShowPhoneNumber *UserPrivacySettingShowPhoneNumber) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingShowPhoneNumber

type UserPrivacySettingShowProfilePhoto

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

UserPrivacySettingShowProfilePhoto A privacy setting for managing whether the user's profile photo is visible

func NewUserPrivacySettingShowProfilePhoto

func NewUserPrivacySettingShowProfilePhoto() *UserPrivacySettingShowProfilePhoto

NewUserPrivacySettingShowProfilePhoto creates a new UserPrivacySettingShowProfilePhoto

func (*UserPrivacySettingShowProfilePhoto) GetUserPrivacySettingEnum

func (userPrivacySettingShowProfilePhoto *UserPrivacySettingShowProfilePhoto) GetUserPrivacySettingEnum() UserPrivacySettingEnum

GetUserPrivacySettingEnum return the enum type of this object

func (*UserPrivacySettingShowProfilePhoto) MessageType

func (userPrivacySettingShowProfilePhoto *UserPrivacySettingShowProfilePhoto) MessageType() string

MessageType return the string telegram-type of UserPrivacySettingShowProfilePhoto

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 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 a 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 application 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 application 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 identifier 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 identifier 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    []int64 `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 []int64) *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 VectorPathCommand

type VectorPathCommand interface {
	GetVectorPathCommandEnum() VectorPathCommandEnum
}

VectorPathCommand Represents a vector path command

type VectorPathCommandCubicBezierCurve

type VectorPathCommandCubicBezierCurve struct {
	StartControlPoint *Point `json:"start_control_point"` // The start control point of the curve
	EndControlPoint   *Point `json:"end_control_point"`   // The end control point of the curve
	EndPoint          *Point `json:"end_point"`           // The end point of the curve
	// contains filtered or unexported fields
}

VectorPathCommandCubicBezierCurve A cubic Bézier curve to a given point

func NewVectorPathCommandCubicBezierCurve

func NewVectorPathCommandCubicBezierCurve(startControlPoint *Point, endControlPoint *Point, endPoint *Point) *VectorPathCommandCubicBezierCurve

NewVectorPathCommandCubicBezierCurve creates a new VectorPathCommandCubicBezierCurve

@param startControlPoint The start control point of the curve @param endControlPoint The end control point of the curve @param endPoint The end point of the curve

func (*VectorPathCommandCubicBezierCurve) GetVectorPathCommandEnum

func (vectorPathCommandCubicBezierCurve *VectorPathCommandCubicBezierCurve) GetVectorPathCommandEnum() VectorPathCommandEnum

GetVectorPathCommandEnum return the enum type of this object

func (*VectorPathCommandCubicBezierCurve) MessageType

func (vectorPathCommandCubicBezierCurve *VectorPathCommandCubicBezierCurve) MessageType() string

MessageType return the string telegram-type of VectorPathCommandCubicBezierCurve

type VectorPathCommandEnum

type VectorPathCommandEnum string

VectorPathCommandEnum Alias for abstract VectorPathCommand 'Sub-Classes', used as constant-enum here

const (
	VectorPathCommandLineType             VectorPathCommandEnum = "vectorPathCommandLine"
	VectorPathCommandCubicBezierCurveType VectorPathCommandEnum = "vectorPathCommandCubicBezierCurve"
)

VectorPathCommand enums

type VectorPathCommandLine

type VectorPathCommandLine struct {
	EndPoint *Point `json:"end_point"` // The end point of the straight line
	// contains filtered or unexported fields
}

VectorPathCommandLine A straight line to a given point

func NewVectorPathCommandLine

func NewVectorPathCommandLine(endPoint *Point) *VectorPathCommandLine

NewVectorPathCommandLine creates a new VectorPathCommandLine

@param endPoint The end point of the straight line

func (*VectorPathCommandLine) GetVectorPathCommandEnum

func (vectorPathCommandLine *VectorPathCommandLine) GetVectorPathCommandEnum() VectorPathCommandEnum

GetVectorPathCommandEnum return the enum type of this object

func (*VectorPathCommandLine) MessageType

func (vectorPathCommandLine *VectorPathCommandLine) MessageType() string

MessageType return the string telegram-type of VectorPathCommandLine

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" and "gplaces" (Google Places) need 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" and "gplaces" (Google Places) need 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 video. The list of corresponding sticker sets can be received using getAttachedStickerSets
	SupportsStreaming bool           `json:"supports_streaming"` // True, if the video should be tried to be streamed
	Minithumbnail     *Minithumbnail `json:"minithumbnail"`      // Video minithumbnail; may be null
	Thumbnail         *Thumbnail     `json:"thumbnail"`          // Video thumbnail in JPEG or MPEG4 format; 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, minithumbnail *Minithumbnail, thumbnail *Thumbnail, 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 video. The list of corresponding sticker sets can be received using getAttachedStickerSets @param supportsStreaming True, if the video should be tried to be streamed @param minithumbnail Video minithumbnail; may be null @param thumbnail Video thumbnail in JPEG or MPEG4 format; 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
	Minithumbnail *Minithumbnail `json:"minithumbnail"` // Video minithumbnail; may be null
	Thumbnail     *Thumbnail     `json:"thumbnail"`     // Video thumbnail in JPEG format; 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, minithumbnail *Minithumbnail, thumbnail *Thumbnail, 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 minithumbnail Video minithumbnail; may be null @param thumbnail Video thumbnail in JPEG format; 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 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        *FormattedText `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 *FormattedText, 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
	ViewCount  int32       `json:"view_count"`  // Number of the instant view views; 0 if unknown
	Version    int32       `json:"version"`     // Version of the instant view, currently can be 1 or 2
	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, viewCount int32, version int32, isRtl bool, isFull bool) *WebPageInstantView

NewWebPageInstantView creates a new WebPageInstantView

@param pageBlocks Content of the web page @param viewCount Number of the instant view views; 0 if unknown @param version Version of the instant view, currently can be 1 or 2 @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