telegram

package module
v0.0.0-...-fa39741 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 8 Imported by: 0

README

Telegram Bot API

Telegram Bot API Golang implementation

Build Status Go Report Card GolangCI Codecov GoDoc license

Status

Bot API 6.0 (https://core.telegram.org/bots/api-changelog#april-16-2022)

Install

go get github.com/nasermirzaei89/telegram

Example

package main

import (
	"context"
	"github.com/nasermirzaei89/telegram"
	"log"
	"os"
)

func main() {
	bot := telegram.New(os.Getenv("TOKEN"))

	res, err := bot.GetUpdates(context.Background())
	if err != nil {
		log.Fatalln(err)
	}

	if res.IsOK() {
		log.Printf("%+v", res.GetUpdates())
	} else {
		log.Printf("%d: %s", res.GetErrorCode(), res.GetDescription())
	}
}

License

MIT License

Contributing

You can submit a new issue in GitHub issues. Or you can create a fork, hack on your fork and when you're done create a pull request, so that the code contribution can get merged into the main package.

Documentation

Index

Constants

View Source
const (
	InlineQueryResultTypeArticle  = "article"
	InlineQueryResultTypePhoto    = "photo"
	InlineQueryResultTypeGif      = "gif"
	InlineQueryResultTypeMpeg4Gif = "mpeg4_gif"
	InlineQueryResultTypeVideo    = "video"
	InlineQueryResultTypeAudio    = "audio"
	InlineQueryResultTypeVoice    = "voice"
	InlineQueryResultTypeDocument = "document"
	InlineQueryResultTypeLocation = "location"
	InlineQueryResultTypeVenue    = "venue"
	InlineQueryResultTypeContact  = "contact"
	InlineQueryResultTypeGame     = "game"
	InlineQueryResultTypeSticker  = "sticker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionTyping          Action = "typing"
	ActionUploadPhoto     Action = "upload_photo"
	ActionRecordVideo     Action = "record_video"
	ActionUploadVideo     Action = "upload_video"
	ActionRecordVoice     Action = "record_voice"
	ActionUploadVoice     Action = "upload_voice"
	ActionUploadDocument  Action = "upload_document"
	ActionChooseSticker   Action = "choose_sticker"
	ActionFindLocation    Action = "find_location"
	ActionRecordVideoNote Action = "record_video_note"
	ActionUploadVideoNote Action = "upload_video_note"
)

type AddStickerToSetResponse

type AddStickerToSetResponse interface {
	Response
}

AddStickerToSetResponse interface

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"`
	Thumb        *PhotoSize `json:"thumb,omitempty"`
	Filename     *string    `json:"filename,omitempty"`
	MimeType     *string    `json:"mime_type,omitempty"`
	FileSize     *int       `json:"file_size,omitempty"`
}

Animation struct.

type AnswerCallbackQueryResponse

type AnswerCallbackQueryResponse interface {
	Response
}

AnswerCallbackQueryResponse interface

type AnswerInlineQueryResponse

type AnswerInlineQueryResponse interface {
	Response
}

AnswerInlineQueryResponse interface

type AnswerPreCheckoutQueryResponse

type AnswerPreCheckoutQueryResponse interface {
	Response
}

AnswerPreCheckoutQueryResponse interface

type AnswerShippingQueryResponse

type AnswerShippingQueryResponse interface {
	Response
}

AnswerShippingQueryResponse interface

type AnswerWebAppQueryResponse

type AnswerWebAppQueryResponse interface {
	Response
	GetMessage() *Message
}

AnswerWebAppQueryResponse interface.

type ApproveChatJoinRequestResponse

type ApproveChatJoinRequestResponse interface {
	Response
}

ApproveChatJoinRequestResponse interface

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     *int       `json:"file_size,omitempty"`
	Thumb        *PhotoSize `json:"thumb,omitempty"`
}

Audio struct.

type BanChatMemberResponse

type BanChatMemberResponse interface {
	Response
}

BanChatMemberResponse interface

type BanChatSenderChatResponse

type BanChatSenderChatResponse interface {
	Response
}

BanChatSenderChatResponse interface

type Bot

type Bot interface {
	GetToken() string

	GetUpdates(ctx context.Context, options ...MethodOption) (res GetUpdatesResponse, err error)
	SetWebhook(ctx context.Context, options ...MethodOption) (res SetWebhookResponse, err error)
	DeleteWebhook(ctx context.Context) (res DeleteWebhookResponse, err error)
	GetWebhookInfo(ctx context.Context) (res GetWebhookInfoResponse, err error)

	GetMe(ctx context.Context) (res GetMeResponse, err error)
	LogOut(ctx context.Context) (res LogOutResponse, err error)
	Close(ctx context.Context) (res CloseResponse, err error)
	SendMessage(ctx context.Context, options ...MethodOption) (res SendMessageResponse, err error)
	ForwardMessage(ctx context.Context, options ...MethodOption) (res ForwardMessageResponse, err error)
	CopyMessage(ctx context.Context, options ...MethodOption) (CopyMessageResponse, error)
	SendPhoto(ctx context.Context, options ...MethodOption) (res SendPhotoResponse, err error)
	SendAudio(ctx context.Context, options ...MethodOption) (res SendAudioResponse, err error)
	SendDocument(ctx context.Context, options ...MethodOption) (res SendDocumentResponse, err error)
	SendVideo(ctx context.Context, options ...MethodOption) (res SendVideoResponse, err error)
	SendAnimation(ctx context.Context, options ...MethodOption) (res SendAnimationResponse, err error)
	SendVoice(ctx context.Context, options ...MethodOption) (res SendVoiceResponse, err error)
	SendVideoNote(ctx context.Context, options ...MethodOption) (res SendVideoNoteResponse, err error)
	SendMediaGroup(ctx context.Context, options ...MethodOption) (res SendMediaGroupResponse, err error)
	SendLocation(ctx context.Context, options ...MethodOption) (res SendLocationResponse, err error)
	EditMessageLiveLocation(ctx context.Context, options ...MethodOption) (res EditMessageLiveLocationResponse, err error)
	StopMessageLiveLocation(ctx context.Context, options ...MethodOption) (res StopMessageLiveLocationResponse, err error)
	SendVenue(ctx context.Context, options ...MethodOption) (res SendVenueResponse, err error)
	SendContact(ctx context.Context, options ...MethodOption) (res SendContactResponse, err error)
	SendPoll(ctx context.Context, options ...MethodOption) (res SendPollResponse, err error)
	SendDice(ctx context.Context, options ...MethodOption) (res SendDiceResponse, err error)
	SendChatAction(ctx context.Context, options ...MethodOption) (res SendChatActionResponse, err error)
	GetUserProfilePhotos(ctx context.Context, options ...MethodOption) (res GetUserProfilePhotosResponse, err error)
	GetFile(ctx context.Context, options ...MethodOption) (res GetFileResponse, err error)
	BanChatMember(ctx context.Context, options ...MethodOption) (res BanChatMemberResponse, err error)
	UnbanChatMember(ctx context.Context, options ...MethodOption) (res UnbanChatMemberResponse, err error)
	RestrictChatMember(ctx context.Context, options ...MethodOption) (res RestrictChatMemberResponse, err error)
	PromoteChatMember(ctx context.Context, options ...MethodOption) (res PromoteChatMemberResponse, err error)
	SetChatAdministratorCustomTitle(ctx context.Context, options ...MethodOption) (res SetChatAdministratorCustomTitleResponse, err error)
	BanChatSenderChat(ctx context.Context, options ...MethodOption) (res BanChatSenderChatResponse, err error)
	UnbanChatSenderChat(ctx context.Context, options ...MethodOption) (res UnbanChatSenderChatResponse, err error)
	ExportChatInviteLink(ctx context.Context, options ...MethodOption) (res ExportChatInviteLinkResponse, err error)
	CreateChatInviteLink(ctx context.Context, options ...MethodOption) (CreateChatInviteLinkResponse, error)
	EditChatInviteLink(ctx context.Context, options ...MethodOption) (EditChatInviteLinkResponse, error)
	RevokeChatInviteLink(ctx context.Context, options ...MethodOption) (RevokeChatInviteLinkResponse, error)
	ApproveChatJoinRequest(ctx context.Context, options ...MethodOption) (ApproveChatJoinRequestResponse, error)
	DeclineChatJoinRequest(ctx context.Context, options ...MethodOption) (DeclineChatJoinRequestResponse, error)
	SetChatPermissions(ctx context.Context, options ...MethodOption) (res SetChatPermissionsResponse, err error)
	SetChatPhoto(ctx context.Context, options ...MethodOption) (res SetChatPhotoResponse, err error)
	DeleteChatPhoto(ctx context.Context, options ...MethodOption) (res DeleteChatPhotoResponse, err error)
	SetChatTitle(ctx context.Context, options ...MethodOption) (res SetChatTitleResponse, err error)
	SetChatDescription(ctx context.Context, options ...MethodOption) (res SetChatDescriptionResponse, err error)
	PinChatMessage(ctx context.Context, options ...MethodOption) (res PinChatMessageResponse, err error)
	UnpinChatMessage(ctx context.Context, options ...MethodOption) (res UnpinChatMessageResponse, err error)
	UnpinAllChatMessages(ctx context.Context, options ...MethodOption) (UnpinAllChatMessagesResponse, error)
	LeaveChat(ctx context.Context, options ...MethodOption) (res LeaveChatResponse, err error)
	GetChat(ctx context.Context, options ...MethodOption) (res GetChatResponse, err error)
	GetChatAdministrators(ctx context.Context, options ...MethodOption) (res GetChatAdministratorsResponse, err error)
	GetChatMemberCount(ctx context.Context, options ...MethodOption) (res GetChatMemberCountResponse, err error)
	GetChatMember(ctx context.Context, options ...MethodOption) (res GetChatMemberResponse, err error)
	SetChatStickerSet(ctx context.Context, options ...MethodOption) (res SetChatStickerSetResponse, err error)
	DeleteChatStickerSet(ctx context.Context, options ...MethodOption) (res DeleteChatStickerSetResponse, err error)
	AnswerCallbackQuery(ctx context.Context, options ...MethodOption) (res AnswerCallbackQueryResponse, err error)
	SetMyCommands(ctx context.Context, options ...MethodOption) (res SetMyCommandsResponse, err error)
	DeleteMyCommands(ctx context.Context, options ...MethodOption) (res DeleteMyCommandsResponse, err error)
	GetMyCommands(ctx context.Context) (res GetMyCommandsResponse, err error)

	EditMessageText(ctx context.Context, options ...MethodOption) (res EditMessageTextResponse, err error)
	EditMessageCaption(ctx context.Context, options ...MethodOption) (res EditMessageCaptionResponse, err error)
	EditMessageMedia(ctx context.Context, options ...MethodOption) (res EditMessageMediaResponse, err error)
	EditMessageReplyMarkup(ctx context.Context, options ...MethodOption) (res EditMessageReplyMarkupResponse, err error)
	StopPoll(ctx context.Context, options ...MethodOption) (res StopPollResponse, err error)
	DeleteMessage(ctx context.Context, options ...MethodOption) (res DeleteMessageResponse, err error)

	SendSticker(ctx context.Context, options ...MethodOption) (res SendStickerResponse, err error)
	GetStickerSet(ctx context.Context, options ...MethodOption) (res GetStickerSetResponse, err error)
	UploadStickerFile(ctx context.Context, options ...MethodOption) (res UploadStickerFileResponse, err error)
	CreateNewStickerSet(ctx context.Context, options ...MethodOption) (res CreateNewStickerSetResponse, err error)
	AddStickerToSet(ctx context.Context, options ...MethodOption) (res AddStickerToSetResponse, err error)
	SetStickerPositionInSet(ctx context.Context, options ...MethodOption) (res SetStickerPositionInSetResponse, err error)
	DeleteStickerFromSet(ctx context.Context, options ...MethodOption) (res DeleteStickerFromSetResponse, err error)
	SetStickerSetThumb(ctx context.Context, options ...MethodOption) (res SetStickerSetThumbResponse, err error)

	AnswerInlineQuery(ctx context.Context, options ...MethodOption) (res AnswerInlineQueryResponse, err error)

	SendInvoice(ctx context.Context, options ...MethodOption) (res SendInvoiceResponse, err error)
	AnswerShippingQuery(ctx context.Context, options ...MethodOption) (res AnswerShippingQueryResponse, err error)
	AnswerPreCheckoutQuery(ctx context.Context, options ...MethodOption) (res AnswerPreCheckoutQueryResponse, err error)

	SetPassportDataErrors(ctx context.Context, options ...MethodOption) (res SetPassportDataErrorsResponse, err error)

	SendGame(ctx context.Context, options ...MethodOption) (res SendGameResponse, err error)
	SetGameScore(ctx context.Context, options ...MethodOption) (res SetGameScoreResponse, err error)
	GetGameHighScores(ctx context.Context, options ...MethodOption) (res GetGameHighScoresResponse, err error)
}

Bot interface

func New

func New(token string, options ...BotOption) Bot

New return a telegram bot instance

type BotCommand

type BotCommand struct {
	Command     string `json:"command"`
	Description string `json:"description"`
}

BotCommand struct

type BotCommandScope

type BotCommandScope interface{}

BotCommandScope represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported: * BotCommandScopeDefault * BotCommandScopeAllPrivateChats * BotCommandScopeAllGroupChats * BotCommandScopeAllChatAdministrators * BotCommandScopeChat * BotCommandScopeChatAdministrators * BotCommandScopeChatMember

type BotCommandScopeAllChatAdministrators

type BotCommandScopeAllChatAdministrators struct {
	Type string `json:"type"` // Scope type, must be all_chat_administrators
}

BotCommandScopeAllChatAdministrators represents the scope of bot commands, covering all group and supergroup chat administrators.

type BotCommandScopeAllGroupChats

type BotCommandScopeAllGroupChats struct {
	Type string `json:"type"` // Scope type, must be all_group_chats
}

BotCommandScopeAllGroupChats represents the scope of bot commands, covering all group and supergroup chats.

type BotCommandScopeAllPrivateChats

type BotCommandScopeAllPrivateChats struct {
	Type string `json:"type"` // Scope type, must be all_private_chats
}

BotCommandScopeAllPrivateChats represents the scope of bot commands, covering all private chats.

type BotCommandScopeChat

type BotCommandScopeChat struct {
	Type   string      `json:"type"`    // Scope type, must be chat
	ChatID interface{} `json:"chat_id"` // Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
}

BotCommandScopeChat represents the scope of bot commands, covering specific chat.

type BotCommandScopeChatAdministrators

type BotCommandScopeChatAdministrators struct {
	Type   string      `json:"type"`    // Scope type, must be chat_administrators
	ChatID interface{} `json:"chat_id"` // Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
}

BotCommandScopeChatAdministrators represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

type BotCommandScopeChatMember

type BotCommandScopeChatMember struct {
	Type   string      `json:"type"`    // Scope type, must be chat_member
	ChatID interface{} `json:"chat_id"` // Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
	UserID int         `json:"user_id"` // Unique identifier of the target user
}

BotCommandScopeChatMember represents the scope of bot commands, covering a specific member of a group or supergroup chat.

type BotCommandScopeDefault

type BotCommandScopeDefault struct {
	Type string `json:"type"` // Scope type, must be default
}

BotCommandScopeDefault represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.

type BotOption

type BotOption func(*bot)

BotOption type

func SetBaseURL

func SetBaseURL(v string) BotOption

SetBaseURL method

type CallbackGame

type CallbackGame interface{}

CallbackGame interface

type CallbackQuery

type CallbackQuery struct {
	ID              string   `json:"id"`
	From            User     `json:"from"`
	Message         *Message `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 struct

type Chat

type Chat struct {
	ID                    int64            `json:"id"`
	Type                  ChatType         `json:"type"`
	Title                 *string          `json:"title,omitempty"`
	Username              *string          `json:"username,omitempty"`
	FirstName             *string          `json:"first_name,omitempty"`
	LastName              *string          `json:"last_name,omitempty"`
	Photo                 *ChatPhoto       `json:"photo,omitempty"`
	Bio                   *string          `json:"bio,omitempty"`
	HasPrivateForwards    *bool            `json:"has_private_forwards,omitempty"`
	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"`
	MessageAutoDeleteTime *int             `json:"message_auto_delete_time,omitempty"`
	HasProtectedContent   *bool            `json:"has_protected_content,omitempty"`
	StickerSetName        *string          `json:"sticker_set_name,omitempty"`
	CanSetStickerSet      *bool            `json:"can_set_sticker_set,omitempty"`
	LinkedChatID          *int64           `json:"linked_chat_id,omitempty"`
	Location              *ChatLocation    `json:"location,omitempty"`
}

Chat struct.

type ChatAdministratorRights

type ChatAdministratorRights struct {
	IsAnonymous         bool `json:"is_anonymous"`           // True, if the user's presence in the chat is hidden
	CanManageChat       bool `json:"can_manage_chat"`        // True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
	CanDeleteMessages   bool `json:"can_delete_messages"`    // True, if the administrator can delete messages of other users
	CanManageVideoChats bool `json:"can_manage_video_chats"` // True, if the administrator can manage video chats
	CanRestrictMembers  bool `json:"can_restrict_members"`   // True, if the administrator can restrict, ban or unban chat members
	CanPromoteMembers   bool `json:"can_promote_members"`    // True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
	CanChangeInfo       bool `json:"can_change_info"`        // True, if the user is allowed to change the chat title, photo and other settings
	CanInviteUsers      bool `json:"can_invite_users"`       // True, if the user is allowed to invite new users to the chat
	CanPostMessages     bool `json:"can_post_messages"`      // Optional. True, if the administrator can post in the channel; channels only
	CanEditMessages     bool `json:"can_edit_messages"`      // Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
	CanPinMessages      bool `json:"can_pin_messages"`       // Optional. True, if the user is allowed to pin messages; groups and supergroups only
	CanManageTopics     bool `json:"can_manage_topics"`      // Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
}

ChatAdministratorRights represents the rights of an administrator in a chat.

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

ChatInviteLink represents an invite link for a chat.

type ChatJoinRequest

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

ChatJoinRequest represents a join request sent to a chat.

type ChatLocation

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

ChatLocation struct

type ChatMember

type ChatMember interface{}

ChatMember contains information about one member of a chat. Currently, the following 6 types of chat members are supported: * ChatMemberOwner * ChatMemberAdministrator * ChatMemberMember * ChatMemberRestricted * ChatMemberLeft * ChatMemberBanned

type ChatMemberAdministrator

type ChatMemberAdministrator struct {
	Status              string  `json:"status"`
	User                User    `json:"user"`
	CanBeEdited         bool    `json:"can_be_edited,omitempty"`
	IsAnonymous         bool    `json:"is_anonymous,omitempty"`
	CanManageChat       bool    `json:"can_manage_chat,omitempty"`
	CanDeleteMessages   bool    `json:"can_delete_messages,omitempty"`
	CanManageVoiceChats bool    `json:"can_manage_voice_chats,omitempty"` // deprecated
	CanManageVideoChats bool    `json:"can_manage_video_chats,omitempty"`
	CanRestrictMembers  bool    `json:"can_restrict_members,omitempty"`
	CanPromoteMembers   bool    `json:"can_promote_members,omitempty"`
	CanChangeInfo       bool    `json:"can_change_info,omitempty"`
	CanInviteUsers      bool    `json:"can_invite_users,omitempty"`
	CanPostMessages     *bool   `json:"can_post_messages,omitempty"`
	CanEditMessages     *bool   `json:"can_edit_messages,omitempty"`
	CanPinMessages      *bool   `json:"can_pin_messages,omitempty"`
	CustomTitle         *string `json:"custom_title,omitempty"`
}

ChatMemberAdministrator represents a chat member that has some additional privileges.

type ChatMemberBanned

type ChatMemberBanned struct {
	Status    string `json:"status"`
	User      User   `json:"user"`
	UntilDate int    `json:"until_date,omitempty"`
}

ChatMemberBanned represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

type ChatMemberLeft

type ChatMemberLeft struct {
	Status string `json:"status"`
	User   User   `json:"user"`
}

ChatMemberLeft represents a chat member that isn't currently a member of the chat, but may join it themselves.

type ChatMemberMember

type ChatMemberMember struct {
	Status string `json:"status"`
	User   User   `json:"user"`
}

ChatMemberMember represents a chat member that has no additional privileges or restrictions.

type ChatMemberOwner

type ChatMemberOwner struct {
	Status      string  `json:"status"`
	User        User    `json:"user"`
	IsAnonymous bool    `json:"is_anonymous,omitempty"`
	CustomTitle *string `json:"custom_title,omitempty"`
}

ChatMemberOwner represents a chat member that owns the chat and has all administrator privileges.

type ChatMemberRestricted

type ChatMemberRestricted struct {
	Status                string `json:"status"`
	User                  User   `json:"user"`
	IsMember              bool   `json:"is_member,omitempty"`
	CanChangeInfo         bool   `json:"can_change_info,omitempty"`
	CanInviteUsers        bool   `json:"can_invite_users,omitempty"`
	CanPinMessages        bool   `json:"can_pin_messages,omitempty"`
	CanSendMessages       bool   `json:"can_send_messages,omitempty"`
	CanSendMediaMessages  bool   `json:"can_send_media_messages,omitempty"`
	CanSendPolls          bool   `json:"can_send_polls,omitempty"`
	CanSendOtherMessages  bool   `json:"can_send_other_messages,omitempty"`
	CanAddWebPagePreviews bool   `json:"can_add_web_page_previews,omitempty"`
	UntilDate             int    `json:"until_date,omitempty"`
}

ChatMemberRestricted represents a chat member that is under certain restrictions in the chat. Supergroups only.

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"`
}

ChatMemberUpdated represents changes in the status of a chat member.

type ChatPermissions

type ChatPermissions struct {
	CanSendMessages       *bool `json:"can_send_messages,omitempty"`
	CanSendMediaMessages  *bool `json:"can_send_media_messages,omitempty"`
	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"`
}

ChatPermissions struct

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 struct

type ChatType

type ChatType string
const (
	ChatTypeSender     ChatType = "sender"
	ChatTypePrivate    ChatType = "private"
	ChatTypeGroup      ChatType = "group"
	ChatTypeSupergroup ChatType = "supergroup"
	ChatTypeChannel    ChatType = "channel"
)

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 struct

type CloseResponse

type CloseResponse interface {
	Response
}

CloseResponse interface.

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 struct

type CopyMessageResponse

type CopyMessageResponse interface {
	Response
	GetMessageID() *MessageID
}

CopyMessageResponse interface.

type CreateChatInviteLinkResponse

type CreateChatInviteLinkResponse interface {
	Response
	GetNewInviteLink() ChatInviteLink
}

CreateChatInviteLinkResponse interface

type CreateNewStickerSetResponse

type CreateNewStickerSetResponse interface {
	Response
}

CreateNewStickerSetResponse interface

type Currency

type Currency string
const (
	UnitedArabEmiratesDirham            Currency = "AED"
	AfghanAfghani                       Currency = "AFN"
	AlbanianLek                         Currency = "ALL"
	ArmenianDram                        Currency = "AMD"
	ArgentinePeso                       Currency = "ARS"
	AustralianDollar                    Currency = "AUD"
	AzerbaijaniManat                    Currency = "AZN"
	BosniaAndHerzegovinaConvertibleMark Currency = "BAM"
	BangladeshiTaka                     Currency = "BDT"
	BulgarianLev                        Currency = "BGN"
	BruneiDollar                        Currency = "BND"
	BolivianBoliviano                   Currency = "BOB"
	BrazilianReal                       Currency = "BRL"
	CanadianDollar                      Currency = "CAD"
	SwissFranc                          Currency = "CHF"
	ChileanPeso                         Currency = "CLP"
	ChineseRenminbiYuan                 Currency = "CNY"
	ColombianPeso                       Currency = "COP"
	CostaRicanColon                     Currency = "CRC"
	CzechKoruna                         Currency = "CZK"
	DanishKrone                         Currency = "DKK"
	DominicanPeso                       Currency = "DOP"
	AlgerianDinar                       Currency = "DZD"
	EgyptianPound                       Currency = "EGP"
	Euro                                Currency = "EUR"
	BritishPound                        Currency = "GBP"
	GeorgianLari                        Currency = "GEL"
	GuatemalanQuetzal                   Currency = "GTQ"
	HongKongDollar                      Currency = "HKD"
	HonduranLempira                     Currency = "HNL"
	CroatianKuna                        Currency = "HRK"
	HungarianForint                     Currency = "HUF"
	IndonesianRupiah                    Currency = "IDR"
	IsraeliNewSheqel                    Currency = "ILS"
	IndianRupee                         Currency = "INR"
	IcelandicKrona                      Currency = "ISK"
	JamaicanDollar                      Currency = "JMD"
	JapaneseYen                         Currency = "JPY"
	KenyanShilling                      Currency = "KES"
	KyrgyzstaniSom                      Currency = "KGS"
	SouthKoreanWon                      Currency = "KRW"
	KazakhstaniTenge                    Currency = "KZT"
	LebanesePound                       Currency = "LBP"
	SriLankanRupee                      Currency = "LKR"
	MoroccanDirham                      Currency = "MAD"
	MoldovanLeu                         Currency = "MDL"
	MongolianTogrog                     Currency = "MNT"
	MauritianRupee                      Currency = "MUR"
	MaldivianRufiyaa                    Currency = "MVR"
	MexicanPeso                         Currency = "MXN"
	MalaysianRinggit                    Currency = "MYR"
	MozambicanMetical                   Currency = "MZN"
	NigerianNaira                       Currency = "NGN"
	NicaraguanCordoba                   Currency = "NIO"
	NorwegianKrone                      Currency = "NOK"
	NepaleseRupee                       Currency = "NPR"
	NewZealandDollar                    Currency = "NZD"
	PanamanianBalboa                    Currency = "PAB"
	PeruvianNuevoSol                    Currency = "PEN"
	PhilippinePeso                      Currency = "PHP"
	PakistaniRupee                      Currency = "PKR"
	PolishZloty                         Currency = "PLN"
	ParaguayanGuarani                   Currency = "PYG"
	QatariRiyal                         Currency = "QAR"
	RomanianLeu                         Currency = "RON"
	SerbianDinar                        Currency = "RSD"
	RussianRuble                        Currency = "RUB"
	SaudiRiyal                          Currency = "SAR"
	SwedishKrona                        Currency = "SEK"
	SingaporeDollar                     Currency = "SGD"
	ThaiBaht                            Currency = "THB"
	TajikistaniSomoni                   Currency = "TJS"
	TurkishLira                         Currency = "TRY"
	TrinidadAndTobagoDollar             Currency = "TTD"
	NewTaiwanDollar                     Currency = "TWD"
	TanzanianShilling                   Currency = "TZS"
	UkrainianHryvnia                    Currency = "UAH"
	UgandanShilling                     Currency = "UGX"
	UnitedStatesDollar                  Currency = "USD"
	UruguayanPeso                       Currency = "UYU"
	UzbekistaniSom                      Currency = "UZS"
	VietnameseDong                      Currency = "VND"
	YemeniRial                          Currency = "YER"
	SouthAfricanRand                    Currency = "ZAR"
)

type DeclineChatJoinRequestResponse

type DeclineChatJoinRequestResponse interface {
	Response
}

DeclineChatJoinRequestResponse interface

type DeleteChatPhotoResponse

type DeleteChatPhotoResponse interface {
	Response
}

DeleteChatPhotoResponse interface

type DeleteChatStickerSetResponse

type DeleteChatStickerSetResponse interface {
	Response
}

DeleteChatStickerSetResponse interface

type DeleteMessageResponse

type DeleteMessageResponse interface {
	Response
}

DeleteMessageResponse interface

type DeleteMyCommandsResponse

type DeleteMyCommandsResponse interface {
	Response
}

DeleteMyCommandsResponse interface

type DeleteStickerFromSetResponse

type DeleteStickerFromSetResponse interface {
	Response
}

DeleteStickerFromSetResponse interface

type DeleteWebhookResponse

type DeleteWebhookResponse interface {
	Response
}

DeleteWebhookResponse interface.

type Dice

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

Dice struct

type Document

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

Document struct

type EditChatInviteLinkResponse

type EditChatInviteLinkResponse interface {
	Response
	GetEditedInviteLink() ChatInviteLink
}

EditChatInviteLinkResponse interface

type EditMessageCaptionResponse

type EditMessageCaptionResponse interface {
	Response
	GetEditedMessage() *Message
}

EditMessageCaptionResponse interface

type EditMessageLiveLocationResponse

type EditMessageLiveLocationResponse interface {
	Response
	GetEditedMessage() *Message
}

EditMessageLiveLocationResponse interface

type EditMessageMediaResponse

type EditMessageMediaResponse interface {
	Response
	GetEditedMessage() *Message
}

EditMessageMediaResponse interface

type EditMessageReplyMarkupResponse

type EditMessageReplyMarkupResponse interface {
	Response
	GetEditedMessage() *Message
}

EditMessageReplyMarkupResponse interface

type EditMessageTextResponse

type EditMessageTextResponse interface {
	Response
	GetEditedMessage() *Message
}

EditMessageTextResponse interface

type EncryptedCredentials

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

EncryptedCredentials struct

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 struct

type ExportChatInviteLinkResponse

type ExportChatInviteLinkResponse interface {
	Response
	GetNewInviteLink() string
}

ExportChatInviteLinkResponse interface

type File

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

File struct

type ForceReply

type ForceReply struct {
	ForceReply            bool    `json:"force_reply"`                       // Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
	InputFieldPlaceholder *string `json:"input_field_placeholder,omitempty"` // Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
	Selective             *bool   `json:"selective,omitempty"`               // Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
}

ForceReply struct

type ForwardMessageResponse

type ForwardMessageResponse interface {
	Response
	GetMessage() *Message
}

ForwardMessageResponse interface.

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 struct

type GameHighScore

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

GameHighScore struct

type GetChatAdministratorsResponse

type GetChatAdministratorsResponse interface {
	Response
	GetChatAdministrators() []ChatMember
}

GetChatAdministratorsResponse interface

type GetChatMemberCountResponse

type GetChatMemberCountResponse interface {
	Response
	GetChatMemberCount() int
}

GetChatMemberCountResponse interface

type GetChatMemberResponse

type GetChatMemberResponse interface {
	Response
	GetChatMember() *ChatMember
}

GetChatMemberResponse interface

type GetChatMenuButtonResponse

type GetChatMenuButtonResponse interface {
	Response
	GetMenuButton() *MenuButton
}

GetChatMenuButtonResponse interface

type GetChatResponse

type GetChatResponse interface {
	Response
	GetChat() *Chat
}

GetChatResponse interface

type GetFileResponse

type GetFileResponse interface {
	Response
	GetFile() *File
}

GetFileResponse interface

type GetGameHighScoresResponse

type GetGameHighScoresResponse interface {
	Response
	GetGameHighScores() []GameHighScore
}

GetGameHighScoresResponse interface

type GetMeResponse

type GetMeResponse interface {
	Response
	GetUser() *User
}

GetMeResponse interface.

type GetMyCommandsResponse

type GetMyCommandsResponse interface {
	Response
	GetCommands() []BotCommand
}

GetMyCommandsResponse interface

type GetMyDefaultAdministratorRightsResponse

type GetMyDefaultAdministratorRightsResponse interface {
	Response
	GetChatAdministratorRights() *ChatAdministratorRights
}

GetMyDefaultAdministratorRightsResponse interface

type GetStickerSetResponse

type GetStickerSetResponse interface {
	Response
	GetStickerSet() *StickerSet
}

GetStickerSetResponse interface

type GetUpdatesResponse

type GetUpdatesResponse interface {
	Response
	GetUpdates() []Update
}

GetUpdatesResponse interface.

type GetUserProfilePhotosResponse

type GetUserProfilePhotosResponse interface {
	Response
	GetUserProfilePhotos() *UserProfilePhotos
}

GetUserProfilePhotosResponse interface

type GetWebhookInfoResponse

type GetWebhookInfoResponse interface {
	Response
	GetWebhookInfo() *WebhookInfo
}

GetWebhookInfoResponse interface.

type InlineKeyboardButton

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

InlineKeyboardButton struct

type InlineKeyboardMarkup

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

InlineKeyboardMarkup struct

type InlineQuery

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

InlineQuery struct

type InlineQueryResult

type InlineQueryResult interface{}

InlineQueryResult interface

type InlineQueryResultArticle

type InlineQueryResultArticle struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	Title               string                `json:"title"`
	InputMessageContent InputMessageContent   `json:"input_message_content"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	URL                 *string               `json:"url,omitempty"`
	HideURL             *bool                 `json:"hide_url,omitempty"`
	Description         *string               `json:"description,omitempty"`
	ThumbURL            *string               `json:"thumb_url,omitempty"`
	ThumbWidth          *int                  `json:"thumb_width,omitempty"`
	ThumbHeight         *int                  `json:"thumb_height,omitempty"`
}

InlineQueryResultArticle struct

type InlineQueryResultAudio

type InlineQueryResultAudio struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	AudioURL            string                `json:"audio_url"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	Performer           *string               `json:"performer,omitempty"`
	AudioDuration       *int                  `json:"audio_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultAudio struct

type InlineQueryResultCachedAudio

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

InlineQueryResultCachedAudio struct

type InlineQueryResultCachedDocument

type InlineQueryResultCachedDocument struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	Title               string                `json:"title"`
	DocumentFileID      string                `json:"document_file_id"`
	Description         *string               `json:"description,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedDocument struct

type InlineQueryResultCachedGif

type InlineQueryResultCachedGif struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	GifFileID           string                `json:"gif_file_id"`
	Title               *string               `json:"title,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedGif struct

type InlineQueryResultCachedMpeg4Gif

type InlineQueryResultCachedMpeg4Gif struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	Mpeg4FileID         string                `json:"mpeg4_file_id"`
	Title               *string               `json:"title,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedMpeg4Gif struct

type InlineQueryResultCachedPhoto

type InlineQueryResultCachedPhoto struct {
	Type                InlineQueryResultType `json:"type"`
	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           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedPhoto struct

type InlineQueryResultCachedSticker

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

InlineQueryResultCachedSticker struct

type InlineQueryResultCachedVideo

type InlineQueryResultCachedVideo struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	VideoFileID         string                `json:"video_file_id"`
	Title               string                `json:"title"`
	Description         *string               `json:"description,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVideo struct

type InlineQueryResultCachedVoice

type InlineQueryResultCachedVoice struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	VoiceFileID         string                `json:"voice_file_id"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVoice struct

type InlineQueryResultContact

type InlineQueryResultContact struct {
	Type                InlineQueryResultType `json:"type"`
	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         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbURL            *string               `json:"thumb_url,omitempty"`
	ThumbWidth          *int                  `json:"thumb_width,omitempty"`
	ThumbHeight         *int                  `json:"thumb_height,omitempty"`
}

InlineQueryResultContact struct

type InlineQueryResultDocument

type InlineQueryResultDocument struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	DocumentURL         string                `json:"document_url"`
	MimeType            string                `json:"mime_type"`
	Description         *string               `json:"description,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbURL            *string               `json:"thumb_url,omitempty"`
	ThumbWidth          *int                  `json:"thumb_width,omitempty"`
	ThumbHeight         *int                  `json:"thumb_height,omitempty"`
}

InlineQueryResultDocument struct

type InlineQueryResultGame

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

InlineQueryResultGame struct

type InlineQueryResultGif

type InlineQueryResultGif struct {
	Type                InlineQueryResultType `json:"type"`
	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"`
	ThumbURL            string                `json:"thumb_url"`
	ThumbMimeType       string                `json:"thumb_mime_type,omitempty"`
	Title               *string               `json:"title,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultGif struct

type InlineQueryResultLocation

type InlineQueryResultLocation struct {
	Type                 InlineQueryResultType `json:"type"`
	ID                   string                `json:"id"`
	Latitude             float64               `json:"latitude"`
	Longitude            float64               `json:"longitude"`
	Title                string                `json:"title"`
	HorizontalAccuracy   *float32              `json:"horizontal_accuracy,omitempty"`
	LivePeriod           *int                  `json:"live_period,omitempty"`
	Heading              *int                  `json:"heading,omitempty"`
	ProximityAlertRadius *int                  `json:"proximity_alert_radius,omitempty"`
	ReplyMarkup          *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent  *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbURL             *string               `json:"thumb_url,omitempty"`
	ThumbWidth           *int                  `json:"thumb_width,omitempty"`
	ThumbHeight          *int                  `json:"thumb_height,omitempty"`
}

InlineQueryResultLocation struct

type InlineQueryResultMpeg4Gif

type InlineQueryResultMpeg4Gif struct {
	Type                InlineQueryResultType `json:"type"`
	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"`
	ThumbURL            string                `json:"thumb_url"`
	ThumbMimeType       string                `json:"thumb_mime_type,omitempty"`
	Title               *string               `json:"title,omitempty"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultMpeg4Gif struct

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	PhotoURL            string                `json:"photo_url"`
	ThumbURL            string                `json:"thumb_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           *string               `json:"parse_mode,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultPhoto struct

type InlineQueryResultType

type InlineQueryResultType string

type InlineQueryResultVenue

type InlineQueryResultVenue struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	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"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
	ThumbURL            *string               `json:"thumb_url,omitempty"`
	ThumbWidth          *int                  `json:"thumb_width,omitempty"`
	ThumbHeight         *int                  `json:"thumb_height,omitempty"`
}

InlineQueryResultVenue struct

type InlineQueryResultVideo

type InlineQueryResultVideo struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	VideoURL            string                `json:"video_url"`
	MimeType            string                `json:"mime_type"`
	ThumbURL            string                `json:"thumb_url"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,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         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultVideo struct

type InlineQueryResultVoice

type InlineQueryResultVoice struct {
	Type                InlineQueryResultType `json:"type"`
	ID                  string                `json:"id"`
	VoiceURL            string                `json:"voice_url"`
	Title               string                `json:"title"`
	Caption             *string               `json:"caption,omitempty"`
	ParseMode           *string               `json:"parse_mode,omitempty"`
	VoiceDuration       *string               `json:"voice_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultVoice struct

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 struct

type InputFile

type InputFile interface {
	io.Reader
}

InputFile interface

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	Title                     string         `json:"title"`
	Description               string         `json:"description"`
	Payload                   string         `json:"payload"`
	ProviderToken             string         `json:"provider_token"`
	Currency                  Currency       `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 represents the content of an invoice message to be sent as the result of an inline query.

type InputLocationMessageContent

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

InputLocationMessageContent struct

type InputMedia

type InputMedia interface{}

InputMedia interface

type InputMediaAnimation

type InputMediaAnimation struct {
	Type      string      `json:"type"`
	Media     string      `json:"media"`
	Thumb     interface{} `json:"thumb,omitempty"`
	Caption   *string     `json:"caption,omitempty"`
	ParseMode *string     `json:"parse_mode,omitempty"`
	Width     *int        `json:"width,omitempty"`
	Height    *int        `json:"height,omitempty"`
	Duration  *int        `json:"duration,omitempty"`
}

InputMediaAnimation struct

type InputMediaAudio

type InputMediaAudio struct {
	Type      string      `json:"type"`
	Media     string      `json:"media"`
	Thumb     interface{} `json:"thumb,omitempty"`
	Caption   *string     `json:"caption,omitempty"`
	ParseMode *string     `json:"parse_mode,omitempty"`
	Duration  *int        `json:"duration,omitempty"`
	Performer *string     `json:"performer,omitempty"`
	Title     *string     `json:"title,omitempty"`
}

InputMediaAudio struct

type InputMediaDocument

type InputMediaDocument struct {
	Type                        string      `json:"type"`
	Media                       string      `json:"media"`
	Thumb                       interface{} `json:"thumb,omitempty"`
	Caption                     *string     `json:"caption,omitempty"`
	ParseMode                   *string     `json:"parse_mode,omitempty"`
	DisableContentTypeDetection *bool       `json:"disable_content_type_detection,omitempty"`
}

InputMediaDocument struct

type InputMediaPhoto

type InputMediaPhoto struct {
	Type      string  `json:"type"`
	Media     string  `json:"media"`
	Caption   *string `json:"caption,omitempty"`
	ParseMode *string `json:"parse_mode,omitempty"`
}

InputMediaPhoto struct

type InputMediaVideo

type InputMediaVideo struct {
	Type              string      `json:"type"`
	Media             string      `json:"media"`
	Thumb             interface{} `json:"thumb,omitempty"`
	Caption           *string     `json:"caption,omitempty"`
	ParseMode         *string     `json:"parse_mode,omitempty"`
	Width             *int        `json:"width,omitempty"`
	Height            *int        `json:"height,omitempty"`
	Duration          *int        `json:"duration,omitempty"`
	SupportsStreaming *bool       `json:"supports_streaming,omitempty"`
}

InputMediaVideo struct

type InputMessageContent

type InputMessageContent interface{}

InputMessageContent interface

type InputTextMessageContent

type InputTextMessageContent struct {
	MessageText           string  `json:"message_text"`
	ParseMode             *string `json:"parse_mode,omitempty"`
	DisableWebPagePreview *bool   `json:"disable_web_page_preview,omitempty"`
}

InputTextMessageContent struct

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 struct

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 struct

type KeyboardButton

type KeyboardButton struct {
	Text            string                  `json:"text"`
	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 struct

type KeyboardButtonPollType

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

KeyboardButtonPollType struct

type LabeledPrice

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

LabeledPrice struct

type LeaveChatResponse

type LeaveChatResponse interface {
	Response
}

LeaveChatResponse interface

type Location

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

Location struct

type LogOutResponse

type LogOutResponse interface {
	Response
}

LogOutResponse interface.

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 struct

type MaskPosition

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

MaskPosition struct

type MenuButton interface{}

MenuButton describes the bot's menu button in a private chat. It should be one of

  • MenuButtonCommands
  • MenuButtonWebApp
  • MenuButtonDefault

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

type MenuButtonCommands struct {
	Type string `json:"type"`
}

MenuButtonCommands represents a menu button, which opens the bot's list of commands.

type MenuButtonDefault struct {
	Type string `json:"type"`
}

MenuButtonDefault describes that no specific value for the menu button was set.

type MenuButtonWebApp struct {
	Type   string     `json:"type"`
	Text   string     `json:"text"`
	WebApp WebAppInfo `json:"web_app"`
}

MenuButtonWebApp represents a menu button, which launches a Web App.

type Message

type Message struct {
	MessageID                     int                            `json:"message_id"`
	From                          *User                          `json:"from,omitempty"`
	SenderChat                    *Chat                          `json:"sender_chat,omitempty"`
	Date                          int                            `json:"date"`
	Chat                          Chat                           `json:"chat"`
	ForwardFrom                   *User                          `json:"forward_from,omitempty"`
	ForwardFromChat               *Chat                          `json:"forward_from_chat,omitempty"`
	ForwardFromMessageID          *int                           `json:"forward_from_message_id,omitempty"`
	ForwardSignature              *string                        `json:"forward_signature,omitempty"`
	ForwardSenderName             *string                        `json:"forward_sender_name,omitempty"`
	ForwardDate                   *int                           `json:"forward_date,omitempty"`
	IsAutomaticForward            *bool                          `json:"is_automatic_forward,omitempty"`
	ReplyToMessage                *Message                       `json:"reply_to_message,omitempty"`
	ViaBot                        *User                          `json:"via_bot,omitempty"`
	EditDate                      *int                           `json:"edit_date,omitempty"`
	HasProtectedContent           *bool                          `json:"has_protected_content,omitempty"`
	MediaGroupID                  *string                        `json:"media_group_id,omitempty"`
	AuthorSignature               *string                        `json:"author_signature,omitempty"`
	Text                          *string                        `json:"text,omitempty"`
	Entities                      []MessageEntity                `json:"entities,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"`
	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"`
	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                 *Message                       `json:"pinned_message,omitempty"`
	Invoice                       *Invoice                       `json:"invoice,omitempty"`
	SuccessfulPayment             *SuccessfulPayment             `json:"successful_payment,omitempty"`
	ConnectedWebsite              *string                        `json:"connected_website,omitempty"`
	PassportData                  *PassportData                  `json:"passport_data,omitempty"`
	ProximityAlertTriggered       *ProximityAlertTriggered       `json:"proximity_alert_triggered,omitempty"`
	VoiceChatScheduled            *VoiceChatScheduled            `json:"voice_chat_scheduled,omitempty"` // Deprecated
	VideoChatScheduled            *VideoChatScheduled            `json:"video_chat_scheduled,omitempty"`
	VoiceChatStarted              *VoiceChatStarted              `json:"voice_chat_started,omitempty"` // Deprecated
	VideoChatStarted              *VideoChatStarted              `json:"video_chat_started,omitempty"`
	VoiceChatEnded                *VoiceChatEnded                `json:"voice_chat_ended,omitempty"` // Deprecated
	VideoChatEnded                *VideoChatEnded                `json:"video_chat_ended,omitempty"`
	VoiceChatParticipantsInvited  *VoiceChatParticipantsInvited  `json:"voice_chat_participants_invited,omitempty"` // Deprecated
	VideoChatParticipantsInvited  *VideoChatParticipantsInvited  `json:"video_chat_participants_invited,omitempty"`
	WebAppData                    *WebAppData                    `json:"web_app_data,omitempty"` // Optional. Service message: data sent by a Web App
	ReplyMarkup                   *InlineKeyboardMarkup          `json:"reply_markup,omitempty"`
}

Message struct.

type MessageAutoDeleteTimerChanged

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

MessageAutoDeleteTimerChanged struct

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"`
}

MessageEntity struct.

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"
	MessageEntityTypeSpoiler       MessageEntityType = "spoiler"
)

type MessageID

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

MessageID struct.

type MethodOption

type MethodOption func(*request)

MethodOption type

func AllowSendingWithoutReply

func AllowSendingWithoutReply() MethodOption

AllowSendingWithoutReply option function

func AllowsMultipleAnswers

func AllowsMultipleAnswers() MethodOption

AllowsMultipleAnswers option function

func CanAddWebPagePreviews

func CanAddWebPagePreviews() MethodOption

CanAddWebPagePreviews option function

func CanChangeInfo

func CanChangeInfo() MethodOption

CanChangeInfo option function

func CanDeleteMessages

func CanDeleteMessages() MethodOption

CanDeleteMessages option function

func CanEditMessages

func CanEditMessages() MethodOption

CanEditMessages option function

func CanInviteUsers

func CanInviteUsers() MethodOption

CanInviteUsers option function

func CanManageChat

func CanManageChat() MethodOption

CanManageChat option function

func CanManageVideoChats

func CanManageVideoChats() MethodOption

CanManageVideoChats option function

func CanManageVoiceChats

func CanManageVoiceChats() MethodOption

CanManageVoiceChats option function Deprecated

func CanPinMessages

func CanPinMessages() MethodOption

CanPinMessages option function

func CanPostMessages

func CanPostMessages() MethodOption

CanPostMessages option function

func CanPromoteMembers

func CanPromoteMembers() MethodOption

CanPromoteMembers option function

func CanRestrictMembers

func CanRestrictMembers() MethodOption

CanRestrictMembers option function

func CanSendMediaMessages

func CanSendMediaMessages() MethodOption

CanSendMediaMessages option function

func CanSendMessages

func CanSendMessages() MethodOption

CanSendMessages option function

func CanSendOtherMessages

func CanSendOtherMessages() MethodOption

CanSendOtherMessages option function

func ContainsMasks

func ContainsMasks() MethodOption

ContainsMasks option function

func CreatesJoinRequest

func CreatesJoinRequest() MethodOption

CreatesJoinRequest option function

func DisableContentTypeDetection

func DisableContentTypeDetection() MethodOption

DisableContentTypeDetection option function

func DisableNotification

func DisableNotification() MethodOption

DisableNotification option function

func DisableWebPagePreview

func DisableWebPagePreview() MethodOption

DisableWebPagePreview option function

func DropPendingUpdates

func DropPendingUpdates() MethodOption

DropPendingUpdates option function

func ForChannels

func ForChannels() MethodOption

ForChannels option function

func IsAnonymous

func IsAnonymous() MethodOption

IsAnonymous option function

func IsClosed

func IsClosed() MethodOption

IsClosed option function

func IsFlexible

func IsFlexible() MethodOption

IsFlexible option function

func IsPersonal

func IsPersonal() MethodOption

IsPersonal option function

func NeedEmail

func NeedEmail() MethodOption

NeedEmail option function

func NeedName

func NeedName() MethodOption

NeedName option function

func NeedPhoneNumber

func NeedPhoneNumber() MethodOption

NeedPhoneNumber option function

func NeedShippingAddress

func NeedShippingAddress() MethodOption

NeedShippingAddress option function

func OnlyIfBanned

func OnlyIfBanned() MethodOption

OnlyIfBanned option function

func ProtectContent

func ProtectContent() MethodOption

ProtectContent option function

func RevokeMessages

func RevokeMessages() MethodOption

RevokeMessages option function

func SendEmailToProvider

func SendEmailToProvider() MethodOption

SendEmailToProvider option function

func SendPhoneNumberToProvider

func SendPhoneNumberToProvider() MethodOption

SendPhoneNumberToProvider option function

func SetAction

func SetAction(v Action) MethodOption

SetAction option function

func SetAddress

func SetAddress(v string) MethodOption

SetAddress option function

func SetAllowedUpdates

func SetAllowedUpdates(v ...string) MethodOption

SetAllowedUpdates option function

func SetAnimation

func SetAnimation(v InputFile) MethodOption

SetAnimation option function

func SetAnimationFromFileID

func SetAnimationFromFileID(v string) MethodOption

SetAnimationFromFileID option function

func SetAnimationFromURL

func SetAnimationFromURL(v string) MethodOption

SetAnimationFromURL option function

func SetAudio

func SetAudio(v InputFile) MethodOption

SetAudio option function

func SetAudioFromFileID

func SetAudioFromFileID(v string) MethodOption

SetAudioFromFileID option function

func SetAudioFromURL

func SetAudioFromURL(v string) MethodOption

SetAudioFromURL option function

func SetCacheTime

func SetCacheTime(v int) MethodOption

SetCacheTime option function

func SetCallbackQueryID

func SetCallbackQueryID(v string) MethodOption

SetCallbackQueryID option function

func SetCaption

func SetCaption(v string) MethodOption

SetCaption option function

func SetCertificate

func SetCertificate(v InputFile) MethodOption

SetCertificate option function

func SetChatID

func SetChatID(v int64) MethodOption

SetChatID option function

func SetChatUsername

func SetChatUsername(v string) MethodOption

SetChatUsername option function

func SetCloseDate

func SetCloseDate(v int) MethodOption

SetCloseDate option function

func SetCommands

func SetCommands(v ...BotCommand) MethodOption

SetCommands option function

func SetCorrectOptionID

func SetCorrectOptionID(v int) MethodOption

SetCorrectOptionID option function

func SetCurrency

func SetCurrency(v Currency) MethodOption

SetCurrency option function

func SetCustomTitle

func SetCustomTitle(v string) MethodOption

SetCustomTitle option function

func SetDescription

func SetDescription(v string) MethodOption

SetDescription option function

func SetDocument

func SetDocument(v InputFile) MethodOption

SetDocument option function

func SetDocumentFromFileID

func SetDocumentFromFileID(v string) MethodOption

SetDocumentFromFileID option function

func SetDocumentFromURL

func SetDocumentFromURL(v string) MethodOption

SetDocumentFromURL option function

func SetDuration

func SetDuration(v int) MethodOption

SetDuration option function

func SetEmoji

func SetEmoji(v string) MethodOption

SetEmoji option function

func SetEmojis

func SetEmojis(v string) MethodOption

SetEmojis option function

func SetExpireDate

func SetExpireDate(v int) MethodOption

SetExpireDate option function

func SetExplanation

func SetExplanation(v string) MethodOption

SetExplanation option function

func SetExplanationParseMode

func SetExplanationParseMode(v string) MethodOption

SetExplanationParseMode option function

func SetFileID

func SetFileID(v string) MethodOption

SetFileID option function

func SetFirstName

func SetFirstName(v string) MethodOption

SetFirstName option function

func SetFoursquareID

func SetFoursquareID(v string) MethodOption

SetFoursquareID option function

func SetFoursquareType

func SetFoursquareType(v string) MethodOption

SetFoursquareType option function

func SetFromChatID

func SetFromChatID(v int) MethodOption

SetFromChatID option function

func SetFromChatUsername

func SetFromChatUsername(v string) MethodOption

SetFromChatUsername option function

func SetGooglePlaceID

func SetGooglePlaceID(v string) MethodOption

SetGooglePlaceID option function

func SetGooglePlaceType

func SetGooglePlaceType(v string) MethodOption

SetGooglePlaceType option function

func SetHeading

func SetHeading(v int) MethodOption

SetHeading option function

func SetHeight

func SetHeight(v string) MethodOption

SetHeight option function

func SetHorizontalAccuracy

func SetHorizontalAccuracy(v float32) MethodOption

SetHorizontalAccuracy option function

func SetIPAddress

func SetIPAddress(v string) MethodOption

SetIPAddress option function

func SetInlineMessageID

func SetInlineMessageID(v string) MethodOption

SetInlineMessageID option function

func SetInlineQueryID

func SetInlineQueryID(v string) MethodOption

SetInlineQueryID option function

func SetInlineQueryResultType

func SetInlineQueryResultType(v InlineQueryResultType) MethodOption

SetInlineQueryResultType option function

func SetInviteLink(v string) MethodOption

SetInviteLink option function

func SetLanguageCode

func SetLanguageCode(v string) MethodOption

SetLanguageCode option function

func SetLastName

func SetLastName(v string) MethodOption

SetLastName option function

func SetLatitude

func SetLatitude(v float32) MethodOption

SetLatitude option function

func SetLimit

func SetLimit(v int) MethodOption

SetLimit option function

func SetLivePeriod

func SetLivePeriod(v int) MethodOption

SetLivePeriod option function

func SetLongitude

func SetLongitude(v float32) MethodOption

SetLongitude option function

func SetMaskPosition

func SetMaskPosition(v MaskPosition) MethodOption

SetMaskPosition option function

func SetMaxConnections

func SetMaxConnections(v int) MethodOption

SetMaxConnections option function

func SetMaxTipAmount

func SetMaxTipAmount(v int) MethodOption

SetMaxTipAmount option function

func SetMedia

func SetMedia(v ...InputMedia) MethodOption

SetMedia option function

func SetMemberLimit

func SetMemberLimit(v int) MethodOption

SetMemberLimit option function

func SetMenuButton

func SetMenuButton(v MenuButton) MethodOption

SetMenuButton option function

func SetMessageID

func SetMessageID(v int) MethodOption

SetMessageID option function

func SetName

func SetName(v string) MethodOption

SetName option function

func SetNextOffset

func SetNextOffset(v string) MethodOption

SetNextOffset option function

func SetOffset

func SetOffset(v int) MethodOption

SetOffset option function

func SetOpenPeriod

func SetOpenPeriod(v int) MethodOption

SetOpenPeriod option function

func SetOptions

func SetOptions(v ...string) MethodOption

SetOptions option function

func SetPNGSticker

func SetPNGSticker(v InputFile) MethodOption

SetPNGSticker option function

func SetPNGStickerFromFileID

func SetPNGStickerFromFileID(v string) MethodOption

SetPNGStickerFromFileID option function

func SetPNGStickerFromURL

func SetPNGStickerFromURL(v string) MethodOption

SetPNGStickerFromURL option function

func SetParseMode

func SetParseMode(v string) MethodOption

SetParseMode option function

func SetPayload

func SetPayload(v string) MethodOption

SetPayload option function

func SetPerformer

func SetPerformer(v string) MethodOption

SetPerformer option function

func SetPermissions

func SetPermissions(v ChatPermissions) MethodOption

SetPermissions option function

func SetPhoneNumber

func SetPhoneNumber(v string) MethodOption

SetPhoneNumber option function

func SetPhoto

func SetPhoto(v InputFile) MethodOption

SetPhoto option function

func SetPhotoFromFileID

func SetPhotoFromFileID(v string) MethodOption

SetPhotoFromFileID option function

func SetPhotoFromURL

func SetPhotoFromURL(v string) MethodOption

SetPhotoFromURL option function

func SetPhotoHeight

func SetPhotoHeight(v int) MethodOption

SetPhotoHeight option function

func SetPhotoSize

func SetPhotoSize(v int) MethodOption

SetPhotoSize option function

func SetPhotoURL

func SetPhotoURL(v string) MethodOption

SetPhotoURL option function

func SetPhotoWidth

func SetPhotoWidth(v int) MethodOption

SetPhotoWidth option function

func SetPrices

func SetPrices(v ...LabeledPrice) MethodOption

SetPrices option function

func SetProviderData

func SetProviderData(v string) MethodOption

SetProviderData option function

func SetProviderToken

func SetProviderToken(v string) MethodOption

SetProviderToken option function

func SetProximityAlertRadius

func SetProximityAlertRadius(v int) MethodOption

SetProximityAlertRadius option function

func SetQuestion

func SetQuestion(v string) MethodOption

SetQuestion option function

func SetReplyMarkup

func SetReplyMarkup(v interface{}) MethodOption

SetReplyMarkup option function

func SetReplyToMessageID

func SetReplyToMessageID(v int) MethodOption

SetReplyToMessageID option function

func SetResults

func SetResults(v []InlineQueryResult) MethodOption

SetResults option function

func SetRights

SetRights option function

func SetScope

func SetScope(v BotCommandScope) MethodOption

SetScope option function

func SetSenderChatID

func SetSenderChatID(v int) MethodOption

SetSenderChatID option function

func SetStartParameter

func SetStartParameter(v string) MethodOption

SetStartParameter option function

func SetStickerSetName

func SetStickerSetName(v string) MethodOption

SetStickerSetName option function

func SetSuggestedTipAmounts

func SetSuggestedTipAmounts(v ...int) MethodOption

SetSuggestedTipAmounts option function

func SetSwitchPMParameter

func SetSwitchPMParameter(v string) MethodOption

SetSwitchPMParameter option function

func SetSwitchPMText

func SetSwitchPMText(v string) MethodOption

SetSwitchPMText option function

func SetTGSSticker

func SetTGSSticker(v InputFile) MethodOption

SetTGSSticker option function

func SetText

func SetText(v string) MethodOption

SetText option function

func SetThumb

func SetThumb(v InputFile) MethodOption

SetThumb option function

func SetTimeout

func SetTimeout(v int) MethodOption

SetTimeout option function

func SetTitle

func SetTitle(v string) MethodOption

SetTitle option function

func SetType

func SetType(v string) MethodOption

SetType option function

func SetURL

func SetURL(v string) MethodOption

SetURL option function

func SetUntilDate

func SetUntilDate(v int) MethodOption

SetUntilDate option function

func SetUserID

func SetUserID(v int64) MethodOption

SetUserID option function

func SetVCard

func SetVCard(v string) MethodOption

SetVCard option function

func SetVideo

func SetVideo(v InputFile) MethodOption

SetVideo option function

func SetVideoFromFileID

func SetVideoFromFileID(v string) MethodOption

SetVideoFromFileID option function

func SetVideoFromURL

func SetVideoFromURL(v string) MethodOption

SetVideoFromURL option function

func SetVideoNote

func SetVideoNote(v InputFile) MethodOption

SetVideoNote option function

func SetVideoNoteFromFileID

func SetVideoNoteFromFileID(v string) MethodOption

SetVideoNoteFromFileID option function

func SetVideoNoteFromURL

func SetVideoNoteFromURL(v string) MethodOption

SetVideoNoteFromURL option function

func SetVoice

func SetVoice(v InputFile) MethodOption

SetVoice option function

func SetVoiceFromFileID

func SetVoiceFromFileID(v string) MethodOption

SetVoiceFromFileID option function

func SetVoiceFromURL

func SetVoiceFromURL(v string) MethodOption

SetVoiceFromURL option function

func SetWebAppQueryID

func SetWebAppQueryID(v string) MethodOption

SetWebAppQueryID option function

func SetWidth

func SetWidth(v string) MethodOption

SetWidth option function

func ShowAlert

func ShowAlert() MethodOption

ShowAlert option function

func SupportsStreaming

func SupportsStreaming() MethodOption

SupportsStreaming option function

type OrderInfo

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

OrderInfo struct

type PassportData

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

PassportData struct

type PassportElementError

type PassportElementError interface{}

PassportElementError interface

type PassportElementErrorDataField

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

PassportElementErrorDataField struct

type PassportElementErrorFile

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

PassportElementErrorFile struct

type PassportElementErrorFiles

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

PassportElementErrorFiles struct

type PassportElementErrorFrontSide

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

PassportElementErrorFrontSide struct

type PassportElementErrorReverseSide

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

PassportElementErrorReverseSide struct

type PassportElementErrorSelfie

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

PassportElementErrorSelfie struct

type PassportElementErrorTranslationFile

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

PassportElementErrorTranslationFile struct

type PassportElementErrorTranslationFiles

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

PassportElementErrorTranslationFiles struct

type PassportElementErrorUnspecified

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

PassportElementErrorUnspecified struct

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 struct

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,omitempty"`
}

PhotoSize struct.

type PinChatMessageResponse

type PinChatMessageResponse interface {
	Response
}

PinChatMessageResponse interface

type Poll

type Poll struct {
	ID                    string          `json:"id"`
	Question              string          `json:"question"`
	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 struct

type PollAnswer

type PollAnswer struct {
	PollID    string `json:"poll_id"`
	User      User   `json:"user"`
	OptionIDs []int  `json:"option_ids"`
}

PollAnswer struct

type PollOption

type PollOption struct {
	Text       string `json:"text"`
	VoterCount int    `json:"voter_count"`
}

PollOption struct

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"`
	OrderInfo        *OrderInfo `json:"order_info"`
}

PreCheckoutQuery struct

type PromoteChatMemberResponse

type PromoteChatMemberResponse interface {
	Response
}

PromoteChatMemberResponse interface

type ProximityAlertTriggered

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

ProximityAlertTriggered struct

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	Keyboard              [][]KeyboardButton `json:"keyboard"`                          // Array of button rows, each represented by an Array of KeyboardButton objects
	ResizeKeyboard        *bool              `json:"resize_keyboard,omitempty"`         // Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
	OneTimeKeyboard       *bool              `json:"one_time_keyboard,omitempty"`       // Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.
	InputFieldPlaceholder *string            `json:"input_field_placeholder,omitempty"` // Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters
	Selective             *bool              `json:"selective,omitempty"`               // Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
}

ReplyKeyboardMarkup struct

type ReplyKeyboardRemove

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

ReplyKeyboardRemove struct

type Response

type Response interface {
	IsOK() bool
	GetErrorCode() int
	GetDescription() string
	GetParameters() *ResponseParameters
}

Response general interface

type ResponseParameters

type ResponseParameters struct {
	MigrateToChatID *int64 `json:"migrate_to_chat_id,omitempty"`
	RetryAfter      *int   `json:"retry_after,omitempty"`
}

ResponseParameters struct

type RestrictChatMemberResponse

type RestrictChatMemberResponse interface {
	Response
}

RestrictChatMemberResponse interface

type RevokeChatInviteLinkResponse

type RevokeChatInviteLinkResponse interface {
	Response
	GetRevokedInviteLink() ChatInviteLink
}

RevokeChatInviteLinkResponse interface

type SendAnimationResponse

type SendAnimationResponse interface {
	Response
	GetMessage() *Message
}

SendAnimationResponse interface

type SendAudioResponse

type SendAudioResponse interface {
	Response
	GetMessage() *Message
}

SendAudioResponse interface

type SendChatActionResponse

type SendChatActionResponse interface {
	Response
}

SendChatActionResponse interface

type SendContactResponse

type SendContactResponse interface {
	Response
	GetMessage() *Message
}

SendContactResponse interface

type SendDiceResponse

type SendDiceResponse interface {
	Response
}

SendDiceResponse interface

type SendDocumentResponse

type SendDocumentResponse interface {
	Response
	GetMessage() *Message
}

SendDocumentResponse interface

type SendGameResponse

type SendGameResponse interface {
	Response
	GetMessage() *Message
}

SendGameResponse interface

type SendInvoiceResponse

type SendInvoiceResponse interface {
	Response
	GetMessage() *Message
}

SendInvoiceResponse interface

type SendLocationResponse

type SendLocationResponse interface {
	Response
	GetMessage() *Message
}

SendLocationResponse interface

type SendMediaGroupResponse

type SendMediaGroupResponse interface {
	Response
	GetMessage() *Message
}

SendMediaGroupResponse interface

type SendMessageResponse

type SendMessageResponse interface {
	Response
	GetMessage() *Message
}

SendMessageResponse interface.

type SendPhotoResponse

type SendPhotoResponse interface {
	Response
	GetMessage() *Message
}

SendPhotoResponse interface

type SendPollResponse

type SendPollResponse interface {
	Response
	GetMessage() *Message
}

SendPollResponse interface

type SendStickerResponse

type SendStickerResponse interface {
	Response
	GetMessage() *Message
}

SendStickerResponse interface

type SendVenueResponse

type SendVenueResponse interface {
	Response
	GetMessage() *Message
}

SendVenueResponse interface

type SendVideoNoteResponse

type SendVideoNoteResponse interface {
	Response
	GetMessage() *Message
}

SendVideoNoteResponse interface

type SendVideoResponse

type SendVideoResponse interface {
	Response
	GetMessage() *Message
}

SendVideoResponse interface

type SendVoiceResponse

type SendVoiceResponse interface {
	Response
	GetMessage() *Message
}

SendVoiceResponse interface

type SentWebAppMessage

type SentWebAppMessage struct {
	InlineMessageID *string `json:"inline_message_id,omitempty"` // Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.
}

SentWebAppMessage describes an inline message sent by a Web App on behalf of a user.

type SetChatAdministratorCustomTitleResponse

type SetChatAdministratorCustomTitleResponse interface {
	Response
}

SetChatAdministratorCustomTitleResponse interface

type SetChatDescriptionResponse

type SetChatDescriptionResponse interface {
	Response
}

SetChatDescriptionResponse interface

type SetChatMenuButtonResponse

type SetChatMenuButtonResponse interface {
	Response
}

SetChatMenuButtonResponse interface

type SetChatPermissionsResponse

type SetChatPermissionsResponse interface {
	Response
}

SetChatPermissionsResponse interface

type SetChatPhotoResponse

type SetChatPhotoResponse interface {
	Response
}

SetChatPhotoResponse interface

type SetChatStickerSetResponse

type SetChatStickerSetResponse interface {
	Response
}

SetChatStickerSetResponse interface

type SetChatTitleResponse

type SetChatTitleResponse interface {
	Response
}

SetChatTitleResponse interface

type SetGameScoreResponse

type SetGameScoreResponse interface {
	Response
	GetEditedMessage() *Message
}

SetGameScoreResponse interface

type SetMyCommandsResponse

type SetMyCommandsResponse interface {
	Response
}

SetMyCommandsResponse interface

type SetMyDefaultAdministratorRightsResponse

type SetMyDefaultAdministratorRightsResponse interface {
	Response
}

SetMyDefaultAdministratorRightsResponse interface

type SetPassportDataErrorsResponse

type SetPassportDataErrorsResponse interface {
	Response
}

SetPassportDataErrorsResponse interface

type SetStickerPositionInSetResponse

type SetStickerPositionInSetResponse interface {
	Response
}

SetStickerPositionInSetResponse interface

type SetStickerSetThumbResponse

type SetStickerSetThumbResponse interface {
	Response
}

SetStickerSetThumbResponse interface

type SetWebhookResponse

type SetWebhookResponse interface {
	Response
}

SetWebhookResponse interface.

type ShippingAddress

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

ShippingAddress struct

type ShippingOption

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

ShippingOption struct

type ShippingQuery

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

ShippingQuery struct

type Sticker

type Sticker struct {
	FileID       string        `json:"file_id"`
	FileUniqueID string        `json:"file_unique_id"`
	Width        int           `json:"width"`
	Height       int           `json:"height"`
	IsAnimated   bool          `json:"is_animated"`
	IsVideo      bool          `json:"is_video"`
	Thumb        *PhotoSize    `json:"thumb,omitempty"`
	Emoji        *string       `json:"emoji,omitempty"`
	SetName      *string       `json:"set_name,omitempty"`
	MaskPosition *MaskPosition `json:"mask_position,omitempty"`
	FileSize     *int          `json:"file_size,omitempty"`
}

Sticker struct

type StickerSet

type StickerSet struct {
	Name          string     `json:"name"`
	Title         string     `json:"title"`
	IsAnimated    bool       `json:"is_animated"`
	IsVideo       bool       `json:"is_video"`
	ContainsMasks bool       `json:"contains_masks"`
	Stickers      []Sticker  `json:"stickers"`
	Thumb         *PhotoSize `json:"thumb,omitempty"`
}

StickerSet struct

type StopMessageLiveLocationResponse

type StopMessageLiveLocationResponse interface {
	Response
	GetMessage() *Message
}

StopMessageLiveLocationResponse interface

type StopPollResponse

type StopPollResponse interface {
	Response
	GetStoppedPoll() *Poll
}

StopPollResponse interface

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
}

SuccessfulPayment struct

type UnbanChatMemberResponse

type UnbanChatMemberResponse interface {
	Response
}

UnbanChatMemberResponse interface

type UnbanChatSenderChatResponse

type UnbanChatSenderChatResponse interface {
	Response
}

UnbanChatSenderChatResponse interface

type UnpinAllChatMessagesResponse

type UnpinAllChatMessagesResponse interface {
	Response
}

UnpinAllChatMessagesResponse interface

type UnpinChatMessageResponse

type UnpinChatMessageResponse interface {
	Response
}

UnpinChatMessageResponse interface

type Update

type Update struct {
	UpdateID           int                 `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"`
	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"`
	MyChatMember       *ChatMemberUpdated  `json:"my_chat_member,omitempty"`
	ChatMember         *ChatMemberUpdated  `json:"chat_member,omitempty"`
	ChatJoinRequest    *ChatJoinRequest    `json:"chat_join_request,omitempty"`
}

Update struct.

type UploadStickerFileResponse

type UploadStickerFileResponse interface {
	Response
	GetUploadedFile() *File
}

UploadStickerFileResponse interface

type User

type User struct {
	ID                      int64   `json:"id"`
	IsBot                   bool    `json:"is_bot"`
	FirstName               string  `json:"first_name"`
	LastName                *string `json:"last_name,omitempty"`
	Username                *string `json:"username,omitempty"`
	LanguageCode            *string `json:"language_code,omitempty"`
	CanJoinGroups           *bool   `json:"can_join_groups,omitempty"`
	CanReadAllGroupMessages *bool   `json:"can_read_all_group_messages,omitempty"`
	SupportsInlineQueries   *bool   `json:"supports_inline_queries,omitempty"`
}

User struct.

type UserProfilePhotos

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

UserProfilePhotos struct

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 struct

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"`
	Thumb        *PhotoSize `json:"thumb,omitempty"`
	FileName     *string    `json:"file_name,omitempty"`
	MimeType     *string    `json:"mime_type,omitempty"`
	FileSize     *int       `json:"file_size,omitempty"`
}

Video struct

type VideoChatEnded

type VideoChatEnded struct {
	Duration int `json:"duration"` // Voice chat duration; in seconds
}

VideoChatEnded struct

type VideoChatParticipantsInvited

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

VideoChatParticipantsInvited struct

type VideoChatScheduled

type VideoChatScheduled struct {
	StartDate int `json:"start_date"` // Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator
}

VideoChatScheduled represents a service message about a voice chat scheduled in the chat.

type VideoChatStarted

type VideoChatStarted struct{}

VideoChatStarted struct

type VideoNote

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

VideoNote struct

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     *int    `json:"file_size,omitempty"`
}

Voice struct

type VoiceChatEnded

type VoiceChatEnded struct {
	Duration int `json:"duration"` // Voice chat duration; in seconds
}

VoiceChatEnded struct Deprecated

type VoiceChatParticipantsInvited

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

VoiceChatParticipantsInvited struct Deprecated

type VoiceChatScheduled

type VoiceChatScheduled struct {
	StartDate int `json:"start_date"` // Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator
}

VoiceChatScheduled represents a service message about a voice chat scheduled in the chat. Deprecated

type VoiceChatStarted

type VoiceChatStarted struct{}

VoiceChatStarted struct Deprecated

type WebAppData

type WebAppData struct {
	Data       string `json:"data"`        // The data. Be aware that a bad client can send arbitrary data in this field.
	ButtonText string `json:"button_text"` // Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.
}

WebAppData describes data sent from a Web App to the bot.

type WebAppInfo

type WebAppInfo struct {
	URL string `json:"url"` // An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps (https://core.telegram.org/bots/webapps#initializing-web-apps)
}

WebAppInfo struct

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"`
	LastSynchronizationError *int     `json:"last_synchronization_error_date,omitempty"` // Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters
	MaxConnections           *int     `json:"max_connections,omitempty"`
	AllowedUpdates           []string `json:"allowed_updates,omitempty"`
}

WebhookInfo struct.

Jump to

Keyboard shortcuts

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