models

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 4 Imported by: 63

Documentation

Index

Constants

View Source
const (
	ChatActionTyping          ChatAction = "typing"
	ChatActionUploadPhoto                = "upload_photo"
	ChatActionRecordVideo                = "record_video"
	ChatActionUploadVideo                = "upload_video"
	ChatActionRecordVoice                = "record_voice"
	ChatActionUploadVoice                = "upload_voice"
	ChatActionUploadDocument             = "upload_document"
	ChatActionChooseSticker              = "choose_sticker"
	ChatActionFindLocation               = "find_location"
	ChatActionRecordVideoNote            = "record_video_note"
	ChatActionUploadVideoNote            = "upload_video_note"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Width        int        `json:"width"`
	Height       int        `json:"height"`
	Duration     int        `json:"duration"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileName     string     `json:"file_name,omitempty"`
	MimeType     string     `json:"mime_type,omitempty"`
	FileSize     int64      `json:"file_size,omitempty"`
}

Animation https://core.telegram.org/bots/api#animation

type AnswerInlineQuery

type AnswerInlineQuery struct {
	InlineQueryID     string              `json:"inline_query_id"`
	Results           []InlineQueryResult `json:"results"`
	CacheTime         int                 `json:"cache_time,omitempty"`
	IsPersonal        bool                `json:"is_personal,omitempty"`
	NextOffset        string              `json:"next_offset,omitempty"`
	SwitchPmText      string              `json:"switch_pm_text,omitempty"`
	SwitchPmParameter string              `json:"switch_pm_parameter,omitempty"`
}

AnswerInlineQuery https://core.telegram.org/bots/api#answerinlinequery

type Audio

type Audio struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Duration     int        `json:"duration"`
	Performer    string     `json:"performer,omitempty"`
	Title        string     `json:"title,omitempty"`
	FileName     string     `json:"file_name,omitempty"`
	MimeType     string     `json:"mime_type,omitempty"`
	FileSize     int64      `json:"file_size,omitempty"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
}

Audio https://core.telegram.org/bots/api#audio

type BackgroundFill added in v1.3.0

type BackgroundFill struct {
	Type             BackgroundFillType `json:"type"`
	Solid            *BackgroundFillSolid
	Gradient         *BackgroundFillGradient
	FreeformGradient *BackgroundFillFreeformGradient
}

func (*BackgroundFill) UnmarshalJSON added in v1.3.0

func (bf *BackgroundFill) UnmarshalJSON(data []byte) error

type BackgroundFillFreeformGradient added in v1.3.0

type BackgroundFillFreeformGradient struct {
	Colors []int `json:"colors"`
}

BackgroundFillFreeformGradient https://core.telegram.org/bots/api#backgroundfillfreeformgradient

type BackgroundFillGradient added in v1.3.0

type BackgroundFillGradient struct {
	TopColor      int `json:"top_color"`
	BottomColor   int `json:"bottom_color"`
	RotationAngle int `json:"rotation_angle"`
}

BackgroundFillGradient https://core.telegram.org/bots/api#backgroundfillgradient

type BackgroundFillSolid added in v1.3.0

type BackgroundFillSolid struct {
	Color int `json:"color"`
}

BackgroundFillSolid https://core.telegram.org/bots/api#backgroundfillsolid

type BackgroundFillType added in v1.3.0

type BackgroundFillType string
const (
	BackgroundFillTypeSolid            BackgroundFillType = "solid"
	BackgroundFillTypeGradient         BackgroundFillType = "gradient"
	BackgroundFillTypeFreeformGradient BackgroundFillType = "freeform_gradient"
)

type BackgroundType added in v1.3.0

type BackgroundType string

BackgroundType https://core.telegram.org/bots/api#backgroundtype

const (
	ChatBackgroundTypeFill      BackgroundType = "fill"
	ChatBackgroundTypeWallpaper BackgroundType = "wallpaper"
	ChatBackgroundTypePattern   BackgroundType = "pattern"
	ChatBackgroundTypeChatTheme BackgroundType = "chat_theme"
)

type BackgroundTypeChatTheme added in v1.3.0

type BackgroundTypeChatTheme struct {
	ThemeName string `json:"theme_name"`
}

BackgroundTypeChatTheme https://core.telegram.org/bots/api#backgroundtypechattheme

type BackgroundTypeFill added in v1.3.0

type BackgroundTypeFill struct {
	Fill             BackgroundFill `json:"fill"`
	DarkThemeDimming int            `json:"dark_theme_dimming"`
}

BackgroundTypeFill https://core.telegram.org/bots/api#backgroundtypefill

type BackgroundTypePattern added in v1.3.0

type BackgroundTypePattern struct {
	Document   Document       `json:"document"`
	Fill       BackgroundFill `json:"fill"`
	Intensity  int            `json:"intensity"`
	IsInverted bool           `json:"is_inverted,omitempty"`
	IsMoving   bool           `json:"is_moving,omitempty"`
}

BackgroundTypePattern https://core.telegram.org/bots/api#backgroundtypepattern

type BackgroundTypeWallpaper added in v1.3.0

type BackgroundTypeWallpaper struct {
	Document         Document `json:"document"`
	DarkThemeDimming int      `json:"dark_theme_dimming"`
	IsBlurred        bool     `json:"is_blurred,omitempty"`
	IsMoving         bool     `json:"is_moving,omitempty"`
}

BackgroundTypeWallpaper https://core.telegram.org/bots/api#backgroundtypewallpaper

type Birthdate added in v1.2.0

type Birthdate struct {
	Day   int `json:"day"`
	Month int `json:"month"`
	Year  int `json:"year,omitempty"`
}

type BotCommand

type BotCommand struct {
	Command     string `json:"command" rules:"min:1,max:32"`
	Description string `json:"description" rules:"min:1,max:256"`
}

BotCommand https://core.telegram.org/bots/api#botcommand

type BotCommandScope

type BotCommandScope interface {
	MarshalCustom() ([]byte, error)
}

BotCommandScope https://core.telegram.org/bots/api#botcommandscope

type BotCommandScopeAllChatAdministrators

type BotCommandScopeAllChatAdministrators struct{}

BotCommandScopeAllChatAdministrators https://core.telegram.org/bots/api#botcommandscopeallchatadministrators

func (*BotCommandScopeAllChatAdministrators) MarshalCustom

func (m *BotCommandScopeAllChatAdministrators) MarshalCustom() ([]byte, error)

type BotCommandScopeAllGroupChats

type BotCommandScopeAllGroupChats struct{}

BotCommandScopeAllGroupChats https://core.telegram.org/bots/api#botcommandscopeallgroupchats

func (*BotCommandScopeAllGroupChats) MarshalCustom

func (m *BotCommandScopeAllGroupChats) MarshalCustom() ([]byte, error)

type BotCommandScopeAllPrivateChats

type BotCommandScopeAllPrivateChats struct{}

BotCommandScopeAllPrivateChats https://core.telegram.org/bots/api#botcommandscopeallprivatechats

func (*BotCommandScopeAllPrivateChats) MarshalCustom

func (m *BotCommandScopeAllPrivateChats) MarshalCustom() ([]byte, error)

type BotCommandScopeChat

type BotCommandScopeChat struct {
	ChatID any `json:"chat_id"`
}

BotCommandScopeChat https://core.telegram.org/bots/api#botcommandscopechat

func (*BotCommandScopeChat) MarshalCustom

func (m *BotCommandScopeChat) MarshalCustom() ([]byte, error)

type BotCommandScopeChatAdministrators

type BotCommandScopeChatAdministrators struct {
	ChatID any `json:"chat_id"`
}

BotCommandScopeChatAdministrators https://core.telegram.org/bots/api#botcommandscopechatadministrators

func (*BotCommandScopeChatAdministrators) MarshalCustom added in v0.7.11

func (m *BotCommandScopeChatAdministrators) MarshalCustom() ([]byte, error)

type BotCommandScopeChatMember

type BotCommandScopeChatMember struct {
	ChatID any   `json:"chat_id"`
	UserID int64 `json:"user_id"`
}

BotCommandScopeChatMember https://core.telegram.org/bots/api#botcommandscopechatmember

func (*BotCommandScopeChatMember) MarshalCustom

func (m *BotCommandScopeChatMember) MarshalCustom() ([]byte, error)

type BotCommandScopeDefault

type BotCommandScopeDefault struct{}

BotCommandScopeDefault https://core.telegram.org/bots/api#botcommandscopedefault

func (*BotCommandScopeDefault) MarshalCustom

func (m *BotCommandScopeDefault) MarshalCustom() ([]byte, error)

type BotDescription added in v0.7.0

type BotDescription struct {
	Description string `json:"description"`
}

BotDescription https://core.telegram.org/bots/api#botdescription

type BotName added in v0.7.6

type BotName struct {
	Name string `json:"name"`
}

BotName https://core.telegram.org/bots/api#botname

type BotShortDescription added in v0.7.0

type BotShortDescription struct {
	ShortDescription string `json:"short_description"`
}

BotShortDescription https://core.telegram.org/bots/api#botshortdescription

type BusinessConnection added in v1.2.0

type BusinessConnection struct {
	ID         string `json:"id"`
	User       User   `json:"user"`
	UserChatID int64  `json:"user_chat_id"`
	Date       int64  `json:"date"`
	CanReply   bool   `json:"can_reply"`
	IsEnabled  bool   `json:"is_enabled"`
}

BusinessConnection https://core.telegram.org/bots/api#businessconnection

type BusinessIntro added in v1.2.0

type BusinessIntro struct {
	Title   string   `json:"title,omitempty"`
	Message string   `json:"message,omitempty"`
	Sticker *Sticker `json:"sticker,omitempty"`
}

BusinessIntro https://core.telegram.org/bots/api#businessintro

type BusinessLocation added in v1.2.0

type BusinessLocation struct {
	Address  string    `json:"address"`
	Location *Location `json:"location,omitempty"`
}

BusinessLocation https://core.telegram.org/bots/api#businesslocation

type BusinessMessagesDeleted added in v1.2.0

type BusinessMessagesDeleted struct {
	BusinessConnectionID string `json:"business_connection_id"`
	Chat                 Chat   `json:"chat"`
	MessageIDs           []int  `json:"message_ids"`
}

BusinessMessagesDeleted https://core.telegram.org/bots/api#businessmessagesdeleted

type BusinessOpeningHours added in v1.2.0

type BusinessOpeningHours struct {
	TimeZoneName string                         `json:"time_zone_name"`
	OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"`
}

BusinessOpeningHours https://core.telegram.org/bots/api#businessopeninghours

type BusinessOpeningHoursInterval added in v1.2.0

type BusinessOpeningHoursInterval struct {
	OpeningMinute int `json:"opening_minute"`
	ClosingMinute int `json:"closing_minute"`
}

BusinessOpeningHoursInterval https://core.telegram.org/bots/api#businessopeninghoursinterval

type CallbackGame

type CallbackGame struct {
	UserID             int64 `json:"user_id"`
	Score              int   `json:"score"`
	Force              bool  `json:"force,omitempty"`
	DisableEditMessage bool  `json:"disable_edit_message,omitempty"`
	ChatID             int   `json:"chat_id,omitempty"`
	MessageID          int   `json:"message_id,omitempty"`
	InlineMessageID    int   `json:"inline_message_id,omitempty"`
}

type CallbackQuery

type CallbackQuery struct {
	ID              string                   `json:"id"`
	From            User                     `json:"from,omitempty"`
	Message         MaybeInaccessibleMessage `json:"message,omitempty"`
	InlineMessageID string                   `json:"inline_message_id,omitempty"`
	ChatInstance    string                   `json:"chat_instance,omitempty"`
	Data            string                   `json:"data,omitempty"`
	GameShortName   string                   `json:"game_short_name,omitempty"`
}

CallbackQuery https://core.telegram.org/bots/api#callbackquery

type Chat

type Chat struct {
	ID        int64  `json:"id"`
	Type      string `json:"type"`
	Title     string `json:"title,omitempty"`
	Username  string `json:"username,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	IsForum   bool   `json:"is_forum,omitempty"`
}

Chat https://core.telegram.org/bots/api#chat

type ChatAction added in v0.7.10

type ChatAction string

type ChatAdministratorRights

type ChatAdministratorRights struct {
	IsAnonymous         bool `json:"is_anonymous"`
	CanManageChat       bool `json:"can_manage_chat"`
	CanDeleteMessages   bool `json:"can_delete_messages"`
	CanManageVideoChats bool `json:"can_manage_video_chats"`
	CanRestrictMembers  bool `json:"can_restrict_members"`
	CanPromoteMembers   bool `json:"can_promote_members"`
	CanChangeInfo       bool `json:"can_change_info"`
	CanInviteUsers      bool `json:"can_invite_users"`
	CanPostMessages     bool `json:"can_post_messages,omitempty"`
	CanEditMessages     bool `json:"can_edit_messages,omitempty"`
	CanPinMessages      bool `json:"can_pin_messages,omitempty"`
	CanPostStories      bool `json:"can_post_stories,omitempty"`
	CanEditStories      bool `json:"can_edit_stories,omitempty"`
	CanDeleteStories    bool `json:"can_delete_stories,omitempty"`
	CanManageTopics     bool `json:"can_manage_topics,omitempty"`
}

ChatAdministratorRights https://core.telegram.org/bots/api#chatadministratorrights

type ChatBackground added in v1.3.0

type ChatBackground struct {
	Type      BackgroundType
	Fill      *BackgroundTypeFill
	Wallpaper *BackgroundTypeWallpaper
	Pattern   *BackgroundTypePattern
	Theme     *BackgroundTypeChatTheme
}

ChatBackground https://core.telegram.org/bots/api#chatbackground

func (*ChatBackground) UnmarshalJSON added in v1.3.0

func (cb *ChatBackground) UnmarshalJSON(data []byte) error

type ChatBoost added in v1.0.0

type ChatBoost struct {
	BoostID        string          `json:"boost_id"`
	AddDate        int             `json:"add_date"`
	ExpirationDate int             `json:"expiration_date"`
	Source         ChatBoostSource `json:"source"`
}

ChatBoost https://core.telegram.org/bots/api#chatboost

type ChatBoostAdded added in v1.1.0

type ChatBoostAdded struct {
	BoostCount int `json:"boost_count"`
}

ChatBoostAdded https://core.telegram.org/bots/api#chatboostadded

type ChatBoostRemoved added in v1.0.0

type ChatBoostRemoved struct {
	Chat       Chat            `json:"chat"`
	BoostID    string          `json:"boost_id"`
	RemoveDate int             `json:"remove_date"`
	Source     ChatBoostSource `json:"source"`
}

ChatBoostRemoved https://core.telegram.org/bots/api#chatboostremoved

type ChatBoostSource added in v1.0.0

type ChatBoostSource struct {
	Source ChatBoostSourceType

	ChatBoostSourcePremium  *ChatBoostSourcePremium
	ChatBoostSourceGiftCode *ChatBoostSourceGiftCode
	ChatBoostSourceGiveaway *ChatBoostSourceGiveaway
}

ChatBoostSource https://core.telegram.org/bots/api#chatboostsource

func (*ChatBoostSource) UnmarshalJSON added in v1.0.0

func (cbs *ChatBoostSource) UnmarshalJSON(data []byte) error

type ChatBoostSourceGiftCode added in v1.0.0

type ChatBoostSourceGiftCode struct {
	Source string `json:"source"` // always “gift_code”
	User   User   `json:"user"`
}

ChatBoostSourceGiftCode https://core.telegram.org/bots/api#chatboostsourcegiftcode

type ChatBoostSourceGiveaway added in v1.0.0

type ChatBoostSourceGiveaway struct {
	Source string `json:"source"` // always “giveaway”
	User   User   `json:"user"`
}

ChatBoostSourceGiveaway https://core.telegram.org/bots/api#chatboostsourcegiveaway

type ChatBoostSourcePremium added in v1.0.0

type ChatBoostSourcePremium struct {
	Source string `json:"source"` // always “premium”
	User   User   `json:"user"`
}

ChatBoostSourcePremium https://core.telegram.org/bots/api#chatboostsourcepremium

type ChatBoostSourceType added in v1.0.0

type ChatBoostSourceType int

ChatBoostSourceType https://core.telegram.org/bots/api#chatboostsource

const (
	ChatBoostSourceTypePremium ChatBoostSourceType = iota
	ChatBoostSourceTypeGiftCode
	ChatBoostSourceTypeGiveaway
)

type ChatBoostUpdated added in v1.0.0

type ChatBoostUpdated struct {
	Chat  Chat      `json:"chat"`
	Boost ChatBoost `json:"boost"`
}

ChatBoostUpdated https://core.telegram.org/bots/api#chatboostupdated

type ChatFullInfo added in v1.3.0

type ChatFullInfo struct {
	ID                                 int64                 `json:"id"`
	Type                               string                `json:"type"`
	Title                              string                `json:"title,omitempty"`
	Username                           string                `json:"username,omitempty"`
	FirstName                          string                `json:"first_name,omitempty"`
	LastName                           string                `json:"last_name,omitempty"`
	IsForum                            bool                  `json:"is_forum,omitempty"`
	Photo                              *ChatPhoto            `json:"photo,omitempty"`
	ActiveUsernames                    []string              `json:"active_usernames,omitempty"`
	Birthdate                          Birthdate             `json:"birthdate,omitempty"`
	BusinessIntro                      *BusinessIntro        `json:"business_intro,omitempty"`
	BusinessLocation                   *BusinessLocation     `json:"business_location,omitempty"`
	BusinessOpeningHours               *BusinessOpeningHours `json:"business_opening_hours,omitempty"`
	PersonalChat                       *Chat                 `json:"personal_chat,omitempty"`
	AvailableReactions                 []ReactionType        `json:"available_reactions,omitempty"`
	AccentColorID                      int                   `json:"accent_color_id,omitempty"`
	MaxReactionCount                   int                   `json:"max_reaction_count"`
	BackgroundCustomEmojiID            string                `json:"background_custom_emoji_id,omitempty"`
	ProfileAccentColorID               int                   `json:"profile_accent_color_id,omitempty"`
	ProfileBackgroundCustomEmojiID     string                `json:"profile_background_custom_emoji_id,omitempty"`
	EmojiStatusCustomEmojiID           string                `json:"emoji_status_custom_emoji_id,omitempty"`
	EmojiStatusExpirationDate          int                   `json:"emoji_status_expiration_date,omitempty"`
	Bio                                string                `json:"bio"`
	HasPrivateForwards                 bool                  `json:"has_private_forwards,omitempty"`
	HasRestrictedVoiceAndVideoMessages bool                  `json:"has_restricted_voice_and_video_messages,omitempty"`
	JoinToSendMessages                 bool                  `json:"join_to_send_messages"`
	JoinByRequest                      bool                  `json:"join_by_request"`
	Description                        string                `json:"description,omitempty"`
	InviteLink                         string                `json:"invite_link,omitempty"`
	PinnedMessage                      *Message              `json:"pinned_message,omitempty"`
	Permissions                        *ChatPermissions      `json:"permissions,omitempty"`
	SlowModeDelay                      int                   `json:"slow_mode_delay,omitempty"`
	UnrestrictBoostCount               int                   `json:"unrestrict_boost_count,omitempty"`
	MessageAutoDeleteTime              int                   `json:"message_auto_delete_time,omitempty"`
	HasAggressiveAntiSpamEnabled       bool                  `json:"has_aggressive_anti_spam_enabled,omitempty"`
	HasHiddenMembers                   bool                  `json:"has_hidden_members,omitempty"`
	HasProtectedContent                bool                  `json:"has_protected_content,omitempty"`
	HasVisibleHistory                  bool                  `json:"has_visible_history,omitempty"`
	StickerSetName                     string                `json:"sticker_set_name,omitempty"`
	CanSetStickerSet                   bool                  `json:"can_set_sticker_set,omitempty"`
	CustomEmojiStickerSetName          string                `json:"custom_emoji_sticker_set_name,omitempty"`
	LinkedChatID                       int64                 `json:"linked_chat_id,omitempty"`
	Location                           *ChatLocation         `json:"location,omitempty"`
}

ChatFullInfo https://core.telegram.org/bots/api#chatfullinfo

type ChatInviteLink struct {
	InviteLink              string `json:"invite_link"`
	Creator                 User   `json:"creator"`
	CreatesJoinRequest      bool   `json:"creates_join_request"`
	IsPrimary               bool   `json:"is_primary"`
	IsRevoked               bool   `json:"is_revoked"`
	Name                    string `json:"name,omitempty"`
	ExpireDate              int    `json:"expire_date,omitempty"`
	MemberLimit             int    `json:"member_limit,omitempty"`
	PendingJoinRequestCount int    `json:"pending_join_request_count,omitempty"`
}

ChatInviteLink https://core.telegram.org/bots/api#chatinvitelink

type ChatJoinRequest

type ChatJoinRequest struct {
	Chat       Chat            `json:"chat"`
	From       User            `json:"from"`
	UserChatID int64           `json:"user_chat_id"`
	Date       int             `json:"date"`
	Bio        string          `json:"bio,omitempty"`
	InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
}

ChatJoinRequest https://core.telegram.org/bots/api#chatjoinrequest

type ChatLocation

type ChatLocation struct {
	Location Location `json:"location"`
	Address  string   `json:"address"`
}

ChatLocation https://core.telegram.org/bots/api#chatlocation

type ChatMember

type ChatMember struct {
	Type ChatMemberType

	Owner         *ChatMemberOwner
	Administrator *ChatMemberAdministrator
	Member        *ChatMemberMember
	Restricted    *ChatMemberRestricted
	Left          *ChatMemberLeft
	Banned        *ChatMemberBanned
}

ChatMember https://core.telegram.org/bots/api#chatmember

func (*ChatMember) UnmarshalJSON

func (c *ChatMember) UnmarshalJSON(data []byte) error

type ChatMemberAdministrator

type ChatMemberAdministrator struct {
	Status              string `json:"status"` // The member's status in the chat, always “administrator”
	User                User   `json:"user"`
	CanBeEdited         bool   `json:"can_be_edited"`
	IsAnonymous         bool   `json:"is_anonymous"`
	CanManageChat       bool   `json:"can_manage_chat"`
	CanDeleteMessages   bool   `json:"can_delete_messages"`
	CanManageVideoChats bool   `json:"can_manage_video_chats"`
	CanRestrictMembers  bool   `json:"can_restrict_members"`
	CanPromoteMembers   bool   `json:"can_promote_members"`
	CanChangeInfo       bool   `json:"can_change_info"`
	CanInviteUsers      bool   `json:"can_invite_users"`
	CanPostMessages     bool   `json:"can_post_messages,omitempty"`
	CanEditMessages     bool   `json:"can_edit_messages,omitempty"`
	CanPinMessages      bool   `json:"can_pin_messages,omitempty"`
	CanPostStories      bool   `json:"can_post_stories,omitempty"`
	CanEditStories      bool   `json:"can_edit_stories,omitempty"`
	CanDeleteStories    bool   `json:"can_delete_stories,omitempty"`
	CanManageTopics     bool   `json:"can_manage_topics,omitempty"`
	CustomTitle         string `json:"custom_title,omitempty"`
}

ChatMemberAdministrator https://core.telegram.org/bots/api#chatmemberadministrator

type ChatMemberBanned

type ChatMemberBanned struct {
	Status    string `json:"status"` // The member's status in the chat, always “kicked”
	User      *User  `json:"user"`
	UntilDate int    `json:"until_date"`
}

ChatMemberBanned https://core.telegram.org/bots/api#chatmemberbanned

type ChatMemberLeft

type ChatMemberLeft struct {
	Status string `json:"status"` // The member's status in the chat, always “left”
	User   *User  `json:"user"`
}

ChatMemberLeft https://core.telegram.org/bots/api#chatmemberleft

type ChatMemberMember

type ChatMemberMember struct {
	Status string `json:"status"` // The member's status in the chat, always “member”
	User   *User  `json:"user"`
}

ChatMemberMember https://core.telegram.org/bots/api#chatmembermember

type ChatMemberOwner

type ChatMemberOwner struct {
	Status      string `json:"status"` // The member's status in the chat, always “creator”
	User        *User  `json:"user"`
	IsAnonymous bool   `json:"is_anonymous"`
	CustomTitle string `json:"custom_title,omitempty"`
}

ChatMemberOwner https://core.telegram.org/bots/api#chatmemberowner

type ChatMemberRestricted

type ChatMemberRestricted struct {
	Status                string `json:"status"` // The member's status in the chat, always “restricted”
	User                  *User  `json:"user"`
	IsMember              bool   `json:"is_member"`
	CanSendMessages       bool   `json:"can_send_messages"`
	CanSendAudios         bool   `json:"can_send_audios"`
	CanSendDocuments      bool   `json:"can_send_documents"`
	CanSendPhotos         bool   `json:"can_send_photos"`
	CanSendVideos         bool   `json:"can_send_videos"`
	CanSendVideoNotes     bool   `json:"can_send_video_notes"`
	CanSendVoiceNotes     bool   `json:"can_send_voice_notes"`
	CanSendPolls          bool   `json:"can_send_polls"`
	CanSendOtherMessages  bool   `json:"can_send_other_messages"`
	CanAddWebPagePreviews bool   `json:"can_add_web_page_previews"`
	CanChangeInfo         bool   `json:"can_change_info"`
	CanInviteUsers        bool   `json:"can_invite_users"`
	CanPinMessages        bool   `json:"can_pin_messages"`
	CanManageTopics       bool   `json:"can_manage_topics,omitempty"`
	UntilDate             int    `json:"until_date"`
}

ChatMemberRestricted https://core.telegram.org/bots/api#chatmemberrestricted

type ChatMemberType

type ChatMemberType int
const (
	ChatMemberTypeOwner ChatMemberType = iota
	ChatMemberTypeAdministrator
	ChatMemberTypeMember
	ChatMemberTypeRestricted
	ChatMemberTypeLeft
	ChatMemberTypeBanned
)

type ChatMemberUpdated

type ChatMemberUpdated struct {
	Chat                    Chat            `json:"chat"`
	From                    User            `json:"from"`
	Date                    int             `json:"date"`
	OldChatMember           ChatMember      `json:"old_chat_member"`
	NewChatMember           ChatMember      `json:"new_chat_member"`
	InviteLink              *ChatInviteLink `json:"invite_link,omitempty"`
	ViaJoinRequest          bool            `json:"via_join_request,omitempty"`
	ViaChatFolderInviteLink bool            `json:"via_chat_folder_invite_link,omitempty"`
}

ChatMemberUpdated https://core.telegram.org/bots/api#chatmemberupdated

type ChatPermissions

type ChatPermissions struct {
	CanSendMessages       bool `json:"can_send_messages,omitempty"`
	CanSendAudios         bool `json:"can_send_audios"`
	CanSendDocuments      bool `json:"can_send_documents"`
	CanSendPhotos         bool `json:"can_send_photos"`
	CanSendVideos         bool `json:"can_send_videos"`
	CanSendVideoNotes     bool `json:"can_send_video_notes"`
	CanSendVoiceNotes     bool `json:"can_send_voice_notes"`
	CanSendPolls          bool `json:"can_send_polls,omitempty"`
	CanSendOtherMessages  bool `json:"can_send_other_messages,omitempty"`
	CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"`
	CanChangeInfo         bool `json:"can_change_info,omitempty"`
	CanInviteUsers        bool `json:"can_invite_users,omitempty"`
	CanPinMessages        bool `json:"can_pin_messages,omitempty"`
	CanManageTopics       bool `json:"can_manage_topics,omitempty"`
}

ChatPermissions https://core.telegram.org/bots/api#chatpermissions

type ChatPhoto

type ChatPhoto struct {
	SmallFileID       string `json:"small_file_id"`
	SmallFileUniqueID string `json:"small_file_unique_id"`
	BigFileID         string `json:"big_file_id"`
	BigFileUniqueID   string `json:"big_file_unique_id"`
}

ChatPhoto https://core.telegram.org/bots/api#chatphoto

type ChatShared added in v0.5.0

type ChatShared struct {
	RequestID int         `json:"request_id"`
	ChatID    int64       `json:"chat_id"`
	Title     string      `json:"title,omitempty"`
	Username  string      `json:"username,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
}

ChatShared https://core.telegram.org/bots/api#chatshared

type ChosenInlineResult

type ChosenInlineResult struct {
	ResultID        string    `json:"result_id"`
	From            User      `json:"from"`
	Location        *Location `json:"location,omitempty"`
	InlineMessageID string    `json:"inline_message_id,omitempty"`
	Query           string    `json:"query"`
}

ChosenInlineResult https://core.telegram.org/bots/api#choseninlineresult

type Contact

type Contact struct {
	PhoneNumber string `json:"phone_number"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name,omitempty"`
	UserID      int64  `json:"user_id,omitempty"`
	VCard       string `json:"vcard,omitempty"`
}

Contact https://core.telegram.org/bots/api#contact

type Dice

type Dice struct {
	Emoji string `json:"emoji"`
	Value int    `json:"value"`
}

Dice https://core.telegram.org/bots/api#dice

type Document

type Document struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileName     string     `json:"file_name,omitempty"`
	MimeType     string     `json:"mime_type,omitempty"`
	FileSize     int64      `json:"file_size,omitempty"`
}

Document https://core.telegram.org/bots/api#document

type EncryptedCredentials

type EncryptedCredentials struct {
	Data   string `json:"data"`
	Hash   string `json:"hash"`
	Secret string `json:"secret"`
}

EncryptedCredentials https://core.telegram.org/bots/api#encryptedcredentials

type EncryptedPassportElement

type EncryptedPassportElement struct {
	Type        string         `json:"type"`
	Data        string         `json:"data,omitempty"`
	PhoneNumber string         `json:"phone_number,omitempty"`
	Email       string         `json:"email,omitempty"`
	Files       []PassportFile `json:"files,omitempty"`
	FrontSide   *PassportFile  `json:"front_side,omitempty"`
	ReverseSide *PassportFile  `json:"reverse_side,omitempty"`
	Selfie      *PassportFile  `json:"selfie,omitempty"`
	Translation []PassportFile `json:"translation,omitempty"`
	Hash        string         `json:"hash"`
}

EncryptedPassportElement https://core.telegram.org/bots/api#encryptedpassportelement

type ExternalReplyInfo added in v1.0.0

type ExternalReplyInfo struct {
	Origin             MessageOrigin       `json:"origin"`
	Chat               *Chat               `json:"chat,omitempty"`
	MessageID          int                 `json:"message_id,omitempty"`
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
	Animation          *Animation          `json:"animation,omitempty"`
	Audio              *Audio              `json:"audio,omitempty"`
	Document           *Document           `json:"document,omitempty"`
	Photo              []PhotoSize         `json:"photo,omitempty"`
	Sticker            *Sticker            `json:"sticker,omitempty"`
	Story              *Story              `json:"story,omitempty"`
	Video              *Video              `json:"video,omitempty"`
	VideoNote          *VideoNote          `json:"video_note,omitempty"`
	Voice              *Voice              `json:"voice,omitempty"`
	HasMediaSpoiler    bool                `json:"has_media_spoiler,omitempty"`
	Contact            *Contact            `json:"contact,omitempty"`
	Dice               *Dice               `json:"dice,omitempty"`
	Game               *Game               `json:"game,omitempty"`
	Giveaway           *Giveaway           `json:"giveaway,omitempty"`
	GiveawayWinners    *GiveawayWinners    `json:"giveaway_winners,omitempty"`
	Invoice            *Invoice            `json:"invoice,omitempty"`
	Location           *Location           `json:"location,omitempty"`
	Poll               *Poll               `json:"poll,omitempty"`
	Venue              *Venue              `json:"venue,omitempty"`
}

ExternalReplyInfo https://core.telegram.org/bots/api#externalreplyinfo

type File

type File struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	FileSize     int64  `json:"file_size,omitempty"`
	FilePath     string `json:"file_path,omitempty"`
}

File https://core.telegram.org/bots/api#file

type ForceReply

type ForceReply struct {
	ForceReply            bool   `json:"force_reply"`
	InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
	Selective             bool   `json:"selective,omitempty"`
}

ForceReply https://core.telegram.org/bots/api#forcereply

type ForumTopic added in v0.3.1

type ForumTopic struct {
	MessageThreadID   int    `json:"message_thread_id"`
	Name              string `json:"name"`
	IconColor         int    `json:"icon_color,omitempty"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

ForumTopic https://core.telegram.org/bots/api#forumtopic

type ForumTopicClosed added in v0.3.1

type ForumTopicClosed struct {
}

ForumTopicClosed https://core.telegram.org/bots/api#forumtopicclosed

type ForumTopicCreated added in v0.3.1

type ForumTopicCreated struct {
	Name              string `json:"name"`
	IconColor         int    `json:"icon_color"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

ForumTopicCreated https://core.telegram.org/bots/api#forumtopiccreated

type ForumTopicEdited added in v0.3.4

type ForumTopicEdited struct {
	Name              string `json:"name,omitempty"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

ForumTopicEdited https://core.telegram.org/bots/api#forumtopicedited

type ForumTopicReopened added in v0.3.1

type ForumTopicReopened struct {
}

ForumTopicReopened https://core.telegram.org/bots/api#forumtopicreopened

type Game

type Game struct {
	Title        string          `json:"title"`
	Description  string          `json:"description"`
	Photo        []PhotoSize     `json:"photo"`
	Text         string          `json:"text,omitempty"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	Animation    *Animation      `json:"animation,omitempty"`
}

Game https://core.telegram.org/bots/api#game

type GameHighScore

type GameHighScore struct {
	Position int  `json:"position"`
	User     User `json:"user"`
	Score    int  `json:"score"`
}

GameHighScore https://core.telegram.org/bots/api#gamehighscore

type GeneralForumTopicHidden added in v0.3.4

type GeneralForumTopicHidden struct {
}

GeneralForumTopicHidden https://core.telegram.org/bots/api#generalforumtopichidden

type GeneralForumTopicUnhidden added in v0.3.4

type GeneralForumTopicUnhidden struct {
}

GeneralForumTopicUnhidden https://core.telegram.org/bots/api#generalforumtopicunhidden

type Giveaway added in v1.0.0

type Giveaway struct {
	Chats                         []Chat   `json:"chats"`
	WinnersSelectionDate          int      `json:"winners_selection_date"`
	WinnerCount                   int      `json:"winner_count"`
	OnlyNewMembers                bool     `json:"only_new_members,omitempty"`
	HasPublicWinners              bool     `json:"has_public_winners,omitempty"`
	PrizeDescription              string   `json:"prize_description,omitempty"`
	CountryCodes                  []string `json:"country_codes,omitempty"`
	PremiumSubscriptionMonthCount int      `json:"premium_subscription_month_count,omitempty"`
}

Giveaway https://core.telegram.org/bots/api#giveaway

type GiveawayCompleted added in v1.0.0

type GiveawayCompleted struct {
	WinnerCount         int      `json:"winner_count"`
	UnclaimedPrizeCount int      `json:"unclaimed_prize_count,omitempty"`
	GiveawayMessage     *Message `json:"giveaway_message,omitempty"`
}

GiveawayCompleted https://core.telegram.org/bots/api#giveawaycompleted

type GiveawayCreated added in v1.0.0

type GiveawayCreated struct{}

GiveawayCreated https://core.telegram.org/bots/api#giveawaycreated

type GiveawayWinners added in v1.0.0

type GiveawayWinners struct {
	Chat                          Chat   `json:"chat"`
	GiveawayMessageID             int    `json:"giveaway_message_id"`
	WinnersSelectionDate          int    `json:"winners_selection_date"`
	WinnerCount                   int    `json:"winner_count"`
	Winners                       []User `json:"winners"`
	AdditionalChatCount           int    `json:"additional_chat_count,omitempty"`
	PremiumSubscriptionMonthCount int    `json:"premium_subscription_month_count,omitempty"`
	UnclaimedPrizeCount           int    `json:"unclaimed_prize_count,omitempty"`
	OnlyNewMembers                bool   `json:"only_new_members,omitempty"`
	WasRefunded                   bool   `json:"was_refunded,omitempty"`
	PrizeDescription              string `json:"prize_description,omitempty"`
}

GiveawayWinners https://core.telegram.org/bots/api#giveawaywinners

type InaccessibleMessage added in v1.0.0

type InaccessibleMessage struct {
	Chat      Chat `json:"chat"`
	MessageID int  `json:"message_id"`
	Date      int  `json:"date"`
}

InaccessibleMessage https://core.telegram.org/bots/api#inaccessiblemessage

type InlineKeyboardButton

type InlineKeyboardButton struct {
	Text                         string                       `json:"text"`
	URL                          string                       `json:"url,omitempty"`
	CallbackData                 string                       `json:"callback_data,omitempty"`
	WebApp                       *WebAppInfo                  `json:"web_app,omitempty"`
	LoginURL                     *LoginURL                    `json:"login_url,omitempty"`
	SwitchInlineQuery            string                       `json:"switch_inline_query,omitempty"`
	SwitchInlineQueryCurrentChat string                       `json:"switch_inline_query_current_chat,omitempty"`
	SwitchInlineQueryChosenChat  *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`
	CallbackGame                 *CallbackGame                `json:"callback_game,omitempty"`
	Pay                          bool                         `json:"pay,omitempty"`
}

InlineKeyboardButton https://core.telegram.org/bots/api#inlinekeyboardbutton

type InlineKeyboardMarkup

type InlineKeyboardMarkup struct {
	InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}

InlineKeyboardMarkup https://core.telegram.org/bots/api#inlinekeyboardmarkup

type InlineQuery

type InlineQuery struct {
	ID       string    `json:"id"`
	From     *User     `json:"from"`
	Query    string    `json:"query"`
	Offset   string    `json:"offset"`
	ChatType string    `json:"chat_type,omitempty"`
	Location *Location `json:"location,omitempty"`
}

InlineQuery https://core.telegram.org/bots/api#inlinequery

type InlineQueryResult

type InlineQueryResult interface {
	MarshalCustom() ([]byte, error)
	// contains filtered or unexported methods
}

InlineQueryResult https://core.telegram.org/bots/api#inlinequeryresult

type InlineQueryResultArticle

type InlineQueryResultArticle struct {
	ID                  string              `json:"id"`
	Title               string              `json:"title,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	URL                 string              `json:"url,omitempty"`
	HideURL             bool                `json:"hide_url,omitempty"`
	Description         string              `json:"description,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultArticle https://core.telegram.org/bots/api#inlinequeryresultarticle

func (*InlineQueryResultArticle) MarshalCustom

func (m *InlineQueryResultArticle) MarshalCustom() ([]byte, error)

type InlineQueryResultAudio

type InlineQueryResultAudio struct {
	ID                  string              `json:"id"`
	AudioURL            string              `json:"audio_url"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	Performer           string              `json:"performer,omitempty"`
	AudioDuration       int                 `json:"audio_duration,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultAudio https://core.telegram.org/bots/api#inlinequeryresultaudio

func (*InlineQueryResultAudio) MarshalCustom

func (m *InlineQueryResultAudio) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedAudio

type InlineQueryResultCachedAudio struct {
	ID                  string              `json:"id"`
	AudioFileID         string              `json:"audio_file_id"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedAudio https://core.telegram.org/bots/api#inlinequeryresultcachedaudio

func (*InlineQueryResultCachedAudio) MarshalCustom

func (m *InlineQueryResultCachedAudio) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedDocument

type InlineQueryResultCachedDocument struct {
	ID                  string              `json:"id"`
	Title               string              `json:"title,omitempty"`
	DocumentFileID      string              `json:"document_file_id"`
	Description         string              `json:"description,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedDocument https://core.telegram.org/bots/api#inlinequeryresultcacheddocument

func (*InlineQueryResultCachedDocument) MarshalCustom

func (m *InlineQueryResultCachedDocument) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedGif

type InlineQueryResultCachedGif struct {
	ID                  string              `json:"id"`
	GifFileID           string              `json:"gif_file_id"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedGif https://core.telegram.org/bots/api#inlinequeryresultcachedgif

func (*InlineQueryResultCachedGif) MarshalCustom

func (m *InlineQueryResultCachedGif) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedMpeg4Gif

type InlineQueryResultCachedMpeg4Gif struct {
	ID                  string              `json:"id"`
	Mpeg4FileID         string              `json:"mpeg4_file_id"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif

func (*InlineQueryResultCachedMpeg4Gif) MarshalCustom

func (m *InlineQueryResultCachedMpeg4Gif) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedPhoto

type InlineQueryResultCachedPhoto struct {
	ID                  string              `json:"id"`
	PhotoFileID         string              `json:"photo_file_id"`
	Title               string              `json:"title,omitempty"`
	Description         string              `json:"description,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedPhoto https://core.telegram.org/bots/api#inlinequeryresultcachedphoto

func (*InlineQueryResultCachedPhoto) MarshalCustom

func (m *InlineQueryResultCachedPhoto) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedSticker

type InlineQueryResultCachedSticker struct {
	ID                  string              `json:"id"`
	StickerFileID       string              `json:"sticker_file_id"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedSticker https://core.telegram.org/bots/api#inlinequeryresultcachedsticker

func (*InlineQueryResultCachedSticker) MarshalCustom

func (m *InlineQueryResultCachedSticker) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedVideo

type InlineQueryResultCachedVideo struct {
	ID                  string              `json:"id"`
	VideoFileID         string              `json:"video_file_id"`
	Title               string              `json:"title,omitempty"`
	Description         string              `json:"description,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVideo https://core.telegram.org/bots/api#inlinequeryresultcachedvideo

func (*InlineQueryResultCachedVideo) MarshalCustom

func (m *InlineQueryResultCachedVideo) MarshalCustom() ([]byte, error)

type InlineQueryResultCachedVoice

type InlineQueryResultCachedVoice struct {
	ID                  string              `json:"id"`
	VoiceFileID         string              `json:"voice_file_id"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVoice https://core.telegram.org/bots/api#inlinequeryresultcachedvoice

func (*InlineQueryResultCachedVoice) MarshalCustom

func (m *InlineQueryResultCachedVoice) MarshalCustom() ([]byte, error)

type InlineQueryResultContact

type InlineQueryResultContact struct {
	ID                  string              `json:"id"`
	PhoneNumber         string              `json:"phone_number"`
	FirstName           string              `json:"first_name"`
	LastName            string              `json:"last_name,omitempty"`
	VCard               string              `json:"vcard,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultContact https://core.telegram.org/bots/api#inlinequeryresultcontact

func (*InlineQueryResultContact) MarshalCustom

func (m *InlineQueryResultContact) MarshalCustom() ([]byte, error)

type InlineQueryResultDocument

type InlineQueryResultDocument struct {
	ID                  string              `json:"id"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	DocumentURL         string              `json:"document_url"`
	MimeType            string              `json:"mime_type"`
	Description         string              `json:"description,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultDocument https://core.telegram.org/bots/api#inlinequeryresultdocument

func (*InlineQueryResultDocument) MarshalCustom

func (m *InlineQueryResultDocument) MarshalCustom() ([]byte, error)

type InlineQueryResultGame

type InlineQueryResultGame struct {
	ID            string      `json:"id"`
	GameShortName string      `json:"game_short_name"`
	ReplyMarkup   ReplyMarkup `json:"reply_markup,omitempty"`
}

InlineQueryResultGame https://core.telegram.org/bots/api#inlinequeryresultgame

func (*InlineQueryResultGame) MarshalCustom

func (m *InlineQueryResultGame) MarshalCustom() ([]byte, error)

type InlineQueryResultGif

type InlineQueryResultGif struct {
	ID                  string              `json:"id"`
	GifURL              string              `json:"gif_url"`
	GifWidth            int                 `json:"gif_width,omitempty"`
	GifHeight           int                 `json:"gif_height,omitempty"`
	GifDuration         int                 `json:"gif_duration,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url"`
	ThumbnailMimeType   string              `json:"thumbnail_mime_type,omitempty"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultGif https://core.telegram.org/bots/api#inlinequeryresultgif

func (*InlineQueryResultGif) MarshalCustom

func (m *InlineQueryResultGif) MarshalCustom() ([]byte, error)

type InlineQueryResultLocation

type InlineQueryResultLocation struct {
	ID                   string              `json:"id"`
	Latitude             float64             `json:"latitude"`
	Longitude            float64             `json:"longitude"`
	Title                string              `json:"title,omitempty"`
	HorizontalAccuracy   float64             `json:"horizontal_accuracy,omitempty"`
	LivePeriod           int                 `json:"live_period,omitempty"`
	Heading              int                 `json:"heading,omitempty"`
	ProximityAlertRadius int                 `json:"proximity_alert_radius,omitempty"`
	ReplyMarkup          ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent  InputMessageContent `json:"input_message_content,omitempty"`
	ThumbnailURL         string              `json:"thumbnail_url,omitempty"`
	ThumbnailWidth       int                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight      int                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultLocation https://core.telegram.org/bots/api#inlinequeryresultlocation

func (*InlineQueryResultLocation) MarshalCustom

func (m *InlineQueryResultLocation) MarshalCustom() ([]byte, error)

type InlineQueryResultMpeg4Gif

type InlineQueryResultMpeg4Gif struct {
	ID                  string              `json:"id"`
	Mpeg4URL            string              `json:"mpeg4_url"`
	Mpeg4Width          int                 `json:"mpeg4_width,omitempty"`
	Mpeg4Height         int                 `json:"mpeg4_height,omitempty"`
	Mpeg4Duration       int                 `json:"mpeg4_duration,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url"`
	ThumbnailMimeType   string              `json:"thumbnail_mime_type,omitempty"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif

func (*InlineQueryResultMpeg4Gif) MarshalCustom

func (m *InlineQueryResultMpeg4Gif) MarshalCustom() ([]byte, error)

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {
	ID                  string              `json:"id"`
	PhotoURL            string              `json:"photo_url"`
	ThumbnailURL        string              `json:"thumbnail_url"`
	PhotoWidth          int                 `json:"photo_width,omitempty"`
	PhotoHeight         int                 `json:"photo_height,omitempty"`
	Title               string              `json:"title,omitempty"`
	Description         string              `json:"description,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultPhoto https://core.telegram.org/bots/api#inlinequeryresultphoto

func (*InlineQueryResultPhoto) MarshalCustom

func (m *InlineQueryResultPhoto) MarshalCustom() ([]byte, error)

type InlineQueryResultVenue

type InlineQueryResultVenue struct {
	ID                  string              `json:"id"`
	Latitude            float64             `json:"latitude"`
	Longitude           float64             `json:"longitude"`
	Title               string              `json:"title,omitempty"`
	Address             string              `json:"address"`
	FoursquareID        string              `json:"foursquare_id,omitempty"`
	FoursquareType      string              `json:"foursquare_type,omitempty"`
	GooglePlaceID       string              `json:"google_place_id,omitempty"`
	GooglePlaceType     string              `json:"google_place_type,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultVenue https://core.telegram.org/bots/api#inlinequeryresultvenue

func (*InlineQueryResultVenue) MarshalCustom

func (m *InlineQueryResultVenue) MarshalCustom() ([]byte, error)

type InlineQueryResultVideo

type InlineQueryResultVideo struct {
	ID                  string              `json:"id"`
	VideoURL            string              `json:"video_url"`
	MimeType            string              `json:"mime_type,omitempty"`
	ThumbnailURL        string              `json:"thumbnail_url"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	VideoWidth          int                 `json:"video_width,omitempty"`
	VideoHeight         int                 `json:"video_height,omitempty"`
	VideoDuration       int                 `json:"video_duration,omitempty"`
	Description         string              `json:"description,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultVideo https://core.telegram.org/bots/api#inlinequeryresultvideo

func (*InlineQueryResultVideo) MarshalCustom

func (m *InlineQueryResultVideo) MarshalCustom() ([]byte, error)

type InlineQueryResultVoice

type InlineQueryResultVoice struct {
	ID                  string              `json:"id"`
	VoiceURL            string              `json:"voice_url"`
	Title               string              `json:"title,omitempty"`
	Caption             string              `json:"caption,omitempty"`
	ParseMode           ParseMode           `json:"parse_mode,omitempty"`
	CaptionEntities     []MessageEntity     `json:"caption_entities,omitempty"`
	VoiceDuration       int                 `json:"voice_duration,omitempty"`
	ReplyMarkup         ReplyMarkup         `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}

InlineQueryResultVoice https://core.telegram.org/bots/api#inlinequeryresultvoice

func (*InlineQueryResultVoice) MarshalCustom

func (m *InlineQueryResultVoice) MarshalCustom() ([]byte, error)

type InlineQueryResultsButton added in v0.7.6

type InlineQueryResultsButton struct {
	Text           string      `json:"text"`
	WebApp         *WebAppInfo `json:"web_app"`
	StartParameter string      `json:"start_parameter,omitempty"`
}

InlineQueryResultsButton https://core.telegram.org/bots/api#inlinequeryresultsbutton

type InputContactMessageContent

type InputContactMessageContent struct {
	PhoneNumber string `json:"phone_number"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name,omitempty"`
	VCard       string `json:"vcard,omitempty"`
}

InputContactMessageContent https://core.telegram.org/bots/api#inputcontactmessagecontent

type InputFile

type InputFile interface {
	// contains filtered or unexported methods
}

InputFile https://core.telegram.org/bots/api#inputfile

type InputFileString

type InputFileString struct {
	Data string
}

func (*InputFileString) MarshalJSON

func (i *InputFileString) MarshalJSON() ([]byte, error)

func (*InputFileString) UnmarshalJSON added in v1.2.2

func (i *InputFileString) UnmarshalJSON(data []byte) error

type InputFileType

type InputFileType int

type InputFileUpload

type InputFileUpload struct {
	Filename string
	Data     io.Reader
}

func (*InputFileUpload) MarshalJSON

func (i *InputFileUpload) MarshalJSON() ([]byte, error)

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	Title                     string         `json:"title"`
	Description               string         `json:"description"`
	Payload                   string         `json:"payload"`
	ProviderToken             string         `json:"provider_token"`
	Currency                  string         `json:"currency"`
	Prices                    []LabeledPrice `json:"prices"`
	MaxTipAmount              int            `json:"max_tip_amount,omitempty"`
	SuggestedTipAmounts       []int          `json:"suggested_tip_amounts,omitempty"`
	ProviderData              string         `json:"provider_data,omitempty"`
	PhotoURL                  string         `json:"photo_url,omitempty"`
	PhotoSize                 int            `json:"photo_size,omitempty"`
	PhotoWidth                int            `json:"photo_width,omitempty"`
	PhotoHeight               int            `json:"photo_height,omitempty"`
	NeedName                  bool           `json:"need_name,omitempty"`
	NeedPhoneNumber           bool           `json:"need_phone_number,omitempty"`
	NeedEmail                 bool           `json:"need_email,omitempty"`
	NeedShippingAddress       bool           `json:"need_shipping_address,omitempty"`
	SendPhoneNumberToProvider bool           `json:"send_phone_number_to_provider,omitempty"`
	SendEmailToProvider       bool           `json:"send_email_to_provider,omitempty"`
	IsFlexible                bool           `json:"is_flexible,omitempty"`
}

InputInvoiceMessageContent https://core.telegram.org/bots/api#inputinvoicemessagecontent

type InputLocationMessageContent

type InputLocationMessageContent struct {
	Latitude             float64 `json:"latitude"`
	Longitude            float64 `json:"longitude"`
	HorizontalAccuracy   float64 `json:"horizontal_accuracy,omitempty"`
	LivePeriod           int     `json:"live_period,omitempty"`
	Heading              int     `json:"heading,omitempty"`
	ProximityAlertRadius int     `json:"proximity_alert_radius,omitempty"`
}

InputLocationMessageContent https://core.telegram.org/bots/api#inputlocationmessagecontent

type InputMedia

type InputMedia interface {
	MarshalInputMedia() ([]byte, error)
	Attachment() io.Reader
	GetMedia() string
	// contains filtered or unexported methods
}

InputMedia https://core.telegram.org/bots/api#inputmedia

type InputMediaAnimation

type InputMediaAnimation struct {
	Media           string          `json:"media"`
	Thumbnail       InputFile       `json:"thumbnail,omitempty"`
	Caption         string          `json:"caption,omitempty"`
	ParseMode       ParseMode       `json:"parse_mode,omitempty"`
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	Width           int             `json:"width,omitempty"`
	Height          int             `json:"height,omitempty"`
	Duration        int             `json:"duration,omitempty"`
	HasSpoiler      bool            `json:"has_spoiler,omitempty"`

	MediaAttachment io.Reader `json:"-"`
}

InputMediaAnimation https://core.telegram.org/bots/api#inputmediaanimation

func (*InputMediaAnimation) Attachment

func (m *InputMediaAnimation) Attachment() io.Reader

func (*InputMediaAnimation) GetMedia

func (m *InputMediaAnimation) GetMedia() string

func (InputMediaAnimation) MarshalInputMedia

func (m InputMediaAnimation) MarshalInputMedia() ([]byte, error)

type InputMediaAudio

type InputMediaAudio struct {
	Media           string          `json:"media"`
	Thumbnail       InputFile       `json:"thumbnail,omitempty"`
	Caption         string          `json:"caption,omitempty"`
	ParseMode       ParseMode       `json:"parse_mode,omitempty"`
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	Duration        int             `json:"duration,omitempty"`
	Performer       string          `json:"performer,omitempty"`
	Title           string          `json:"title,omitempty"`

	MediaAttachment io.Reader `json:"-"`
}

InputMediaAudio https://core.telegram.org/bots/api#inputmediaaudio

func (*InputMediaAudio) Attachment

func (m *InputMediaAudio) Attachment() io.Reader

func (*InputMediaAudio) GetMedia

func (m *InputMediaAudio) GetMedia() string

func (InputMediaAudio) MarshalInputMedia

func (m InputMediaAudio) MarshalInputMedia() ([]byte, error)

type InputMediaDocument

type InputMediaDocument struct {
	Media                       string          `json:"media"`
	Thumbnail                   InputFile       `json:"thumbnail,omitempty"`
	Caption                     string          `json:"caption,omitempty"`
	ParseMode                   ParseMode       `json:"parse_mode,omitempty"`
	CaptionEntities             []MessageEntity `json:"caption_entities,omitempty"`
	DisableContentTypeDetection bool            `json:"disable_content_type_detection,omitempty"`

	MediaAttachment io.Reader `json:"-"`
}

InputMediaDocument https://core.telegram.org/bots/api#inputmediadocument

func (*InputMediaDocument) Attachment

func (m *InputMediaDocument) Attachment() io.Reader

func (*InputMediaDocument) GetMedia

func (m *InputMediaDocument) GetMedia() string

func (InputMediaDocument) MarshalInputMedia

func (m InputMediaDocument) MarshalInputMedia() ([]byte, error)

type InputMediaPhoto

type InputMediaPhoto struct {
	Media           string          `json:"media"`
	Caption         string          `json:"caption,omitempty"`
	ParseMode       ParseMode       `json:"parse_mode,omitempty"`
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	HasSpoiler      bool            `json:"has_spoiler,omitempty"`

	MediaAttachment io.Reader `json:"-"`
}

InputMediaPhoto https://core.telegram.org/bots/api#inputmediaphoto

func (*InputMediaPhoto) Attachment

func (m *InputMediaPhoto) Attachment() io.Reader

func (*InputMediaPhoto) GetMedia

func (m *InputMediaPhoto) GetMedia() string

func (*InputMediaPhoto) MarshalInputMedia

func (m *InputMediaPhoto) MarshalInputMedia() ([]byte, error)

type InputMediaVideo

type InputMediaVideo struct {
	Media             string          `json:"media"`
	Thumbnail         InputFile       `json:"thumbnail,omitempty"`
	Caption           string          `json:"caption,omitempty"`
	ParseMode         ParseMode       `json:"parse_mode,omitempty"`
	CaptionEntities   []MessageEntity `json:"caption_entities,omitempty"`
	Width             int             `json:"width,omitempty"`
	Height            int             `json:"height,omitempty"`
	Duration          int             `json:"duration,omitempty"`
	SupportsStreaming bool            `json:"supports_streaming,omitempty"`
	HasSpoiler        bool            `json:"has_spoiler,omitempty"`

	MediaAttachment io.Reader `json:"-"`
}

InputMediaVideo https://core.telegram.org/bots/api#inputmediavideo

func (*InputMediaVideo) Attachment

func (m *InputMediaVideo) Attachment() io.Reader

func (*InputMediaVideo) GetMedia

func (m *InputMediaVideo) GetMedia() string

func (InputMediaVideo) MarshalInputMedia

func (m InputMediaVideo) MarshalInputMedia() ([]byte, error)

type InputMenuButton

type InputMenuButton interface {
	// contains filtered or unexported methods
}

type InputMessageContent

type InputMessageContent interface {
	// contains filtered or unexported methods
}

InputMessageContent https://core.telegram.org/bots/api#inputmessagecontent

type InputPollOption added in v1.3.0

type InputPollOption struct {
	Text          string          `json:"text"`
	TextParseMode ParseMode       `json:"text_parse_mode,omitempty"`
	TextEntities  []MessageEntity `json:"text_entities,omitempty"`
}

InputPollOption https://core.telegram.org/bots/api#inputpolloption

type InputSticker added in v0.7.0

type InputSticker struct {
	Sticker      InputFile    `json:"sticker"`
	Format       string       `json:"format"`
	EmojiList    []string     `json:"emoji_list"`
	MaskPosition MaskPosition `json:"mask_position,omitempty"`
	Keywords     []string     `json:"keywords,omitempty"`
}

InputSticker https://core.telegram.org/bots/api#inputsticker

type InputTextMessageContent

type InputTextMessageContent struct {
	MessageText        string              `json:"message_text"`
	ParseMode          ParseMode           `json:"parse_mode,omitempty"`
	Entities           []MessageEntity     `json:"entities,omitempty"`
	LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
}

InputTextMessageContent https://core.telegram.org/bots/api#inputtextmessagecontent

type InputVenueMessageContent

type InputVenueMessageContent struct {
	Latitude        float64 `json:"latitude"`
	Longitude       float64 `json:"longitude"`
	Title           string  `json:"title"`
	Address         string  `json:"address"`
	FoursquareID    string  `json:"foursquare_id,omitempty"`
	FoursquareType  string  `json:"foursquare_type,omitempty"`
	GooglePlaceID   string  `json:"google_place_id,omitempty"`
	GooglePlaceType string  `json:"google_place_type,omitempty"`
}

InputVenueMessageContent https://core.telegram.org/bots/api#inputvenuemessagecontent

type Invoice

type Invoice struct {
	Title          string `json:"title"`
	Description    string `json:"description"`
	StartParameter string `json:"start_parameter"`
	Currency       string `json:"currency"`
	TotalAmount    int    `json:"total_amount"`
}

Invoice https://core.telegram.org/bots/api#invoice

type KeyboardButton

type KeyboardButton struct {
	Text            string                      `json:"text"`
	RequestUser     *KeyboardButtonRequestUsers `json:"request_user,omitempty"`
	RequestUsers    *KeyboardButtonRequestUsers `json:"request_users,omitempty"`
	RequestChat     *KeyboardButtonRequestChat  `json:"request_chat,omitempty"`
	RequestContact  bool                        `json:"request_contact,omitempty"`
	RequestLocation bool                        `json:"request_location,omitempty"`
	RequestPoll     *KeyboardButtonPollType     `json:"request_poll,omitempty"`
	WebApp          *WebAppInfo                 `json:"web_app,omitempty"`
}

KeyboardButton https://core.telegram.org/bots/api#keyboardbutton

type KeyboardButtonPollType

type KeyboardButtonPollType struct {
	Type string `json:"type,omitempty"`
}

KeyboardButtonPollType https://core.telegram.org/bots/api#keyboardbuttonpolltype

type KeyboardButtonRequestChat added in v0.5.0

type KeyboardButtonRequestChat struct {
	RequestID               int32                    `json:"request_id"`
	ChatIsChannel           bool                     `json:"chat_is_channel"`
	ChatIsForum             bool                     `json:"chat_is_forum,omitempty"`
	ChatHasUsername         bool                     `json:"chat_has_username,omitempty"`
	ChatIsCreated           bool                     `json:"chat_is_created,omitempty"`
	UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"`
	BotAdministratorRights  *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"`
	BotIsMember             bool                     `json:"bot_is_member,omitempty"`
	RequestTitle            bool                     `json:"request_title,omitempty"`
	RequestUsername         bool                     `json:"request_username,omitempty"`
	RequestPhoto            bool                     `json:"request_photo,omitempty"`
}

KeyboardButtonRequestChat https://core.telegram.org/bots/api#keyboardbuttonrequestchat

type KeyboardButtonRequestUser added in v0.5.0

type KeyboardButtonRequestUser struct {
	RequestID     int32 `json:"request_id"`
	UserIsBot     bool  `json:"user_is_bot,omitempty"`
	UserIsPremium bool  `json:"user_is_premium,omitempty"`
}

KeyboardButtonRequestUser https://core.telegram.org/bots/api#keyboardbuttonrequestuser

type KeyboardButtonRequestUsers added in v1.0.0

type KeyboardButtonRequestUsers struct {
	RequestID       int32 `json:"request_id"`
	UserIsBot       bool  `json:"user_is_bot,omitempty"`
	UserIsPremium   bool  `json:"user_is_premium,omitempty"`
	MaxQuantity     int   `json:"max_quantity,omitempty"`
	RequestName     bool  `json:"request_name,omitempty"`
	RequestUsername bool  `json:"request_username,omitempty"`
	RequestPhoto    bool  `json:"request_photo,omitempty"`
}

KeyboardButtonRequestUsers https://core.telegram.org/bots/api#keyboardbuttonrequestusers

type LabeledPrice

type LabeledPrice struct {
	Label  string `json:"label"`
	Amount int    `json:"amount"`
}

LabeledPrice https://core.telegram.org/bots/api#labeledprice

type LinkPreviewOptions added in v1.0.0

type LinkPreviewOptions struct {
	IsDisabled       *bool   `json:"is_disabled,omitempty"`
	URL              *string `json:"url,omitempty"`
	PreferSmallMedia *bool   `json:"prefer_small_media,omitempty"`
	PreferLargeMedia *bool   `json:"prefer_large_media,omitempty"`
	ShowAboveText    *bool   `json:"show_above_text,omitempty"`
}

LinkPreviewOptions https://core.telegram.org/bots/api#linkpreviewoptions

type Location

type Location struct {
	Longitude            float64 `json:"longitude"`
	Latitude             float64 `json:"latitude"`
	HorizontalAccuracy   float64 `json:"horizontal_accuracy,omitempty"`
	LivePeriod           int     `json:"live_period,omitempty"`
	Heading              int     `json:"heading,omitempty"`
	ProximityAlertRadius int     `json:"proximity_alert_radius,omitempty"`
}

Location https://core.telegram.org/bots/api#location

type LoginURL

type LoginURL struct {
	URL                string `json:"url"`
	ForwardText        string `json:"forward_text,omitempty"`
	BotUsername        string `json:"bot_username,omitempty"`
	RequestWriteAccess bool   `json:"request_write_access,omitempty"`
}

LoginURL https://core.telegram.org/bots/api#loginurl

type MaskPosition

type MaskPosition struct {
	Point  string  `json:"point"`
	XShift float64 `json:"x_shift"`
	YShift float64 `json:"y_shift"`
	Scale  float64 `json:"scale"`
}

MaskPosition https://core.telegram.org/bots/api#maskposition

type MaybeInaccessibleMessage added in v1.0.0

type MaybeInaccessibleMessage struct {
	Type MaybeInaccessibleMessageType

	Message             *Message
	InaccessibleMessage *InaccessibleMessage
}

MaybeInaccessibleMessage https://core.telegram.org/bots/api#maybeinaccessiblemessage

func (*MaybeInaccessibleMessage) UnmarshalJSON added in v1.0.0

func (mim *MaybeInaccessibleMessage) UnmarshalJSON(data []byte) error

type MaybeInaccessibleMessageType added in v1.0.0

type MaybeInaccessibleMessageType int

MaybeInaccessibleMessageType https://core.telegram.org/bots/api#maybeinaccessiblemessage

const (
	MaybeInaccessibleMessageTypeMessage MaybeInaccessibleMessageType = iota
	MaybeInaccessibleMessageTypeInaccessibleMessage
)
type MenuButton struct {
	Type MenuButtonType

	Commands *MenuButtonCommands
	WebApp   *MenuButtonWebApp
	Default  *MenuButtonDefault
}

MenuButton https://core.telegram.org/bots/api#menubutton

func (c *MenuButton) UnmarshalJSON(data []byte) error
type MenuButtonCommands struct {
	Type string `json:"type" rules:"required,equals:commands"`
}

MenuButtonCommands https://core.telegram.org/bots/api#menubuttoncommands

type MenuButtonDefault struct {
	Type string `json:"type" rules:"required,equals:default"`
}

MenuButtonDefault https://core.telegram.org/bots/api#menubuttondefault

type MenuButtonType int
const (
	MenuButtonTypeCommands MenuButtonType = iota
	MenuButtonTypeWebApp
	MenuButtonTypeDefault
)
type MenuButtonWebApp struct {
	Type   string     `json:"type" rules:"required,equals:web_app"`
	Text   string     `json:"text" rules:"required"`
	WebApp WebAppInfo `json:"web_app" rules:"required"`
}

MenuButtonWebApp https://core.telegram.org/bots/api#menubuttonwebapp

type Message

type Message struct {
	ID                            int                            `json:"message_id"`
	MessageThreadID               int                            `json:"message_thread_id,omitempty"`
	From                          *User                          `json:"from,omitempty"`
	SenderChat                    *Chat                          `json:"sender_chat,omitempty"`
	SenderBoostCount              int                            `json:"sender_boost_count,omitempty"`
	SenderBusinessBot             *User                          `json:"sender_business_bot,omitempty"`
	Date                          int                            `json:"date"`
	BusinessConnectionID          string                         `json:"business_connection_id,omitempty"`
	Chat                          Chat                           `json:"chat"`
	ForwardOrigin                 *MessageOrigin                 `json:"forward_origin,omitempty"`
	IsTopicMessage                bool                           `json:"is_topic_message,omitempty"`
	IsAutomaticForward            bool                           `json:"is_automatic_forward,omitempty"`
	ReplyToMessage                *Message                       `json:"reply_to_message,omitempty"`
	ExternalReply                 *ExternalReplyInfo             `json:"external_reply,omitempty"`
	Quote                         *TextQuote                     `json:"quote,omitempty"`
	ReplyToStore                  *Story                         `json:"reply_to_store,omitempty"`
	ViaBot                        *User                          `json:"via_bot,omitempty"`
	EditDate                      int                            `json:"edit_date,omitempty"`
	HasProtectedContent           bool                           `json:"has_protected_content,omitempty"`
	IsFromOffline                 bool                           `json:"is_from_offline,omitempty"`
	MediaGroupID                  string                         `json:"media_group_id,omitempty"`
	AuthorSignature               string                         `json:"author_signature,omitempty"`
	Text                          string                         `json:"text,omitempty"`
	Entities                      []MessageEntity                `json:"entities,omitempty"`
	LinkPreviewOptions            *LinkPreviewOptions            `json:"link_preview_options,omitempty"`
	Animation                     *Animation                     `json:"animation,omitempty"`
	Audio                         *Audio                         `json:"audio,omitempty"`
	Document                      *Document                      `json:"document,omitempty"`
	Photo                         []PhotoSize                    `json:"photo,omitempty"`
	Sticker                       *Sticker                       `json:"sticker,omitempty"`
	Story                         *Story                         `json:"story,omitempty"`
	Video                         *Video                         `json:"video,omitempty"`
	VideoNote                     *VideoNote                     `json:"video_note,omitempty"`
	Voice                         *Voice                         `json:"voice,omitempty"`
	Caption                       string                         `json:"caption,omitempty"`
	CaptionEntities               []MessageEntity                `json:"caption_entities,omitempty"`
	HasMediaSpoiler               bool                           `json:"has_media_spoiler,omitempty"`
	Contact                       *Contact                       `json:"contact,omitempty"`
	Dice                          *Dice                          `json:"dice,omitempty"`
	Game                          *Game                          `json:"game,omitempty"`
	Poll                          *Poll                          `json:"poll,omitempty"`
	Venue                         *Venue                         `json:"venue,omitempty"`
	Location                      *Location                      `json:"location,omitempty"`
	NewChatMembers                []User                         `json:"new_chat_members,omitempty"`
	LeftChatMember                *User                          `json:"left_chat_member,omitempty"`
	NewChatTitle                  string                         `json:"new_chat_title,omitempty"`
	NewChatPhoto                  []PhotoSize                    `json:"new_chat_photo,omitempty"`
	DeleteChatPhoto               bool                           `json:"delete_chat_photo,omitempty"`
	GroupChatCreated              bool                           `json:"group_chat_created,omitempty"`
	SupergroupChatCreated         bool                           `json:"supergroup_chat_created,omitempty"`
	ChannelChatCreated            bool                           `json:"channel_chat_created,omitempty"`
	MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
	MigrateToChatID               int64                          `json:"migrate_to_chat_id,omitempty"`
	MigrateFromChatID             int64                          `json:"migrate_from_chat_id,omitempty"`
	PinnedMessage                 MaybeInaccessibleMessage       `json:"pinned_message,omitempty"`
	Invoice                       *Invoice                       `json:"invoice,omitempty"`
	SuccessfulPayment             *SuccessfulPayment             `json:"successful_payment,omitempty"`
	UsersShared                   *UsersShared                   `json:"users_shared,omitempty"`
	ChatShared                    *ChatShared                    `json:"chat_shared,omitempty"`
	ConnectedWebsite              string                         `json:"connected_website,omitempty"`
	WriteAccessAllowed            *WriteAccessAllowed            `json:"write_access_allowed,omitempty"`
	PassportData                  *PassportData                  `json:"passport_data,omitempty"`
	ProximityAlertTriggered       *ProximityAlertTriggered       `json:"proximity_alert_triggered,omitempty"`
	BoostAdded                    *ChatBoostAdded                `json:"boost_added,omitempty"`
	ChatBackgroundSet             *ChatBackground                `json:"chat_background_set,omitempty"`
	ForumTopicCreated             *ForumTopicCreated             `json:"forum_topic_created,omitempty"`
	ForumTopicEdited              *ForumTopicEdited              `json:"forum_topic_edited,omitempty"`
	ForumTopicClosed              *ForumTopicClosed              `json:"forum_topic_closed,omitempty"`
	ForumTopicReopened            *ForumTopicReopened            `json:"forum_topic_reopened,omitempty"`
	GeneralForumTopicHidden       *GeneralForumTopicHidden       `json:"general_forum_topic_hidden,omitempty"`
	GeneralForumTopicUnhidden     *GeneralForumTopicUnhidden     `json:"general_forum_topic_unhidden,omitempty"`
	GiveawayCreated               *GiveawayCreated               `json:"giveaway_created,omitempty"`
	Giveaway                      *Giveaway                      `json:"giveaway,omitempty"`
	GiveawayWinners               *GiveawayWinners               `json:"giveaway_winners,omitempty"`
	GiveawayCompleted             *GiveawayCompleted             `json:"giveaway_completed,omitempty"`
	VoiceChatScheduled            *VoiceChatScheduled            `json:"voice_chat_scheduled,omitempty"`
	VoiceChatStarted              *VoiceChatStarted              `json:"voice_chat_started,omitempty"`
	VoiceChatEnded                *VoiceChatEnded                `json:"voice_chat_ended,omitempty"`
	VoiceChatParticipantsInvited  *VoiceChatParticipantsInvited  `json:"voice_chat_participants_invited,omitempty"`
	WebAppData                    *WebAppData                    `json:"web_app_data,omitempty"`
	ReplyMarkup                   InlineKeyboardMarkup           `json:"reply_markup,omitempty"`
}

Message https://core.telegram.org/bots/api#message

type MessageAutoDeleteTimerChanged

type MessageAutoDeleteTimerChanged struct {
	MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}

MessageAutoDeleteTimerChanged https://core.telegram.org/bots/api#messageautodeletetimerchanged

type MessageEntity

type MessageEntity struct {
	Type          MessageEntityType `json:"type"`
	Offset        int               `json:"offset"`
	Length        int               `json:"length"`
	URL           string            `json:"url,omitempty"`
	User          *User             `json:"user,omitempty"`
	Language      string            `json:"language,omitempty"`
	CustomEmojiID string            `json:"custom_emoji_id"`
}

MessageEntity https://core.telegram.org/bots/api#messageentity

type MessageEntityType

type MessageEntityType string
const (
	MessageEntityTypeMention       MessageEntityType = "mention"
	MessageEntityTypeHashtag       MessageEntityType = "hashtag"
	MessageEntityTypeCashtag       MessageEntityType = "cashtag"
	MessageEntityTypeBotCommand    MessageEntityType = "bot_command"
	MessageEntityTypeURL           MessageEntityType = "url"
	MessageEntityTypeEmail         MessageEntityType = "email"
	MessageEntityTypePhoneNumber   MessageEntityType = "phone_number"
	MessageEntityTypeBold          MessageEntityType = "bold"
	MessageEntityTypeItalic        MessageEntityType = "italic"
	MessageEntityTypeUnderline     MessageEntityType = "underline"
	MessageEntityTypeStrikethrough MessageEntityType = "strikethrough"
	MessageEntityTypeCode          MessageEntityType = "code"
	MessageEntityTypePre           MessageEntityType = "pre"
	MessageEntityTypeTextLink      MessageEntityType = "text_link"
	MessageEntityTypeTextMention   MessageEntityType = "text_mention"
	MessageEntityTypeCustomEmoji   MessageEntityType = "custom_emoji"
)

type MessageID

type MessageID struct {
	ID int `json:"message_id"`
}

type MessageOrigin added in v1.0.0

type MessageOrigin struct {
	Type MessageOriginType

	MessageOriginUser       *MessageOriginUser
	MessageOriginHiddenUser *MessageOriginHiddenUser
	MessageOriginChat       *MessageOriginChat
	MessageOriginChannel    *MessageOriginChannel
}

MessageOrigin https://core.telegram.org/bots/api#messageorigin

func (*MessageOrigin) UnmarshalJSON added in v1.0.0

func (mo *MessageOrigin) UnmarshalJSON(data []byte) error

type MessageOriginChannel added in v1.0.0

type MessageOriginChannel struct {
	Type            string  `json:"type"` // always “channel”
	Date            int     `json:"date"`
	Chat            Chat    `json:"chat"`
	MessageID       int     `json:"message_id"`
	AuthorSignature *string `json:"author_signature,omitempty"`
}

MessageOriginChannel https://core.telegram.org/bots/api#messageoriginchannel

type MessageOriginChat added in v1.0.0

type MessageOriginChat struct {
	Type            string  `json:"type"` // always “chat”
	Date            int     `json:"date"`
	SenderChat      Chat    `json:"sender_chat"`
	AuthorSignature *string `json:"author_signature,omitempty"`
}

MessageOriginChat https://core.telegram.org/bots/api#messageoriginchat

type MessageOriginHiddenUser added in v1.0.0

type MessageOriginHiddenUser struct {
	Type           string `json:"type"` // always “hidden_user”
	Date           int    `json:"date"`
	SenderUserName string `json:"sender_user_name"`
}

MessageOriginHiddenUser https://core.telegram.org/bots/api#messageoriginhiddenuser

type MessageOriginType added in v1.0.0

type MessageOriginType int

MessageOriginType https://core.telegram.org/bots/api#messageorigin

const (
	MessageOriginTypeUser MessageOriginType = iota
	MessageOriginTypeHiddenUser
	MessageOriginTypeChat
	MessageOriginTypeChannel
)

type MessageOriginUser added in v1.0.0

type MessageOriginUser struct {
	Type       string `json:"type"` // always “user”
	Date       int    `json:"date"`
	SenderUser User   `json:"sender_user"`
}

MessageOriginUser https://core.telegram.org/bots/api#messageoriginuser

type MessageReactionCountUpdated added in v1.0.0

type MessageReactionCountUpdated struct {
	Chat      Chat            `json:"chat"`
	MessageID int             `json:"message_id"`
	Date      int             `json:"date"`
	Reactions []ReactionCount `json:"reactions"`
}

MessageReactionCountUpdated https://core.telegram.org/bots/api#messagereactioncountupdated

type MessageReactionUpdated added in v1.0.0

type MessageReactionUpdated struct {
	Chat        Chat           `json:"chat"`
	MessageID   int            `json:"message_id"`
	User        *User          `json:"user,omitempty"`
	ActorChat   *Chat          `json:"actor_chat,omitempty"`
	Date        int            `json:"date"`
	OldReaction []ReactionType `json:"old_reaction"`
	NewReaction []ReactionType `json:"new_reaction"`
}

MessageReactionUpdated https://core.telegram.org/bots/api#messagereactionupdated

type OrderInfo

type OrderInfo struct {
	Name            string           `json:"name,omitempty"`
	PhoneNumber     string           `json:"phone_number,omitempty"`
	Email           string           `json:"email,omitempty"`
	ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
}

OrderInfo https://core.telegram.org/bots/api#orderinfo

type ParseMode

type ParseMode string
const (
	ParseModeMarkdown ParseMode = "MarkdownV2"
	ParseModeHTML     ParseMode = "HTML"
)

type PassportData

type PassportData struct {
	Data        []EncryptedPassportElement `json:"data"`
	Credentials EncryptedCredentials       `json:"credentials"`
}

PassportData https://core.telegram.org/bots/api#passportdata

type PassportElementError

type PassportElementError interface {
	MarshalCustom() ([]byte, error)
	// contains filtered or unexported methods
}

PassportElementError https://core.telegram.org/bots/api#passportelementerror

type PassportElementErrorDataField

type PassportElementErrorDataField struct {
	Type      string `json:"type"`
	FieldName string `json:"field_name"`
	DataHash  string `json:"data_hash"`
	Message   string `json:"message"`
}

PassportElementErrorDataField https://core.telegram.org/bots/api#passportelementerrordatafield

func (*PassportElementErrorDataField) MarshalCustom

func (m *PassportElementErrorDataField) MarshalCustom() ([]byte, error)

type PassportElementErrorFile

type PassportElementErrorFile struct {
	Type     string `json:"type"`
	FileHash string `json:"file_hash"`
	Message  string `json:"message"`
}

PassportElementErrorFile https://core.telegram.org/bots/api#passportelementerrorfile

func (*PassportElementErrorFile) MarshalCustom

func (m *PassportElementErrorFile) MarshalCustom() ([]byte, error)

type PassportElementErrorFiles

type PassportElementErrorFiles struct {
	Type       string   `json:"type"`
	FileHashes []string `json:"file_hashes"`
	Message    string   `json:"message"`
}

PassportElementErrorFiles https://core.telegram.org/bots/api#passportelementerrorfiles

func (*PassportElementErrorFiles) MarshalCustom

func (m *PassportElementErrorFiles) MarshalCustom() ([]byte, error)

type PassportElementErrorFrontSide

type PassportElementErrorFrontSide struct {
	Type     string `json:"type"`
	FileHash string `json:"file_hash"`
	Message  string `json:"message"`
}

PassportElementErrorFrontSide https://core.telegram.org/bots/api#passportelementerrorfrontside

func (*PassportElementErrorFrontSide) MarshalCustom

func (m *PassportElementErrorFrontSide) MarshalCustom() ([]byte, error)

type PassportElementErrorReverseSide

type PassportElementErrorReverseSide struct {
	Type     string `json:"type"`
	FileHash string `json:"file_hash"`
	Message  string `json:"message"`
}

PassportElementErrorReverseSide https://core.telegram.org/bots/api#passportelementerrorreverseside

func (*PassportElementErrorReverseSide) MarshalCustom

func (m *PassportElementErrorReverseSide) MarshalCustom() ([]byte, error)

type PassportElementErrorSelfie

type PassportElementErrorSelfie struct {
	Type     string `json:"type"`
	FileHash string `json:"file_hash"`
	Message  string `json:"message"`
}

PassportElementErrorSelfie https://core.telegram.org/bots/api#passportelementerrorselfie

func (*PassportElementErrorSelfie) MarshalCustom

func (m *PassportElementErrorSelfie) MarshalCustom() ([]byte, error)

type PassportElementErrorTranslationFile

type PassportElementErrorTranslationFile struct {
	Type     string `json:"type"`
	FileHash string `json:"file_hash"`
	Message  string `json:"message"`
}

PassportElementErrorTranslationFile https://core.telegram.org/bots/api#passportelementerrortranslationfile

func (*PassportElementErrorTranslationFile) MarshalCustom

func (m *PassportElementErrorTranslationFile) MarshalCustom() ([]byte, error)

type PassportElementErrorTranslationFiles

type PassportElementErrorTranslationFiles struct {
	Type       string   `json:"type"`
	FileHashes []string `json:"file_hashes"`
	Message    string   `json:"message"`
}

PassportElementErrorTranslationFiles https://core.telegram.org/bots/api#passportelementerrortranslationfiles

func (*PassportElementErrorTranslationFiles) MarshalCustom

func (m *PassportElementErrorTranslationFiles) MarshalCustom() ([]byte, error)

type PassportElementErrorUnspecified

type PassportElementErrorUnspecified struct {
	Type        string `json:"type"`
	ElementHash string `json:"element_hash"`
	Message     string `json:"message"`
}

PassportElementErrorUnspecified https://core.telegram.org/bots/api#passportelementerrorunspecified

func (*PassportElementErrorUnspecified) MarshalCustom

func (m *PassportElementErrorUnspecified) MarshalCustom() ([]byte, error)

type PassportFile

type PassportFile struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	FileSize     int    `json:"file_size"`
	FileDate     int    `json:"file_date"`
}

PassportFile https://core.telegram.org/bots/api#passportfile

type PhotoSize

type PhotoSize struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	FileSize     int    `json:"file_size"`
}

PhotoSize https://core.telegram.org/bots/api#photosize

type Poll

type Poll struct {
	ID                    string          `json:"id"`
	Question              string          `json:"question"`
	QuestionEntities      []MessageEntity `json:"question_entities,omitempty"`
	Options               []PollOption    `json:"options"`
	TotalVoterCount       int             `json:"total_voter_count"`
	IsClosed              bool            `json:"is_closed"`
	IsAnonymous           bool            `json:"is_anonymous"`
	Type                  string          `json:"type"`
	AllowsMultipleAnswers bool            `json:"allows_multiple_answers"`
	CorrectOptionID       int             `json:"correct_option_id,omitempty"`
	Explanation           string          `json:"explanation,omitempty"`
	ExplanationEntities   []MessageEntity `json:"explanation_entities,omitempty"`
	OpenPeriod            int             `json:"open_period,omitempty"`
	CloseDate             int             `json:"close_date,omitempty"`
}

Poll https://core.telegram.org/bots/api#poll

type PollAnswer

type PollAnswer struct {
	PollID    string `json:"poll_id"`
	VoterChat *Chat  `json:"voter_chat,omitempty"`
	User      *User  `json:"user"`
	OptionIDs []int  `json:"option_ids,omitempty"`
}

PollAnswer https://core.telegram.org/bots/api#pollanswer

type PollOption

type PollOption struct {
	Text         string          `json:"text"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	VoterCount   int             `json:"voter_count"`
}

PollOption https://core.telegram.org/bots/api#polloption

type PreCheckoutQuery

type PreCheckoutQuery struct {
	ID               string     `json:"id"`
	From             *User      `json:"from"`
	Currency         string     `json:"currency"`
	TotalAmount      int        `json:"total_amount"`
	InvoicePayload   string     `json:"invoice_payload"`
	ShippingOptionID string     `json:"shipping_option_id,omitempty"`
	OrderInfo        *OrderInfo `json:"order_info,omitempty"`
}

PreCheckoutQuery https://core.telegram.org/bots/api#precheckoutquery

type ProximityAlertTriggered

type ProximityAlertTriggered struct {
	Traveler User `json:"traveler"`
	Watcher  User `json:"watcher"`
	Distance int  `json:"distance"`
}

ProximityAlertTriggered https://core.telegram.org/bots/api#proximityalerttriggered

type ReactionCount added in v1.0.0

type ReactionCount struct {
	Type       ReactionType `json:"type"`
	TotalCount int          `json:"total_count"`
}

ReactionCount https://core.telegram.org/bots/api#reactioncount

type ReactionType added in v1.0.0

type ReactionType struct {
	Type ReactionTypeType

	ReactionTypeEmoji       *ReactionTypeEmoji
	ReactionTypeCustomEmoji *ReactionTypeCustomEmoji
}

ReactionType https://core.telegram.org/bots/api#reactiontype

func (*ReactionType) MarshalJSON added in v1.1.2

func (rt *ReactionType) MarshalJSON() ([]byte, error)

func (*ReactionType) UnmarshalJSON added in v1.0.0

func (rt *ReactionType) UnmarshalJSON(data []byte) error

type ReactionTypeCustomEmoji added in v1.0.0

type ReactionTypeCustomEmoji struct {
	Type          string `json:"type"`
	CustomEmojiID string `json:"custom_emoji_id"`
}

ReactionTypeCustomEmoji https://core.telegram.org/bots/api#reactiontypecustomemoji

type ReactionTypeEmoji added in v1.0.0

type ReactionTypeEmoji struct {
	Type  string `json:"type"`
	Emoji string `json:"emoji"`
}

ReactionTypeEmoji https://core.telegram.org/bots/api#reactiontypeemoji

type ReactionTypeType added in v1.0.0

type ReactionTypeType int

ReactionTypeType https://core.telegram.org/bots/api#reactiontype

const (
	ReactionTypeTypeEmoji ReactionTypeType = iota
	ReactionTypeTypeCustomEmoji
)

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	Keyboard              [][]KeyboardButton `json:"keyboard"`
	IsPersistent          bool               `json:"is_persistent,omitempty"`
	ResizeKeyboard        bool               `json:"resize_keyboard,omitempty"`
	OneTimeKeyboard       bool               `json:"one_time_keyboard,omitempty"`
	InputFieldPlaceholder string             `json:"input_field_placeholder,omitempty"`
	Selective             bool               `json:"selective,omitempty"`
}

ReplyKeyboardMarkup https://core.telegram.org/bots/api#replykeyboardmarkup

type ReplyKeyboardRemove

type ReplyKeyboardRemove struct {
	RemoveKeyboard bool `json:"remove_keyboard"`
	Selective      bool `json:"selective,omitempty"`
}

ReplyKeyboardRemove https://core.telegram.org/bots/api#replykeyboardremove

type ReplyMarkup

type ReplyMarkup any

type ReplyParameters added in v1.0.0

type ReplyParameters struct {
	MessageID                int             `json:"message_id"`
	ChatID                   any             `json:"chat_id,omitempty"`
	AllowSendingWithoutReply bool            `json:"allow_sending_without_reply,omitempty"`
	Quote                    string          `json:"quote,omitempty"`
	QuoteParseMode           ParseMode       `json:"quote_parse_mode,omitempty"`
	QuoteEntities            []MessageEntity `json:"quote_entities,omitempty"`
	QuotePosition            int             `json:"quote_position,omitempty"`
}

ReplyParameters https://core.telegram.org/bots/api#replyparameters

type SentWebAppMessage

type SentWebAppMessage struct {
	InlineMessageID string `json:"inline_message_id"`
}

SentWebAppMessage https://core.telegram.org/bots/api#sentwebappmessage

type SharedUser added in v1.2.0

type SharedUser struct {
	UserID    int64       `json:"user_id"`
	FirstName string      `json:"first_name,omitempty"`
	LastName  string      `json:"last_name,omitempty"`
	Username  string      `json:"username,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
}

SharedUser https://core.telegram.org/bots/api#shareduser

type ShippingAddress

type ShippingAddress struct {
	CountryCode string `json:"country_code"`
	State       string `json:"state"`
	City        string `json:"city"`
	StreetLine1 string `json:"street_line1"`
	StreetLine2 string `json:"street_line2"`
	PostCode    string `json:"post_code"`
}

ShippingAddress https://core.telegram.org/bots/api#shippingaddress

type ShippingOption

type ShippingOption struct {
	ID     string         `json:"id"`
	Title  string         `json:"title"`
	Prices []LabeledPrice `json:"prices"`
}

ShippingOption https://core.telegram.org/bots/api#shippingoption

type ShippingQuery

type ShippingQuery struct {
	ID              string          `json:"id"`
	From            *User           `json:"from"`
	InvoicePayload  string          `json:"invoice_payload"`
	ShippingAddress ShippingAddress `json:"shipping_address"`
}

ShippingQuery https://core.telegram.org/bots/api#shippingquery

type Sticker

type Sticker struct {
	FileID           string       `json:"file_id"`
	FileUniqueID     string       `json:"file_unique_id"`
	Type             string       `json:"type"`
	Width            int          `json:"width"`
	Height           int          `json:"height"`
	IsAnimated       bool         `json:"is_animated"`
	IsVideo          bool         `json:"is_video"`
	Thumbnail        *PhotoSize   `json:"thumbnail,omitempty"`
	Emoji            string       `json:"emoji,omitempty"`
	SetName          string       `json:"set_name,omitempty"`
	PremiumAnimation *File        `json:"premium_animation,omitempty"`
	MaskPosition     MaskPosition `json:"mask_position,omitempty"`
	CustomEmojiID    string       `json:"custom_emoji_id"`
	NeedsRepainting  bool         `json:"needs_repainting,omitempty"`
	FileSize         int          `json:"file_size,omitempty"`
}

Sticker https://core.telegram.org/bots/api#sticker

type StickerSet

type StickerSet struct {
	Name        string     `json:"name"`
	Title       string     `json:"title"`
	StickerType string     `json:"sticker_type"`
	Stickers    []Sticker  `json:"stickers"`
	Thumbnail   *PhotoSize `json:"thumbnail,omitempty"`
}

StickerSet https://core.telegram.org/bots/api#stickerset

type Story added in v0.7.15

type Story struct {
	Chat Chat `json:"chat"`
	ID   int  `json:"id"`
}

type SuccessfulPayment

type SuccessfulPayment struct {
	Currency                string     `json:"currency"`
	TotalAmount             int        `json:"total_amount"`
	InvoicePayload          string     `json:"invoice_payload"`
	ShippingOptionID        string     `json:"shipping_option_id,omitempty"`
	OrderInfo               *OrderInfo `json:"order_info,omitempty"`
	TelegramPaymentChargeID string     `json:"telegram_payment_charge_id"`
	ProviderPaymentChargeID string     `json:"provider_payment_charge_id"`
}

SuccessfulPayment https://core.telegram.org/bots/api#successfulpayment

type SwitchInlineQueryChosenChat added in v0.7.6

type SwitchInlineQueryChosenChat struct {
	Query             string `json:"query,omitempty"`
	AllowUserChats    bool   `json:"allow_user_chats,omitempty"`
	AllowBotChats     bool   `json:"allow_bot_chats,omitempty"`
	AllowGroupChats   bool   `json:"allow_group_chats,omitempty"`
	AllowChannelChats bool   `json:"allow_channel_chats,omitempty"`
}

SwitchInlineQueryChosenChat https://core.telegram.org/bots/api#switchinlinequerychosenchat

type TextQuote added in v1.0.0

type TextQuote struct {
	Text     string          `json:"text"`
	Entities []MessageEntity `json:"entities,omitempty"`
	Position int             `json:"position"`
	IsManual bool            `json:"is_manual,omitempty"`
}

TextQuote https://core.telegram.org/bots/api#textquote

type Update

type Update struct {
	ID                      int64                        `json:"update_id"`
	Message                 *Message                     `json:"message,omitempty"`
	EditedMessage           *Message                     `json:"edited_message,omitempty"`
	ChannelPost             *Message                     `json:"channel_post,omitempty"`
	EditedChannelPost       *Message                     `json:"edited_channel_post,omitempty"`
	BusinessConnection      *BusinessConnection          `json:"business_connection,omitempty"`
	BusinessMessage         *Message                     `json:"business_message,omitempty"`
	EditedBusinessMessage   *Message                     `json:"edited_business_message,omitempty"`
	DeletedBusinessMessages *BusinessMessagesDeleted     `json:"deleted_business_messages,omitempty"`
	MessageReaction         *MessageReactionUpdated      `json:"message_reaction,omitempty"`
	MessageReactionCount    *MessageReactionCountUpdated `json:"message_reaction_count,omitempty"`
	InlineQuery             *InlineQuery                 `json:"inline_query,omitempty"`
	ChosenInlineResult      *ChosenInlineResult          `json:"chosen_inline_result,omitempty"`
	CallbackQuery           *CallbackQuery               `json:"callback_query,omitempty"`
	ShippingQuery           *ShippingQuery               `json:"shipping_query,omitempty"`
	PreCheckoutQuery        *PreCheckoutQuery            `json:"pre_checkout_query,omitempty"`
	Poll                    *Poll                        `json:"poll,omitempty"`
	PollAnswer              *PollAnswer                  `json:"poll_answer,omitempty"`
	MyChatMember            *ChatMemberUpdated           `json:"my_chat_member,omitempty"`
	ChatMember              *ChatMemberUpdated           `json:"chat_member,omitempty"`
	ChatJoinRequest         *ChatJoinRequest             `json:"chat_join_request,omitempty"`
	ChatBoost               *ChatBoostUpdated            `json:"chat_boost,omitempty"`
	RemovedChatBoost        *ChatBoostRemoved            `json:"removed_chat_boost,omitempty"`
}

Update https://core.telegram.org/bots/api#update

type User

type User struct {
	ID                      int64  `json:"id"`
	IsBot                   bool   `json:"is_bot"`
	FirstName               string `json:"first_name,omitempty"`
	LastName                string `json:"last_name,omitempty"`
	Username                string `json:"username,omitempty"`
	LanguageCode            string `json:"language_code,omitempty"`
	IsPremium               bool   `json:"is_premium,omitempty"`
	AddedToAttachmentMenu   bool   `json:"added_to_attachment_menu,omitempty"`
	CanJoinGroups           bool   `json:"can_join_groups,omitempty"`
	CanReadAllGroupMessages bool   `json:"can_read_all_group_messages,omitempty"`
	SupportInlineQueries    bool   `json:"support_inline_queries,omitempty"`
	CanConnectToBusiness    bool   `json:"can_connect_to_business,omitempty"`
}

User https://core.telegram.org/bots/api#user

type UserChatBoosts added in v1.0.0

type UserChatBoosts struct {
	Boosts []ChatBoost `json:"boosts"`
}

UserChatBoosts https://core.telegram.org/bots/api#userchatboosts

type UserProfilePhotos

type UserProfilePhotos struct {
	TotalCount int           `json:"total_count"`
	Photos     [][]PhotoSize `json:"photos"`
}

UserProfilePhotos https://core.telegram.org/bots/api#userprofilephotos

type UserShared added in v0.5.0

type UserShared struct {
	RequestID int   `json:"request_id"`
	UserID    int64 `json:"user_id"`
}

UserShared https://core.telegram.org/bots/api#usershared

type UsersShared added in v1.0.0

type UsersShared struct {
	RequestID int          `json:"request_id"`
	Users     []SharedUser `json:"users"`
}

UsersShared https://core.telegram.org/bots/api#usersshared

type Venue

type Venue struct {
	Location        Location `json:"location"`
	Title           string   `json:"title"`
	Address         string   `json:"address"`
	FoursquareID    string   `json:"foursquare_id,omitempty"`
	FoursquareType  string   `json:"foursquare_type,omitempty"`
	GooglePlaceID   string   `json:"google_place_id,omitempty"`
	GooglePlaceType string   `json:"google_place_type,omitempty"`
}

Venue https://core.telegram.org/bots/api#venue

type Video

type Video struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Width        int        `json:"width"`
	Height       int        `json:"height"`
	Duration     int        `json:"duration"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileName     string     `json:"file_name,omitempty"`
	MimeType     string     `json:"mime_type,omitempty"`
	FileSize     int64      `json:"file_size,omitempty"`
}

Video https://core.telegram.org/bots/api#video

type VideoChatEnded

type VideoChatEnded struct {
	Duration int `json:"duration"`
}

VideoChatEnded https://core.telegram.org/bots/api#videochatended

type VideoChatParticipantsInvited

type VideoChatParticipantsInvited struct {
	Users []User `json:"users"`
}

VideoChatParticipantsInvited https://core.telegram.org/bots/api#videochatparticipantsinvited

type VideoChatScheduled

type VideoChatScheduled struct {
	StartDate int `json:"start_date"`
}

VideoChatScheduled https://core.telegram.org/bots/api#videochatscheduled

type VideoChatStarted

type VideoChatStarted struct {
	Duration int `json:"duration"`
}

VideoChatStarted https://core.telegram.org/bots/api#videochatstarted

type VideoNote

type VideoNote struct {
	FileID       string     `json:"file_id"`
	FileUniqueID string     `json:"file_unique_id"`
	Length       int        `json:"length"`
	Duration     int        `json:"duration"`
	Thumbnail    *PhotoSize `json:"thumbnail,omitempty"`
	FileSize     int        `json:"file_size,omitempty"`
}

VideoNote https://core.telegram.org/bots/api#videonote

type Voice

type Voice struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	Duration     int    `json:"duration"`
	MimeType     string `json:"mime_type,omitempty"`
	FileSize     int64  `json:"file_size,omitempty"`
}

Voice https://core.telegram.org/bots/api#voice

type VoiceChatEnded

type VoiceChatEnded struct {
	Duration int `json:"duration"`
}

VoiceChatEnded https://core.telegram.org/bots/api#videochatended

type VoiceChatParticipantsInvited

type VoiceChatParticipantsInvited struct {
	Users []User `json:"users"`
}

VoiceChatParticipantsInvited https://core.telegram.org/bots/api#videochatparticipantsinvited

type VoiceChatScheduled

type VoiceChatScheduled struct {
	StartDate int `json:"start_date"`
}

VoiceChatScheduled https://core.telegram.org/bots/api#videochatscheduled

type VoiceChatStarted

type VoiceChatStarted struct {
	Duration int `json:"duration"`
}

VoiceChatStarted https://core.telegram.org/bots/api#videochatstarted

type WebAppData

type WebAppData struct {
	Data       string `json:"data"`
	ButtonText string `json:"button_text"`
}

WebAppData https://core.telegram.org/bots/api#webappdata

type WebAppInfo

type WebAppInfo struct {
	URL string `json:"url"`
}

WebAppInfo https://core.telegram.org/bots/api#webappinfo

type WebhookInfo

type WebhookInfo struct {
	URL                          string   `json:"url"`
	HasCustomCertificate         bool     `json:"has_custom_certificate"`
	PendingUpdateCount           int      `json:"pending_update_count"`
	IPAddress                    string   `json:"ip_address,omitempty"`
	LastErrorDate                int      `json:"last_error_date,omitempty"`
	LastErrorMessage             string   `json:"last_error_message,omitempty"`
	LastSynchronizationErrorDate int      `json:"last_synchronization_error_date,omitempty"`
	MaxConnections               int      `json:"max_connections,omitempty"`
	AllowedUpdates               []string `json:"allowed_updates,omitempty"`
}

WebhookInfo https://core.telegram.org/bots/api#webhookinfo

type WriteAccessAllowed added in v0.3.4

type WriteAccessAllowed struct {
	FromRequest        bool   `json:"from_request,omitempty"`
	WebAppName         string `json:"web_app_name,omitempty"`
	FromAttachmentMenu bool   `json:"from_attachment_menu,omitempty"`
}

WriteAccessAllowed https://core.telegram.org/bots/api#writeaccessallowed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL