tgbot

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 18 Imported by: 0

README

tgbot

CI Go Version Go Reference

English | 简体中文 | Español | 日本語

Web documentation: https://tgbot.bestcheapvps.org

A lightweight, strongly typed Telegram Bot API SDK for Go with zero third-party runtime dependencies.

tgbot is an open-source Go SDK for building Telegram bots with clean abstractions, full Bot API coverage, typed union decoding, webhook support, and production-friendly long polling.

Why tgbot?

  • Full Telegram Bot API method and type coverage
  • Strongly typed union decoding for polymorphic Telegram fields and results
  • Zero third-party runtime dependencies (standard library only)
  • File upload helpers for file_id, URL, local path, and io.Reader
  • Opt-in retries with bounded backoff, Telegram retry_after, and safe request telemetry
  • Async long polling with channel subscriptions and bounded application dispatch
  • PTB-style routing groups, middleware, priorities, filters, and propagation control in ext
  • Fixed-size dispatcher workers with queue backpressure and explicit shutdown
  • Standard-library test helpers in tgutil and tgbottest

Quick Start

package main

import (
    "context"
    "log"

    "github.com/cloudapp3/tgbot"
)

func main() {
    bot, err := tgbot.NewBot("<BOT_TOKEN>")
    if err != nil {
        log.Fatal(err)
    }

    _, err = bot.SendMessage(context.Background(), &tgbot.SendMessageParams{
        ChatID: int64(123456789),
        Text:   "hello from tgbot",
    })
    if err != nil {
        log.Fatal(err)
    }
}

Install

go get github.com/cloudapp3/tgbot

Request Governance

Requests are attempted exactly once by default. Retries are explicit because a lost response from a side-effecting Telegram method can make a retry duplicate the operation.

bot, err := tgbot.NewBot(
    "<BOT_TOKEN>",
    tgbot.WithRetryPolicy(tgbot.ExponentialRetryPolicy{
        MaxAttempts:  3,
        InitialDelay: 200 * time.Millisecond,
        MaxDelay:     5 * time.Second,
        Jitter:       0.2,
    }),
    tgbot.WithRequestObserver(func(event tgbot.RequestEvent) {
        log.Printf("method=%s attempt=%d status=%d api_code=%d duration=%s err=%v",
            event.Method, event.Attempt, event.StatusCode, event.APIErrorCode, event.Duration, event.Err)
    }),
)

Observer and debug logger events exclude the bot token, request URL, parameters, and body. Arbitrary InputFile.Reader uploads are never retried; JSON, file ID, URL, and local-path requests can be rebuilt for another attempt.

Webhook Routing (ext)

package main

import (
    "context"
    "net/http"
    "time"

    "github.com/cloudapp3/tgbot"
    "github.com/cloudapp3/tgbot/ext"
)

func main() {
    bot, _ := tgbot.NewBot("<BOT_TOKEN>")
    app, _ := ext.NewApplication(bot)

    app.AddHandler(ext.NewCommandHandler("start", func(ctx context.Context, c *ext.Context) error {
        msg := c.EffectiveMessage()
        if msg == nil || msg.Chat == nil {
            return nil
        }
        _, err := c.Bot.SendMessage(ctx, &tgbot.SendMessageParams{
            ChatID: msg.Chat.ID,
            Text:   "welcome",
        })
        return err
    }))

    mux := http.NewServeMux()
    mux.Handle("/telegram/webhook", app.WebhookHandler("<SECRET_TOKEN>"))
    server := &http.Server{
        Addr:              ":8080",
        Handler:           mux,
        ReadHeaderTimeout: 5 * time.Second,
        ReadTimeout:       15 * time.Second,
        WriteTimeout:      45 * time.Second,
        IdleTimeout:       60 * time.Second,
    }
    _ = server.ListenAndServe()
}

For bounded concurrent processing or enqueue-first webhook acknowledgement, use an explicitly owned ext.Dispatcher. Queue saturation and closed dispatchers return 503 in AckAfterEnqueue mode. See ext/README.md.

Test Helpers

  • tgutil provides small message, upload, button, and keyboard constructors.
  • tgbottest.NewServer provides a concurrency-safe fake Telegram API with FIFO responses and isolated JSON/multipart request snapshots.

Examples

  • examples/quickstart
  • examples/webhook
  • examples/commands
  • examples/async_updates
  • examples/ext_polling

Official Coverage

This SDK is verified against the official Telegram Bot API documentation at https://core.telegram.org/bots/api. As of 2026-07-19, the latest official release on that page is Bot API 10.2, published on July 14, 2026.

The machine-readable api/telegram-bot-api.json pins the source snapshot path, release identity, fetch date, and compressed and decompressed SHA-256 digests.

./scripts/check_generated.sh
go run ./cmd/apicheck

Sync SDK Definitions

go run ./cmd/apigen

If you already downloaded the official HTML page:

go run ./cmd/apigen -html /tmp/telegram_bot_api.html

Key files:

  • sdk_types.go
  • sdk_methods.go
  • sdk_unions.go

Development

go test ./...
go test -race ./...
go vet ./...
python3 -m unittest discover -s scripts -p '*_test.py' -v
./scripts/check_generated.sh
go run ./cmd/apicheck

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

AllUpdateTypes lists every currently supported Telegram update type.

Functions

func IsTooManyRequests

func IsTooManyRequests(err error) bool

IsTooManyRequests reports whether an error is a Telegram 429 rate-limit error.

func ParseCommand

func ParseCommand(text string) (command string, args string, ok bool)

ParseCommand parses Telegram-style command text like "/start arg".

Types

type APIError

type APIError struct {
	StatusCode int
	Code       int
	Message    string
	RetryAfter int
	Parameters *ResponseParameters
}

APIError wraps Telegram API failures.

func (*APIError) Error

func (value *APIError) Error() string

type APIResponse

type APIResponse struct {
	OK          bool                `json:"ok"`
	Result      json.RawMessage     `json:"result,omitempty"`
	ErrorCode   int                 `json:"error_code,omitempty"`
	Description string              `json:"description,omitempty"`
	Parameters  *ResponseParameters `json:"parameters,omitempty"`
}

APIResponse is the Telegram Bot API response envelope.

type AcceptedGiftTypes

type AcceptedGiftTypes struct {
	UnlimitedGifts      bool `json:"unlimited_gifts"`
	LimitedGifts        bool `json:"limited_gifts"`
	UniqueGifts         bool `json:"unique_gifts"`
	PremiumSubscription bool `json:"premium_subscription"`
	GiftsFromChannels   bool `json:"gifts_from_channels"`
}

AcceptedGiftTypes maps to Telegram Bot API type "AcceptedGiftTypes".

type AddStickerToSetParams

type AddStickerToSetParams struct {
	UserID  int64        `json:"user_id"`
	Name    string       `json:"name"`
	Sticker InputSticker `json:"sticker"`
}

AddStickerToSetParams contains params for Telegram method "addStickerToSet".

type AffiliateInfo

type AffiliateInfo struct {
	AffiliateUser      *User `json:"affiliate_user,omitempty"`
	AffiliateChat      *Chat `json:"affiliate_chat,omitempty"`
	CommissionPerMille int64 `json:"commission_per_mille"`
	Amount             int64 `json:"amount"`
	NanostarAmount     int64 `json:"nanostar_amount,omitempty"`
}

AffiliateInfo maps to Telegram Bot API type "AffiliateInfo".

type Animation

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

Animation maps to Telegram Bot API type "Animation".

type AnswerCallbackQueryParams

type AnswerCallbackQueryParams struct {
	CallbackQueryID string `json:"callback_query_id"`
	Text            string `json:"text,omitempty"`
	ShowAlert       bool   `json:"show_alert,omitempty"`
	URL             string `json:"url,omitempty"`
	CacheTime       int64  `json:"cache_time,omitempty"`
}

AnswerCallbackQueryParams contains params for Telegram method "answerCallbackQuery".

type AnswerChatJoinRequestQueryParams added in v0.2.0

type AnswerChatJoinRequestQueryParams struct {
	ChatJoinRequestQueryID string `json:"chat_join_request_query_id"`
	Result                 string `json:"result"`
}

AnswerChatJoinRequestQueryParams contains params for Telegram method "answerChatJoinRequestQuery".

type AnswerGuestQueryParams added in v0.2.0

type AnswerGuestQueryParams struct {
	GuestQueryID string            `json:"guest_query_id"`
	Result       InlineQueryResult `json:"result"`
}

AnswerGuestQueryParams contains params for Telegram method "answerGuestQuery".

type AnswerInlineQueryParams

type AnswerInlineQueryParams struct {
	InlineQueryID string                   `json:"inline_query_id"`
	Results       []InlineQueryResult      `json:"results"`
	CacheTime     int64                    `json:"cache_time,omitempty"`
	IsPersonal    bool                     `json:"is_personal,omitempty"`
	NextOffset    string                   `json:"next_offset,omitempty"`
	Button        InlineQueryResultsButton `json:"button,omitempty"`
}

AnswerInlineQueryParams contains params for Telegram method "answerInlineQuery".

type AnswerPreCheckoutQueryParams

type AnswerPreCheckoutQueryParams struct {
	PreCheckoutQueryID string `json:"pre_checkout_query_id"`
	Ok                 bool   `json:"ok"`
	ErrorMessage       string `json:"error_message,omitempty"`
}

AnswerPreCheckoutQueryParams contains params for Telegram method "answerPreCheckoutQuery".

type AnswerShippingQueryParams

type AnswerShippingQueryParams struct {
	ShippingQueryID string           `json:"shipping_query_id"`
	Ok              bool             `json:"ok"`
	ShippingOptions []ShippingOption `json:"shipping_options,omitempty"`
	ErrorMessage    string           `json:"error_message,omitempty"`
}

AnswerShippingQueryParams contains params for Telegram method "answerShippingQuery".

type AnswerWebAppQueryParams

type AnswerWebAppQueryParams struct {
	WebAppQueryID string            `json:"web_app_query_id"`
	Result        InlineQueryResult `json:"result"`
}

AnswerWebAppQueryParams contains params for Telegram method "answerWebAppQuery".

type ApproveChatJoinRequestParams

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

ApproveChatJoinRequestParams contains params for Telegram method "approveChatJoinRequest".

type ApproveSuggestedPostParams

type ApproveSuggestedPostParams struct {
	ChatID    int64 `json:"chat_id"`
	MessageID int64 `json:"message_id"`
	SendDate  int64 `json:"send_date,omitempty"`
}

ApproveSuggestedPostParams contains params for Telegram method "approveSuggestedPost".

type Audio

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

Audio maps to Telegram Bot API type "Audio".

type BackgroundFill

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

BackgroundFill is a union type in Telegram Bot API.

type BackgroundFillFreeformGradient

type BackgroundFillFreeformGradient struct {
	Type   string  `json:"type"`
	Colors []int64 `json:"colors"`
}

BackgroundFillFreeformGradient maps to Telegram Bot API type "BackgroundFillFreeformGradient".

type BackgroundFillGradient

type BackgroundFillGradient struct {
	Type          string `json:"type"`
	TopColor      int64  `json:"top_color"`
	BottomColor   int64  `json:"bottom_color"`
	RotationAngle int64  `json:"rotation_angle"`
}

BackgroundFillGradient maps to Telegram Bot API type "BackgroundFillGradient".

type BackgroundFillSolid

type BackgroundFillSolid struct {
	Type  string `json:"type"`
	Color int64  `json:"color"`
}

BackgroundFillSolid maps to Telegram Bot API type "BackgroundFillSolid".

type BackgroundType

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

BackgroundType is a union type in Telegram Bot API.

type BackgroundTypeChatTheme

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

BackgroundTypeChatTheme maps to Telegram Bot API type "BackgroundTypeChatTheme".

type BackgroundTypeFill

type BackgroundTypeFill struct {
	Type             string         `json:"type"`
	Fill             BackgroundFill `json:"fill"`
	DarkThemeDimming int64          `json:"dark_theme_dimming"`
}

BackgroundTypeFill maps to Telegram Bot API type "BackgroundTypeFill".

func (*BackgroundTypeFill) UnmarshalJSON

func (value *BackgroundTypeFill) UnmarshalJSON(data []byte) error

type BackgroundTypePattern

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

BackgroundTypePattern maps to Telegram Bot API type "BackgroundTypePattern".

func (*BackgroundTypePattern) UnmarshalJSON

func (value *BackgroundTypePattern) UnmarshalJSON(data []byte) error

type BackgroundTypeWallpaper

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

BackgroundTypeWallpaper maps to Telegram Bot API type "BackgroundTypeWallpaper".

type BanChatMemberParams

type BanChatMemberParams struct {
	ChatID         any   `json:"chat_id"`
	UserID         int64 `json:"user_id"`
	UntilDate      int64 `json:"until_date,omitempty"`
	RevokeMessages bool  `json:"revoke_messages,omitempty"`
}

BanChatMemberParams contains params for Telegram method "banChatMember".

type BanChatSenderChatParams

type BanChatSenderChatParams struct {
	ChatID       any   `json:"chat_id"`
	SenderChatID int64 `json:"sender_chat_id"`
}

BanChatSenderChatParams contains params for Telegram method "banChatSenderChat".

type Birthdate

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

Birthdate maps to Telegram Bot API type "Birthdate".

type Bot

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

Bot is a generic Telegram Bot API client used by API wrappers.

func NewBot

func NewBot(token string, opts ...BotOption) (*Bot, error)

NewBot creates a new Telegram Bot API client.

func (*Bot) AddStickerToSet

func (bot *Bot) AddStickerToSet(ctx context.Context, params *AddStickerToSetParams) (bool, error)

AddStickerToSet calls Telegram method "addStickerToSet". Doc: https://core.telegram.org/bots/api#addstickertoset

func (*Bot) AnswerCallbackQuery

func (bot *Bot) AnswerCallbackQuery(ctx context.Context, params *AnswerCallbackQueryParams) (bool, error)

AnswerCallbackQuery calls Telegram method "answerCallbackQuery". Doc: https://core.telegram.org/bots/api#answercallbackquery

func (*Bot) AnswerChatJoinRequestQuery added in v0.2.0

func (bot *Bot) AnswerChatJoinRequestQuery(ctx context.Context, params *AnswerChatJoinRequestQueryParams) (bool, error)

AnswerChatJoinRequestQuery calls Telegram method "answerChatJoinRequestQuery". Doc: https://core.telegram.org/bots/api#answerchatjoinrequestquery

func (*Bot) AnswerGuestQuery added in v0.2.0

func (bot *Bot) AnswerGuestQuery(ctx context.Context, params *AnswerGuestQueryParams) (SentGuestMessage, error)

AnswerGuestQuery calls Telegram method "answerGuestQuery". Doc: https://core.telegram.org/bots/api#answerguestquery

func (*Bot) AnswerInlineQuery

func (bot *Bot) AnswerInlineQuery(ctx context.Context, params *AnswerInlineQueryParams) (bool, error)

AnswerInlineQuery calls Telegram method "answerInlineQuery". Doc: https://core.telegram.org/bots/api#answerinlinequery

func (*Bot) AnswerPreCheckoutQuery

func (bot *Bot) AnswerPreCheckoutQuery(ctx context.Context, params *AnswerPreCheckoutQueryParams) (bool, error)

AnswerPreCheckoutQuery calls Telegram method "answerPreCheckoutQuery". Doc: https://core.telegram.org/bots/api#answerprecheckoutquery

func (*Bot) AnswerShippingQuery

func (bot *Bot) AnswerShippingQuery(ctx context.Context, params *AnswerShippingQueryParams) (bool, error)

AnswerShippingQuery calls Telegram method "answerShippingQuery". Doc: https://core.telegram.org/bots/api#answershippingquery

func (*Bot) AnswerWebAppQuery

func (bot *Bot) AnswerWebAppQuery(ctx context.Context, params *AnswerWebAppQueryParams) (SentWebAppMessage, error)

AnswerWebAppQuery calls Telegram method "answerWebAppQuery". Doc: https://core.telegram.org/bots/api#answerwebappquery

func (*Bot) ApproveChatJoinRequest

func (bot *Bot) ApproveChatJoinRequest(ctx context.Context, params *ApproveChatJoinRequestParams) (bool, error)

ApproveChatJoinRequest calls Telegram method "approveChatJoinRequest". Doc: https://core.telegram.org/bots/api#approvechatjoinrequest

func (*Bot) ApproveSuggestedPost

func (bot *Bot) ApproveSuggestedPost(ctx context.Context, params *ApproveSuggestedPostParams) (bool, error)

ApproveSuggestedPost calls Telegram method "approveSuggestedPost". Doc: https://core.telegram.org/bots/api#approvesuggestedpost

func (*Bot) BanChatMember

func (bot *Bot) BanChatMember(ctx context.Context, params *BanChatMemberParams) (bool, error)

BanChatMember calls Telegram method "banChatMember". Doc: https://core.telegram.org/bots/api#banchatmember

func (*Bot) BanChatSenderChat

func (bot *Bot) BanChatSenderChat(ctx context.Context, params *BanChatSenderChatParams) (bool, error)

BanChatSenderChat calls Telegram method "banChatSenderChat". Doc: https://core.telegram.org/bots/api#banchatsenderchat

func (*Bot) Call

func (bot *Bot) Call(ctx context.Context, method string, params any, result any) error

Call sends a Telegram method call and decodes the result into result.

func (*Bot) Close

func (bot *Bot) Close(ctx context.Context, params *CloseParams) (bool, error)

Close calls Telegram method "close". Doc: https://core.telegram.org/bots/api#close

func (*Bot) CloseForumTopic

func (bot *Bot) CloseForumTopic(ctx context.Context, params *CloseForumTopicParams) (bool, error)

CloseForumTopic calls Telegram method "closeForumTopic". Doc: https://core.telegram.org/bots/api#closeforumtopic

func (*Bot) CloseGeneralForumTopic

func (bot *Bot) CloseGeneralForumTopic(ctx context.Context, params *CloseGeneralForumTopicParams) (bool, error)

CloseGeneralForumTopic calls Telegram method "closeGeneralForumTopic". Doc: https://core.telegram.org/bots/api#closegeneralforumtopic

func (*Bot) ConvertGiftToStars

func (bot *Bot) ConvertGiftToStars(ctx context.Context, params *ConvertGiftToStarsParams) (bool, error)

ConvertGiftToStars calls Telegram method "convertGiftToStars". Doc: https://core.telegram.org/bots/api#convertgifttostars

func (*Bot) CopyMessage

func (bot *Bot) CopyMessage(ctx context.Context, params *CopyMessageParams) (MessageId, error)

CopyMessage calls Telegram method "copyMessage". Doc: https://core.telegram.org/bots/api#copymessage

func (*Bot) CopyMessages

func (bot *Bot) CopyMessages(ctx context.Context, params *CopyMessagesParams) ([]MessageId, error)

CopyMessages calls Telegram method "copyMessages". Doc: https://core.telegram.org/bots/api#copymessages

func (bot *Bot) CreateChatInviteLink(ctx context.Context, params *CreateChatInviteLinkParams) (ChatInviteLink, error)

CreateChatInviteLink calls Telegram method "createChatInviteLink". Doc: https://core.telegram.org/bots/api#createchatinvitelink

func (bot *Bot) CreateChatSubscriptionInviteLink(ctx context.Context, params *CreateChatSubscriptionInviteLinkParams) (ChatInviteLink, error)

CreateChatSubscriptionInviteLink calls Telegram method "createChatSubscriptionInviteLink". Doc: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink

func (*Bot) CreateForumTopic

func (bot *Bot) CreateForumTopic(ctx context.Context, params *CreateForumTopicParams) (ForumTopic, error)

CreateForumTopic calls Telegram method "createForumTopic". Doc: https://core.telegram.org/bots/api#createforumtopic

func (bot *Bot) CreateInvoiceLink(ctx context.Context, params *CreateInvoiceLinkParams) (string, error)

CreateInvoiceLink calls Telegram method "createInvoiceLink". Doc: https://core.telegram.org/bots/api#createinvoicelink

func (*Bot) CreateNewStickerSet

func (bot *Bot) CreateNewStickerSet(ctx context.Context, params *CreateNewStickerSetParams) (bool, error)

CreateNewStickerSet calls Telegram method "createNewStickerSet". Doc: https://core.telegram.org/bots/api#createnewstickerset

func (*Bot) DeclineChatJoinRequest

func (bot *Bot) DeclineChatJoinRequest(ctx context.Context, params *DeclineChatJoinRequestParams) (bool, error)

DeclineChatJoinRequest calls Telegram method "declineChatJoinRequest". Doc: https://core.telegram.org/bots/api#declinechatjoinrequest

func (*Bot) DeclineSuggestedPost

func (bot *Bot) DeclineSuggestedPost(ctx context.Context, params *DeclineSuggestedPostParams) (bool, error)

DeclineSuggestedPost calls Telegram method "declineSuggestedPost". Doc: https://core.telegram.org/bots/api#declinesuggestedpost

func (*Bot) DeleteAllMessageReactions added in v0.2.0

func (bot *Bot) DeleteAllMessageReactions(ctx context.Context, params *DeleteAllMessageReactionsParams) (bool, error)

DeleteAllMessageReactions calls Telegram method "deleteAllMessageReactions". Doc: https://core.telegram.org/bots/api#deleteallmessagereactions

func (*Bot) DeleteBusinessMessages

func (bot *Bot) DeleteBusinessMessages(ctx context.Context, params *DeleteBusinessMessagesParams) (bool, error)

DeleteBusinessMessages calls Telegram method "deleteBusinessMessages". Doc: https://core.telegram.org/bots/api#deletebusinessmessages

func (*Bot) DeleteChatPhoto

func (bot *Bot) DeleteChatPhoto(ctx context.Context, params *DeleteChatPhotoParams) (bool, error)

DeleteChatPhoto calls Telegram method "deleteChatPhoto". Doc: https://core.telegram.org/bots/api#deletechatphoto

func (*Bot) DeleteChatStickerSet

func (bot *Bot) DeleteChatStickerSet(ctx context.Context, params *DeleteChatStickerSetParams) (bool, error)

DeleteChatStickerSet calls Telegram method "deleteChatStickerSet". Doc: https://core.telegram.org/bots/api#deletechatstickerset

func (*Bot) DeleteEphemeralMessage added in v0.2.0

func (bot *Bot) DeleteEphemeralMessage(ctx context.Context, params *DeleteEphemeralMessageParams) (bool, error)

DeleteEphemeralMessage calls Telegram method "deleteEphemeralMessage". Doc: https://core.telegram.org/bots/api#deleteephemeralmessage

func (*Bot) DeleteForumTopic

func (bot *Bot) DeleteForumTopic(ctx context.Context, params *DeleteForumTopicParams) (bool, error)

DeleteForumTopic calls Telegram method "deleteForumTopic". Doc: https://core.telegram.org/bots/api#deleteforumtopic

func (*Bot) DeleteMessage

func (bot *Bot) DeleteMessage(ctx context.Context, params *DeleteMessageParams) (bool, error)

DeleteMessage calls Telegram method "deleteMessage". Doc: https://core.telegram.org/bots/api#deletemessage

func (*Bot) DeleteMessageReaction added in v0.2.0

func (bot *Bot) DeleteMessageReaction(ctx context.Context, params *DeleteMessageReactionParams) (bool, error)

DeleteMessageReaction calls Telegram method "deleteMessageReaction". Doc: https://core.telegram.org/bots/api#deletemessagereaction

func (*Bot) DeleteMessages

func (bot *Bot) DeleteMessages(ctx context.Context, params *DeleteMessagesParams) (bool, error)

DeleteMessages calls Telegram method "deleteMessages". Doc: https://core.telegram.org/bots/api#deletemessages

func (*Bot) DeleteMyCommands

func (bot *Bot) DeleteMyCommands(ctx context.Context, params *DeleteMyCommandsParams) (bool, error)

DeleteMyCommands calls Telegram method "deleteMyCommands". Doc: https://core.telegram.org/bots/api#deletemycommands

func (*Bot) DeleteStickerFromSet

func (bot *Bot) DeleteStickerFromSet(ctx context.Context, params *DeleteStickerFromSetParams) (bool, error)

DeleteStickerFromSet calls Telegram method "deleteStickerFromSet". Doc: https://core.telegram.org/bots/api#deletestickerfromset

func (*Bot) DeleteStickerSet

func (bot *Bot) DeleteStickerSet(ctx context.Context, params *DeleteStickerSetParams) (bool, error)

DeleteStickerSet calls Telegram method "deleteStickerSet". Doc: https://core.telegram.org/bots/api#deletestickerset

func (*Bot) DeleteStory

func (bot *Bot) DeleteStory(ctx context.Context, params *DeleteStoryParams) (bool, error)

DeleteStory calls Telegram method "deleteStory". Doc: https://core.telegram.org/bots/api#deletestory

func (*Bot) DeleteWebhook

func (bot *Bot) DeleteWebhook(ctx context.Context, params *DeleteWebhookParams) (bool, error)

DeleteWebhook calls Telegram method "deleteWebhook". Doc: https://core.telegram.org/bots/api#deletewebhook

func (*Bot) Do

func (bot *Bot) Do(ctx context.Context, method string, params any) (json.RawMessage, error)

Do sends a raw Telegram method call and returns the raw result payload.

func (bot *Bot) EditChatInviteLink(ctx context.Context, params *EditChatInviteLinkParams) (ChatInviteLink, error)

EditChatInviteLink calls Telegram method "editChatInviteLink". Doc: https://core.telegram.org/bots/api#editchatinvitelink

func (bot *Bot) EditChatSubscriptionInviteLink(ctx context.Context, params *EditChatSubscriptionInviteLinkParams) (ChatInviteLink, error)

EditChatSubscriptionInviteLink calls Telegram method "editChatSubscriptionInviteLink". Doc: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink

func (*Bot) EditEphemeralMessageCaption added in v0.2.0

func (bot *Bot) EditEphemeralMessageCaption(ctx context.Context, params *EditEphemeralMessageCaptionParams) (bool, error)

EditEphemeralMessageCaption calls Telegram method "editEphemeralMessageCaption". Doc: https://core.telegram.org/bots/api#editephemeralmessagecaption

func (*Bot) EditEphemeralMessageMedia added in v0.2.0

func (bot *Bot) EditEphemeralMessageMedia(ctx context.Context, params *EditEphemeralMessageMediaParams) (bool, error)

EditEphemeralMessageMedia calls Telegram method "editEphemeralMessageMedia". Doc: https://core.telegram.org/bots/api#editephemeralmessagemedia

func (*Bot) EditEphemeralMessageReplyMarkup added in v0.2.0

func (bot *Bot) EditEphemeralMessageReplyMarkup(ctx context.Context, params *EditEphemeralMessageReplyMarkupParams) (bool, error)

EditEphemeralMessageReplyMarkup calls Telegram method "editEphemeralMessageReplyMarkup". Doc: https://core.telegram.org/bots/api#editephemeralmessagereplymarkup

func (*Bot) EditEphemeralMessageText added in v0.2.0

func (bot *Bot) EditEphemeralMessageText(ctx context.Context, params *EditEphemeralMessageTextParams) (bool, error)

EditEphemeralMessageText calls Telegram method "editEphemeralMessageText". Doc: https://core.telegram.org/bots/api#editephemeralmessagetext

func (*Bot) EditForumTopic

func (bot *Bot) EditForumTopic(ctx context.Context, params *EditForumTopicParams) (bool, error)

EditForumTopic calls Telegram method "editForumTopic". Doc: https://core.telegram.org/bots/api#editforumtopic

func (*Bot) EditGeneralForumTopic

func (bot *Bot) EditGeneralForumTopic(ctx context.Context, params *EditGeneralForumTopicParams) (bool, error)

EditGeneralForumTopic calls Telegram method "editGeneralForumTopic". Doc: https://core.telegram.org/bots/api#editgeneralforumtopic

func (*Bot) EditMessageCaption

func (bot *Bot) EditMessageCaption(ctx context.Context, params *EditMessageCaptionParams) (MessageOrBool, error)

EditMessageCaption calls Telegram method "editMessageCaption". Doc: https://core.telegram.org/bots/api#editmessagecaption

func (*Bot) EditMessageChecklist

func (bot *Bot) EditMessageChecklist(ctx context.Context, params *EditMessageChecklistParams) (Message, error)

EditMessageChecklist calls Telegram method "editMessageChecklist". Doc: https://core.telegram.org/bots/api#editmessagechecklist

func (*Bot) EditMessageLiveLocation

func (bot *Bot) EditMessageLiveLocation(ctx context.Context, params *EditMessageLiveLocationParams) (MessageOrBool, error)

EditMessageLiveLocation calls Telegram method "editMessageLiveLocation". Doc: https://core.telegram.org/bots/api#editmessagelivelocation

func (*Bot) EditMessageMedia

func (bot *Bot) EditMessageMedia(ctx context.Context, params *EditMessageMediaParams) (MessageOrBool, error)

EditMessageMedia calls Telegram method "editMessageMedia". Doc: https://core.telegram.org/bots/api#editmessagemedia

func (*Bot) EditMessageReplyMarkup

func (bot *Bot) EditMessageReplyMarkup(ctx context.Context, params *EditMessageReplyMarkupParams) (MessageOrBool, error)

EditMessageReplyMarkup calls Telegram method "editMessageReplyMarkup". Doc: https://core.telegram.org/bots/api#editmessagereplymarkup

func (*Bot) EditMessageText

func (bot *Bot) EditMessageText(ctx context.Context, params *EditMessageTextParams) (MessageOrBool, error)

EditMessageText calls Telegram method "editMessageText". Doc: https://core.telegram.org/bots/api#editmessagetext

func (*Bot) EditStory

func (bot *Bot) EditStory(ctx context.Context, params *EditStoryParams) (Story, error)

EditStory calls Telegram method "editStory". Doc: https://core.telegram.org/bots/api#editstory

func (*Bot) EditUserStarSubscription

func (bot *Bot) EditUserStarSubscription(ctx context.Context, params *EditUserStarSubscriptionParams) (bool, error)

EditUserStarSubscription calls Telegram method "editUserStarSubscription". Doc: https://core.telegram.org/bots/api#edituserstarsubscription

func (bot *Bot) ExportChatInviteLink(ctx context.Context, params *ExportChatInviteLinkParams) (string, error)

ExportChatInviteLink calls Telegram method "exportChatInviteLink". Doc: https://core.telegram.org/bots/api#exportchatinvitelink

func (*Bot) ForwardMessage

func (bot *Bot) ForwardMessage(ctx context.Context, params *ForwardMessageParams) (Message, error)

ForwardMessage calls Telegram method "forwardMessage". Doc: https://core.telegram.org/bots/api#forwardmessage

func (*Bot) ForwardMessages

func (bot *Bot) ForwardMessages(ctx context.Context, params *ForwardMessagesParams) ([]MessageId, error)

ForwardMessages calls Telegram method "forwardMessages". Doc: https://core.telegram.org/bots/api#forwardmessages

func (*Bot) GetAvailableGifts

func (bot *Bot) GetAvailableGifts(ctx context.Context, params *GetAvailableGiftsParams) (Gifts, error)

GetAvailableGifts calls Telegram method "getAvailableGifts". Doc: https://core.telegram.org/bots/api#getavailablegifts

func (*Bot) GetBusinessAccountGifts

func (bot *Bot) GetBusinessAccountGifts(ctx context.Context, params *GetBusinessAccountGiftsParams) (OwnedGifts, error)

GetBusinessAccountGifts calls Telegram method "getBusinessAccountGifts". Doc: https://core.telegram.org/bots/api#getbusinessaccountgifts

func (*Bot) GetBusinessAccountStarBalance

func (bot *Bot) GetBusinessAccountStarBalance(ctx context.Context, params *GetBusinessAccountStarBalanceParams) (StarAmount, error)

GetBusinessAccountStarBalance calls Telegram method "getBusinessAccountStarBalance". Doc: https://core.telegram.org/bots/api#getbusinessaccountstarbalance

func (*Bot) GetBusinessConnection

func (bot *Bot) GetBusinessConnection(ctx context.Context, params *GetBusinessConnectionParams) (BusinessConnection, error)

GetBusinessConnection calls Telegram method "getBusinessConnection". Doc: https://core.telegram.org/bots/api#getbusinessconnection

func (*Bot) GetChat

func (bot *Bot) GetChat(ctx context.Context, params *GetChatParams) (ChatFullInfo, error)

GetChat calls Telegram method "getChat". Doc: https://core.telegram.org/bots/api#getchat

func (*Bot) GetChatAdministrators

func (bot *Bot) GetChatAdministrators(ctx context.Context, params *GetChatAdministratorsParams) ([]ChatMember, error)

GetChatAdministrators calls Telegram method "getChatAdministrators". Doc: https://core.telegram.org/bots/api#getchatadministrators

func (*Bot) GetChatGifts

func (bot *Bot) GetChatGifts(ctx context.Context, params *GetChatGiftsParams) (OwnedGifts, error)

GetChatGifts calls Telegram method "getChatGifts". Doc: https://core.telegram.org/bots/api#getchatgifts

func (*Bot) GetChatMember

func (bot *Bot) GetChatMember(ctx context.Context, params *GetChatMemberParams) (ChatMember, error)

GetChatMember calls Telegram method "getChatMember". Doc: https://core.telegram.org/bots/api#getchatmember

func (*Bot) GetChatMemberCount

func (bot *Bot) GetChatMemberCount(ctx context.Context, params *GetChatMemberCountParams) (int64, error)

GetChatMemberCount calls Telegram method "getChatMemberCount". Doc: https://core.telegram.org/bots/api#getchatmembercount

func (*Bot) GetChatMenuButton

func (bot *Bot) GetChatMenuButton(ctx context.Context, params *GetChatMenuButtonParams) (MenuButton, error)

GetChatMenuButton calls Telegram method "getChatMenuButton". Doc: https://core.telegram.org/bots/api#getchatmenubutton

func (*Bot) GetCustomEmojiStickers

func (bot *Bot) GetCustomEmojiStickers(ctx context.Context, params *GetCustomEmojiStickersParams) ([]Sticker, error)

GetCustomEmojiStickers calls Telegram method "getCustomEmojiStickers". Doc: https://core.telegram.org/bots/api#getcustomemojistickers

func (*Bot) GetFile

func (bot *Bot) GetFile(ctx context.Context, params *GetFileParams) (File, error)

GetFile calls Telegram method "getFile". Doc: https://core.telegram.org/bots/api#getfile

func (*Bot) GetForumTopicIconStickers

func (bot *Bot) GetForumTopicIconStickers(ctx context.Context, params *GetForumTopicIconStickersParams) ([]Sticker, error)

GetForumTopicIconStickers calls Telegram method "getForumTopicIconStickers". Doc: https://core.telegram.org/bots/api#getforumtopiciconstickers

func (*Bot) GetGameHighScores

func (bot *Bot) GetGameHighScores(ctx context.Context, params *GetGameHighScoresParams) ([]GameHighScore, error)

GetGameHighScores calls Telegram method "getGameHighScores". Doc: https://core.telegram.org/bots/api#getgamehighscores

func (*Bot) GetManagedBotAccessSettings added in v0.2.0

func (bot *Bot) GetManagedBotAccessSettings(ctx context.Context, params *GetManagedBotAccessSettingsParams) (BotAccessSettings, error)

GetManagedBotAccessSettings calls Telegram method "getManagedBotAccessSettings". Doc: https://core.telegram.org/bots/api#getmanagedbotaccesssettings

func (*Bot) GetManagedBotToken added in v0.2.0

func (bot *Bot) GetManagedBotToken(ctx context.Context, params *GetManagedBotTokenParams) (string, error)

GetManagedBotToken calls Telegram method "getManagedBotToken". Doc: https://core.telegram.org/bots/api#getmanagedbottoken

func (*Bot) GetMe

func (bot *Bot) GetMe(ctx context.Context, params *GetMeParams) (User, error)

GetMe calls Telegram method "getMe". Doc: https://core.telegram.org/bots/api#getme

func (*Bot) GetMyCommands

func (bot *Bot) GetMyCommands(ctx context.Context, params *GetMyCommandsParams) ([]BotCommand, error)

GetMyCommands calls Telegram method "getMyCommands". Doc: https://core.telegram.org/bots/api#getmycommands

func (*Bot) GetMyDefaultAdministratorRights

func (bot *Bot) GetMyDefaultAdministratorRights(ctx context.Context, params *GetMyDefaultAdministratorRightsParams) (ChatAdministratorRights, error)

GetMyDefaultAdministratorRights calls Telegram method "getMyDefaultAdministratorRights". Doc: https://core.telegram.org/bots/api#getmydefaultadministratorrights

func (*Bot) GetMyDescription

func (bot *Bot) GetMyDescription(ctx context.Context, params *GetMyDescriptionParams) (BotDescription, error)

GetMyDescription calls Telegram method "getMyDescription". Doc: https://core.telegram.org/bots/api#getmydescription

func (*Bot) GetMyName

func (bot *Bot) GetMyName(ctx context.Context, params *GetMyNameParams) (BotName, error)

GetMyName calls Telegram method "getMyName". Doc: https://core.telegram.org/bots/api#getmyname

func (*Bot) GetMyShortDescription

func (bot *Bot) GetMyShortDescription(ctx context.Context, params *GetMyShortDescriptionParams) (BotShortDescription, error)

GetMyShortDescription calls Telegram method "getMyShortDescription". Doc: https://core.telegram.org/bots/api#getmyshortdescription

func (*Bot) GetMyStarBalance

func (bot *Bot) GetMyStarBalance(ctx context.Context, params *GetMyStarBalanceParams) (StarAmount, error)

GetMyStarBalance calls Telegram method "getMyStarBalance". Doc: https://core.telegram.org/bots/api#getmystarbalance

func (*Bot) GetStarTransactions

func (bot *Bot) GetStarTransactions(ctx context.Context, params *GetStarTransactionsParams) (StarTransactions, error)

GetStarTransactions calls Telegram method "getStarTransactions". Doc: https://core.telegram.org/bots/api#getstartransactions

func (*Bot) GetStickerSet

func (bot *Bot) GetStickerSet(ctx context.Context, params *GetStickerSetParams) (StickerSet, error)

GetStickerSet calls Telegram method "getStickerSet". Doc: https://core.telegram.org/bots/api#getstickerset

func (*Bot) GetUpdates

func (bot *Bot) GetUpdates(ctx context.Context, params *GetUpdatesParams) ([]Update, error)

GetUpdates calls Telegram method "getUpdates". Doc: https://core.telegram.org/bots/api#getupdates

func (*Bot) GetUserChatBoosts

func (bot *Bot) GetUserChatBoosts(ctx context.Context, params *GetUserChatBoostsParams) (UserChatBoosts, error)

GetUserChatBoosts calls Telegram method "getUserChatBoosts". Doc: https://core.telegram.org/bots/api#getuserchatboosts

func (*Bot) GetUserGifts

func (bot *Bot) GetUserGifts(ctx context.Context, params *GetUserGiftsParams) (OwnedGifts, error)

GetUserGifts calls Telegram method "getUserGifts". Doc: https://core.telegram.org/bots/api#getusergifts

func (*Bot) GetUserPersonalChatMessages added in v0.2.0

func (bot *Bot) GetUserPersonalChatMessages(ctx context.Context, params *GetUserPersonalChatMessagesParams) ([]Message, error)

GetUserPersonalChatMessages calls Telegram method "getUserPersonalChatMessages". Doc: https://core.telegram.org/bots/api#getuserpersonalchatmessages

func (*Bot) GetUserProfileAudios

func (bot *Bot) GetUserProfileAudios(ctx context.Context, params *GetUserProfileAudiosParams) (UserProfileAudios, error)

GetUserProfileAudios calls Telegram method "getUserProfileAudios". Doc: https://core.telegram.org/bots/api#getuserprofileaudios

func (*Bot) GetUserProfilePhotos

func (bot *Bot) GetUserProfilePhotos(ctx context.Context, params *GetUserProfilePhotosParams) (UserProfilePhotos, error)

GetUserProfilePhotos calls Telegram method "getUserProfilePhotos". Doc: https://core.telegram.org/bots/api#getuserprofilephotos

func (*Bot) GetWebhookInfo

func (bot *Bot) GetWebhookInfo(ctx context.Context, params *GetWebhookInfoParams) (WebhookInfo, error)

GetWebhookInfo calls Telegram method "getWebhookInfo". Doc: https://core.telegram.org/bots/api#getwebhookinfo

func (*Bot) GiftPremiumSubscription

func (bot *Bot) GiftPremiumSubscription(ctx context.Context, params *GiftPremiumSubscriptionParams) (bool, error)

GiftPremiumSubscription calls Telegram method "giftPremiumSubscription". Doc: https://core.telegram.org/bots/api#giftpremiumsubscription

func (*Bot) HideGeneralForumTopic

func (bot *Bot) HideGeneralForumTopic(ctx context.Context, params *HideGeneralForumTopicParams) (bool, error)

HideGeneralForumTopic calls Telegram method "hideGeneralForumTopic". Doc: https://core.telegram.org/bots/api#hidegeneralforumtopic

func (*Bot) LeaveChat

func (bot *Bot) LeaveChat(ctx context.Context, params *LeaveChatParams) (bool, error)

LeaveChat calls Telegram method "leaveChat". Doc: https://core.telegram.org/bots/api#leavechat

func (*Bot) LogOut

func (bot *Bot) LogOut(ctx context.Context, params *LogOutParams) (bool, error)

LogOut calls Telegram method "logOut". Doc: https://core.telegram.org/bots/api#logout

func (*Bot) PinChatMessage

func (bot *Bot) PinChatMessage(ctx context.Context, params *PinChatMessageParams) (bool, error)

PinChatMessage calls Telegram method "pinChatMessage". Doc: https://core.telegram.org/bots/api#pinchatmessage

func (*Bot) PostStory

func (bot *Bot) PostStory(ctx context.Context, params *PostStoryParams) (Story, error)

PostStory calls Telegram method "postStory". Doc: https://core.telegram.org/bots/api#poststory

func (*Bot) PromoteChatMember

func (bot *Bot) PromoteChatMember(ctx context.Context, params *PromoteChatMemberParams) (bool, error)

PromoteChatMember calls Telegram method "promoteChatMember". Doc: https://core.telegram.org/bots/api#promotechatmember

func (*Bot) ReadBusinessMessage

func (bot *Bot) ReadBusinessMessage(ctx context.Context, params *ReadBusinessMessageParams) (bool, error)

ReadBusinessMessage calls Telegram method "readBusinessMessage". Doc: https://core.telegram.org/bots/api#readbusinessmessage

func (*Bot) RefundStarPayment

func (bot *Bot) RefundStarPayment(ctx context.Context, params *RefundStarPaymentParams) (bool, error)

RefundStarPayment calls Telegram method "refundStarPayment". Doc: https://core.telegram.org/bots/api#refundstarpayment

func (*Bot) RemoveBusinessAccountProfilePhoto

func (bot *Bot) RemoveBusinessAccountProfilePhoto(ctx context.Context, params *RemoveBusinessAccountProfilePhotoParams) (bool, error)

RemoveBusinessAccountProfilePhoto calls Telegram method "removeBusinessAccountProfilePhoto". Doc: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto

func (*Bot) RemoveChatVerification

func (bot *Bot) RemoveChatVerification(ctx context.Context, params *RemoveChatVerificationParams) (bool, error)

RemoveChatVerification calls Telegram method "removeChatVerification". Doc: https://core.telegram.org/bots/api#removechatverification

func (*Bot) RemoveMyProfilePhoto

func (bot *Bot) RemoveMyProfilePhoto(ctx context.Context, params *RemoveMyProfilePhotoParams) (bool, error)

RemoveMyProfilePhoto calls Telegram method "removeMyProfilePhoto". Doc: https://core.telegram.org/bots/api#removemyprofilephoto

func (*Bot) RemoveUserVerification

func (bot *Bot) RemoveUserVerification(ctx context.Context, params *RemoveUserVerificationParams) (bool, error)

RemoveUserVerification calls Telegram method "removeUserVerification". Doc: https://core.telegram.org/bots/api#removeuserverification

func (*Bot) ReopenForumTopic

func (bot *Bot) ReopenForumTopic(ctx context.Context, params *ReopenForumTopicParams) (bool, error)

ReopenForumTopic calls Telegram method "reopenForumTopic". Doc: https://core.telegram.org/bots/api#reopenforumtopic

func (*Bot) ReopenGeneralForumTopic

func (bot *Bot) ReopenGeneralForumTopic(ctx context.Context, params *ReopenGeneralForumTopicParams) (bool, error)

ReopenGeneralForumTopic calls Telegram method "reopenGeneralForumTopic". Doc: https://core.telegram.org/bots/api#reopengeneralforumtopic

func (*Bot) ReplaceManagedBotToken added in v0.2.0

func (bot *Bot) ReplaceManagedBotToken(ctx context.Context, params *ReplaceManagedBotTokenParams) (string, error)

ReplaceManagedBotToken calls Telegram method "replaceManagedBotToken". Doc: https://core.telegram.org/bots/api#replacemanagedbottoken

func (*Bot) ReplaceStickerInSet

func (bot *Bot) ReplaceStickerInSet(ctx context.Context, params *ReplaceStickerInSetParams) (bool, error)

ReplaceStickerInSet calls Telegram method "replaceStickerInSet". Doc: https://core.telegram.org/bots/api#replacestickerinset

func (*Bot) RepostStory

func (bot *Bot) RepostStory(ctx context.Context, params *RepostStoryParams) (Story, error)

RepostStory calls Telegram method "repostStory". Doc: https://core.telegram.org/bots/api#repoststory

func (*Bot) RestrictChatMember

func (bot *Bot) RestrictChatMember(ctx context.Context, params *RestrictChatMemberParams) (bool, error)

RestrictChatMember calls Telegram method "restrictChatMember". Doc: https://core.telegram.org/bots/api#restrictchatmember

func (bot *Bot) RevokeChatInviteLink(ctx context.Context, params *RevokeChatInviteLinkParams) (ChatInviteLink, error)

RevokeChatInviteLink calls Telegram method "revokeChatInviteLink". Doc: https://core.telegram.org/bots/api#revokechatinvitelink

func (*Bot) SavePreparedInlineMessage

func (bot *Bot) SavePreparedInlineMessage(ctx context.Context, params *SavePreparedInlineMessageParams) (PreparedInlineMessage, error)

SavePreparedInlineMessage calls Telegram method "savePreparedInlineMessage". Doc: https://core.telegram.org/bots/api#savepreparedinlinemessage

func (*Bot) SavePreparedKeyboardButton added in v0.2.0

func (bot *Bot) SavePreparedKeyboardButton(ctx context.Context, params *SavePreparedKeyboardButtonParams) (PreparedKeyboardButton, error)

SavePreparedKeyboardButton calls Telegram method "savePreparedKeyboardButton". Doc: https://core.telegram.org/bots/api#savepreparedkeyboardbutton

func (*Bot) SendAnimation

func (bot *Bot) SendAnimation(ctx context.Context, params *SendAnimationParams) (Message, error)

SendAnimation calls Telegram method "sendAnimation". Doc: https://core.telegram.org/bots/api#sendanimation

func (*Bot) SendAudio

func (bot *Bot) SendAudio(ctx context.Context, params *SendAudioParams) (Message, error)

SendAudio calls Telegram method "sendAudio". Doc: https://core.telegram.org/bots/api#sendaudio

func (*Bot) SendChatAction

func (bot *Bot) SendChatAction(ctx context.Context, params *SendChatActionParams) (bool, error)

SendChatAction calls Telegram method "sendChatAction". Doc: https://core.telegram.org/bots/api#sendchataction

func (*Bot) SendChatJoinRequestWebApp added in v0.2.0

func (bot *Bot) SendChatJoinRequestWebApp(ctx context.Context, params *SendChatJoinRequestWebAppParams) (bool, error)

SendChatJoinRequestWebApp calls Telegram method "sendChatJoinRequestWebApp". Doc: https://core.telegram.org/bots/api#sendchatjoinrequestwebapp

func (*Bot) SendChecklist

func (bot *Bot) SendChecklist(ctx context.Context, params *SendChecklistParams) (Message, error)

SendChecklist calls Telegram method "sendChecklist". Doc: https://core.telegram.org/bots/api#sendchecklist

func (*Bot) SendContact

func (bot *Bot) SendContact(ctx context.Context, params *SendContactParams) (Message, error)

SendContact calls Telegram method "sendContact". Doc: https://core.telegram.org/bots/api#sendcontact

func (*Bot) SendDice

func (bot *Bot) SendDice(ctx context.Context, params *SendDiceParams) (Message, error)

SendDice calls Telegram method "sendDice". Doc: https://core.telegram.org/bots/api#senddice

func (*Bot) SendDocument

func (bot *Bot) SendDocument(ctx context.Context, params *SendDocumentParams) (Message, error)

SendDocument calls Telegram method "sendDocument". Doc: https://core.telegram.org/bots/api#senddocument

func (*Bot) SendGame

func (bot *Bot) SendGame(ctx context.Context, params *SendGameParams) (Message, error)

SendGame calls Telegram method "sendGame". Doc: https://core.telegram.org/bots/api#sendgame

func (*Bot) SendGift

func (bot *Bot) SendGift(ctx context.Context, params *SendGiftParams) (bool, error)

SendGift calls Telegram method "sendGift". Doc: https://core.telegram.org/bots/api#sendgift

func (*Bot) SendInvoice

func (bot *Bot) SendInvoice(ctx context.Context, params *SendInvoiceParams) (Message, error)

SendInvoice calls Telegram method "sendInvoice". Doc: https://core.telegram.org/bots/api#sendinvoice

func (*Bot) SendLivePhoto added in v0.2.0

func (bot *Bot) SendLivePhoto(ctx context.Context, params *SendLivePhotoParams) (Message, error)

SendLivePhoto calls Telegram method "sendLivePhoto". Doc: https://core.telegram.org/bots/api#sendlivephoto

func (*Bot) SendLocation

func (bot *Bot) SendLocation(ctx context.Context, params *SendLocationParams) (Message, error)

SendLocation calls Telegram method "sendLocation". Doc: https://core.telegram.org/bots/api#sendlocation

func (*Bot) SendMediaGroup

func (bot *Bot) SendMediaGroup(ctx context.Context, params *SendMediaGroupParams) ([]Message, error)

SendMediaGroup calls Telegram method "sendMediaGroup". Doc: https://core.telegram.org/bots/api#sendmediagroup

func (*Bot) SendMessage

func (bot *Bot) SendMessage(ctx context.Context, params *SendMessageParams) (Message, error)

SendMessage calls Telegram method "sendMessage". Doc: https://core.telegram.org/bots/api#sendmessage

func (*Bot) SendMessageDraft

func (bot *Bot) SendMessageDraft(ctx context.Context, params *SendMessageDraftParams) (bool, error)

SendMessageDraft calls Telegram method "sendMessageDraft". Doc: https://core.telegram.org/bots/api#sendmessagedraft

func (*Bot) SendPaidMedia

func (bot *Bot) SendPaidMedia(ctx context.Context, params *SendPaidMediaParams) (Message, error)

SendPaidMedia calls Telegram method "sendPaidMedia". Doc: https://core.telegram.org/bots/api#sendpaidmedia

func (*Bot) SendPhoto

func (bot *Bot) SendPhoto(ctx context.Context, params *SendPhotoParams) (Message, error)

SendPhoto calls Telegram method "sendPhoto". Doc: https://core.telegram.org/bots/api#sendphoto

func (*Bot) SendPoll

func (bot *Bot) SendPoll(ctx context.Context, params *SendPollParams) (Message, error)

SendPoll calls Telegram method "sendPoll". Doc: https://core.telegram.org/bots/api#sendpoll

func (*Bot) SendRichMessage added in v0.2.0

func (bot *Bot) SendRichMessage(ctx context.Context, params *SendRichMessageParams) (Message, error)

SendRichMessage calls Telegram method "sendRichMessage". Doc: https://core.telegram.org/bots/api#sendrichmessage

func (*Bot) SendRichMessageDraft added in v0.2.0

func (bot *Bot) SendRichMessageDraft(ctx context.Context, params *SendRichMessageDraftParams) (bool, error)

SendRichMessageDraft calls Telegram method "sendRichMessageDraft". Doc: https://core.telegram.org/bots/api#sendrichmessagedraft

func (*Bot) SendSticker

func (bot *Bot) SendSticker(ctx context.Context, params *SendStickerParams) (Message, error)

SendSticker calls Telegram method "sendSticker". Doc: https://core.telegram.org/bots/api#sendsticker

func (*Bot) SendVenue

func (bot *Bot) SendVenue(ctx context.Context, params *SendVenueParams) (Message, error)

SendVenue calls Telegram method "sendVenue". Doc: https://core.telegram.org/bots/api#sendvenue

func (*Bot) SendVideo

func (bot *Bot) SendVideo(ctx context.Context, params *SendVideoParams) (Message, error)

SendVideo calls Telegram method "sendVideo". Doc: https://core.telegram.org/bots/api#sendvideo

func (*Bot) SendVideoNote

func (bot *Bot) SendVideoNote(ctx context.Context, params *SendVideoNoteParams) (Message, error)

SendVideoNote calls Telegram method "sendVideoNote". Doc: https://core.telegram.org/bots/api#sendvideonote

func (*Bot) SendVoice

func (bot *Bot) SendVoice(ctx context.Context, params *SendVoiceParams) (Message, error)

SendVoice calls Telegram method "sendVoice". Doc: https://core.telegram.org/bots/api#sendvoice

func (*Bot) SetBusinessAccountBio

func (bot *Bot) SetBusinessAccountBio(ctx context.Context, params *SetBusinessAccountBioParams) (bool, error)

SetBusinessAccountBio calls Telegram method "setBusinessAccountBio". Doc: https://core.telegram.org/bots/api#setbusinessaccountbio

func (*Bot) SetBusinessAccountGiftSettings

func (bot *Bot) SetBusinessAccountGiftSettings(ctx context.Context, params *SetBusinessAccountGiftSettingsParams) (bool, error)

SetBusinessAccountGiftSettings calls Telegram method "setBusinessAccountGiftSettings". Doc: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings

func (*Bot) SetBusinessAccountName

func (bot *Bot) SetBusinessAccountName(ctx context.Context, params *SetBusinessAccountNameParams) (bool, error)

SetBusinessAccountName calls Telegram method "setBusinessAccountName". Doc: https://core.telegram.org/bots/api#setbusinessaccountname

func (*Bot) SetBusinessAccountProfilePhoto

func (bot *Bot) SetBusinessAccountProfilePhoto(ctx context.Context, params *SetBusinessAccountProfilePhotoParams) (bool, error)

SetBusinessAccountProfilePhoto calls Telegram method "setBusinessAccountProfilePhoto". Doc: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto

func (*Bot) SetBusinessAccountUsername

func (bot *Bot) SetBusinessAccountUsername(ctx context.Context, params *SetBusinessAccountUsernameParams) (bool, error)

SetBusinessAccountUsername calls Telegram method "setBusinessAccountUsername". Doc: https://core.telegram.org/bots/api#setbusinessaccountusername

func (*Bot) SetChatAdministratorCustomTitle

func (bot *Bot) SetChatAdministratorCustomTitle(ctx context.Context, params *SetChatAdministratorCustomTitleParams) (bool, error)

SetChatAdministratorCustomTitle calls Telegram method "setChatAdministratorCustomTitle". Doc: https://core.telegram.org/bots/api#setchatadministratorcustomtitle

func (*Bot) SetChatDescription

func (bot *Bot) SetChatDescription(ctx context.Context, params *SetChatDescriptionParams) (bool, error)

SetChatDescription calls Telegram method "setChatDescription". Doc: https://core.telegram.org/bots/api#setchatdescription

func (*Bot) SetChatMemberTag

func (bot *Bot) SetChatMemberTag(ctx context.Context, params *SetChatMemberTagParams) (bool, error)

SetChatMemberTag calls Telegram method "setChatMemberTag". Doc: https://core.telegram.org/bots/api#setchatmembertag

func (*Bot) SetChatMenuButton

func (bot *Bot) SetChatMenuButton(ctx context.Context, params *SetChatMenuButtonParams) (bool, error)

SetChatMenuButton calls Telegram method "setChatMenuButton". Doc: https://core.telegram.org/bots/api#setchatmenubutton

func (*Bot) SetChatPermissions

func (bot *Bot) SetChatPermissions(ctx context.Context, params *SetChatPermissionsParams) (bool, error)

SetChatPermissions calls Telegram method "setChatPermissions". Doc: https://core.telegram.org/bots/api#setchatpermissions

func (*Bot) SetChatPhoto

func (bot *Bot) SetChatPhoto(ctx context.Context, params *SetChatPhotoParams) (bool, error)

SetChatPhoto calls Telegram method "setChatPhoto". Doc: https://core.telegram.org/bots/api#setchatphoto

func (*Bot) SetChatStickerSet

func (bot *Bot) SetChatStickerSet(ctx context.Context, params *SetChatStickerSetParams) (bool, error)

SetChatStickerSet calls Telegram method "setChatStickerSet". Doc: https://core.telegram.org/bots/api#setchatstickerset

func (*Bot) SetChatTitle

func (bot *Bot) SetChatTitle(ctx context.Context, params *SetChatTitleParams) (bool, error)

SetChatTitle calls Telegram method "setChatTitle". Doc: https://core.telegram.org/bots/api#setchattitle

func (*Bot) SetCustomEmojiStickerSetThumbnail

func (bot *Bot) SetCustomEmojiStickerSetThumbnail(ctx context.Context, params *SetCustomEmojiStickerSetThumbnailParams) (bool, error)

SetCustomEmojiStickerSetThumbnail calls Telegram method "setCustomEmojiStickerSetThumbnail". Doc: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail

func (*Bot) SetGameScore

func (bot *Bot) SetGameScore(ctx context.Context, params *SetGameScoreParams) (MessageOrBool, error)

SetGameScore calls Telegram method "setGameScore". Doc: https://core.telegram.org/bots/api#setgamescore

func (*Bot) SetManagedBotAccessSettings added in v0.2.0

func (bot *Bot) SetManagedBotAccessSettings(ctx context.Context, params *SetManagedBotAccessSettingsParams) (bool, error)

SetManagedBotAccessSettings calls Telegram method "setManagedBotAccessSettings". Doc: https://core.telegram.org/bots/api#setmanagedbotaccesssettings

func (*Bot) SetMessageReaction

func (bot *Bot) SetMessageReaction(ctx context.Context, params *SetMessageReactionParams) (bool, error)

SetMessageReaction calls Telegram method "setMessageReaction". Doc: https://core.telegram.org/bots/api#setmessagereaction

func (*Bot) SetMyCommands

func (bot *Bot) SetMyCommands(ctx context.Context, params *SetMyCommandsParams) (bool, error)

SetMyCommands calls Telegram method "setMyCommands". Doc: https://core.telegram.org/bots/api#setmycommands

func (*Bot) SetMyDefaultAdministratorRights

func (bot *Bot) SetMyDefaultAdministratorRights(ctx context.Context, params *SetMyDefaultAdministratorRightsParams) (bool, error)

SetMyDefaultAdministratorRights calls Telegram method "setMyDefaultAdministratorRights". Doc: https://core.telegram.org/bots/api#setmydefaultadministratorrights

func (*Bot) SetMyDescription

func (bot *Bot) SetMyDescription(ctx context.Context, params *SetMyDescriptionParams) (bool, error)

SetMyDescription calls Telegram method "setMyDescription". Doc: https://core.telegram.org/bots/api#setmydescription

func (*Bot) SetMyName

func (bot *Bot) SetMyName(ctx context.Context, params *SetMyNameParams) (bool, error)

SetMyName calls Telegram method "setMyName". Doc: https://core.telegram.org/bots/api#setmyname

func (*Bot) SetMyProfilePhoto

func (bot *Bot) SetMyProfilePhoto(ctx context.Context, params *SetMyProfilePhotoParams) (bool, error)

SetMyProfilePhoto calls Telegram method "setMyProfilePhoto". Doc: https://core.telegram.org/bots/api#setmyprofilephoto

func (*Bot) SetMyShortDescription

func (bot *Bot) SetMyShortDescription(ctx context.Context, params *SetMyShortDescriptionParams) (bool, error)

SetMyShortDescription calls Telegram method "setMyShortDescription". Doc: https://core.telegram.org/bots/api#setmyshortdescription

func (*Bot) SetPassportDataErrors

func (bot *Bot) SetPassportDataErrors(ctx context.Context, params *SetPassportDataErrorsParams) (bool, error)

SetPassportDataErrors calls Telegram method "setPassportDataErrors". Doc: https://core.telegram.org/bots/api#setpassportdataerrors

func (*Bot) SetStickerEmojiList

func (bot *Bot) SetStickerEmojiList(ctx context.Context, params *SetStickerEmojiListParams) (bool, error)

SetStickerEmojiList calls Telegram method "setStickerEmojiList". Doc: https://core.telegram.org/bots/api#setstickeremojilist

func (*Bot) SetStickerKeywords

func (bot *Bot) SetStickerKeywords(ctx context.Context, params *SetStickerKeywordsParams) (bool, error)

SetStickerKeywords calls Telegram method "setStickerKeywords". Doc: https://core.telegram.org/bots/api#setstickerkeywords

func (*Bot) SetStickerMaskPosition

func (bot *Bot) SetStickerMaskPosition(ctx context.Context, params *SetStickerMaskPositionParams) (bool, error)

SetStickerMaskPosition calls Telegram method "setStickerMaskPosition". Doc: https://core.telegram.org/bots/api#setstickermaskposition

func (*Bot) SetStickerPositionInSet

func (bot *Bot) SetStickerPositionInSet(ctx context.Context, params *SetStickerPositionInSetParams) (bool, error)

SetStickerPositionInSet calls Telegram method "setStickerPositionInSet". Doc: https://core.telegram.org/bots/api#setstickerpositioninset

func (*Bot) SetStickerSetThumbnail

func (bot *Bot) SetStickerSetThumbnail(ctx context.Context, params *SetStickerSetThumbnailParams) (bool, error)

SetStickerSetThumbnail calls Telegram method "setStickerSetThumbnail". Doc: https://core.telegram.org/bots/api#setstickersetthumbnail

func (*Bot) SetStickerSetTitle

func (bot *Bot) SetStickerSetTitle(ctx context.Context, params *SetStickerSetTitleParams) (bool, error)

SetStickerSetTitle calls Telegram method "setStickerSetTitle". Doc: https://core.telegram.org/bots/api#setstickersettitle

func (*Bot) SetUserEmojiStatus

func (bot *Bot) SetUserEmojiStatus(ctx context.Context, params *SetUserEmojiStatusParams) (bool, error)

SetUserEmojiStatus calls Telegram method "setUserEmojiStatus". Doc: https://core.telegram.org/bots/api#setuseremojistatus

func (*Bot) SetWebhook

func (bot *Bot) SetWebhook(ctx context.Context, params *SetWebhookParams) (bool, error)

SetWebhook calls Telegram method "setWebhook". Doc: https://core.telegram.org/bots/api#setwebhook

func (*Bot) StartUpdatePoller

func (bot *Bot) StartUpdatePoller(ctx context.Context, opts ...UpdatePollerOption) (*UpdatePoller, error)

StartUpdatePoller creates and starts an UpdatePoller.

func (*Bot) StopMessageLiveLocation

func (bot *Bot) StopMessageLiveLocation(ctx context.Context, params *StopMessageLiveLocationParams) (MessageOrBool, error)

StopMessageLiveLocation calls Telegram method "stopMessageLiveLocation". Doc: https://core.telegram.org/bots/api#stopmessagelivelocation

func (*Bot) StopPoll

func (bot *Bot) StopPoll(ctx context.Context, params *StopPollParams) (Poll, error)

StopPoll calls Telegram method "stopPoll". Doc: https://core.telegram.org/bots/api#stoppoll

func (*Bot) TransferBusinessAccountStars

func (bot *Bot) TransferBusinessAccountStars(ctx context.Context, params *TransferBusinessAccountStarsParams) (bool, error)

TransferBusinessAccountStars calls Telegram method "transferBusinessAccountStars". Doc: https://core.telegram.org/bots/api#transferbusinessaccountstars

func (*Bot) TransferGift

func (bot *Bot) TransferGift(ctx context.Context, params *TransferGiftParams) (bool, error)

TransferGift calls Telegram method "transferGift". Doc: https://core.telegram.org/bots/api#transfergift

func (*Bot) UnbanChatMember

func (bot *Bot) UnbanChatMember(ctx context.Context, params *UnbanChatMemberParams) (bool, error)

UnbanChatMember calls Telegram method "unbanChatMember". Doc: https://core.telegram.org/bots/api#unbanchatmember

func (*Bot) UnbanChatSenderChat

func (bot *Bot) UnbanChatSenderChat(ctx context.Context, params *UnbanChatSenderChatParams) (bool, error)

UnbanChatSenderChat calls Telegram method "unbanChatSenderChat". Doc: https://core.telegram.org/bots/api#unbanchatsenderchat

func (*Bot) UnhideGeneralForumTopic

func (bot *Bot) UnhideGeneralForumTopic(ctx context.Context, params *UnhideGeneralForumTopicParams) (bool, error)

UnhideGeneralForumTopic calls Telegram method "unhideGeneralForumTopic". Doc: https://core.telegram.org/bots/api#unhidegeneralforumtopic

func (*Bot) UnpinAllChatMessages

func (bot *Bot) UnpinAllChatMessages(ctx context.Context, params *UnpinAllChatMessagesParams) (bool, error)

UnpinAllChatMessages calls Telegram method "unpinAllChatMessages". Doc: https://core.telegram.org/bots/api#unpinallchatmessages

func (*Bot) UnpinAllForumTopicMessages

func (bot *Bot) UnpinAllForumTopicMessages(ctx context.Context, params *UnpinAllForumTopicMessagesParams) (bool, error)

UnpinAllForumTopicMessages calls Telegram method "unpinAllForumTopicMessages". Doc: https://core.telegram.org/bots/api#unpinallforumtopicmessages

func (*Bot) UnpinAllGeneralForumTopicMessages

func (bot *Bot) UnpinAllGeneralForumTopicMessages(ctx context.Context, params *UnpinAllGeneralForumTopicMessagesParams) (bool, error)

UnpinAllGeneralForumTopicMessages calls Telegram method "unpinAllGeneralForumTopicMessages". Doc: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages

func (*Bot) UnpinChatMessage

func (bot *Bot) UnpinChatMessage(ctx context.Context, params *UnpinChatMessageParams) (bool, error)

UnpinChatMessage calls Telegram method "unpinChatMessage". Doc: https://core.telegram.org/bots/api#unpinchatmessage

func (*Bot) UpgradeGift

func (bot *Bot) UpgradeGift(ctx context.Context, params *UpgradeGiftParams) (bool, error)

UpgradeGift calls Telegram method "upgradeGift". Doc: https://core.telegram.org/bots/api#upgradegift

func (*Bot) UploadStickerFile

func (bot *Bot) UploadStickerFile(ctx context.Context, params *UploadStickerFileParams) (File, error)

UploadStickerFile calls Telegram method "uploadStickerFile". Doc: https://core.telegram.org/bots/api#uploadstickerfile

func (*Bot) VerifyChat

func (bot *Bot) VerifyChat(ctx context.Context, params *VerifyChatParams) (bool, error)

VerifyChat calls Telegram method "verifyChat". Doc: https://core.telegram.org/bots/api#verifychat

func (*Bot) VerifyUser

func (bot *Bot) VerifyUser(ctx context.Context, params *VerifyUserParams) (bool, error)

VerifyUser calls Telegram method "verifyUser". Doc: https://core.telegram.org/bots/api#verifyuser

type BotAccessSettings added in v0.2.0

type BotAccessSettings struct {
	IsAccessRestricted bool   `json:"is_access_restricted"`
	AddedUsers         []User `json:"added_users,omitempty"`
}

BotAccessSettings maps to Telegram Bot API type "BotAccessSettings".

type BotCommand

type BotCommand struct {
	Command     string `json:"command"`
	Description string `json:"description"`
	IsEphemeral bool   `json:"is_ephemeral,omitempty"`
}

BotCommand maps to Telegram Bot API type "BotCommand".

type BotCommandScope

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

BotCommandScope is a union type in Telegram Bot API.

type BotCommandScopeAllChatAdministrators

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

BotCommandScopeAllChatAdministrators maps to Telegram Bot API type "BotCommandScopeAllChatAdministrators".

type BotCommandScopeAllGroupChats

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

BotCommandScopeAllGroupChats maps to Telegram Bot API type "BotCommandScopeAllGroupChats".

type BotCommandScopeAllPrivateChats

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

BotCommandScopeAllPrivateChats maps to Telegram Bot API type "BotCommandScopeAllPrivateChats".

type BotCommandScopeChat

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

BotCommandScopeChat maps to Telegram Bot API type "BotCommandScopeChat".

type BotCommandScopeChatAdministrators

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

BotCommandScopeChatAdministrators maps to Telegram Bot API type "BotCommandScopeChatAdministrators".

type BotCommandScopeChatMember

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

BotCommandScopeChatMember maps to Telegram Bot API type "BotCommandScopeChatMember".

type BotCommandScopeDefault

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

BotCommandScopeDefault maps to Telegram Bot API type "BotCommandScopeDefault".

type BotDescription

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

BotDescription maps to Telegram Bot API type "BotDescription".

type BotName

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

BotName maps to Telegram Bot API type "BotName".

type BotOption

type BotOption func(*Bot)

BotOption configures a Bot client.

func WithAPIURL

func WithAPIURL(apiURL string) BotOption

WithAPIURL overrides Telegram API base URL. Useful for local Bot API servers.

func WithDebug

func WithDebug(debug bool) BotOption

WithDebug toggles lightweight debug logging for requests and errors.

func WithHTTPClient

func WithHTTPClient(client *http.Client) BotOption

WithHTTPClient overrides the HTTP client used by the Bot.

func WithLogger added in v0.2.0

func WithLogger(logger *slog.Logger) BotOption

WithLogger sets the structured logger used when WithDebug is enabled.

func WithRequestObserver added in v0.2.0

func WithRequestObserver(observer RequestObserver) BotOption

WithRequestObserver registers an observer for safe per-attempt metadata.

func WithRetryPolicy added in v0.2.0

func WithRetryPolicy(policy RetryPolicy) BotOption

WithRetryPolicy enables request retries with the supplied policy. The default is nil and performs exactly one attempt.

WARNING: Retrying side-effecting Telegram methods can duplicate operations when Telegram completed a request but its response was lost. The caller is responsible for deciding whether and where retries are appropriate.

type BotShortDescription

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

BotShortDescription maps to Telegram Bot API type "BotShortDescription".

type BotSubscriptionUpdated added in v0.2.0

type BotSubscriptionUpdated struct {
	User           *User  `json:"user"`
	InvoicePayload string `json:"invoice_payload"`
	State          string `json:"state"`
}

BotSubscriptionUpdated maps to Telegram Bot API type "BotSubscriptionUpdated".

type BusinessBotRights

type BusinessBotRights struct {
	CanReply                   bool `json:"can_reply,omitempty"`
	CanReadMessages            bool `json:"can_read_messages,omitempty"`
	CanDeleteSentMessages      bool `json:"can_delete_sent_messages,omitempty"`
	CanDeleteAllMessages       bool `json:"can_delete_all_messages,omitempty"`
	CanEditName                bool `json:"can_edit_name,omitempty"`
	CanEditBio                 bool `json:"can_edit_bio,omitempty"`
	CanEditProfilePhoto        bool `json:"can_edit_profile_photo,omitempty"`
	CanEditUsername            bool `json:"can_edit_username,omitempty"`
	CanChangeGiftSettings      bool `json:"can_change_gift_settings,omitempty"`
	CanViewGiftsAndStars       bool `json:"can_view_gifts_and_stars,omitempty"`
	CanConvertGiftsToStars     bool `json:"can_convert_gifts_to_stars,omitempty"`
	CanTransferAndUpgradeGifts bool `json:"can_transfer_and_upgrade_gifts,omitempty"`
	CanTransferStars           bool `json:"can_transfer_stars,omitempty"`
	CanManageStories           bool `json:"can_manage_stories,omitempty"`
}

BusinessBotRights maps to Telegram Bot API type "BusinessBotRights".

type BusinessConnection

type BusinessConnection struct {
	ID         string             `json:"id"`
	User       *User              `json:"user"`
	UserChatID int64              `json:"user_chat_id"`
	Date       int64              `json:"date"`
	Rights     *BusinessBotRights `json:"rights,omitempty"`
	IsEnabled  bool               `json:"is_enabled"`
}

BusinessConnection maps to Telegram Bot API type "BusinessConnection".

type BusinessIntro

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

BusinessIntro maps to Telegram Bot API type "BusinessIntro".

type BusinessLocation

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

BusinessLocation maps to Telegram Bot API type "BusinessLocation".

type BusinessMessagesDeleted

type BusinessMessagesDeleted struct {
	BusinessConnectionID string  `json:"business_connection_id"`
	Chat                 *Chat   `json:"chat"`
	MessageIds           []int64 `json:"message_ids"`
}

BusinessMessagesDeleted maps to Telegram Bot API type "BusinessMessagesDeleted".

type BusinessOpeningHours

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

BusinessOpeningHours maps to Telegram Bot API type "BusinessOpeningHours".

type BusinessOpeningHoursInterval

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

BusinessOpeningHoursInterval maps to Telegram Bot API type "BusinessOpeningHoursInterval".

type CallbackGame

type CallbackGame struct {
}

CallbackGame maps to Telegram Bot API type "CallbackGame".

type CallbackQuery

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

CallbackQuery maps to Telegram Bot API type "CallbackQuery".

func (*CallbackQuery) UnmarshalJSON

func (value *CallbackQuery) UnmarshalJSON(data []byte) error

type Chat

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

Chat maps to Telegram Bot API type "Chat".

type ChatAdministratorRights

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

ChatAdministratorRights maps to Telegram Bot API type "ChatAdministratorRights".

type ChatBackground

type ChatBackground struct {
	Type BackgroundType `json:"type"`
}

ChatBackground maps to Telegram Bot API type "ChatBackground".

func (*ChatBackground) UnmarshalJSON

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

type ChatBoost

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

ChatBoost maps to Telegram Bot API type "ChatBoost".

func (*ChatBoost) UnmarshalJSON

func (value *ChatBoost) UnmarshalJSON(data []byte) error

type ChatBoostAdded

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

ChatBoostAdded maps to Telegram Bot API type "ChatBoostAdded".

type ChatBoostRemoved

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

ChatBoostRemoved maps to Telegram Bot API type "ChatBoostRemoved".

func (*ChatBoostRemoved) UnmarshalJSON

func (value *ChatBoostRemoved) UnmarshalJSON(data []byte) error

type ChatBoostSource

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

ChatBoostSource is a union type in Telegram Bot API.

type ChatBoostSourceGiftCode

type ChatBoostSourceGiftCode struct {
	Source string `json:"source"`
	User   *User  `json:"user"`
}

ChatBoostSourceGiftCode maps to Telegram Bot API type "ChatBoostSourceGiftCode".

type ChatBoostSourceGiveaway

type ChatBoostSourceGiveaway struct {
	Source            string `json:"source"`
	GiveawayMessageID int64  `json:"giveaway_message_id"`
	User              *User  `json:"user,omitempty"`
	PrizeStarCount    int64  `json:"prize_star_count,omitempty"`
	IsUnclaimed       bool   `json:"is_unclaimed,omitempty"`
}

ChatBoostSourceGiveaway maps to Telegram Bot API type "ChatBoostSourceGiveaway".

type ChatBoostSourcePremium

type ChatBoostSourcePremium struct {
	Source string `json:"source"`
	User   *User  `json:"user"`
}

ChatBoostSourcePremium maps to Telegram Bot API type "ChatBoostSourcePremium".

type ChatBoostUpdated

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

ChatBoostUpdated maps to Telegram Bot API type "ChatBoostUpdated".

type ChatFullInfo

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

ChatFullInfo maps to Telegram Bot API type "ChatFullInfo".

func (*ChatFullInfo) UnmarshalJSON

func (value *ChatFullInfo) UnmarshalJSON(data []byte) error
type ChatInviteLink struct {
	InviteLink              string `json:"invite_link"`
	Creator                 *User  `json:"creator"`
	CreatesJoinRequest      bool   `json:"creates_join_request"`
	IsPrimary               bool   `json:"is_primary"`
	IsRevoked               bool   `json:"is_revoked"`
	Name                    string `json:"name,omitempty"`
	ExpireDate              int64  `json:"expire_date,omitempty"`
	MemberLimit             int64  `json:"member_limit,omitempty"`
	PendingJoinRequestCount int64  `json:"pending_join_request_count,omitempty"`
	SubscriptionPeriod      int64  `json:"subscription_period,omitempty"`
	SubscriptionPrice       int64  `json:"subscription_price,omitempty"`
}

ChatInviteLink maps to Telegram Bot API type "ChatInviteLink".

type ChatJoinRequest

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

ChatJoinRequest maps to Telegram Bot API type "ChatJoinRequest".

type ChatLocation

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

ChatLocation maps to Telegram Bot API type "ChatLocation".

type ChatMember

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

ChatMember is a union type in Telegram Bot API.

type ChatMemberAdministrator

type ChatMemberAdministrator struct {
	Status                  string `json:"status"`
	User                    *User  `json:"user"`
	CanBeEdited             bool   `json:"can_be_edited"`
	IsAnonymous             bool   `json:"is_anonymous"`
	CanManageChat           bool   `json:"can_manage_chat"`
	CanDeleteMessages       bool   `json:"can_delete_messages"`
	CanManageVideoChats     bool   `json:"can_manage_video_chats"`
	CanRestrictMembers      bool   `json:"can_restrict_members"`
	CanPromoteMembers       bool   `json:"can_promote_members"`
	CanChangeInfo           bool   `json:"can_change_info"`
	CanInviteUsers          bool   `json:"can_invite_users"`
	CanPostStories          bool   `json:"can_post_stories"`
	CanEditStories          bool   `json:"can_edit_stories"`
	CanDeleteStories        bool   `json:"can_delete_stories"`
	CanPostMessages         bool   `json:"can_post_messages,omitempty"`
	CanEditMessages         bool   `json:"can_edit_messages,omitempty"`
	CanPinMessages          bool   `json:"can_pin_messages,omitempty"`
	CanManageTopics         bool   `json:"can_manage_topics,omitempty"`
	CanManageDirectMessages bool   `json:"can_manage_direct_messages,omitempty"`
	CanManageTags           bool   `json:"can_manage_tags,omitempty"`
	CustomTitle             string `json:"custom_title,omitempty"`
}

ChatMemberAdministrator maps to Telegram Bot API type "ChatMemberAdministrator".

type ChatMemberBanned

type ChatMemberBanned struct {
	Status    string `json:"status"`
	User      *User  `json:"user"`
	UntilDate int64  `json:"until_date"`
}

ChatMemberBanned maps to Telegram Bot API type "ChatMemberBanned".

type ChatMemberLeft

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

ChatMemberLeft maps to Telegram Bot API type "ChatMemberLeft".

type ChatMemberMember

type ChatMemberMember struct {
	Status    string `json:"status"`
	Tag       string `json:"tag,omitempty"`
	User      *User  `json:"user"`
	UntilDate int64  `json:"until_date,omitempty"`
}

ChatMemberMember maps to Telegram Bot API type "ChatMemberMember".

type ChatMemberOwner

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

ChatMemberOwner maps to Telegram Bot API type "ChatMemberOwner".

type ChatMemberRestricted

type ChatMemberRestricted struct {
	Status                string `json:"status"`
	Tag                   string `json:"tag,omitempty"`
	User                  *User  `json:"user"`
	IsMember              bool   `json:"is_member"`
	CanSendMessages       bool   `json:"can_send_messages"`
	CanSendAudios         bool   `json:"can_send_audios"`
	CanSendDocuments      bool   `json:"can_send_documents"`
	CanSendPhotos         bool   `json:"can_send_photos"`
	CanSendVideos         bool   `json:"can_send_videos"`
	CanSendVideoNotes     bool   `json:"can_send_video_notes"`
	CanSendVoiceNotes     bool   `json:"can_send_voice_notes"`
	CanSendPolls          bool   `json:"can_send_polls"`
	CanSendOtherMessages  bool   `json:"can_send_other_messages"`
	CanAddWebPagePreviews bool   `json:"can_add_web_page_previews"`
	CanReactToMessages    bool   `json:"can_react_to_messages"`
	CanEditTag            bool   `json:"can_edit_tag"`
	CanChangeInfo         bool   `json:"can_change_info"`
	CanInviteUsers        bool   `json:"can_invite_users"`
	CanPinMessages        bool   `json:"can_pin_messages"`
	CanManageTopics       bool   `json:"can_manage_topics"`
	UntilDate             int64  `json:"until_date"`
}

ChatMemberRestricted maps to Telegram Bot API type "ChatMemberRestricted".

type ChatMemberUpdated

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

ChatMemberUpdated maps to Telegram Bot API type "ChatMemberUpdated".

func (*ChatMemberUpdated) UnmarshalJSON

func (value *ChatMemberUpdated) UnmarshalJSON(data []byte) error

type ChatOwnerChanged

type ChatOwnerChanged struct {
	NewOwner *User `json:"new_owner"`
}

ChatOwnerChanged maps to Telegram Bot API type "ChatOwnerChanged".

type ChatOwnerLeft

type ChatOwnerLeft struct {
	NewOwner *User `json:"new_owner,omitempty"`
}

ChatOwnerLeft maps to Telegram Bot API type "ChatOwnerLeft".

type ChatPermissions

type ChatPermissions struct {
	CanSendMessages       bool `json:"can_send_messages,omitempty"`
	CanSendAudios         bool `json:"can_send_audios,omitempty"`
	CanSendDocuments      bool `json:"can_send_documents,omitempty"`
	CanSendPhotos         bool `json:"can_send_photos,omitempty"`
	CanSendVideos         bool `json:"can_send_videos,omitempty"`
	CanSendVideoNotes     bool `json:"can_send_video_notes,omitempty"`
	CanSendVoiceNotes     bool `json:"can_send_voice_notes,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"`
	CanReactToMessages    bool `json:"can_react_to_messages,omitempty"`
	CanEditTag            bool `json:"can_edit_tag,omitempty"`
	CanChangeInfo         bool `json:"can_change_info,omitempty"`
	CanInviteUsers        bool `json:"can_invite_users,omitempty"`
	CanPinMessages        bool `json:"can_pin_messages,omitempty"`
	CanManageTopics       bool `json:"can_manage_topics,omitempty"`
}

ChatPermissions maps to Telegram Bot API type "ChatPermissions".

type ChatPhoto

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

ChatPhoto maps to Telegram Bot API type "ChatPhoto".

type ChatShared

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

ChatShared maps to Telegram Bot API type "ChatShared".

type Checklist

type Checklist struct {
	Title                    string          `json:"title"`
	TitleEntities            []MessageEntity `json:"title_entities,omitempty"`
	Tasks                    []ChecklistTask `json:"tasks"`
	OthersCanAddTasks        bool            `json:"others_can_add_tasks,omitempty"`
	OthersCanMarkTasksAsDone bool            `json:"others_can_mark_tasks_as_done,omitempty"`
}

Checklist maps to Telegram Bot API type "Checklist".

type ChecklistTask

type ChecklistTask struct {
	ID              int64           `json:"id"`
	Text            string          `json:"text"`
	TextEntities    []MessageEntity `json:"text_entities,omitempty"`
	CompletedByUser *User           `json:"completed_by_user,omitempty"`
	CompletedByChat *Chat           `json:"completed_by_chat,omitempty"`
	CompletionDate  int64           `json:"completion_date,omitempty"`
}

ChecklistTask maps to Telegram Bot API type "ChecklistTask".

type ChecklistTasksAdded

type ChecklistTasksAdded struct {
	ChecklistMessage *Message        `json:"checklist_message,omitempty"`
	Tasks            []ChecklistTask `json:"tasks"`
}

ChecklistTasksAdded maps to Telegram Bot API type "ChecklistTasksAdded".

type ChecklistTasksDone

type ChecklistTasksDone struct {
	ChecklistMessage       *Message `json:"checklist_message,omitempty"`
	MarkedAsDoneTaskIds    []int64  `json:"marked_as_done_task_ids,omitempty"`
	MarkedAsNotDoneTaskIds []int64  `json:"marked_as_not_done_task_ids,omitempty"`
}

ChecklistTasksDone maps to Telegram Bot API type "ChecklistTasksDone".

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 maps to Telegram Bot API type "ChosenInlineResult".

type CloseForumTopicParams

type CloseForumTopicParams struct {
	ChatID          any   `json:"chat_id"`
	MessageThreadID int64 `json:"message_thread_id"`
}

CloseForumTopicParams contains params for Telegram method "closeForumTopic".

type CloseGeneralForumTopicParams

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

CloseGeneralForumTopicParams contains params for Telegram method "closeGeneralForumTopic".

type CloseParams

type CloseParams struct {
}

CloseParams contains params for Telegram method "close".

type Community added in v0.2.0

type Community struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

Community maps to Telegram Bot API type "Community".

type CommunityChatAdded added in v0.2.0

type CommunityChatAdded struct {
	Community *Community `json:"community"`
}

CommunityChatAdded maps to Telegram Bot API type "CommunityChatAdded".

type CommunityChatRemoved added in v0.2.0

type CommunityChatRemoved struct {
}

CommunityChatRemoved maps to Telegram Bot API type "CommunityChatRemoved".

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 maps to Telegram Bot API type "Contact".

type ConvertGiftToStarsParams

type ConvertGiftToStarsParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	OwnedGiftID          string `json:"owned_gift_id"`
}

ConvertGiftToStarsParams contains params for Telegram method "convertGiftToStars".

type CopyMessageParams

type CopyMessageParams struct {
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	FromChatID              any                     `json:"from_chat_id"`
	MessageID               int64                   `json:"message_id"`
	VideoStartTimestamp     int64                   `json:"video_start_timestamp,omitempty"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

CopyMessageParams contains params for Telegram method "copyMessage".

type CopyMessagesParams

type CopyMessagesParams struct {
	ChatID                any     `json:"chat_id"`
	MessageThreadID       int64   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID int64   `json:"direct_messages_topic_id,omitempty"`
	FromChatID            any     `json:"from_chat_id"`
	MessageIds            []int64 `json:"message_ids"`
	DisableNotification   bool    `json:"disable_notification,omitempty"`
	ProtectContent        bool    `json:"protect_content,omitempty"`
	RemoveCaption         bool    `json:"remove_caption,omitempty"`
}

CopyMessagesParams contains params for Telegram method "copyMessages".

type CopyTextButton

type CopyTextButton struct {
	Text string `json:"text"`
}

CopyTextButton maps to Telegram Bot API type "CopyTextButton".

type CreateChatInviteLinkParams

type CreateChatInviteLinkParams struct {
	ChatID             any    `json:"chat_id"`
	Name               string `json:"name,omitempty"`
	ExpireDate         int64  `json:"expire_date,omitempty"`
	MemberLimit        int64  `json:"member_limit,omitempty"`
	CreatesJoinRequest bool   `json:"creates_join_request,omitempty"`
}

CreateChatInviteLinkParams contains params for Telegram method "createChatInviteLink".

type CreateChatSubscriptionInviteLinkParams

type CreateChatSubscriptionInviteLinkParams struct {
	ChatID             any    `json:"chat_id"`
	Name               string `json:"name,omitempty"`
	SubscriptionPeriod int64  `json:"subscription_period"`
	SubscriptionPrice  int64  `json:"subscription_price"`
}

CreateChatSubscriptionInviteLinkParams contains params for Telegram method "createChatSubscriptionInviteLink".

type CreateForumTopicParams

type CreateForumTopicParams struct {
	ChatID            any    `json:"chat_id"`
	Name              string `json:"name"`
	IconColor         int64  `json:"icon_color,omitempty"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

CreateForumTopicParams contains params for Telegram method "createForumTopic".

type CreateInvoiceLinkParams

type CreateInvoiceLinkParams struct {
	BusinessConnectionID      string         `json:"business_connection_id,omitempty"`
	Title                     string         `json:"title"`
	Description               string         `json:"description"`
	Payload                   string         `json:"payload"`
	ProviderToken             string         `json:"provider_token,omitempty"`
	Currency                  string         `json:"currency"`
	Prices                    []LabeledPrice `json:"prices"`
	SubscriptionPeriod        int64          `json:"subscription_period,omitempty"`
	MaxTipAmount              int64          `json:"max_tip_amount,omitempty"`
	SuggestedTipAmounts       []int64        `json:"suggested_tip_amounts,omitempty"`
	ProviderData              string         `json:"provider_data,omitempty"`
	PhotoURL                  string         `json:"photo_url,omitempty"`
	PhotoSize                 int64          `json:"photo_size,omitempty"`
	PhotoWidth                int64          `json:"photo_width,omitempty"`
	PhotoHeight               int64          `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"`
}

CreateInvoiceLinkParams contains params for Telegram method "createInvoiceLink".

type CreateNewStickerSetParams

type CreateNewStickerSetParams struct {
	UserID          int64          `json:"user_id"`
	Name            string         `json:"name"`
	Title           string         `json:"title"`
	Stickers        []InputSticker `json:"stickers"`
	StickerType     string         `json:"sticker_type,omitempty"`
	NeedsRepainting bool           `json:"needs_repainting,omitempty"`
}

CreateNewStickerSetParams contains params for Telegram method "createNewStickerSet".

type DeclineChatJoinRequestParams

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

DeclineChatJoinRequestParams contains params for Telegram method "declineChatJoinRequest".

type DeclineSuggestedPostParams

type DeclineSuggestedPostParams struct {
	ChatID    int64  `json:"chat_id"`
	MessageID int64  `json:"message_id"`
	Comment   string `json:"comment,omitempty"`
}

DeclineSuggestedPostParams contains params for Telegram method "declineSuggestedPost".

type DeleteAllMessageReactionsParams added in v0.2.0

type DeleteAllMessageReactionsParams struct {
	ChatID      any   `json:"chat_id"`
	UserID      int64 `json:"user_id,omitempty"`
	ActorChatID int64 `json:"actor_chat_id,omitempty"`
}

DeleteAllMessageReactionsParams contains params for Telegram method "deleteAllMessageReactions".

type DeleteBusinessMessagesParams

type DeleteBusinessMessagesParams struct {
	BusinessConnectionID string  `json:"business_connection_id"`
	MessageIds           []int64 `json:"message_ids"`
}

DeleteBusinessMessagesParams contains params for Telegram method "deleteBusinessMessages".

type DeleteChatPhotoParams

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

DeleteChatPhotoParams contains params for Telegram method "deleteChatPhoto".

type DeleteChatStickerSetParams

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

DeleteChatStickerSetParams contains params for Telegram method "deleteChatStickerSet".

type DeleteEphemeralMessageParams added in v0.2.0

type DeleteEphemeralMessageParams struct {
	ChatID             any   `json:"chat_id"`
	ReceiverUserID     int64 `json:"receiver_user_id"`
	EphemeralMessageID int64 `json:"ephemeral_message_id"`
}

DeleteEphemeralMessageParams contains params for Telegram method "deleteEphemeralMessage".

type DeleteForumTopicParams

type DeleteForumTopicParams struct {
	ChatID          any   `json:"chat_id"`
	MessageThreadID int64 `json:"message_thread_id"`
}

DeleteForumTopicParams contains params for Telegram method "deleteForumTopic".

type DeleteMessageParams

type DeleteMessageParams struct {
	ChatID    any   `json:"chat_id"`
	MessageID int64 `json:"message_id"`
}

DeleteMessageParams contains params for Telegram method "deleteMessage".

type DeleteMessageReactionParams added in v0.2.0

type DeleteMessageReactionParams struct {
	ChatID      any   `json:"chat_id"`
	MessageID   int64 `json:"message_id"`
	UserID      int64 `json:"user_id,omitempty"`
	ActorChatID int64 `json:"actor_chat_id,omitempty"`
}

DeleteMessageReactionParams contains params for Telegram method "deleteMessageReaction".

type DeleteMessagesParams

type DeleteMessagesParams struct {
	ChatID     any     `json:"chat_id"`
	MessageIds []int64 `json:"message_ids"`
}

DeleteMessagesParams contains params for Telegram method "deleteMessages".

type DeleteMyCommandsParams

type DeleteMyCommandsParams struct {
	Scope        BotCommandScope `json:"scope,omitempty"`
	LanguageCode string          `json:"language_code,omitempty"`
}

DeleteMyCommandsParams contains params for Telegram method "deleteMyCommands".

type DeleteStickerFromSetParams

type DeleteStickerFromSetParams struct {
	Sticker string `json:"sticker"`
}

DeleteStickerFromSetParams contains params for Telegram method "deleteStickerFromSet".

type DeleteStickerSetParams

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

DeleteStickerSetParams contains params for Telegram method "deleteStickerSet".

type DeleteStoryParams

type DeleteStoryParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	StoryID              int64  `json:"story_id"`
}

DeleteStoryParams contains params for Telegram method "deleteStory".

type DeleteWebhookParams

type DeleteWebhookParams struct {
	DropPendingUpdates bool `json:"drop_pending_updates,omitempty"`
}

DeleteWebhookParams contains params for Telegram method "deleteWebhook".

type Dice

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

Dice maps to Telegram Bot API type "Dice".

type DirectMessagePriceChanged

type DirectMessagePriceChanged struct {
	AreDirectMessagesEnabled bool  `json:"are_direct_messages_enabled"`
	DirectMessageStarCount   int64 `json:"direct_message_star_count,omitempty"`
}

DirectMessagePriceChanged maps to Telegram Bot API type "DirectMessagePriceChanged".

type DirectMessagesTopic

type DirectMessagesTopic struct {
	TopicID int64 `json:"topic_id"`
	User    *User `json:"user,omitempty"`
}

DirectMessagesTopic maps to Telegram Bot API type "DirectMessagesTopic".

type Document

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

Document maps to Telegram Bot API type "Document".

type EditChatInviteLinkParams

type EditChatInviteLinkParams struct {
	ChatID             any    `json:"chat_id"`
	InviteLink         string `json:"invite_link"`
	Name               string `json:"name,omitempty"`
	ExpireDate         int64  `json:"expire_date,omitempty"`
	MemberLimit        int64  `json:"member_limit,omitempty"`
	CreatesJoinRequest bool   `json:"creates_join_request,omitempty"`
}

EditChatInviteLinkParams contains params for Telegram method "editChatInviteLink".

type EditChatSubscriptionInviteLinkParams

type EditChatSubscriptionInviteLinkParams struct {
	ChatID     any    `json:"chat_id"`
	InviteLink string `json:"invite_link"`
	Name       string `json:"name,omitempty"`
}

EditChatSubscriptionInviteLinkParams contains params for Telegram method "editChatSubscriptionInviteLink".

type EditEphemeralMessageCaptionParams added in v0.2.0

type EditEphemeralMessageCaptionParams struct {
	ChatID             any                  `json:"chat_id"`
	ReceiverUserID     int64                `json:"receiver_user_id"`
	EphemeralMessageID int64                `json:"ephemeral_message_id"`
	Caption            string               `json:"caption,omitempty"`
	ParseMode          string               `json:"parse_mode,omitempty"`
	CaptionEntities    []MessageEntity      `json:"caption_entities,omitempty"`
	ReplyMarkup        InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageCaptionParams contains params for Telegram method "editEphemeralMessageCaption".

type EditEphemeralMessageMediaParams added in v0.2.0

type EditEphemeralMessageMediaParams struct {
	ChatID             any                  `json:"chat_id"`
	ReceiverUserID     int64                `json:"receiver_user_id"`
	EphemeralMessageID int64                `json:"ephemeral_message_id"`
	Media              InputMedia           `json:"media"`
	ReplyMarkup        InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageMediaParams contains params for Telegram method "editEphemeralMessageMedia".

type EditEphemeralMessageReplyMarkupParams added in v0.2.0

type EditEphemeralMessageReplyMarkupParams struct {
	ChatID             any                  `json:"chat_id"`
	ReceiverUserID     int64                `json:"receiver_user_id"`
	EphemeralMessageID int64                `json:"ephemeral_message_id"`
	ReplyMarkup        InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageReplyMarkupParams contains params for Telegram method "editEphemeralMessageReplyMarkup".

type EditEphemeralMessageTextParams added in v0.2.0

type EditEphemeralMessageTextParams struct {
	ChatID             any                  `json:"chat_id"`
	ReceiverUserID     int64                `json:"receiver_user_id"`
	EphemeralMessageID int64                `json:"ephemeral_message_id"`
	Text               string               `json:"text"`
	ParseMode          string               `json:"parse_mode,omitempty"`
	Entities           []MessageEntity      `json:"entities,omitempty"`
	LinkPreviewOptions LinkPreviewOptions   `json:"link_preview_options,omitempty"`
	ReplyMarkup        InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditEphemeralMessageTextParams contains params for Telegram method "editEphemeralMessageText".

type EditForumTopicParams

type EditForumTopicParams struct {
	ChatID            any    `json:"chat_id"`
	MessageThreadID   int64  `json:"message_thread_id"`
	Name              string `json:"name,omitempty"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}

EditForumTopicParams contains params for Telegram method "editForumTopic".

type EditGeneralForumTopicParams

type EditGeneralForumTopicParams struct {
	ChatID any    `json:"chat_id"`
	Name   string `json:"name"`
}

EditGeneralForumTopicParams contains params for Telegram method "editGeneralForumTopic".

type EditMessageCaptionParams

type EditMessageCaptionParams struct {
	BusinessConnectionID  string               `json:"business_connection_id,omitempty"`
	ChatID                any                  `json:"chat_id,omitempty"`
	MessageID             int64                `json:"message_id,omitempty"`
	InlineMessageID       string               `json:"inline_message_id,omitempty"`
	Caption               string               `json:"caption,omitempty"`
	ParseMode             string               `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity      `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                 `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageCaptionParams contains params for Telegram method "editMessageCaption".

type EditMessageChecklistParams

type EditMessageChecklistParams struct {
	BusinessConnectionID string               `json:"business_connection_id"`
	ChatID               any                  `json:"chat_id"`
	MessageID            int64                `json:"message_id"`
	Checklist            InputChecklist       `json:"checklist"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageChecklistParams contains params for Telegram method "editMessageChecklist".

type EditMessageLiveLocationParams

type EditMessageLiveLocationParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id,omitempty"`
	MessageID            int64                `json:"message_id,omitempty"`
	InlineMessageID      string               `json:"inline_message_id,omitempty"`
	Latitude             float64              `json:"latitude"`
	Longitude            float64              `json:"longitude"`
	LivePeriod           int64                `json:"live_period,omitempty"`
	HorizontalAccuracy   float64              `json:"horizontal_accuracy,omitempty"`
	Heading              int64                `json:"heading,omitempty"`
	ProximityAlertRadius int64                `json:"proximity_alert_radius,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageLiveLocationParams contains params for Telegram method "editMessageLiveLocation".

type EditMessageMediaParams

type EditMessageMediaParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id,omitempty"`
	MessageID            int64                `json:"message_id,omitempty"`
	InlineMessageID      string               `json:"inline_message_id,omitempty"`
	Media                InputMedia           `json:"media"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageMediaParams contains params for Telegram method "editMessageMedia".

type EditMessageReplyMarkupParams

type EditMessageReplyMarkupParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id,omitempty"`
	MessageID            int64                `json:"message_id,omitempty"`
	InlineMessageID      string               `json:"inline_message_id,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageReplyMarkupParams contains params for Telegram method "editMessageReplyMarkup".

type EditMessageTextParams

type EditMessageTextParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id,omitempty"`
	MessageID            int64                `json:"message_id,omitempty"`
	InlineMessageID      string               `json:"inline_message_id,omitempty"`
	Text                 string               `json:"text,omitempty"`
	ParseMode            string               `json:"parse_mode,omitempty"`
	Entities             []MessageEntity      `json:"entities,omitempty"`
	LinkPreviewOptions   LinkPreviewOptions   `json:"link_preview_options,omitempty"`
	RichMessage          InputRichMessage     `json:"rich_message,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

EditMessageTextParams contains params for Telegram method "editMessageText".

type EditStoryParams

type EditStoryParams struct {
	BusinessConnectionID string            `json:"business_connection_id"`
	StoryID              int64             `json:"story_id"`
	Content              InputStoryContent `json:"content"`
	Caption              string            `json:"caption,omitempty"`
	ParseMode            string            `json:"parse_mode,omitempty"`
	CaptionEntities      []MessageEntity   `json:"caption_entities,omitempty"`
	Areas                []StoryArea       `json:"areas,omitempty"`
}

EditStoryParams contains params for Telegram method "editStory".

type EditUserStarSubscriptionParams

type EditUserStarSubscriptionParams struct {
	UserID                  int64  `json:"user_id"`
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	IsCanceled              bool   `json:"is_canceled"`
}

EditUserStarSubscriptionParams contains params for Telegram method "editUserStarSubscription".

type EncryptedCredentials

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

EncryptedCredentials maps to Telegram Bot API type "EncryptedCredentials".

type EncryptedPassportElement

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

EncryptedPassportElement maps to Telegram Bot API type "EncryptedPassportElement".

type ExponentialRetryPolicy added in v0.2.0

type ExponentialRetryPolicy struct {
	MaxAttempts  int
	InitialDelay time.Duration
	MaxDelay     time.Duration
	Jitter       float64
}

ExponentialRetryPolicy retries rate limits, server failures, and network errors with bounded exponential backoff. MaxAttempts includes the initial request. Jitter is the fraction, between 0 and 1, randomly subtracted from the calculated delay. Telegram retry_after values take precedence over the exponential delay and aren't capped or jittered.

WARNING: This policy doesn't distinguish read-only from side-effecting methods. Wrap it in RetryPolicyFunc when retries must be limited by method.

func (ExponentialRetryPolicy) ShouldRetry added in v0.2.0

func (policy ExponentialRetryPolicy) ShouldRetry(attempt RetryAttempt) (bool, time.Duration)

ShouldRetry implements RetryPolicy.

type ExportChatInviteLinkParams

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

ExportChatInviteLinkParams contains params for Telegram method "exportChatInviteLink".

type ExternalReplyInfo

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

ExternalReplyInfo maps to Telegram Bot API type "ExternalReplyInfo".

func (*ExternalReplyInfo) UnmarshalJSON

func (value *ExternalReplyInfo) UnmarshalJSON(data []byte) error

type File

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

File maps to Telegram Bot API type "File".

type ForceReply

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

ForceReply maps to Telegram Bot API type "ForceReply".

type ForumTopic

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

ForumTopic maps to Telegram Bot API type "ForumTopic".

type ForumTopicClosed

type ForumTopicClosed struct {
}

ForumTopicClosed maps to Telegram Bot API type "ForumTopicClosed".

type ForumTopicCreated

type ForumTopicCreated struct {
	Name              string `json:"name"`
	IconColor         int64  `json:"icon_color"`
	IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
	IsNameImplicit    bool   `json:"is_name_implicit,omitempty"`
}

ForumTopicCreated maps to Telegram Bot API type "ForumTopicCreated".

type ForumTopicEdited

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

ForumTopicEdited maps to Telegram Bot API type "ForumTopicEdited".

type ForumTopicReopened

type ForumTopicReopened struct {
}

ForumTopicReopened maps to Telegram Bot API type "ForumTopicReopened".

type ForwardMessageParams

type ForwardMessageParams struct {
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	FromChatID              any                     `json:"from_chat_id"`
	VideoStartTimestamp     int64                   `json:"video_start_timestamp,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	MessageID               int64                   `json:"message_id"`
}

ForwardMessageParams contains params for Telegram method "forwardMessage".

type ForwardMessagesParams

type ForwardMessagesParams struct {
	ChatID                any     `json:"chat_id"`
	MessageThreadID       int64   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID int64   `json:"direct_messages_topic_id,omitempty"`
	FromChatID            any     `json:"from_chat_id"`
	MessageIds            []int64 `json:"message_ids"`
	DisableNotification   bool    `json:"disable_notification,omitempty"`
	ProtectContent        bool    `json:"protect_content,omitempty"`
}

ForwardMessagesParams contains params for Telegram method "forwardMessages".

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 maps to Telegram Bot API type "Game".

type GameHighScore

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

GameHighScore maps to Telegram Bot API type "GameHighScore".

type GeneralForumTopicHidden

type GeneralForumTopicHidden struct {
}

GeneralForumTopicHidden maps to Telegram Bot API type "GeneralForumTopicHidden".

type GeneralForumTopicUnhidden

type GeneralForumTopicUnhidden struct {
}

GeneralForumTopicUnhidden maps to Telegram Bot API type "GeneralForumTopicUnhidden".

type GetAvailableGiftsParams

type GetAvailableGiftsParams struct {
}

GetAvailableGiftsParams contains params for Telegram method "getAvailableGifts".

type GetBusinessAccountGiftsParams

type GetBusinessAccountGiftsParams struct {
	BusinessConnectionID        string `json:"business_connection_id"`
	ExcludeUnsaved              bool   `json:"exclude_unsaved,omitempty"`
	ExcludeSaved                bool   `json:"exclude_saved,omitempty"`
	ExcludeUnlimited            bool   `json:"exclude_unlimited,omitempty"`
	ExcludeLimitedUpgradable    bool   `json:"exclude_limited_upgradable,omitempty"`
	ExcludeLimitedNonUpgradable bool   `json:"exclude_limited_non_upgradable,omitempty"`
	ExcludeUnique               bool   `json:"exclude_unique,omitempty"`
	ExcludeFromBlockchain       bool   `json:"exclude_from_blockchain,omitempty"`
	SortByPrice                 bool   `json:"sort_by_price,omitempty"`
	Offset                      string `json:"offset,omitempty"`
	Limit                       int64  `json:"limit,omitempty"`
}

GetBusinessAccountGiftsParams contains params for Telegram method "getBusinessAccountGifts".

type GetBusinessAccountStarBalanceParams

type GetBusinessAccountStarBalanceParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
}

GetBusinessAccountStarBalanceParams contains params for Telegram method "getBusinessAccountStarBalance".

type GetBusinessConnectionParams

type GetBusinessConnectionParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
}

GetBusinessConnectionParams contains params for Telegram method "getBusinessConnection".

type GetChatAdministratorsParams

type GetChatAdministratorsParams struct {
	ChatID     any  `json:"chat_id"`
	ReturnBots bool `json:"return_bots,omitempty"`
}

GetChatAdministratorsParams contains params for Telegram method "getChatAdministrators".

type GetChatGiftsParams

type GetChatGiftsParams struct {
	ChatID                      any    `json:"chat_id"`
	ExcludeUnsaved              bool   `json:"exclude_unsaved,omitempty"`
	ExcludeSaved                bool   `json:"exclude_saved,omitempty"`
	ExcludeUnlimited            bool   `json:"exclude_unlimited,omitempty"`
	ExcludeLimitedUpgradable    bool   `json:"exclude_limited_upgradable,omitempty"`
	ExcludeLimitedNonUpgradable bool   `json:"exclude_limited_non_upgradable,omitempty"`
	ExcludeFromBlockchain       bool   `json:"exclude_from_blockchain,omitempty"`
	ExcludeUnique               bool   `json:"exclude_unique,omitempty"`
	SortByPrice                 bool   `json:"sort_by_price,omitempty"`
	Offset                      string `json:"offset,omitempty"`
	Limit                       int64  `json:"limit,omitempty"`
}

GetChatGiftsParams contains params for Telegram method "getChatGifts".

type GetChatMemberCountParams

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

GetChatMemberCountParams contains params for Telegram method "getChatMemberCount".

type GetChatMemberParams

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

GetChatMemberParams contains params for Telegram method "getChatMember".

type GetChatMenuButtonParams

type GetChatMenuButtonParams struct {
	ChatID int64 `json:"chat_id,omitempty"`
}

GetChatMenuButtonParams contains params for Telegram method "getChatMenuButton".

type GetChatParams

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

GetChatParams contains params for Telegram method "getChat".

type GetCustomEmojiStickersParams

type GetCustomEmojiStickersParams struct {
	CustomEmojiIds []string `json:"custom_emoji_ids"`
}

GetCustomEmojiStickersParams contains params for Telegram method "getCustomEmojiStickers".

type GetFileParams

type GetFileParams struct {
	FileID string `json:"file_id"`
}

GetFileParams contains params for Telegram method "getFile".

type GetForumTopicIconStickersParams

type GetForumTopicIconStickersParams struct {
}

GetForumTopicIconStickersParams contains params for Telegram method "getForumTopicIconStickers".

type GetGameHighScoresParams

type GetGameHighScoresParams struct {
	UserID          int64  `json:"user_id"`
	ChatID          int64  `json:"chat_id,omitempty"`
	MessageID       int64  `json:"message_id,omitempty"`
	InlineMessageID string `json:"inline_message_id,omitempty"`
}

GetGameHighScoresParams contains params for Telegram method "getGameHighScores".

type GetManagedBotAccessSettingsParams added in v0.2.0

type GetManagedBotAccessSettingsParams struct {
	UserID int64 `json:"user_id"`
}

GetManagedBotAccessSettingsParams contains params for Telegram method "getManagedBotAccessSettings".

type GetManagedBotTokenParams added in v0.2.0

type GetManagedBotTokenParams struct {
	UserID int64 `json:"user_id"`
}

GetManagedBotTokenParams contains params for Telegram method "getManagedBotToken".

type GetMeParams

type GetMeParams struct {
}

GetMeParams contains params for Telegram method "getMe".

type GetMyCommandsParams

type GetMyCommandsParams struct {
	Scope        BotCommandScope `json:"scope,omitempty"`
	LanguageCode string          `json:"language_code,omitempty"`
}

GetMyCommandsParams contains params for Telegram method "getMyCommands".

type GetMyDefaultAdministratorRightsParams

type GetMyDefaultAdministratorRightsParams struct {
	ForChannels bool `json:"for_channels,omitempty"`
}

GetMyDefaultAdministratorRightsParams contains params for Telegram method "getMyDefaultAdministratorRights".

type GetMyDescriptionParams

type GetMyDescriptionParams struct {
	LanguageCode string `json:"language_code,omitempty"`
}

GetMyDescriptionParams contains params for Telegram method "getMyDescription".

type GetMyNameParams

type GetMyNameParams struct {
	LanguageCode string `json:"language_code,omitempty"`
}

GetMyNameParams contains params for Telegram method "getMyName".

type GetMyShortDescriptionParams

type GetMyShortDescriptionParams struct {
	LanguageCode string `json:"language_code,omitempty"`
}

GetMyShortDescriptionParams contains params for Telegram method "getMyShortDescription".

type GetMyStarBalanceParams

type GetMyStarBalanceParams struct {
}

GetMyStarBalanceParams contains params for Telegram method "getMyStarBalance".

type GetStarTransactionsParams

type GetStarTransactionsParams struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

GetStarTransactionsParams contains params for Telegram method "getStarTransactions".

type GetStickerSetParams

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

GetStickerSetParams contains params for Telegram method "getStickerSet".

type GetUpdatesParams

type GetUpdatesParams struct {
	Offset         int64    `json:"offset,omitempty"`
	Limit          int64    `json:"limit,omitempty"`
	Timeout        int64    `json:"timeout,omitempty"`
	AllowedUpdates []string `json:"allowed_updates,omitempty"`
}

GetUpdatesParams contains params for Telegram method "getUpdates".

type GetUserChatBoostsParams

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

GetUserChatBoostsParams contains params for Telegram method "getUserChatBoosts".

type GetUserGiftsParams

type GetUserGiftsParams struct {
	UserID                      int64  `json:"user_id"`
	ExcludeUnlimited            bool   `json:"exclude_unlimited,omitempty"`
	ExcludeLimitedUpgradable    bool   `json:"exclude_limited_upgradable,omitempty"`
	ExcludeLimitedNonUpgradable bool   `json:"exclude_limited_non_upgradable,omitempty"`
	ExcludeFromBlockchain       bool   `json:"exclude_from_blockchain,omitempty"`
	ExcludeUnique               bool   `json:"exclude_unique,omitempty"`
	SortByPrice                 bool   `json:"sort_by_price,omitempty"`
	Offset                      string `json:"offset,omitempty"`
	Limit                       int64  `json:"limit,omitempty"`
}

GetUserGiftsParams contains params for Telegram method "getUserGifts".

type GetUserPersonalChatMessagesParams added in v0.2.0

type GetUserPersonalChatMessagesParams struct {
	UserID int64 `json:"user_id"`
	Limit  int64 `json:"limit"`
}

GetUserPersonalChatMessagesParams contains params for Telegram method "getUserPersonalChatMessages".

type GetUserProfileAudiosParams

type GetUserProfileAudiosParams struct {
	UserID int64 `json:"user_id"`
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

GetUserProfileAudiosParams contains params for Telegram method "getUserProfileAudios".

type GetUserProfilePhotosParams

type GetUserProfilePhotosParams struct {
	UserID int64 `json:"user_id"`
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

GetUserProfilePhotosParams contains params for Telegram method "getUserProfilePhotos".

type GetWebhookInfoParams

type GetWebhookInfoParams struct {
}

GetWebhookInfoParams contains params for Telegram method "getWebhookInfo".

type Gift

type Gift struct {
	ID                     string          `json:"id"`
	Sticker                *Sticker        `json:"sticker"`
	StarCount              int64           `json:"star_count"`
	UpgradeStarCount       int64           `json:"upgrade_star_count,omitempty"`
	IsPremium              bool            `json:"is_premium,omitempty"`
	HasColors              bool            `json:"has_colors,omitempty"`
	TotalCount             int64           `json:"total_count,omitempty"`
	RemainingCount         int64           `json:"remaining_count,omitempty"`
	PersonalTotalCount     int64           `json:"personal_total_count,omitempty"`
	PersonalRemainingCount int64           `json:"personal_remaining_count,omitempty"`
	Background             *GiftBackground `json:"background,omitempty"`
	UniqueGiftVariantCount int64           `json:"unique_gift_variant_count,omitempty"`
	PublisherChat          *Chat           `json:"publisher_chat,omitempty"`
}

Gift maps to Telegram Bot API type "Gift".

type GiftBackground

type GiftBackground struct {
	CenterColor int64 `json:"center_color"`
	EdgeColor   int64 `json:"edge_color"`
	TextColor   int64 `json:"text_color"`
}

GiftBackground maps to Telegram Bot API type "GiftBackground".

type GiftInfo

type GiftInfo struct {
	Gift                    *Gift           `json:"gift"`
	OwnedGiftID             string          `json:"owned_gift_id,omitempty"`
	ConvertStarCount        int64           `json:"convert_star_count,omitempty"`
	PrepaidUpgradeStarCount int64           `json:"prepaid_upgrade_star_count,omitempty"`
	IsUpgradeSeparate       bool            `json:"is_upgrade_separate,omitempty"`
	CanBeUpgraded           bool            `json:"can_be_upgraded,omitempty"`
	Text                    string          `json:"text,omitempty"`
	Entities                []MessageEntity `json:"entities,omitempty"`
	IsPrivate               bool            `json:"is_private,omitempty"`
	UniqueGiftNumber        int64           `json:"unique_gift_number,omitempty"`
}

GiftInfo maps to Telegram Bot API type "GiftInfo".

type GiftPremiumSubscriptionParams

type GiftPremiumSubscriptionParams struct {
	UserID        int64           `json:"user_id"`
	MonthCount    int64           `json:"month_count"`
	StarCount     int64           `json:"star_count"`
	Text          string          `json:"text,omitempty"`
	TextParseMode string          `json:"text_parse_mode,omitempty"`
	TextEntities  []MessageEntity `json:"text_entities,omitempty"`
}

GiftPremiumSubscriptionParams contains params for Telegram method "giftPremiumSubscription".

type Gifts

type Gifts struct {
	Gifts []Gift `json:"gifts"`
}

Gifts maps to Telegram Bot API type "Gifts".

type Giveaway

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

Giveaway maps to Telegram Bot API type "Giveaway".

type GiveawayCompleted

type GiveawayCompleted struct {
	WinnerCount         int64    `json:"winner_count"`
	UnclaimedPrizeCount int64    `json:"unclaimed_prize_count,omitempty"`
	GiveawayMessage     *Message `json:"giveaway_message,omitempty"`
	IsStarGiveaway      bool     `json:"is_star_giveaway,omitempty"`
}

GiveawayCompleted maps to Telegram Bot API type "GiveawayCompleted".

type GiveawayCreated

type GiveawayCreated struct {
	PrizeStarCount int64 `json:"prize_star_count,omitempty"`
}

GiveawayCreated maps to Telegram Bot API type "GiveawayCreated".

type GiveawayWinners

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

GiveawayWinners maps to Telegram Bot API type "GiveawayWinners".

type HideGeneralForumTopicParams

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

HideGeneralForumTopicParams contains params for Telegram method "hideGeneralForumTopic".

type InaccessibleMessage

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

InaccessibleMessage maps to Telegram Bot API type "InaccessibleMessage".

type InlineKeyboardButton

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

InlineKeyboardButton maps to Telegram Bot API type "InlineKeyboardButton".

type InlineKeyboardMarkup

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

InlineKeyboardMarkup maps to Telegram Bot API type "InlineKeyboardMarkup".

type InlineQuery

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

InlineQuery maps to Telegram Bot API type "InlineQuery".

type InlineQueryResult

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

InlineQueryResult is a union type in Telegram Bot API.

type InlineQueryResultArticle

type InlineQueryResultArticle struct {
	Type                string                `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"`
	Description         string                `json:"description,omitempty"`
	ThumbnailURL        string                `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int64                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int64                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultArticle maps to Telegram Bot API type "InlineQueryResultArticle".

func (*InlineQueryResultArticle) UnmarshalJSON

func (value *InlineQueryResultArticle) UnmarshalJSON(data []byte) error

type InlineQueryResultAudio

type InlineQueryResultAudio struct {
	Type                string                `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"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	Performer           string                `json:"performer,omitempty"`
	AudioDuration       int64                 `json:"audio_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultAudio maps to Telegram Bot API type "InlineQueryResultAudio".

func (*InlineQueryResultAudio) UnmarshalJSON

func (value *InlineQueryResultAudio) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedAudio

type InlineQueryResultCachedAudio struct {
	Type                string                `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 maps to Telegram Bot API type "InlineQueryResultCachedAudio".

func (*InlineQueryResultCachedAudio) UnmarshalJSON

func (value *InlineQueryResultCachedAudio) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedDocument

type InlineQueryResultCachedDocument struct {
	Type                string                `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"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedDocument maps to Telegram Bot API type "InlineQueryResultCachedDocument".

func (*InlineQueryResultCachedDocument) UnmarshalJSON

func (value *InlineQueryResultCachedDocument) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedGif

type InlineQueryResultCachedGif struct {
	Type                  string                `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"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                  `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedGif maps to Telegram Bot API type "InlineQueryResultCachedGif".

func (*InlineQueryResultCachedGif) UnmarshalJSON

func (value *InlineQueryResultCachedGif) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedMpeg4Gif

type InlineQueryResultCachedMpeg4Gif struct {
	Type                  string                `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"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                  `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedMpeg4Gif maps to Telegram Bot API type "InlineQueryResultCachedMpeg4Gif".

func (*InlineQueryResultCachedMpeg4Gif) UnmarshalJSON

func (value *InlineQueryResultCachedMpeg4Gif) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedPhoto

type InlineQueryResultCachedPhoto struct {
	Type                  string                `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"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                  `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedPhoto maps to Telegram Bot API type "InlineQueryResultCachedPhoto".

func (*InlineQueryResultCachedPhoto) UnmarshalJSON

func (value *InlineQueryResultCachedPhoto) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedSticker

type InlineQueryResultCachedSticker struct {
	Type                string                `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 maps to Telegram Bot API type "InlineQueryResultCachedSticker".

func (*InlineQueryResultCachedSticker) UnmarshalJSON

func (value *InlineQueryResultCachedSticker) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedVideo

type InlineQueryResultCachedVideo struct {
	Type                  string                `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"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                  `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVideo maps to Telegram Bot API type "InlineQueryResultCachedVideo".

func (*InlineQueryResultCachedVideo) UnmarshalJSON

func (value *InlineQueryResultCachedVideo) UnmarshalJSON(data []byte) error

type InlineQueryResultCachedVoice

type InlineQueryResultCachedVoice struct {
	Type                string                `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"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedVoice maps to Telegram Bot API type "InlineQueryResultCachedVoice".

func (*InlineQueryResultCachedVoice) UnmarshalJSON

func (value *InlineQueryResultCachedVoice) UnmarshalJSON(data []byte) error

type InlineQueryResultContact

type InlineQueryResultContact struct {
	Type                string                `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"`
	ThumbnailURL        string                `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int64                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int64                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultContact maps to Telegram Bot API type "InlineQueryResultContact".

func (*InlineQueryResultContact) UnmarshalJSON

func (value *InlineQueryResultContact) UnmarshalJSON(data []byte) error

type InlineQueryResultDocument

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

InlineQueryResultDocument maps to Telegram Bot API type "InlineQueryResultDocument".

func (*InlineQueryResultDocument) UnmarshalJSON

func (value *InlineQueryResultDocument) UnmarshalJSON(data []byte) error

type InlineQueryResultGame

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

InlineQueryResultGame maps to Telegram Bot API type "InlineQueryResultGame".

type InlineQueryResultGif

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

InlineQueryResultGif maps to Telegram Bot API type "InlineQueryResultGif".

func (*InlineQueryResultGif) UnmarshalJSON

func (value *InlineQueryResultGif) UnmarshalJSON(data []byte) error

type InlineQueryResultLocation

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

InlineQueryResultLocation maps to Telegram Bot API type "InlineQueryResultLocation".

func (*InlineQueryResultLocation) UnmarshalJSON

func (value *InlineQueryResultLocation) UnmarshalJSON(data []byte) error

type InlineQueryResultMpeg4Gif

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

InlineQueryResultMpeg4Gif maps to Telegram Bot API type "InlineQueryResultMpeg4Gif".

func (*InlineQueryResultMpeg4Gif) UnmarshalJSON

func (value *InlineQueryResultMpeg4Gif) UnmarshalJSON(data []byte) error

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {
	Type                  string                `json:"type"`
	ID                    string                `json:"id"`
	PhotoURL              string                `json:"photo_url"`
	ThumbnailURL          string                `json:"thumbnail_url"`
	PhotoWidth            int64                 `json:"photo_width,omitempty"`
	PhotoHeight           int64                 `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"`
	CaptionEntities       []MessageEntity       `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool                  `json:"show_caption_above_media,omitempty"`
	ReplyMarkup           *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent   InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultPhoto maps to Telegram Bot API type "InlineQueryResultPhoto".

func (*InlineQueryResultPhoto) UnmarshalJSON

func (value *InlineQueryResultPhoto) UnmarshalJSON(data []byte) error

type InlineQueryResultVenue

type InlineQueryResultVenue struct {
	Type                string                `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"`
	ThumbnailURL        string                `json:"thumbnail_url,omitempty"`
	ThumbnailWidth      int64                 `json:"thumbnail_width,omitempty"`
	ThumbnailHeight     int64                 `json:"thumbnail_height,omitempty"`
}

InlineQueryResultVenue maps to Telegram Bot API type "InlineQueryResultVenue".

func (*InlineQueryResultVenue) UnmarshalJSON

func (value *InlineQueryResultVenue) UnmarshalJSON(data []byte) error

type InlineQueryResultVideo

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

InlineQueryResultVideo maps to Telegram Bot API type "InlineQueryResultVideo".

func (*InlineQueryResultVideo) UnmarshalJSON

func (value *InlineQueryResultVideo) UnmarshalJSON(data []byte) error

type InlineQueryResultVoice

type InlineQueryResultVoice struct {
	Type                string                `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"`
	CaptionEntities     []MessageEntity       `json:"caption_entities,omitempty"`
	VoiceDuration       int64                 `json:"voice_duration,omitempty"`
	ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
	InputMessageContent InputMessageContent   `json:"input_message_content,omitempty"`
}

InlineQueryResultVoice maps to Telegram Bot API type "InlineQueryResultVoice".

func (*InlineQueryResultVoice) UnmarshalJSON

func (value *InlineQueryResultVoice) UnmarshalJSON(data []byte) error

type InlineQueryResultsButton

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

InlineQueryResultsButton maps to Telegram Bot API type "InlineQueryResultsButton".

type InputChecklist

type InputChecklist struct {
	Title                    string               `json:"title"`
	ParseMode                string               `json:"parse_mode,omitempty"`
	TitleEntities            []MessageEntity      `json:"title_entities,omitempty"`
	Tasks                    []InputChecklistTask `json:"tasks"`
	OthersCanAddTasks        bool                 `json:"others_can_add_tasks,omitempty"`
	OthersCanMarkTasksAsDone bool                 `json:"others_can_mark_tasks_as_done,omitempty"`
}

InputChecklist maps to Telegram Bot API type "InputChecklist".

type InputChecklistTask

type InputChecklistTask struct {
	ID           int64           `json:"id"`
	Text         string          `json:"text"`
	ParseMode    string          `json:"parse_mode,omitempty"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
}

InputChecklistTask maps to Telegram Bot API type "InputChecklistTask".

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 maps to Telegram Bot API type "InputContactMessageContent".

type InputFile

type InputFile struct {
	FileID   string
	URL      string
	FilePath string
	Reader   io.Reader
	FileName string
}

InputFile represents Telegram file inputs: file_id, URL, local file path, or in-memory reader.

func FileFromID

func FileFromID(fileID string) InputFile

FileFromID creates an InputFile that references an existing Telegram file_id.

func FileFromPath

func FileFromPath(path string) InputFile

FileFromPath creates an InputFile that uploads a local file path.

func FileFromReader

func FileFromReader(name string, reader io.Reader) InputFile

FileFromReader creates an InputFile that uploads from a reader. If the reader also implements io.Closer, an interrupted upload may close it to unblock Read.

func FileFromURL

func FileFromURL(url string) InputFile

FileFromURL creates an InputFile that references a public URL.

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	Title                     string         `json:"title"`
	Description               string         `json:"description"`
	Payload                   string         `json:"payload"`
	ProviderToken             string         `json:"provider_token,omitempty"`
	Currency                  string         `json:"currency"`
	Prices                    []LabeledPrice `json:"prices"`
	MaxTipAmount              int64          `json:"max_tip_amount,omitempty"`
	SuggestedTipAmounts       []int64        `json:"suggested_tip_amounts,omitempty"`
	ProviderData              string         `json:"provider_data,omitempty"`
	PhotoURL                  string         `json:"photo_url,omitempty"`
	PhotoSize                 int64          `json:"photo_size,omitempty"`
	PhotoWidth                int64          `json:"photo_width,omitempty"`
	PhotoHeight               int64          `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 maps to Telegram Bot API type "InputInvoiceMessageContent".

type InputLocationMessageContent

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

InputLocationMessageContent maps to Telegram Bot API type "InputLocationMessageContent".

type InputMedia

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

InputMedia is a union type in Telegram Bot API.

type InputMediaAnimation

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

InputMediaAnimation maps to Telegram Bot API type "InputMediaAnimation".

type InputMediaAudio

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

InputMediaAudio maps to Telegram Bot API type "InputMediaAudio".

type InputMediaDocument

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

InputMediaDocument maps to Telegram Bot API type "InputMediaDocument".

type InputMediaLink struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

InputMediaLink maps to Telegram Bot API type "InputMediaLink".

type InputMediaLivePhoto added in v0.2.0

type InputMediaLivePhoto struct {
	Type                  string          `json:"type"`
	Media                 InputFile       `json:"media"`
	Photo                 InputFile       `json:"photo"`
	Caption               string          `json:"caption,omitempty"`
	ParseMode             string          `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool            `json:"show_caption_above_media,omitempty"`
	HasSpoiler            bool            `json:"has_spoiler,omitempty"`
}

InputMediaLivePhoto maps to Telegram Bot API type "InputMediaLivePhoto".

type InputMediaLocation added in v0.2.0

type InputMediaLocation struct {
	Type               string  `json:"type"`
	Latitude           float64 `json:"latitude"`
	Longitude          float64 `json:"longitude"`
	HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
}

InputMediaLocation maps to Telegram Bot API type "InputMediaLocation".

type InputMediaPhoto

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

InputMediaPhoto maps to Telegram Bot API type "InputMediaPhoto".

type InputMediaSticker added in v0.2.0

type InputMediaSticker struct {
	Type  string    `json:"type"`
	Media InputFile `json:"media"`
	Emoji string    `json:"emoji,omitempty"`
}

InputMediaSticker maps to Telegram Bot API type "InputMediaSticker".

type InputMediaVenue added in v0.2.0

type InputMediaVenue struct {
	Type            string  `json:"type"`
	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"`
}

InputMediaVenue maps to Telegram Bot API type "InputMediaVenue".

type InputMediaVideo

type InputMediaVideo struct {
	Type                  string          `json:"type"`
	Media                 InputFile       `json:"media"`
	Thumbnail             InputFile       `json:"thumbnail,omitempty"`
	Cover                 InputFile       `json:"cover,omitempty"`
	StartTimestamp        int64           `json:"start_timestamp,omitempty"`
	Caption               string          `json:"caption,omitempty"`
	ParseMode             string          `json:"parse_mode,omitempty"`
	CaptionEntities       []MessageEntity `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia bool            `json:"show_caption_above_media,omitempty"`
	Width                 int64           `json:"width,omitempty"`
	Height                int64           `json:"height,omitempty"`
	Duration              int64           `json:"duration,omitempty"`
	SupportsStreaming     bool            `json:"supports_streaming,omitempty"`
	HasSpoiler            bool            `json:"has_spoiler,omitempty"`
}

InputMediaVideo maps to Telegram Bot API type "InputMediaVideo".

type InputMediaVoiceNote added in v0.2.0

type InputMediaVoiceNote struct {
	Type            string          `json:"type"`
	Media           InputFile       `json:"media"`
	Caption         string          `json:"caption,omitempty"`
	ParseMode       string          `json:"parse_mode,omitempty"`
	CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
	Duration        int64           `json:"duration,omitempty"`
}

InputMediaVoiceNote maps to Telegram Bot API type "InputMediaVoiceNote".

type InputMessageContent

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

InputMessageContent is a union type in Telegram Bot API.

type InputPaidMedia

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

InputPaidMedia is a union type in Telegram Bot API.

type InputPaidMediaLivePhoto added in v0.2.0

type InputPaidMediaLivePhoto struct {
	Type  string    `json:"type"`
	Media InputFile `json:"media"`
	Photo InputFile `json:"photo"`
}

InputPaidMediaLivePhoto maps to Telegram Bot API type "InputPaidMediaLivePhoto".

type InputPaidMediaPhoto

type InputPaidMediaPhoto struct {
	Type  string    `json:"type"`
	Media InputFile `json:"media"`
}

InputPaidMediaPhoto maps to Telegram Bot API type "InputPaidMediaPhoto".

type InputPaidMediaVideo

type InputPaidMediaVideo struct {
	Type              string    `json:"type"`
	Media             InputFile `json:"media"`
	Thumbnail         InputFile `json:"thumbnail,omitempty"`
	Cover             InputFile `json:"cover,omitempty"`
	StartTimestamp    int64     `json:"start_timestamp,omitempty"`
	Width             int64     `json:"width,omitempty"`
	Height            int64     `json:"height,omitempty"`
	Duration          int64     `json:"duration,omitempty"`
	SupportsStreaming bool      `json:"supports_streaming,omitempty"`
}

InputPaidMediaVideo maps to Telegram Bot API type "InputPaidMediaVideo".

type InputPollMedia added in v0.2.0

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

InputPollMedia is a union type in Telegram Bot API.

type InputPollOption

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

InputPollOption maps to Telegram Bot API type "InputPollOption".

func (*InputPollOption) UnmarshalJSON added in v0.2.0

func (value *InputPollOption) UnmarshalJSON(data []byte) error

type InputPollOptionMedia added in v0.2.0

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

InputPollOptionMedia is a union type in Telegram Bot API.

type InputProfilePhoto

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

InputProfilePhoto is a union type in Telegram Bot API.

type InputProfilePhotoAnimated

type InputProfilePhotoAnimated struct {
	Type               string    `json:"type"`
	Animation          InputFile `json:"animation"`
	MainFrameTimestamp float64   `json:"main_frame_timestamp,omitempty"`
}

InputProfilePhotoAnimated maps to Telegram Bot API type "InputProfilePhotoAnimated".

type InputProfilePhotoStatic

type InputProfilePhotoStatic struct {
	Type  string    `json:"type"`
	Photo InputFile `json:"photo"`
}

InputProfilePhotoStatic maps to Telegram Bot API type "InputProfilePhotoStatic".

type InputRichBlock added in v0.2.0

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

InputRichBlock is a union type in Telegram Bot API.

type InputRichBlockAnchor added in v0.2.0

type InputRichBlockAnchor struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

InputRichBlockAnchor maps to Telegram Bot API type "InputRichBlockAnchor".

type InputRichBlockAnimation added in v0.2.0

type InputRichBlockAnimation struct {
	Type      string               `json:"type"`
	Animation *InputMediaAnimation `json:"animation"`
	Caption   *RichBlockCaption    `json:"caption,omitempty"`
}

InputRichBlockAnimation maps to Telegram Bot API type "InputRichBlockAnimation".

type InputRichBlockAudio added in v0.2.0

type InputRichBlockAudio struct {
	Type    string            `json:"type"`
	Audio   *InputMediaAudio  `json:"audio"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockAudio maps to Telegram Bot API type "InputRichBlockAudio".

type InputRichBlockBlockQuotation added in v0.2.0

type InputRichBlockBlockQuotation struct {
	Type   string           `json:"type"`
	Blocks []InputRichBlock `json:"blocks"`
	Credit RichText         `json:"credit,omitempty"`
}

InputRichBlockBlockQuotation maps to Telegram Bot API type "InputRichBlockBlockQuotation".

func (*InputRichBlockBlockQuotation) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockBlockQuotation) UnmarshalJSON(data []byte) error

type InputRichBlockCollage added in v0.2.0

type InputRichBlockCollage struct {
	Type    string            `json:"type"`
	Blocks  []InputRichBlock  `json:"blocks"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockCollage maps to Telegram Bot API type "InputRichBlockCollage".

func (*InputRichBlockCollage) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockCollage) UnmarshalJSON(data []byte) error

type InputRichBlockDetails added in v0.2.0

type InputRichBlockDetails struct {
	Type    string           `json:"type"`
	Summary RichText         `json:"summary"`
	Blocks  []InputRichBlock `json:"blocks"`
	IsOpen  bool             `json:"is_open,omitempty"`
}

InputRichBlockDetails maps to Telegram Bot API type "InputRichBlockDetails".

func (*InputRichBlockDetails) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockDetails) UnmarshalJSON(data []byte) error

type InputRichBlockDivider added in v0.2.0

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

InputRichBlockDivider maps to Telegram Bot API type "InputRichBlockDivider".

type InputRichBlockFooter added in v0.2.0

type InputRichBlockFooter struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

InputRichBlockFooter maps to Telegram Bot API type "InputRichBlockFooter".

func (*InputRichBlockFooter) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockFooter) UnmarshalJSON(data []byte) error

type InputRichBlockList added in v0.2.0

type InputRichBlockList struct {
	Type  string                   `json:"type"`
	Items []InputRichBlockListItem `json:"items"`
}

InputRichBlockList maps to Telegram Bot API type "InputRichBlockList".

type InputRichBlockListItem added in v0.2.0

type InputRichBlockListItem struct {
	Blocks      []InputRichBlock `json:"blocks"`
	HasCheckbox bool             `json:"has_checkbox,omitempty"`
	IsChecked   bool             `json:"is_checked,omitempty"`
	Value       int64            `json:"value,omitempty"`
	Type        string           `json:"type,omitempty"`
}

InputRichBlockListItem maps to Telegram Bot API type "InputRichBlockListItem".

func (*InputRichBlockListItem) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockListItem) UnmarshalJSON(data []byte) error

type InputRichBlockMap added in v0.2.0

type InputRichBlockMap struct {
	Type     string            `json:"type"`
	Location *Location         `json:"location"`
	Zoom     int64             `json:"zoom"`
	Width    int64             `json:"width"`
	Height   int64             `json:"height"`
	Caption  *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockMap maps to Telegram Bot API type "InputRichBlockMap".

type InputRichBlockMathematicalExpression added in v0.2.0

type InputRichBlockMathematicalExpression struct {
	Type       string `json:"type"`
	Expression string `json:"expression"`
}

InputRichBlockMathematicalExpression maps to Telegram Bot API type "InputRichBlockMathematicalExpression".

type InputRichBlockParagraph added in v0.2.0

type InputRichBlockParagraph struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

InputRichBlockParagraph maps to Telegram Bot API type "InputRichBlockParagraph".

func (*InputRichBlockParagraph) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockParagraph) UnmarshalJSON(data []byte) error

type InputRichBlockPhoto added in v0.2.0

type InputRichBlockPhoto struct {
	Type    string            `json:"type"`
	Photo   *InputMediaPhoto  `json:"photo"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockPhoto maps to Telegram Bot API type "InputRichBlockPhoto".

type InputRichBlockPreformatted added in v0.2.0

type InputRichBlockPreformatted struct {
	Type     string   `json:"type"`
	Text     RichText `json:"text"`
	Language string   `json:"language,omitempty"`
}

InputRichBlockPreformatted maps to Telegram Bot API type "InputRichBlockPreformatted".

func (*InputRichBlockPreformatted) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockPreformatted) UnmarshalJSON(data []byte) error

type InputRichBlockPullQuotation added in v0.2.0

type InputRichBlockPullQuotation struct {
	Type   string   `json:"type"`
	Text   RichText `json:"text"`
	Credit RichText `json:"credit,omitempty"`
}

InputRichBlockPullQuotation maps to Telegram Bot API type "InputRichBlockPullQuotation".

func (*InputRichBlockPullQuotation) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockPullQuotation) UnmarshalJSON(data []byte) error

type InputRichBlockSectionHeading added in v0.2.0

type InputRichBlockSectionHeading struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
	Size int64    `json:"size"`
}

InputRichBlockSectionHeading maps to Telegram Bot API type "InputRichBlockSectionHeading".

func (*InputRichBlockSectionHeading) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockSectionHeading) UnmarshalJSON(data []byte) error

type InputRichBlockSlideshow added in v0.2.0

type InputRichBlockSlideshow struct {
	Type    string            `json:"type"`
	Blocks  []InputRichBlock  `json:"blocks"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockSlideshow maps to Telegram Bot API type "InputRichBlockSlideshow".

func (*InputRichBlockSlideshow) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockSlideshow) UnmarshalJSON(data []byte) error

type InputRichBlockTable added in v0.2.0

type InputRichBlockTable struct {
	Type       string                 `json:"type"`
	Cells      [][]RichBlockTableCell `json:"cells"`
	IsBordered bool                   `json:"is_bordered,omitempty"`
	IsStriped  bool                   `json:"is_striped,omitempty"`
	Caption    RichText               `json:"caption,omitempty"`
}

InputRichBlockTable maps to Telegram Bot API type "InputRichBlockTable".

func (*InputRichBlockTable) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockTable) UnmarshalJSON(data []byte) error

type InputRichBlockThinking added in v0.2.0

type InputRichBlockThinking struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

InputRichBlockThinking maps to Telegram Bot API type "InputRichBlockThinking".

func (*InputRichBlockThinking) UnmarshalJSON added in v0.2.0

func (value *InputRichBlockThinking) UnmarshalJSON(data []byte) error

type InputRichBlockVideo added in v0.2.0

type InputRichBlockVideo struct {
	Type    string            `json:"type"`
	Video   *InputMediaVideo  `json:"video"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

InputRichBlockVideo maps to Telegram Bot API type "InputRichBlockVideo".

type InputRichBlockVoiceNote added in v0.2.0

type InputRichBlockVoiceNote struct {
	Type      string               `json:"type"`
	VoiceNote *InputMediaVoiceNote `json:"voice_note"`
	Caption   *RichBlockCaption    `json:"caption,omitempty"`
}

InputRichBlockVoiceNote maps to Telegram Bot API type "InputRichBlockVoiceNote".

type InputRichMessage added in v0.2.0

type InputRichMessage struct {
	Blocks              []InputRichBlock        `json:"blocks,omitempty"`
	Html                string                  `json:"html,omitempty"`
	Markdown            string                  `json:"markdown,omitempty"`
	Media               []InputRichMessageMedia `json:"media,omitempty"`
	IsRtl               bool                    `json:"is_rtl,omitempty"`
	SkipEntityDetection bool                    `json:"skip_entity_detection,omitempty"`
}

InputRichMessage maps to Telegram Bot API type "InputRichMessage".

func (*InputRichMessage) UnmarshalJSON added in v0.2.0

func (value *InputRichMessage) UnmarshalJSON(data []byte) error

type InputRichMessageContent added in v0.2.0

type InputRichMessageContent struct {
	RichMessage *InputRichMessage `json:"rich_message"`
}

InputRichMessageContent maps to Telegram Bot API type "InputRichMessageContent".

type InputRichMessageMedia added in v0.2.0

type InputRichMessageMedia struct {
	ID    string `json:"id"`
	Media any    `json:"media"`
}

InputRichMessageMedia maps to Telegram Bot API type "InputRichMessageMedia".

type InputSticker

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

InputSticker maps to Telegram Bot API type "InputSticker".

type InputStoryContent

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

InputStoryContent is a union type in Telegram Bot API.

type InputStoryContentPhoto

type InputStoryContentPhoto struct {
	Type  string    `json:"type"`
	Photo InputFile `json:"photo"`
}

InputStoryContentPhoto maps to Telegram Bot API type "InputStoryContentPhoto".

type InputStoryContentVideo

type InputStoryContentVideo struct {
	Type                string    `json:"type"`
	Video               InputFile `json:"video"`
	Duration            float64   `json:"duration,omitempty"`
	CoverFrameTimestamp float64   `json:"cover_frame_timestamp,omitempty"`
	IsAnimation         bool      `json:"is_animation,omitempty"`
}

InputStoryContentVideo maps to Telegram Bot API type "InputStoryContentVideo".

type InputTextMessageContent

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

InputTextMessageContent maps to Telegram Bot API type "InputTextMessageContent".

type InputVenueMessageContent

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

InputVenueMessageContent maps to Telegram Bot API type "InputVenueMessageContent".

type Invoice

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

Invoice maps to Telegram Bot API type "Invoice".

type KeyboardButton

type KeyboardButton struct {
	Text              string                           `json:"text"`
	IconCustomEmojiID string                           `json:"icon_custom_emoji_id,omitempty"`
	Style             string                           `json:"style,omitempty"`
	RequestUsers      *KeyboardButtonRequestUsers      `json:"request_users,omitempty"`
	RequestChat       *KeyboardButtonRequestChat       `json:"request_chat,omitempty"`
	RequestManagedBot *KeyboardButtonRequestManagedBot `json:"request_managed_bot,omitempty"`
	RequestContact    bool                             `json:"request_contact,omitempty"`
	RequestLocation   bool                             `json:"request_location,omitempty"`
	RequestPoll       *KeyboardButtonPollType          `json:"request_poll,omitempty"`
	WebApp            *WebAppInfo                      `json:"web_app,omitempty"`
}

KeyboardButton maps to Telegram Bot API type "KeyboardButton".

type KeyboardButtonPollType

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

KeyboardButtonPollType maps to Telegram Bot API type "KeyboardButtonPollType".

type KeyboardButtonRequestChat

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

KeyboardButtonRequestChat maps to Telegram Bot API type "KeyboardButtonRequestChat".

type KeyboardButtonRequestManagedBot added in v0.2.0

type KeyboardButtonRequestManagedBot struct {
	RequestID         int64  `json:"request_id"`
	SuggestedName     string `json:"suggested_name,omitempty"`
	SuggestedUsername string `json:"suggested_username,omitempty"`
}

KeyboardButtonRequestManagedBot maps to Telegram Bot API type "KeyboardButtonRequestManagedBot".

type KeyboardButtonRequestUsers

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

KeyboardButtonRequestUsers maps to Telegram Bot API type "KeyboardButtonRequestUsers".

type LabeledPrice

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

LabeledPrice maps to Telegram Bot API type "LabeledPrice".

type LeaveChatParams

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

LeaveChatParams contains params for Telegram method "leaveChat".

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

Link maps to Telegram Bot API type "Link".

type LinkPreviewOptions

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

LinkPreviewOptions maps to Telegram Bot API type "LinkPreviewOptions".

type LivePhoto added in v0.2.0

type LivePhoto struct {
	Photo        []PhotoSize `json:"photo,omitempty"`
	FileID       string      `json:"file_id"`
	FileUniqueID string      `json:"file_unique_id"`
	Width        int64       `json:"width"`
	Height       int64       `json:"height"`
	Duration     int64       `json:"duration"`
	MimeType     string      `json:"mime_type,omitempty"`
	FileSize     int64       `json:"file_size,omitempty"`
}

LivePhoto maps to Telegram Bot API type "LivePhoto".

type Location

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

Location maps to Telegram Bot API type "Location".

type LocationAddress

type LocationAddress struct {
	CountryCode string `json:"country_code"`
	State       string `json:"state,omitempty"`
	City        string `json:"city,omitempty"`
	Street      string `json:"street,omitempty"`
}

LocationAddress maps to Telegram Bot API type "LocationAddress".

type LogOutParams

type LogOutParams struct {
}

LogOutParams contains params for Telegram method "logOut".

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 maps to Telegram Bot API type "LoginUrl".

type ManagedBotCreated added in v0.2.0

type ManagedBotCreated struct {
	Bot *User `json:"bot"`
}

ManagedBotCreated maps to Telegram Bot API type "ManagedBotCreated".

type ManagedBotUpdated added in v0.2.0

type ManagedBotUpdated struct {
	User *User `json:"user"`
	Bot  *User `json:"bot"`
}

ManagedBotUpdated maps to Telegram Bot API type "ManagedBotUpdated".

type MaskPosition

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

MaskPosition maps to Telegram Bot API type "MaskPosition".

type MaybeInaccessibleMessage

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

MaybeInaccessibleMessage is a union type in Telegram Bot API.

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

MenuButton is a union type in Telegram Bot API.

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

MenuButtonCommands maps to Telegram Bot API type "MenuButtonCommands".

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

MenuButtonDefault maps to Telegram Bot API type "MenuButtonDefault".

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

MenuButtonWebApp maps to Telegram Bot API type "MenuButtonWebApp".

type Message

type Message struct {
	MessageID                     int64                          `json:"message_id"`
	MessageThreadID               int64                          `json:"message_thread_id,omitempty"`
	DirectMessagesTopic           *DirectMessagesTopic           `json:"direct_messages_topic,omitempty"`
	From                          *User                          `json:"from,omitempty"`
	SenderChat                    *Chat                          `json:"sender_chat,omitempty"`
	SenderBoostCount              int64                          `json:"sender_boost_count,omitempty"`
	SenderBusinessBot             *User                          `json:"sender_business_bot,omitempty"`
	SenderTag                     string                         `json:"sender_tag,omitempty"`
	ReceiverUser                  *User                          `json:"receiver_user,omitempty"`
	EphemeralMessageID            int64                          `json:"ephemeral_message_id,omitempty"`
	Date                          int64                          `json:"date"`
	GuestQueryID                  string                         `json:"guest_query_id,omitempty"`
	BusinessConnectionID          string                         `json:"business_connection_id,omitempty"`
	Chat                          *Chat                          `json:"chat"`
	ForwardOrigin                 MessageOrigin                  `json:"forward_origin,omitempty"`
	IsTopicMessage                bool                           `json:"is_topic_message,omitempty"`
	IsAutomaticForward            bool                           `json:"is_automatic_forward,omitempty"`
	ReplyToMessage                *Message                       `json:"reply_to_message,omitempty"`
	ExternalReply                 *ExternalReplyInfo             `json:"external_reply,omitempty"`
	Quote                         *TextQuote                     `json:"quote,omitempty"`
	ReplyToStory                  *Story                         `json:"reply_to_story,omitempty"`
	ReplyToChecklistTaskID        int64                          `json:"reply_to_checklist_task_id,omitempty"`
	ReplyToPollOptionID           string                         `json:"reply_to_poll_option_id,omitempty"`
	ViaBot                        *User                          `json:"via_bot,omitempty"`
	GuestBotCallerUser            *User                          `json:"guest_bot_caller_user,omitempty"`
	GuestBotCallerChat            *Chat                          `json:"guest_bot_caller_chat,omitempty"`
	EditDate                      int64                          `json:"edit_date,omitempty"`
	HasProtectedContent           bool                           `json:"has_protected_content,omitempty"`
	IsFromOffline                 bool                           `json:"is_from_offline,omitempty"`
	IsPaidPost                    bool                           `json:"is_paid_post,omitempty"`
	MediaGroupID                  string                         `json:"media_group_id,omitempty"`
	AuthorSignature               string                         `json:"author_signature,omitempty"`
	PaidStarCount                 int64                          `json:"paid_star_count,omitempty"`
	Text                          string                         `json:"text,omitempty"`
	Entities                      []MessageEntity                `json:"entities,omitempty"`
	LinkPreviewOptions            *LinkPreviewOptions            `json:"link_preview_options,omitempty"`
	SuggestedPostInfo             *SuggestedPostInfo             `json:"suggested_post_info,omitempty"`
	EffectID                      string                         `json:"effect_id,omitempty"`
	RichMessage                   *RichMessage                   `json:"rich_message,omitempty"`
	Animation                     *Animation                     `json:"animation,omitempty"`
	Audio                         *Audio                         `json:"audio,omitempty"`
	Document                      *Document                      `json:"document,omitempty"`
	LivePhoto                     *LivePhoto                     `json:"live_photo,omitempty"`
	PaidMedia                     *PaidMediaInfo                 `json:"paid_media,omitempty"`
	Photo                         []PhotoSize                    `json:"photo,omitempty"`
	Sticker                       *Sticker                       `json:"sticker,omitempty"`
	Story                         *Story                         `json:"story,omitempty"`
	Video                         *Video                         `json:"video,omitempty"`
	VideoNote                     *VideoNote                     `json:"video_note,omitempty"`
	Voice                         *Voice                         `json:"voice,omitempty"`
	Caption                       string                         `json:"caption,omitempty"`
	CaptionEntities               []MessageEntity                `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia         bool                           `json:"show_caption_above_media,omitempty"`
	HasMediaSpoiler               bool                           `json:"has_media_spoiler,omitempty"`
	Checklist                     *Checklist                     `json:"checklist,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"`
	ChatOwnerLeft                 *ChatOwnerLeft                 `json:"chat_owner_left,omitempty"`
	ChatOwnerChanged              *ChatOwnerChanged              `json:"chat_owner_changed,omitempty"`
	NewChatTitle                  string                         `json:"new_chat_title,omitempty"`
	NewChatPhoto                  []PhotoSize                    `json:"new_chat_photo,omitempty"`
	DeleteChatPhoto               bool                           `json:"delete_chat_photo,omitempty"`
	GroupChatCreated              bool                           `json:"group_chat_created,omitempty"`
	SupergroupChatCreated         bool                           `json:"supergroup_chat_created,omitempty"`
	ChannelChatCreated            bool                           `json:"channel_chat_created,omitempty"`
	MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
	MigrateToChatID               int64                          `json:"migrate_to_chat_id,omitempty"`
	MigrateFromChatID             int64                          `json:"migrate_from_chat_id,omitempty"`
	PinnedMessage                 MaybeInaccessibleMessage       `json:"pinned_message,omitempty"`
	Invoice                       *Invoice                       `json:"invoice,omitempty"`
	SuccessfulPayment             *SuccessfulPayment             `json:"successful_payment,omitempty"`
	RefundedPayment               *RefundedPayment               `json:"refunded_payment,omitempty"`
	UsersShared                   *UsersShared                   `json:"users_shared,omitempty"`
	ChatShared                    *ChatShared                    `json:"chat_shared,omitempty"`
	Gift                          *GiftInfo                      `json:"gift,omitempty"`
	UniqueGift                    *UniqueGiftInfo                `json:"unique_gift,omitempty"`
	GiftUpgradeSent               *GiftInfo                      `json:"gift_upgrade_sent,omitempty"`
	ConnectedWebsite              string                         `json:"connected_website,omitempty"`
	WriteAccessAllowed            *WriteAccessAllowed            `json:"write_access_allowed,omitempty"`
	PassportData                  *PassportData                  `json:"passport_data,omitempty"`
	ProximityAlertTriggered       *ProximityAlertTriggered       `json:"proximity_alert_triggered,omitempty"`
	BoostAdded                    *ChatBoostAdded                `json:"boost_added,omitempty"`
	ChatBackgroundSet             *ChatBackground                `json:"chat_background_set,omitempty"`
	ChecklistTasksDone            *ChecklistTasksDone            `json:"checklist_tasks_done,omitempty"`
	ChecklistTasksAdded           *ChecklistTasksAdded           `json:"checklist_tasks_added,omitempty"`
	CommunityChatAdded            *CommunityChatAdded            `json:"community_chat_added,omitempty"`
	CommunityChatRemoved          *CommunityChatRemoved          `json:"community_chat_removed,omitempty"`
	DirectMessagePriceChanged     *DirectMessagePriceChanged     `json:"direct_message_price_changed,omitempty"`
	ForumTopicCreated             *ForumTopicCreated             `json:"forum_topic_created,omitempty"`
	ForumTopicEdited              *ForumTopicEdited              `json:"forum_topic_edited,omitempty"`
	ForumTopicClosed              *ForumTopicClosed              `json:"forum_topic_closed,omitempty"`
	ForumTopicReopened            *ForumTopicReopened            `json:"forum_topic_reopened,omitempty"`
	GeneralForumTopicHidden       *GeneralForumTopicHidden       `json:"general_forum_topic_hidden,omitempty"`
	GeneralForumTopicUnhidden     *GeneralForumTopicUnhidden     `json:"general_forum_topic_unhidden,omitempty"`
	GiveawayCreated               *GiveawayCreated               `json:"giveaway_created,omitempty"`
	Giveaway                      *Giveaway                      `json:"giveaway,omitempty"`
	GiveawayWinners               *GiveawayWinners               `json:"giveaway_winners,omitempty"`
	GiveawayCompleted             *GiveawayCompleted             `json:"giveaway_completed,omitempty"`
	ManagedBotCreated             *ManagedBotCreated             `json:"managed_bot_created,omitempty"`
	PaidMessagePriceChanged       *PaidMessagePriceChanged       `json:"paid_message_price_changed,omitempty"`
	PollOptionAdded               *PollOptionAdded               `json:"poll_option_added,omitempty"`
	PollOptionDeleted             *PollOptionDeleted             `json:"poll_option_deleted,omitempty"`
	SuggestedPostApproved         *SuggestedPostApproved         `json:"suggested_post_approved,omitempty"`
	SuggestedPostApprovalFailed   *SuggestedPostApprovalFailed   `json:"suggested_post_approval_failed,omitempty"`
	SuggestedPostDeclined         *SuggestedPostDeclined         `json:"suggested_post_declined,omitempty"`
	SuggestedPostPaid             *SuggestedPostPaid             `json:"suggested_post_paid,omitempty"`
	SuggestedPostRefunded         *SuggestedPostRefunded         `json:"suggested_post_refunded,omitempty"`
	VideoChatScheduled            *VideoChatScheduled            `json:"video_chat_scheduled,omitempty"`
	VideoChatStarted              *VideoChatStarted              `json:"video_chat_started,omitempty"`
	VideoChatEnded                *VideoChatEnded                `json:"video_chat_ended,omitempty"`
	VideoChatParticipantsInvited  *VideoChatParticipantsInvited  `json:"video_chat_participants_invited,omitempty"`
	WebAppData                    *WebAppData                    `json:"web_app_data,omitempty"`
	ReplyMarkup                   *InlineKeyboardMarkup          `json:"reply_markup,omitempty"`
}

Message maps to Telegram Bot API type "Message".

func (*Message) UnmarshalJSON

func (value *Message) UnmarshalJSON(data []byte) error

type MessageAutoDeleteTimerChanged

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

MessageAutoDeleteTimerChanged maps to Telegram Bot API type "MessageAutoDeleteTimerChanged".

type MessageEntity

type MessageEntity struct {
	Type           string `json:"type"`
	Offset         int64  `json:"offset"`
	Length         int64  `json:"length"`
	URL            string `json:"url,omitempty"`
	User           *User  `json:"user,omitempty"`
	Language       string `json:"language,omitempty"`
	CustomEmojiID  string `json:"custom_emoji_id,omitempty"`
	UnixTime       int64  `json:"unix_time,omitempty"`
	DateTimeFormat string `json:"date_time_format,omitempty"`
}

MessageEntity maps to Telegram Bot API type "MessageEntity".

type MessageId

type MessageId struct {
	MessageID int64 `json:"message_id"`
}

MessageId maps to Telegram Bot API type "MessageId".

type MessageOrBool added in v0.2.0

type MessageOrBool struct {
	Message *Message
	Bool    bool
	IsBool  bool
}

MessageOrBool represents Telegram method results that return a Message for chat messages and a Boolean for inline messages.

func (MessageOrBool) AsBool added in v0.2.0

func (result MessageOrBool) AsBool() (bool, bool)

AsBool returns the boolean variant when present.

func (MessageOrBool) AsMessage added in v0.2.0

func (result MessageOrBool) AsMessage() (*Message, bool)

AsMessage returns the message variant when present.

func (MessageOrBool) MarshalJSON added in v0.2.0

func (result MessageOrBool) MarshalJSON() ([]byte, error)

MarshalJSON encodes the active Message or Boolean result value.

func (*MessageOrBool) UnmarshalJSON added in v0.2.0

func (result *MessageOrBool) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes either a Telegram Message object or a Boolean result.

type MessageOrigin

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

MessageOrigin is a union type in Telegram Bot API.

type MessageOriginChannel

type MessageOriginChannel struct {
	Type            string `json:"type"`
	Date            int64  `json:"date"`
	Chat            *Chat  `json:"chat"`
	MessageID       int64  `json:"message_id"`
	AuthorSignature string `json:"author_signature,omitempty"`
}

MessageOriginChannel maps to Telegram Bot API type "MessageOriginChannel".

type MessageOriginChat

type MessageOriginChat struct {
	Type            string `json:"type"`
	Date            int64  `json:"date"`
	SenderChat      *Chat  `json:"sender_chat"`
	AuthorSignature string `json:"author_signature,omitempty"`
}

MessageOriginChat maps to Telegram Bot API type "MessageOriginChat".

type MessageOriginHiddenUser

type MessageOriginHiddenUser struct {
	Type           string `json:"type"`
	Date           int64  `json:"date"`
	SenderUserName string `json:"sender_user_name"`
}

MessageOriginHiddenUser maps to Telegram Bot API type "MessageOriginHiddenUser".

type MessageOriginUser

type MessageOriginUser struct {
	Type       string `json:"type"`
	Date       int64  `json:"date"`
	SenderUser *User  `json:"sender_user"`
}

MessageOriginUser maps to Telegram Bot API type "MessageOriginUser".

type MessageReactionCountUpdated

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

MessageReactionCountUpdated maps to Telegram Bot API type "MessageReactionCountUpdated".

type MessageReactionUpdated

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

MessageReactionUpdated maps to Telegram Bot API type "MessageReactionUpdated".

func (*MessageReactionUpdated) UnmarshalJSON

func (value *MessageReactionUpdated) UnmarshalJSON(data []byte) error

type OrderInfo

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

OrderInfo maps to Telegram Bot API type "OrderInfo".

type OwnedGift

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

OwnedGift is a union type in Telegram Bot API.

type OwnedGiftRegular

type OwnedGiftRegular struct {
	Type                    string          `json:"type"`
	Gift                    *Gift           `json:"gift"`
	OwnedGiftID             string          `json:"owned_gift_id,omitempty"`
	SenderUser              *User           `json:"sender_user,omitempty"`
	SendDate                int64           `json:"send_date"`
	Text                    string          `json:"text,omitempty"`
	Entities                []MessageEntity `json:"entities,omitempty"`
	IsPrivate               bool            `json:"is_private,omitempty"`
	IsSaved                 bool            `json:"is_saved,omitempty"`
	CanBeUpgraded           bool            `json:"can_be_upgraded,omitempty"`
	WasRefunded             bool            `json:"was_refunded,omitempty"`
	ConvertStarCount        int64           `json:"convert_star_count,omitempty"`
	PrepaidUpgradeStarCount int64           `json:"prepaid_upgrade_star_count,omitempty"`
	IsUpgradeSeparate       bool            `json:"is_upgrade_separate,omitempty"`
	UniqueGiftNumber        int64           `json:"unique_gift_number,omitempty"`
}

OwnedGiftRegular maps to Telegram Bot API type "OwnedGiftRegular".

type OwnedGiftUnique

type OwnedGiftUnique struct {
	Type              string      `json:"type"`
	Gift              *UniqueGift `json:"gift"`
	OwnedGiftID       string      `json:"owned_gift_id,omitempty"`
	SenderUser        *User       `json:"sender_user,omitempty"`
	SendDate          int64       `json:"send_date"`
	IsSaved           bool        `json:"is_saved,omitempty"`
	CanBeTransferred  bool        `json:"can_be_transferred,omitempty"`
	TransferStarCount int64       `json:"transfer_star_count,omitempty"`
	NextTransferDate  int64       `json:"next_transfer_date,omitempty"`
}

OwnedGiftUnique maps to Telegram Bot API type "OwnedGiftUnique".

type OwnedGifts

type OwnedGifts struct {
	TotalCount int64       `json:"total_count"`
	Gifts      []OwnedGift `json:"gifts"`
	NextOffset string      `json:"next_offset,omitempty"`
}

OwnedGifts maps to Telegram Bot API type "OwnedGifts".

func (*OwnedGifts) UnmarshalJSON

func (value *OwnedGifts) UnmarshalJSON(data []byte) error

type PaidMedia

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

PaidMedia is a union type in Telegram Bot API.

type PaidMediaInfo

type PaidMediaInfo struct {
	StarCount int64       `json:"star_count"`
	PaidMedia []PaidMedia `json:"paid_media"`
}

PaidMediaInfo maps to Telegram Bot API type "PaidMediaInfo".

func (*PaidMediaInfo) UnmarshalJSON

func (value *PaidMediaInfo) UnmarshalJSON(data []byte) error

type PaidMediaLivePhoto added in v0.2.0

type PaidMediaLivePhoto struct {
	Type      string     `json:"type"`
	LivePhoto *LivePhoto `json:"live_photo"`
}

PaidMediaLivePhoto maps to Telegram Bot API type "PaidMediaLivePhoto".

type PaidMediaPhoto

type PaidMediaPhoto struct {
	Type  string      `json:"type"`
	Photo []PhotoSize `json:"photo"`
}

PaidMediaPhoto maps to Telegram Bot API type "PaidMediaPhoto".

type PaidMediaPreview

type PaidMediaPreview struct {
	Type     string `json:"type"`
	Width    int64  `json:"width,omitempty"`
	Height   int64  `json:"height,omitempty"`
	Duration int64  `json:"duration,omitempty"`
}

PaidMediaPreview maps to Telegram Bot API type "PaidMediaPreview".

type PaidMediaPurchased

type PaidMediaPurchased struct {
	From             *User  `json:"from"`
	PaidMediaPayload string `json:"paid_media_payload"`
}

PaidMediaPurchased maps to Telegram Bot API type "PaidMediaPurchased".

type PaidMediaVideo

type PaidMediaVideo struct {
	Type  string `json:"type"`
	Video *Video `json:"video"`
}

PaidMediaVideo maps to Telegram Bot API type "PaidMediaVideo".

type PaidMessagePriceChanged

type PaidMessagePriceChanged struct {
	PaidMessageStarCount int64 `json:"paid_message_star_count"`
}

PaidMessagePriceChanged maps to Telegram Bot API type "PaidMessagePriceChanged".

type PassportData

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

PassportData maps to Telegram Bot API type "PassportData".

type PassportElementError

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

PassportElementError is a union type in Telegram Bot API.

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 maps to Telegram Bot API type "PassportElementErrorDataField".

type PassportElementErrorFile

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

PassportElementErrorFile maps to Telegram Bot API type "PassportElementErrorFile".

type PassportElementErrorFiles

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

PassportElementErrorFiles maps to Telegram Bot API type "PassportElementErrorFiles".

type PassportElementErrorFrontSide

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

PassportElementErrorFrontSide maps to Telegram Bot API type "PassportElementErrorFrontSide".

type PassportElementErrorReverseSide

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

PassportElementErrorReverseSide maps to Telegram Bot API type "PassportElementErrorReverseSide".

type PassportElementErrorSelfie

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

PassportElementErrorSelfie maps to Telegram Bot API type "PassportElementErrorSelfie".

type PassportElementErrorTranslationFile

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

PassportElementErrorTranslationFile maps to Telegram Bot API type "PassportElementErrorTranslationFile".

type PassportElementErrorTranslationFiles

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

PassportElementErrorTranslationFiles maps to Telegram Bot API type "PassportElementErrorTranslationFiles".

type PassportElementErrorUnspecified

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

PassportElementErrorUnspecified maps to Telegram Bot API type "PassportElementErrorUnspecified".

type PassportFile

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

PassportFile maps to Telegram Bot API type "PassportFile".

type PhotoSize

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

PhotoSize maps to Telegram Bot API type "PhotoSize".

type PinChatMessageParams

type PinChatMessageParams struct {
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	ChatID               any    `json:"chat_id"`
	MessageID            int64  `json:"message_id"`
	DisableNotification  bool   `json:"disable_notification,omitempty"`
}

PinChatMessageParams contains params for Telegram method "pinChatMessage".

type Poll

type Poll struct {
	ID                    string          `json:"id"`
	Question              string          `json:"question"`
	QuestionEntities      []MessageEntity `json:"question_entities,omitempty"`
	Options               []PollOption    `json:"options"`
	TotalVoterCount       int64           `json:"total_voter_count"`
	IsClosed              bool            `json:"is_closed"`
	IsAnonymous           bool            `json:"is_anonymous"`
	Type                  string          `json:"type"`
	AllowsMultipleAnswers bool            `json:"allows_multiple_answers"`
	AllowsRevoting        bool            `json:"allows_revoting"`
	MembersOnly           bool            `json:"members_only"`
	CountryCodes          []string        `json:"country_codes,omitempty"`
	CorrectOptionIds      []int64         `json:"correct_option_ids,omitempty"`
	Explanation           string          `json:"explanation,omitempty"`
	ExplanationEntities   []MessageEntity `json:"explanation_entities,omitempty"`
	ExplanationMedia      *PollMedia      `json:"explanation_media,omitempty"`
	OpenPeriod            int64           `json:"open_period,omitempty"`
	CloseDate             int64           `json:"close_date,omitempty"`
	Description           string          `json:"description,omitempty"`
	DescriptionEntities   []MessageEntity `json:"description_entities,omitempty"`
	Media                 *PollMedia      `json:"media,omitempty"`
}

Poll maps to Telegram Bot API type "Poll".

type PollAnswer

type PollAnswer struct {
	PollID              string   `json:"poll_id"`
	VoterChat           *Chat    `json:"voter_chat,omitempty"`
	User                *User    `json:"user,omitempty"`
	OptionIds           []int64  `json:"option_ids"`
	OptionPersistentIds []string `json:"option_persistent_ids"`
}

PollAnswer maps to Telegram Bot API type "PollAnswer".

type PollMedia added in v0.2.0

type PollMedia struct {
	Animation *Animation  `json:"animation,omitempty"`
	Audio     *Audio      `json:"audio,omitempty"`
	Document  *Document   `json:"document,omitempty"`
	Link      *Link       `json:"link,omitempty"`
	LivePhoto *LivePhoto  `json:"live_photo,omitempty"`
	Location  *Location   `json:"location,omitempty"`
	Photo     []PhotoSize `json:"photo,omitempty"`
	Sticker   *Sticker    `json:"sticker,omitempty"`
	Venue     *Venue      `json:"venue,omitempty"`
	Video     *Video      `json:"video,omitempty"`
}

PollMedia maps to Telegram Bot API type "PollMedia".

type PollOption

type PollOption struct {
	PersistentID string          `json:"persistent_id"`
	Text         string          `json:"text"`
	TextEntities []MessageEntity `json:"text_entities,omitempty"`
	Media        *PollMedia      `json:"media,omitempty"`
	VoterCount   int64           `json:"voter_count"`
	AddedByUser  *User           `json:"added_by_user,omitempty"`
	AddedByChat  *Chat           `json:"added_by_chat,omitempty"`
	AdditionDate int64           `json:"addition_date,omitempty"`
}

PollOption maps to Telegram Bot API type "PollOption".

type PollOptionAdded added in v0.2.0

type PollOptionAdded struct {
	PollMessage        MaybeInaccessibleMessage `json:"poll_message,omitempty"`
	OptionPersistentID string                   `json:"option_persistent_id"`
	OptionText         string                   `json:"option_text"`
	OptionTextEntities []MessageEntity          `json:"option_text_entities,omitempty"`
}

PollOptionAdded maps to Telegram Bot API type "PollOptionAdded".

func (*PollOptionAdded) UnmarshalJSON added in v0.2.0

func (value *PollOptionAdded) UnmarshalJSON(data []byte) error

type PollOptionDeleted added in v0.2.0

type PollOptionDeleted struct {
	PollMessage        MaybeInaccessibleMessage `json:"poll_message,omitempty"`
	OptionPersistentID string                   `json:"option_persistent_id"`
	OptionText         string                   `json:"option_text"`
	OptionTextEntities []MessageEntity          `json:"option_text_entities,omitempty"`
}

PollOptionDeleted maps to Telegram Bot API type "PollOptionDeleted".

func (*PollOptionDeleted) UnmarshalJSON added in v0.2.0

func (value *PollOptionDeleted) UnmarshalJSON(data []byte) error

type PostStoryParams

type PostStoryParams struct {
	BusinessConnectionID string            `json:"business_connection_id"`
	Content              InputStoryContent `json:"content"`
	ActivePeriod         int64             `json:"active_period"`
	Caption              string            `json:"caption,omitempty"`
	ParseMode            string            `json:"parse_mode,omitempty"`
	CaptionEntities      []MessageEntity   `json:"caption_entities,omitempty"`
	Areas                []StoryArea       `json:"areas,omitempty"`
	PostToChatPage       bool              `json:"post_to_chat_page,omitempty"`
	ProtectContent       bool              `json:"protect_content,omitempty"`
}

PostStoryParams contains params for Telegram method "postStory".

type PreCheckoutQuery

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

PreCheckoutQuery maps to Telegram Bot API type "PreCheckoutQuery".

type PreparedInlineMessage

type PreparedInlineMessage struct {
	ID             string `json:"id"`
	ExpirationDate int64  `json:"expiration_date"`
}

PreparedInlineMessage maps to Telegram Bot API type "PreparedInlineMessage".

type PreparedKeyboardButton added in v0.2.0

type PreparedKeyboardButton struct {
	ID string `json:"id"`
}

PreparedKeyboardButton maps to Telegram Bot API type "PreparedKeyboardButton".

type PromoteChatMemberParams

type PromoteChatMemberParams struct {
	ChatID                  any   `json:"chat_id"`
	UserID                  int64 `json:"user_id"`
	IsAnonymous             bool  `json:"is_anonymous,omitempty"`
	CanManageChat           bool  `json:"can_manage_chat,omitempty"`
	CanDeleteMessages       bool  `json:"can_delete_messages,omitempty"`
	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"`
	CanPostStories          bool  `json:"can_post_stories,omitempty"`
	CanEditStories          bool  `json:"can_edit_stories,omitempty"`
	CanDeleteStories        bool  `json:"can_delete_stories,omitempty"`
	CanPostMessages         bool  `json:"can_post_messages,omitempty"`
	CanEditMessages         bool  `json:"can_edit_messages,omitempty"`
	CanPinMessages          bool  `json:"can_pin_messages,omitempty"`
	CanManageTopics         bool  `json:"can_manage_topics,omitempty"`
	CanManageDirectMessages bool  `json:"can_manage_direct_messages,omitempty"`
	CanManageTags           bool  `json:"can_manage_tags,omitempty"`
}

PromoteChatMemberParams contains params for Telegram method "promoteChatMember".

type ProximityAlertTriggered

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

ProximityAlertTriggered maps to Telegram Bot API type "ProximityAlertTriggered".

type ReactionCount

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

ReactionCount maps to Telegram Bot API type "ReactionCount".

func (*ReactionCount) UnmarshalJSON

func (value *ReactionCount) UnmarshalJSON(data []byte) error

type ReactionType

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

ReactionType is a union type in Telegram Bot API.

type ReactionTypeCustomEmoji

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

ReactionTypeCustomEmoji maps to Telegram Bot API type "ReactionTypeCustomEmoji".

type ReactionTypeEmoji

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

ReactionTypeEmoji maps to Telegram Bot API type "ReactionTypeEmoji".

type ReactionTypePaid

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

ReactionTypePaid maps to Telegram Bot API type "ReactionTypePaid".

type ReadBusinessMessageParams

type ReadBusinessMessageParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	ChatID               int64  `json:"chat_id"`
	MessageID            int64  `json:"message_id"`
}

ReadBusinessMessageParams contains params for Telegram method "readBusinessMessage".

type RefundStarPaymentParams

type RefundStarPaymentParams struct {
	UserID                  int64  `json:"user_id"`
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
}

RefundStarPaymentParams contains params for Telegram method "refundStarPayment".

type RefundedPayment

type RefundedPayment struct {
	Currency                string `json:"currency"`
	TotalAmount             int64  `json:"total_amount"`
	InvoicePayload          string `json:"invoice_payload"`
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	ProviderPaymentChargeID string `json:"provider_payment_charge_id,omitempty"`
}

RefundedPayment maps to Telegram Bot API type "RefundedPayment".

type RemoveBusinessAccountProfilePhotoParams

type RemoveBusinessAccountProfilePhotoParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	IsPublic             bool   `json:"is_public,omitempty"`
}

RemoveBusinessAccountProfilePhotoParams contains params for Telegram method "removeBusinessAccountProfilePhoto".

type RemoveChatVerificationParams

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

RemoveChatVerificationParams contains params for Telegram method "removeChatVerification".

type RemoveMyProfilePhotoParams

type RemoveMyProfilePhotoParams struct {
}

RemoveMyProfilePhotoParams contains params for Telegram method "removeMyProfilePhoto".

type RemoveUserVerificationParams

type RemoveUserVerificationParams struct {
	UserID int64 `json:"user_id"`
}

RemoveUserVerificationParams contains params for Telegram method "removeUserVerification".

type ReopenForumTopicParams

type ReopenForumTopicParams struct {
	ChatID          any   `json:"chat_id"`
	MessageThreadID int64 `json:"message_thread_id"`
}

ReopenForumTopicParams contains params for Telegram method "reopenForumTopic".

type ReopenGeneralForumTopicParams

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

ReopenGeneralForumTopicParams contains params for Telegram method "reopenGeneralForumTopic".

type ReplaceManagedBotTokenParams added in v0.2.0

type ReplaceManagedBotTokenParams struct {
	UserID int64 `json:"user_id"`
}

ReplaceManagedBotTokenParams contains params for Telegram method "replaceManagedBotToken".

type ReplaceStickerInSetParams

type ReplaceStickerInSetParams struct {
	UserID     int64        `json:"user_id"`
	Name       string       `json:"name"`
	OldSticker string       `json:"old_sticker"`
	Sticker    InputSticker `json:"sticker"`
}

ReplaceStickerInSetParams contains params for Telegram method "replaceStickerInSet".

type ReplyKeyboardMarkup

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

ReplyKeyboardMarkup maps to Telegram Bot API type "ReplyKeyboardMarkup".

type ReplyKeyboardRemove

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

ReplyKeyboardRemove maps to Telegram Bot API type "ReplyKeyboardRemove".

type ReplyParameters

type ReplyParameters struct {
	MessageID                int64           `json:"message_id,omitempty"`
	ChatID                   any             `json:"chat_id,omitempty"`
	EphemeralMessageID       int64           `json:"ephemeral_message_id,omitempty"`
	AllowSendingWithoutReply bool            `json:"allow_sending_without_reply,omitempty"`
	Quote                    string          `json:"quote,omitempty"`
	QuoteParseMode           string          `json:"quote_parse_mode,omitempty"`
	QuoteEntities            []MessageEntity `json:"quote_entities,omitempty"`
	QuotePosition            int64           `json:"quote_position,omitempty"`
	ChecklistTaskID          int64           `json:"checklist_task_id,omitempty"`
	PollOptionID             string          `json:"poll_option_id,omitempty"`
}

ReplyParameters maps to Telegram Bot API type "ReplyParameters".

type RepostStoryParams

type RepostStoryParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	FromChatID           int64  `json:"from_chat_id"`
	FromStoryID          int64  `json:"from_story_id"`
	ActivePeriod         int64  `json:"active_period"`
	PostToChatPage       bool   `json:"post_to_chat_page,omitempty"`
	ProtectContent       bool   `json:"protect_content,omitempty"`
}

RepostStoryParams contains params for Telegram method "repostStory".

type RequestEvent added in v0.2.0

type RequestEvent struct {
	Method       string
	Attempt      int
	Upload       bool
	Replayable   bool
	StatusCode   int
	APIErrorCode int
	RetryAfter   time.Duration
	Duration     time.Duration
	Err          error
}

RequestEvent contains safe metadata for one Telegram request attempt. It never contains the bot token, request URL, request parameters, or body.

type RequestObserver added in v0.2.0

type RequestObserver func(RequestEvent)

RequestObserver observes completed Telegram request attempts.

type ResponseParameters

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

ResponseParameters contains extra Telegram error hints.

type RestrictChatMemberParams

type RestrictChatMemberParams struct {
	ChatID                        any             `json:"chat_id"`
	UserID                        int64           `json:"user_id"`
	Permissions                   ChatPermissions `json:"permissions"`
	UseIndependentChatPermissions bool            `json:"use_independent_chat_permissions,omitempty"`
	UntilDate                     int64           `json:"until_date,omitempty"`
}

RestrictChatMemberParams contains params for Telegram method "restrictChatMember".

type RetryAttempt added in v0.2.0

type RetryAttempt struct {
	Method       string
	Attempt      int
	Upload       bool
	Replayable   bool
	StatusCode   int
	APIErrorCode int
	RetryAfter   time.Duration
	NetworkError bool
	Err          error
}

RetryAttempt contains the safe request outcome passed to a RetryPolicy.

type RetryPolicy added in v0.2.0

type RetryPolicy interface {
	ShouldRetry(RetryAttempt) (retry bool, delay time.Duration)
}

RetryPolicy decides whether another request attempt should be made.

WARNING: Telegram methods can have side effects. A retry can repeat an operation that Telegram completed when its response was lost. Callers must decide which methods are safe to retry and opt in explicitly.

type RetryPolicyFunc added in v0.2.0

type RetryPolicyFunc func(RetryAttempt) (retry bool, delay time.Duration)

RetryPolicyFunc adapts a function to RetryPolicy.

func (RetryPolicyFunc) ShouldRetry added in v0.2.0

func (fn RetryPolicyFunc) ShouldRetry(attempt RetryAttempt) (bool, time.Duration)

ShouldRetry implements RetryPolicy.

type RevenueWithdrawalState

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

RevenueWithdrawalState is a union type in Telegram Bot API.

type RevenueWithdrawalStateFailed

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

RevenueWithdrawalStateFailed maps to Telegram Bot API type "RevenueWithdrawalStateFailed".

type RevenueWithdrawalStatePending

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

RevenueWithdrawalStatePending maps to Telegram Bot API type "RevenueWithdrawalStatePending".

type RevenueWithdrawalStateSucceeded

type RevenueWithdrawalStateSucceeded struct {
	Type string `json:"type"`
	Date int64  `json:"date"`
	URL  string `json:"url"`
}

RevenueWithdrawalStateSucceeded maps to Telegram Bot API type "RevenueWithdrawalStateSucceeded".

type RevokeChatInviteLinkParams

type RevokeChatInviteLinkParams struct {
	ChatID     any    `json:"chat_id"`
	InviteLink string `json:"invite_link"`
}

RevokeChatInviteLinkParams contains params for Telegram method "revokeChatInviteLink".

type RichBlock added in v0.2.0

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

RichBlock is a union type in Telegram Bot API.

type RichBlockAnchor added in v0.2.0

type RichBlockAnchor struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

RichBlockAnchor maps to Telegram Bot API type "RichBlockAnchor".

type RichBlockAnimation added in v0.2.0

type RichBlockAnimation struct {
	Type       string            `json:"type"`
	Animation  *Animation        `json:"animation"`
	HasSpoiler bool              `json:"has_spoiler,omitempty"`
	Caption    *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockAnimation maps to Telegram Bot API type "RichBlockAnimation".

type RichBlockAudio added in v0.2.0

type RichBlockAudio struct {
	Type    string            `json:"type"`
	Audio   *Audio            `json:"audio"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockAudio maps to Telegram Bot API type "RichBlockAudio".

type RichBlockBlockQuotation added in v0.2.0

type RichBlockBlockQuotation struct {
	Type   string      `json:"type"`
	Blocks []RichBlock `json:"blocks"`
	Credit RichText    `json:"credit,omitempty"`
}

RichBlockBlockQuotation maps to Telegram Bot API type "RichBlockBlockQuotation".

func (*RichBlockBlockQuotation) UnmarshalJSON added in v0.2.0

func (value *RichBlockBlockQuotation) UnmarshalJSON(data []byte) error

type RichBlockCaption added in v0.2.0

type RichBlockCaption struct {
	Text   RichText `json:"text"`
	Credit RichText `json:"credit,omitempty"`
}

RichBlockCaption maps to Telegram Bot API type "RichBlockCaption".

func (*RichBlockCaption) UnmarshalJSON added in v0.2.0

func (value *RichBlockCaption) UnmarshalJSON(data []byte) error

type RichBlockCollage added in v0.2.0

type RichBlockCollage struct {
	Type    string            `json:"type"`
	Blocks  []RichBlock       `json:"blocks"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockCollage maps to Telegram Bot API type "RichBlockCollage".

func (*RichBlockCollage) UnmarshalJSON added in v0.2.0

func (value *RichBlockCollage) UnmarshalJSON(data []byte) error

type RichBlockDetails added in v0.2.0

type RichBlockDetails struct {
	Type    string      `json:"type"`
	Summary RichText    `json:"summary"`
	Blocks  []RichBlock `json:"blocks"`
	IsOpen  bool        `json:"is_open,omitempty"`
}

RichBlockDetails maps to Telegram Bot API type "RichBlockDetails".

func (*RichBlockDetails) UnmarshalJSON added in v0.2.0

func (value *RichBlockDetails) UnmarshalJSON(data []byte) error

type RichBlockDivider added in v0.2.0

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

RichBlockDivider maps to Telegram Bot API type "RichBlockDivider".

type RichBlockFooter added in v0.2.0

type RichBlockFooter struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichBlockFooter maps to Telegram Bot API type "RichBlockFooter".

func (*RichBlockFooter) UnmarshalJSON added in v0.2.0

func (value *RichBlockFooter) UnmarshalJSON(data []byte) error

type RichBlockList added in v0.2.0

type RichBlockList struct {
	Type  string              `json:"type"`
	Items []RichBlockListItem `json:"items"`
}

RichBlockList maps to Telegram Bot API type "RichBlockList".

type RichBlockListItem added in v0.2.0

type RichBlockListItem struct {
	Label       string      `json:"label"`
	Blocks      []RichBlock `json:"blocks"`
	HasCheckbox bool        `json:"has_checkbox,omitempty"`
	IsChecked   bool        `json:"is_checked,omitempty"`
	Value       int64       `json:"value,omitempty"`
	Type        string      `json:"type,omitempty"`
}

RichBlockListItem maps to Telegram Bot API type "RichBlockListItem".

func (*RichBlockListItem) UnmarshalJSON added in v0.2.0

func (value *RichBlockListItem) UnmarshalJSON(data []byte) error

type RichBlockMap added in v0.2.0

type RichBlockMap struct {
	Type     string            `json:"type"`
	Location *Location         `json:"location"`
	Zoom     int64             `json:"zoom"`
	Width    int64             `json:"width"`
	Height   int64             `json:"height"`
	Caption  *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockMap maps to Telegram Bot API type "RichBlockMap".

type RichBlockMathematicalExpression added in v0.2.0

type RichBlockMathematicalExpression struct {
	Type       string `json:"type"`
	Expression string `json:"expression"`
}

RichBlockMathematicalExpression maps to Telegram Bot API type "RichBlockMathematicalExpression".

type RichBlockParagraph added in v0.2.0

type RichBlockParagraph struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichBlockParagraph maps to Telegram Bot API type "RichBlockParagraph".

func (*RichBlockParagraph) UnmarshalJSON added in v0.2.0

func (value *RichBlockParagraph) UnmarshalJSON(data []byte) error

type RichBlockPhoto added in v0.2.0

type RichBlockPhoto struct {
	Type       string            `json:"type"`
	Photo      []PhotoSize       `json:"photo"`
	HasSpoiler bool              `json:"has_spoiler,omitempty"`
	Caption    *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockPhoto maps to Telegram Bot API type "RichBlockPhoto".

type RichBlockPreformatted added in v0.2.0

type RichBlockPreformatted struct {
	Type     string   `json:"type"`
	Text     RichText `json:"text"`
	Language string   `json:"language,omitempty"`
}

RichBlockPreformatted maps to Telegram Bot API type "RichBlockPreformatted".

func (*RichBlockPreformatted) UnmarshalJSON added in v0.2.0

func (value *RichBlockPreformatted) UnmarshalJSON(data []byte) error

type RichBlockPullQuotation added in v0.2.0

type RichBlockPullQuotation struct {
	Type   string   `json:"type"`
	Text   RichText `json:"text"`
	Credit RichText `json:"credit,omitempty"`
}

RichBlockPullQuotation maps to Telegram Bot API type "RichBlockPullQuotation".

func (*RichBlockPullQuotation) UnmarshalJSON added in v0.2.0

func (value *RichBlockPullQuotation) UnmarshalJSON(data []byte) error

type RichBlockSectionHeading added in v0.2.0

type RichBlockSectionHeading struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
	Size int64    `json:"size"`
}

RichBlockSectionHeading maps to Telegram Bot API type "RichBlockSectionHeading".

func (*RichBlockSectionHeading) UnmarshalJSON added in v0.2.0

func (value *RichBlockSectionHeading) UnmarshalJSON(data []byte) error

type RichBlockSlideshow added in v0.2.0

type RichBlockSlideshow struct {
	Type    string            `json:"type"`
	Blocks  []RichBlock       `json:"blocks"`
	Caption *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockSlideshow maps to Telegram Bot API type "RichBlockSlideshow".

func (*RichBlockSlideshow) UnmarshalJSON added in v0.2.0

func (value *RichBlockSlideshow) UnmarshalJSON(data []byte) error

type RichBlockTable added in v0.2.0

type RichBlockTable struct {
	Type       string                 `json:"type"`
	Cells      [][]RichBlockTableCell `json:"cells"`
	IsBordered bool                   `json:"is_bordered,omitempty"`
	IsStriped  bool                   `json:"is_striped,omitempty"`
	Caption    RichText               `json:"caption,omitempty"`
}

RichBlockTable maps to Telegram Bot API type "RichBlockTable".

func (*RichBlockTable) UnmarshalJSON added in v0.2.0

func (value *RichBlockTable) UnmarshalJSON(data []byte) error

type RichBlockTableCell added in v0.2.0

type RichBlockTableCell struct {
	Text     RichText `json:"text,omitempty"`
	IsHeader bool     `json:"is_header,omitempty"`
	Colspan  int64    `json:"colspan,omitempty"`
	Rowspan  int64    `json:"rowspan,omitempty"`
	Align    string   `json:"align"`
	Valign   string   `json:"valign"`
}

RichBlockTableCell maps to Telegram Bot API type "RichBlockTableCell".

func (*RichBlockTableCell) UnmarshalJSON added in v0.2.0

func (value *RichBlockTableCell) UnmarshalJSON(data []byte) error

type RichBlockThinking added in v0.2.0

type RichBlockThinking struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichBlockThinking maps to Telegram Bot API type "RichBlockThinking".

func (*RichBlockThinking) UnmarshalJSON added in v0.2.0

func (value *RichBlockThinking) UnmarshalJSON(data []byte) error

type RichBlockVideo added in v0.2.0

type RichBlockVideo struct {
	Type       string            `json:"type"`
	Video      *Video            `json:"video"`
	HasSpoiler bool              `json:"has_spoiler,omitempty"`
	Caption    *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockVideo maps to Telegram Bot API type "RichBlockVideo".

type RichBlockVoiceNote added in v0.2.0

type RichBlockVoiceNote struct {
	Type      string            `json:"type"`
	VoiceNote *Voice            `json:"voice_note"`
	Caption   *RichBlockCaption `json:"caption,omitempty"`
}

RichBlockVoiceNote maps to Telegram Bot API type "RichBlockVoiceNote".

type RichMessage added in v0.2.0

type RichMessage struct {
	Blocks []RichBlock `json:"blocks"`
	IsRtl  bool        `json:"is_rtl,omitempty"`
}

RichMessage maps to Telegram Bot API type "RichMessage".

func (*RichMessage) UnmarshalJSON added in v0.2.0

func (value *RichMessage) UnmarshalJSON(data []byte) error

type RichText added in v0.2.0

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

RichText is a union type in Telegram Bot API.

type RichTextAnchor added in v0.2.0

type RichTextAnchor struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

RichTextAnchor maps to Telegram Bot API type "RichTextAnchor".

type RichTextAnchorLink struct {
	Type       string   `json:"type"`
	Text       RichText `json:"text"`
	AnchorName string   `json:"anchor_name"`
}

RichTextAnchorLink maps to Telegram Bot API type "RichTextAnchorLink".

func (*RichTextAnchorLink) UnmarshalJSON added in v0.2.0

func (value *RichTextAnchorLink) UnmarshalJSON(data []byte) error

type RichTextArray added in v0.2.0

type RichTextArray []RichText

RichTextArray represents the recursive array form of RichText.

type RichTextBankCardNumber added in v0.2.0

type RichTextBankCardNumber struct {
	Type           string   `json:"type"`
	Text           RichText `json:"text"`
	BankCardNumber string   `json:"bank_card_number"`
}

RichTextBankCardNumber maps to Telegram Bot API type "RichTextBankCardNumber".

func (*RichTextBankCardNumber) UnmarshalJSON added in v0.2.0

func (value *RichTextBankCardNumber) UnmarshalJSON(data []byte) error

type RichTextBold added in v0.2.0

type RichTextBold struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextBold maps to Telegram Bot API type "RichTextBold".

func (*RichTextBold) UnmarshalJSON added in v0.2.0

func (value *RichTextBold) UnmarshalJSON(data []byte) error

type RichTextBotCommand added in v0.2.0

type RichTextBotCommand struct {
	Type       string   `json:"type"`
	Text       RichText `json:"text"`
	BotCommand string   `json:"bot_command"`
}

RichTextBotCommand maps to Telegram Bot API type "RichTextBotCommand".

func (*RichTextBotCommand) UnmarshalJSON added in v0.2.0

func (value *RichTextBotCommand) UnmarshalJSON(data []byte) error

type RichTextCashtag added in v0.2.0

type RichTextCashtag struct {
	Type    string   `json:"type"`
	Text    RichText `json:"text"`
	Cashtag string   `json:"cashtag"`
}

RichTextCashtag maps to Telegram Bot API type "RichTextCashtag".

func (*RichTextCashtag) UnmarshalJSON added in v0.2.0

func (value *RichTextCashtag) UnmarshalJSON(data []byte) error

type RichTextCode added in v0.2.0

type RichTextCode struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextCode maps to Telegram Bot API type "RichTextCode".

func (*RichTextCode) UnmarshalJSON added in v0.2.0

func (value *RichTextCode) UnmarshalJSON(data []byte) error

type RichTextCustomEmoji added in v0.2.0

type RichTextCustomEmoji struct {
	Type            string `json:"type"`
	CustomEmojiID   string `json:"custom_emoji_id"`
	AlternativeText string `json:"alternative_text"`
}

RichTextCustomEmoji maps to Telegram Bot API type "RichTextCustomEmoji".

type RichTextDateTime added in v0.2.0

type RichTextDateTime struct {
	Type           string   `json:"type"`
	Text           RichText `json:"text"`
	UnixTime       int64    `json:"unix_time"`
	DateTimeFormat string   `json:"date_time_format"`
}

RichTextDateTime maps to Telegram Bot API type "RichTextDateTime".

func (*RichTextDateTime) UnmarshalJSON added in v0.2.0

func (value *RichTextDateTime) UnmarshalJSON(data []byte) error

type RichTextEmailAddress added in v0.2.0

type RichTextEmailAddress struct {
	Type         string   `json:"type"`
	Text         RichText `json:"text"`
	EmailAddress string   `json:"email_address"`
}

RichTextEmailAddress maps to Telegram Bot API type "RichTextEmailAddress".

func (*RichTextEmailAddress) UnmarshalJSON added in v0.2.0

func (value *RichTextEmailAddress) UnmarshalJSON(data []byte) error

type RichTextHashtag added in v0.2.0

type RichTextHashtag struct {
	Type    string   `json:"type"`
	Text    RichText `json:"text"`
	Hashtag string   `json:"hashtag"`
}

RichTextHashtag maps to Telegram Bot API type "RichTextHashtag".

func (*RichTextHashtag) UnmarshalJSON added in v0.2.0

func (value *RichTextHashtag) UnmarshalJSON(data []byte) error

type RichTextItalic added in v0.2.0

type RichTextItalic struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextItalic maps to Telegram Bot API type "RichTextItalic".

func (*RichTextItalic) UnmarshalJSON added in v0.2.0

func (value *RichTextItalic) UnmarshalJSON(data []byte) error

type RichTextMarked added in v0.2.0

type RichTextMarked struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextMarked maps to Telegram Bot API type "RichTextMarked".

func (*RichTextMarked) UnmarshalJSON added in v0.2.0

func (value *RichTextMarked) UnmarshalJSON(data []byte) error

type RichTextMathematicalExpression added in v0.2.0

type RichTextMathematicalExpression struct {
	Type       string `json:"type"`
	Expression string `json:"expression"`
}

RichTextMathematicalExpression maps to Telegram Bot API type "RichTextMathematicalExpression".

type RichTextMention added in v0.2.0

type RichTextMention struct {
	Type     string   `json:"type"`
	Text     RichText `json:"text"`
	Username string   `json:"username"`
}

RichTextMention maps to Telegram Bot API type "RichTextMention".

func (*RichTextMention) UnmarshalJSON added in v0.2.0

func (value *RichTextMention) UnmarshalJSON(data []byte) error

type RichTextPhoneNumber added in v0.2.0

type RichTextPhoneNumber struct {
	Type        string   `json:"type"`
	Text        RichText `json:"text"`
	PhoneNumber string   `json:"phone_number"`
}

RichTextPhoneNumber maps to Telegram Bot API type "RichTextPhoneNumber".

func (*RichTextPhoneNumber) UnmarshalJSON added in v0.2.0

func (value *RichTextPhoneNumber) UnmarshalJSON(data []byte) error

type RichTextReference added in v0.2.0

type RichTextReference struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
	Name string   `json:"name"`
}

RichTextReference maps to Telegram Bot API type "RichTextReference".

func (*RichTextReference) UnmarshalJSON added in v0.2.0

func (value *RichTextReference) UnmarshalJSON(data []byte) error
type RichTextReferenceLink struct {
	Type          string   `json:"type"`
	Text          RichText `json:"text"`
	ReferenceName string   `json:"reference_name"`
}

RichTextReferenceLink maps to Telegram Bot API type "RichTextReferenceLink".

func (*RichTextReferenceLink) UnmarshalJSON added in v0.2.0

func (value *RichTextReferenceLink) UnmarshalJSON(data []byte) error

type RichTextSpoiler added in v0.2.0

type RichTextSpoiler struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextSpoiler maps to Telegram Bot API type "RichTextSpoiler".

func (*RichTextSpoiler) UnmarshalJSON added in v0.2.0

func (value *RichTextSpoiler) UnmarshalJSON(data []byte) error

type RichTextStrikethrough added in v0.2.0

type RichTextStrikethrough struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextStrikethrough maps to Telegram Bot API type "RichTextStrikethrough".

func (*RichTextStrikethrough) UnmarshalJSON added in v0.2.0

func (value *RichTextStrikethrough) UnmarshalJSON(data []byte) error

type RichTextString added in v0.2.0

type RichTextString string

RichTextString represents the plain string form of RichText.

type RichTextSubscript added in v0.2.0

type RichTextSubscript struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextSubscript maps to Telegram Bot API type "RichTextSubscript".

func (*RichTextSubscript) UnmarshalJSON added in v0.2.0

func (value *RichTextSubscript) UnmarshalJSON(data []byte) error

type RichTextSuperscript added in v0.2.0

type RichTextSuperscript struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextSuperscript maps to Telegram Bot API type "RichTextSuperscript".

func (*RichTextSuperscript) UnmarshalJSON added in v0.2.0

func (value *RichTextSuperscript) UnmarshalJSON(data []byte) error

type RichTextTextMention added in v0.2.0

type RichTextTextMention struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
	User *User    `json:"user"`
}

RichTextTextMention maps to Telegram Bot API type "RichTextTextMention".

func (*RichTextTextMention) UnmarshalJSON added in v0.2.0

func (value *RichTextTextMention) UnmarshalJSON(data []byte) error

type RichTextUnderline added in v0.2.0

type RichTextUnderline struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
}

RichTextUnderline maps to Telegram Bot API type "RichTextUnderline".

func (*RichTextUnderline) UnmarshalJSON added in v0.2.0

func (value *RichTextUnderline) UnmarshalJSON(data []byte) error

type RichTextUrl added in v0.2.0

type RichTextUrl struct {
	Type string   `json:"type"`
	Text RichText `json:"text"`
	URL  string   `json:"url"`
}

RichTextUrl maps to Telegram Bot API type "RichTextUrl".

func (*RichTextUrl) UnmarshalJSON added in v0.2.0

func (value *RichTextUrl) UnmarshalJSON(data []byte) error

type SavePreparedInlineMessageParams

type SavePreparedInlineMessageParams struct {
	UserID            int64             `json:"user_id"`
	Result            InlineQueryResult `json:"result"`
	AllowUserChats    bool              `json:"allow_user_chats,omitempty"`
	AllowBotChats     bool              `json:"allow_bot_chats,omitempty"`
	AllowGroupChats   bool              `json:"allow_group_chats,omitempty"`
	AllowChannelChats bool              `json:"allow_channel_chats,omitempty"`
}

SavePreparedInlineMessageParams contains params for Telegram method "savePreparedInlineMessage".

type SavePreparedKeyboardButtonParams added in v0.2.0

type SavePreparedKeyboardButtonParams struct {
	UserID int64          `json:"user_id"`
	Button KeyboardButton `json:"button"`
}

SavePreparedKeyboardButtonParams contains params for Telegram method "savePreparedKeyboardButton".

type SendAnimationParams

type SendAnimationParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Animation               any                     `json:"animation"`
	Duration                int64                   `json:"duration,omitempty"`
	Width                   int64                   `json:"width,omitempty"`
	Height                  int64                   `json:"height,omitempty"`
	Thumbnail               any                     `json:"thumbnail,omitempty"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	HasSpoiler              bool                    `json:"has_spoiler,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendAnimationParams contains params for Telegram method "sendAnimation".

type SendAudioParams

type SendAudioParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Audio                   any                     `json:"audio"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	Duration                int64                   `json:"duration,omitempty"`
	Performer               string                  `json:"performer,omitempty"`
	Title                   string                  `json:"title,omitempty"`
	Thumbnail               any                     `json:"thumbnail,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendAudioParams contains params for Telegram method "sendAudio".

type SendChatActionParams

type SendChatActionParams struct {
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	ChatID               any    `json:"chat_id"`
	MessageThreadID      int64  `json:"message_thread_id,omitempty"`
	Action               string `json:"action"`
}

SendChatActionParams contains params for Telegram method "sendChatAction".

type SendChatJoinRequestWebAppParams added in v0.2.0

type SendChatJoinRequestWebAppParams struct {
	ChatJoinRequestQueryID string `json:"chat_join_request_query_id"`
	WebAppURL              string `json:"web_app_url"`
}

SendChatJoinRequestWebAppParams contains params for Telegram method "sendChatJoinRequestWebApp".

type SendChecklistParams

type SendChecklistParams struct {
	BusinessConnectionID string               `json:"business_connection_id"`
	ChatID               any                  `json:"chat_id"`
	Checklist            InputChecklist       `json:"checklist"`
	DisableNotification  bool                 `json:"disable_notification,omitempty"`
	ProtectContent       bool                 `json:"protect_content,omitempty"`
	MessageEffectID      string               `json:"message_effect_id,omitempty"`
	ReplyParameters      ReplyParameters      `json:"reply_parameters,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

SendChecklistParams contains params for Telegram method "sendChecklist".

type SendContactParams

type SendContactParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	PhoneNumber             string                  `json:"phone_number"`
	FirstName               string                  `json:"first_name"`
	LastName                string                  `json:"last_name,omitempty"`
	Vcard                   string                  `json:"vcard,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendContactParams contains params for Telegram method "sendContact".

type SendDiceParams

type SendDiceParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	Emoji                   string                  `json:"emoji,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendDiceParams contains params for Telegram method "sendDice".

type SendDocumentParams

type SendDocumentParams struct {
	BusinessConnectionID        string                  `json:"business_connection_id,omitempty"`
	ChatID                      any                     `json:"chat_id"`
	MessageThreadID             int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID       int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID              int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID             string                  `json:"callback_query_id,omitempty"`
	Document                    any                     `json:"document"`
	Thumbnail                   any                     `json:"thumbnail,omitempty"`
	Caption                     string                  `json:"caption,omitempty"`
	ParseMode                   string                  `json:"parse_mode,omitempty"`
	CaptionEntities             []MessageEntity         `json:"caption_entities,omitempty"`
	DisableContentTypeDetection bool                    `json:"disable_content_type_detection,omitempty"`
	DisableNotification         bool                    `json:"disable_notification,omitempty"`
	ProtectContent              bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast          bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID             string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters     SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters             ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup                 any                     `json:"reply_markup,omitempty"`
}

SendDocumentParams contains params for Telegram method "sendDocument".

type SendGameParams

type SendGameParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id"`
	MessageThreadID      int64                `json:"message_thread_id,omitempty"`
	GameShortName        string               `json:"game_short_name"`
	DisableNotification  bool                 `json:"disable_notification,omitempty"`
	ProtectContent       bool                 `json:"protect_content,omitempty"`
	AllowPaidBroadcast   bool                 `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID      string               `json:"message_effect_id,omitempty"`
	ReplyParameters      ReplyParameters      `json:"reply_parameters,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

SendGameParams contains params for Telegram method "sendGame".

type SendGiftParams

type SendGiftParams struct {
	UserID        int64           `json:"user_id,omitempty"`
	ChatID        any             `json:"chat_id,omitempty"`
	GiftID        string          `json:"gift_id"`
	PayForUpgrade bool            `json:"pay_for_upgrade,omitempty"`
	Text          string          `json:"text,omitempty"`
	TextParseMode string          `json:"text_parse_mode,omitempty"`
	TextEntities  []MessageEntity `json:"text_entities,omitempty"`
}

SendGiftParams contains params for Telegram method "sendGift".

type SendInvoiceParams

type SendInvoiceParams struct {
	ChatID                    any                     `json:"chat_id"`
	MessageThreadID           int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID     int64                   `json:"direct_messages_topic_id,omitempty"`
	Title                     string                  `json:"title"`
	Description               string                  `json:"description"`
	Payload                   string                  `json:"payload"`
	ProviderToken             string                  `json:"provider_token,omitempty"`
	Currency                  string                  `json:"currency"`
	Prices                    []LabeledPrice          `json:"prices"`
	MaxTipAmount              int64                   `json:"max_tip_amount,omitempty"`
	SuggestedTipAmounts       []int64                 `json:"suggested_tip_amounts,omitempty"`
	StartParameter            string                  `json:"start_parameter,omitempty"`
	ProviderData              string                  `json:"provider_data,omitempty"`
	PhotoURL                  string                  `json:"photo_url,omitempty"`
	PhotoSize                 int64                   `json:"photo_size,omitempty"`
	PhotoWidth                int64                   `json:"photo_width,omitempty"`
	PhotoHeight               int64                   `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"`
	DisableNotification       bool                    `json:"disable_notification,omitempty"`
	ProtectContent            bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast        bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID           string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters   SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters           ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup               InlineKeyboardMarkup    `json:"reply_markup,omitempty"`
}

SendInvoiceParams contains params for Telegram method "sendInvoice".

type SendLivePhotoParams added in v0.2.0

type SendLivePhotoParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	LivePhoto               any                     `json:"live_photo"`
	Photo                   any                     `json:"photo"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	HasSpoiler              bool                    `json:"has_spoiler,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendLivePhotoParams contains params for Telegram method "sendLivePhoto".

type SendLocationParams

type SendLocationParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Latitude                float64                 `json:"latitude"`
	Longitude               float64                 `json:"longitude"`
	HorizontalAccuracy      float64                 `json:"horizontal_accuracy,omitempty"`
	LivePeriod              int64                   `json:"live_period,omitempty"`
	Heading                 int64                   `json:"heading,omitempty"`
	ProximityAlertRadius    int64                   `json:"proximity_alert_radius,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendLocationParams contains params for Telegram method "sendLocation".

type SendMediaGroupParams

type SendMediaGroupParams struct {
	BusinessConnectionID  string          `json:"business_connection_id,omitempty"`
	ChatID                any             `json:"chat_id"`
	MessageThreadID       int64           `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID int64           `json:"direct_messages_topic_id,omitempty"`
	Media                 []InputMedia    `json:"media"`
	DisableNotification   bool            `json:"disable_notification,omitempty"`
	ProtectContent        bool            `json:"protect_content,omitempty"`
	AllowPaidBroadcast    bool            `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID       string          `json:"message_effect_id,omitempty"`
	ReplyParameters       ReplyParameters `json:"reply_parameters,omitempty"`
}

SendMediaGroupParams contains params for Telegram method "sendMediaGroup".

type SendMessageDraftParams

type SendMessageDraftParams struct {
	ChatID          int64           `json:"chat_id"`
	MessageThreadID int64           `json:"message_thread_id,omitempty"`
	DraftID         int64           `json:"draft_id"`
	Text            string          `json:"text,omitempty"`
	ParseMode       string          `json:"parse_mode,omitempty"`
	Entities        []MessageEntity `json:"entities,omitempty"`
}

SendMessageDraftParams contains params for Telegram method "sendMessageDraft".

type SendMessageParams

type SendMessageParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Text                    string                  `json:"text"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	Entities                []MessageEntity         `json:"entities,omitempty"`
	LinkPreviewOptions      LinkPreviewOptions      `json:"link_preview_options,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendMessageParams contains params for Telegram method "sendMessage".

type SendPaidMediaParams

type SendPaidMediaParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	StarCount               int64                   `json:"star_count"`
	Media                   []InputPaidMedia        `json:"media"`
	Payload                 string                  `json:"payload,omitempty"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendPaidMediaParams contains params for Telegram method "sendPaidMedia".

type SendPhotoParams

type SendPhotoParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Photo                   any                     `json:"photo"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	HasSpoiler              bool                    `json:"has_spoiler,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendPhotoParams contains params for Telegram method "sendPhoto".

type SendPollParams

type SendPollParams struct {
	BusinessConnectionID   string            `json:"business_connection_id,omitempty"`
	ChatID                 any               `json:"chat_id"`
	MessageThreadID        int64             `json:"message_thread_id,omitempty"`
	Question               string            `json:"question"`
	QuestionParseMode      string            `json:"question_parse_mode,omitempty"`
	QuestionEntities       []MessageEntity   `json:"question_entities,omitempty"`
	Options                []InputPollOption `json:"options"`
	IsAnonymous            bool              `json:"is_anonymous,omitempty"`
	Type                   string            `json:"type,omitempty"`
	AllowsMultipleAnswers  bool              `json:"allows_multiple_answers,omitempty"`
	AllowsRevoting         bool              `json:"allows_revoting,omitempty"`
	ShuffleOptions         bool              `json:"shuffle_options,omitempty"`
	AllowAddingOptions     bool              `json:"allow_adding_options,omitempty"`
	HideResultsUntilCloses bool              `json:"hide_results_until_closes,omitempty"`
	MembersOnly            bool              `json:"members_only,omitempty"`
	CountryCodes           []string          `json:"country_codes,omitempty"`
	CorrectOptionIds       []int64           `json:"correct_option_ids,omitempty"`
	Explanation            string            `json:"explanation,omitempty"`
	ExplanationParseMode   string            `json:"explanation_parse_mode,omitempty"`
	ExplanationEntities    []MessageEntity   `json:"explanation_entities,omitempty"`
	ExplanationMedia       InputPollMedia    `json:"explanation_media,omitempty"`
	OpenPeriod             int64             `json:"open_period,omitempty"`
	CloseDate              int64             `json:"close_date,omitempty"`
	IsClosed               bool              `json:"is_closed,omitempty"`
	Description            string            `json:"description,omitempty"`
	DescriptionParseMode   string            `json:"description_parse_mode,omitempty"`
	DescriptionEntities    []MessageEntity   `json:"description_entities,omitempty"`
	Media                  InputPollMedia    `json:"media,omitempty"`
	DisableNotification    bool              `json:"disable_notification,omitempty"`
	ProtectContent         bool              `json:"protect_content,omitempty"`
	AllowPaidBroadcast     bool              `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID        string            `json:"message_effect_id,omitempty"`
	ReplyParameters        ReplyParameters   `json:"reply_parameters,omitempty"`
	ReplyMarkup            any               `json:"reply_markup,omitempty"`
}

SendPollParams contains params for Telegram method "sendPoll".

type SendRichMessageDraftParams added in v0.2.0

type SendRichMessageDraftParams struct {
	ChatID          int64            `json:"chat_id"`
	MessageThreadID int64            `json:"message_thread_id,omitempty"`
	DraftID         int64            `json:"draft_id"`
	RichMessage     InputRichMessage `json:"rich_message"`
}

SendRichMessageDraftParams contains params for Telegram method "sendRichMessageDraft".

type SendRichMessageParams added in v0.2.0

type SendRichMessageParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	RichMessage             InputRichMessage        `json:"rich_message"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendRichMessageParams contains params for Telegram method "sendRichMessage".

type SendStickerParams

type SendStickerParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Sticker                 any                     `json:"sticker"`
	Emoji                   string                  `json:"emoji,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendStickerParams contains params for Telegram method "sendSticker".

type SendVenueParams

type SendVenueParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	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"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendVenueParams contains params for Telegram method "sendVenue".

type SendVideoNoteParams

type SendVideoNoteParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	VideoNote               any                     `json:"video_note"`
	Duration                int64                   `json:"duration,omitempty"`
	Length                  int64                   `json:"length,omitempty"`
	Thumbnail               any                     `json:"thumbnail,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendVideoNoteParams contains params for Telegram method "sendVideoNote".

type SendVideoParams

type SendVideoParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Video                   any                     `json:"video"`
	Duration                int64                   `json:"duration,omitempty"`
	Width                   int64                   `json:"width,omitempty"`
	Height                  int64                   `json:"height,omitempty"`
	Thumbnail               any                     `json:"thumbnail,omitempty"`
	Cover                   any                     `json:"cover,omitempty"`
	StartTimestamp          int64                   `json:"start_timestamp,omitempty"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	ShowCaptionAboveMedia   bool                    `json:"show_caption_above_media,omitempty"`
	HasSpoiler              bool                    `json:"has_spoiler,omitempty"`
	SupportsStreaming       bool                    `json:"supports_streaming,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendVideoParams contains params for Telegram method "sendVideo".

type SendVoiceParams

type SendVoiceParams struct {
	BusinessConnectionID    string                  `json:"business_connection_id,omitempty"`
	ChatID                  any                     `json:"chat_id"`
	MessageThreadID         int64                   `json:"message_thread_id,omitempty"`
	DirectMessagesTopicID   int64                   `json:"direct_messages_topic_id,omitempty"`
	ReceiverUserID          int64                   `json:"receiver_user_id,omitempty"`
	CallbackQueryID         string                  `json:"callback_query_id,omitempty"`
	Voice                   any                     `json:"voice"`
	Caption                 string                  `json:"caption,omitempty"`
	ParseMode               string                  `json:"parse_mode,omitempty"`
	CaptionEntities         []MessageEntity         `json:"caption_entities,omitempty"`
	Duration                int64                   `json:"duration,omitempty"`
	DisableNotification     bool                    `json:"disable_notification,omitempty"`
	ProtectContent          bool                    `json:"protect_content,omitempty"`
	AllowPaidBroadcast      bool                    `json:"allow_paid_broadcast,omitempty"`
	MessageEffectID         string                  `json:"message_effect_id,omitempty"`
	SuggestedPostParameters SuggestedPostParameters `json:"suggested_post_parameters,omitempty"`
	ReplyParameters         ReplyParameters         `json:"reply_parameters,omitempty"`
	ReplyMarkup             any                     `json:"reply_markup,omitempty"`
}

SendVoiceParams contains params for Telegram method "sendVoice".

type SentGuestMessage added in v0.2.0

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

SentGuestMessage maps to Telegram Bot API type "SentGuestMessage".

type SentWebAppMessage

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

SentWebAppMessage maps to Telegram Bot API type "SentWebAppMessage".

type SetBusinessAccountBioParams

type SetBusinessAccountBioParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	Bio                  string `json:"bio,omitempty"`
}

SetBusinessAccountBioParams contains params for Telegram method "setBusinessAccountBio".

type SetBusinessAccountGiftSettingsParams

type SetBusinessAccountGiftSettingsParams struct {
	BusinessConnectionID string            `json:"business_connection_id"`
	ShowGiftButton       bool              `json:"show_gift_button"`
	AcceptedGiftTypes    AcceptedGiftTypes `json:"accepted_gift_types"`
}

SetBusinessAccountGiftSettingsParams contains params for Telegram method "setBusinessAccountGiftSettings".

type SetBusinessAccountNameParams

type SetBusinessAccountNameParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	FirstName            string `json:"first_name"`
	LastName             string `json:"last_name,omitempty"`
}

SetBusinessAccountNameParams contains params for Telegram method "setBusinessAccountName".

type SetBusinessAccountProfilePhotoParams

type SetBusinessAccountProfilePhotoParams struct {
	BusinessConnectionID string            `json:"business_connection_id"`
	Photo                InputProfilePhoto `json:"photo"`
	IsPublic             bool              `json:"is_public,omitempty"`
}

SetBusinessAccountProfilePhotoParams contains params for Telegram method "setBusinessAccountProfilePhoto".

type SetBusinessAccountUsernameParams

type SetBusinessAccountUsernameParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	Username             string `json:"username,omitempty"`
}

SetBusinessAccountUsernameParams contains params for Telegram method "setBusinessAccountUsername".

type SetChatAdministratorCustomTitleParams

type SetChatAdministratorCustomTitleParams struct {
	ChatID      any    `json:"chat_id"`
	UserID      int64  `json:"user_id"`
	CustomTitle string `json:"custom_title"`
}

SetChatAdministratorCustomTitleParams contains params for Telegram method "setChatAdministratorCustomTitle".

type SetChatDescriptionParams

type SetChatDescriptionParams struct {
	ChatID      any    `json:"chat_id"`
	Description string `json:"description,omitempty"`
}

SetChatDescriptionParams contains params for Telegram method "setChatDescription".

type SetChatMemberTagParams

type SetChatMemberTagParams struct {
	ChatID any    `json:"chat_id"`
	UserID int64  `json:"user_id"`
	Tag    string `json:"tag,omitempty"`
}

SetChatMemberTagParams contains params for Telegram method "setChatMemberTag".

type SetChatMenuButtonParams

type SetChatMenuButtonParams struct {
	ChatID     int64      `json:"chat_id,omitempty"`
	MenuButton MenuButton `json:"menu_button,omitempty"`
}

SetChatMenuButtonParams contains params for Telegram method "setChatMenuButton".

type SetChatPermissionsParams

type SetChatPermissionsParams struct {
	ChatID                        any             `json:"chat_id"`
	Permissions                   ChatPermissions `json:"permissions"`
	UseIndependentChatPermissions bool            `json:"use_independent_chat_permissions,omitempty"`
}

SetChatPermissionsParams contains params for Telegram method "setChatPermissions".

type SetChatPhotoParams

type SetChatPhotoParams struct {
	ChatID any       `json:"chat_id"`
	Photo  InputFile `json:"photo"`
}

SetChatPhotoParams contains params for Telegram method "setChatPhoto".

type SetChatStickerSetParams

type SetChatStickerSetParams struct {
	ChatID         any    `json:"chat_id"`
	StickerSetName string `json:"sticker_set_name"`
}

SetChatStickerSetParams contains params for Telegram method "setChatStickerSet".

type SetChatTitleParams

type SetChatTitleParams struct {
	ChatID any    `json:"chat_id"`
	Title  string `json:"title"`
}

SetChatTitleParams contains params for Telegram method "setChatTitle".

type SetCustomEmojiStickerSetThumbnailParams

type SetCustomEmojiStickerSetThumbnailParams struct {
	Name          string `json:"name"`
	CustomEmojiID string `json:"custom_emoji_id,omitempty"`
}

SetCustomEmojiStickerSetThumbnailParams contains params for Telegram method "setCustomEmojiStickerSetThumbnail".

type SetGameScoreParams

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

SetGameScoreParams contains params for Telegram method "setGameScore".

type SetManagedBotAccessSettingsParams added in v0.2.0

type SetManagedBotAccessSettingsParams struct {
	UserID             int64   `json:"user_id"`
	IsAccessRestricted bool    `json:"is_access_restricted"`
	AddedUserIds       []int64 `json:"added_user_ids,omitempty"`
}

SetManagedBotAccessSettingsParams contains params for Telegram method "setManagedBotAccessSettings".

type SetMessageReactionParams

type SetMessageReactionParams struct {
	ChatID    any            `json:"chat_id"`
	MessageID int64          `json:"message_id"`
	Reaction  []ReactionType `json:"reaction,omitempty"`
	IsBig     bool           `json:"is_big,omitempty"`
}

SetMessageReactionParams contains params for Telegram method "setMessageReaction".

type SetMyCommandsParams

type SetMyCommandsParams struct {
	Commands     []BotCommand    `json:"commands"`
	Scope        BotCommandScope `json:"scope,omitempty"`
	LanguageCode string          `json:"language_code,omitempty"`
}

SetMyCommandsParams contains params for Telegram method "setMyCommands".

type SetMyDefaultAdministratorRightsParams

type SetMyDefaultAdministratorRightsParams struct {
	Rights      ChatAdministratorRights `json:"rights,omitempty"`
	ForChannels bool                    `json:"for_channels,omitempty"`
}

SetMyDefaultAdministratorRightsParams contains params for Telegram method "setMyDefaultAdministratorRights".

type SetMyDescriptionParams

type SetMyDescriptionParams struct {
	Description  string `json:"description,omitempty"`
	LanguageCode string `json:"language_code,omitempty"`
}

SetMyDescriptionParams contains params for Telegram method "setMyDescription".

type SetMyNameParams

type SetMyNameParams struct {
	Name         string `json:"name,omitempty"`
	LanguageCode string `json:"language_code,omitempty"`
}

SetMyNameParams contains params for Telegram method "setMyName".

type SetMyProfilePhotoParams

type SetMyProfilePhotoParams struct {
	Photo InputProfilePhoto `json:"photo"`
}

SetMyProfilePhotoParams contains params for Telegram method "setMyProfilePhoto".

type SetMyShortDescriptionParams

type SetMyShortDescriptionParams struct {
	ShortDescription string `json:"short_description,omitempty"`
	LanguageCode     string `json:"language_code,omitempty"`
}

SetMyShortDescriptionParams contains params for Telegram method "setMyShortDescription".

type SetPassportDataErrorsParams

type SetPassportDataErrorsParams struct {
	UserID int64                  `json:"user_id"`
	Errors []PassportElementError `json:"errors"`
}

SetPassportDataErrorsParams contains params for Telegram method "setPassportDataErrors".

type SetStickerEmojiListParams

type SetStickerEmojiListParams struct {
	Sticker   string   `json:"sticker"`
	EmojiList []string `json:"emoji_list"`
}

SetStickerEmojiListParams contains params for Telegram method "setStickerEmojiList".

type SetStickerKeywordsParams

type SetStickerKeywordsParams struct {
	Sticker  string   `json:"sticker"`
	Keywords []string `json:"keywords,omitempty"`
}

SetStickerKeywordsParams contains params for Telegram method "setStickerKeywords".

type SetStickerMaskPositionParams

type SetStickerMaskPositionParams struct {
	Sticker      string       `json:"sticker"`
	MaskPosition MaskPosition `json:"mask_position,omitempty"`
}

SetStickerMaskPositionParams contains params for Telegram method "setStickerMaskPosition".

type SetStickerPositionInSetParams

type SetStickerPositionInSetParams struct {
	Sticker  string `json:"sticker"`
	Position int64  `json:"position"`
}

SetStickerPositionInSetParams contains params for Telegram method "setStickerPositionInSet".

type SetStickerSetThumbnailParams

type SetStickerSetThumbnailParams struct {
	Name      string `json:"name"`
	UserID    int64  `json:"user_id"`
	Thumbnail any    `json:"thumbnail,omitempty"`
	Format    string `json:"format"`
}

SetStickerSetThumbnailParams contains params for Telegram method "setStickerSetThumbnail".

type SetStickerSetTitleParams

type SetStickerSetTitleParams struct {
	Name  string `json:"name"`
	Title string `json:"title"`
}

SetStickerSetTitleParams contains params for Telegram method "setStickerSetTitle".

type SetUserEmojiStatusParams

type SetUserEmojiStatusParams struct {
	UserID                    int64  `json:"user_id"`
	EmojiStatusCustomEmojiID  string `json:"emoji_status_custom_emoji_id,omitempty"`
	EmojiStatusExpirationDate int64  `json:"emoji_status_expiration_date,omitempty"`
}

SetUserEmojiStatusParams contains params for Telegram method "setUserEmojiStatus".

type SetWebhookParams

type SetWebhookParams struct {
	URL                string    `json:"url"`
	Certificate        InputFile `json:"certificate,omitempty"`
	IPAddress          string    `json:"ip_address,omitempty"`
	MaxConnections     int64     `json:"max_connections,omitempty"`
	AllowedUpdates     []string  `json:"allowed_updates,omitempty"`
	DropPendingUpdates bool      `json:"drop_pending_updates,omitempty"`
	SecretToken        string    `json:"secret_token,omitempty"`
}

SetWebhookParams contains params for Telegram method "setWebhook".

type SharedUser

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

SharedUser maps to Telegram Bot API type "SharedUser".

type ShippingAddress

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

ShippingAddress maps to Telegram Bot API type "ShippingAddress".

type ShippingOption

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

ShippingOption maps to Telegram Bot API type "ShippingOption".

type ShippingQuery

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

ShippingQuery maps to Telegram Bot API type "ShippingQuery".

type StarAmount

type StarAmount struct {
	Amount         int64 `json:"amount"`
	NanostarAmount int64 `json:"nanostar_amount,omitempty"`
}

StarAmount maps to Telegram Bot API type "StarAmount".

type StarTransaction

type StarTransaction struct {
	ID             string             `json:"id"`
	Amount         int64              `json:"amount"`
	NanostarAmount int64              `json:"nanostar_amount,omitempty"`
	Date           int64              `json:"date"`
	Source         TransactionPartner `json:"source,omitempty"`
	Receiver       TransactionPartner `json:"receiver,omitempty"`
}

StarTransaction maps to Telegram Bot API type "StarTransaction".

func (*StarTransaction) UnmarshalJSON

func (value *StarTransaction) UnmarshalJSON(data []byte) error

type StarTransactions

type StarTransactions struct {
	Transactions []StarTransaction `json:"transactions"`
}

StarTransactions maps to Telegram Bot API type "StarTransactions".

type Sticker

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

Sticker maps to Telegram Bot API type "Sticker".

type StickerSet

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

StickerSet maps to Telegram Bot API type "StickerSet".

type StopMessageLiveLocationParams

type StopMessageLiveLocationParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id,omitempty"`
	MessageID            int64                `json:"message_id,omitempty"`
	InlineMessageID      string               `json:"inline_message_id,omitempty"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

StopMessageLiveLocationParams contains params for Telegram method "stopMessageLiveLocation".

type StopPollParams

type StopPollParams struct {
	BusinessConnectionID string               `json:"business_connection_id,omitempty"`
	ChatID               any                  `json:"chat_id"`
	MessageID            int64                `json:"message_id"`
	ReplyMarkup          InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}

StopPollParams contains params for Telegram method "stopPoll".

type Story

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

Story maps to Telegram Bot API type "Story".

type StoryArea

type StoryArea struct {
	Position *StoryAreaPosition `json:"position"`
	Type     StoryAreaType      `json:"type"`
}

StoryArea maps to Telegram Bot API type "StoryArea".

func (*StoryArea) UnmarshalJSON

func (value *StoryArea) UnmarshalJSON(data []byte) error

type StoryAreaPosition

type StoryAreaPosition struct {
	XPercentage            float64 `json:"x_percentage"`
	YPercentage            float64 `json:"y_percentage"`
	WidthPercentage        float64 `json:"width_percentage"`
	HeightPercentage       float64 `json:"height_percentage"`
	RotationAngle          float64 `json:"rotation_angle"`
	CornerRadiusPercentage float64 `json:"corner_radius_percentage"`
}

StoryAreaPosition maps to Telegram Bot API type "StoryAreaPosition".

type StoryAreaType

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

StoryAreaType is a union type in Telegram Bot API.

type StoryAreaTypeLink struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

StoryAreaTypeLink maps to Telegram Bot API type "StoryAreaTypeLink".

type StoryAreaTypeLocation

type StoryAreaTypeLocation struct {
	Type      string           `json:"type"`
	Latitude  float64          `json:"latitude"`
	Longitude float64          `json:"longitude"`
	Address   *LocationAddress `json:"address,omitempty"`
}

StoryAreaTypeLocation maps to Telegram Bot API type "StoryAreaTypeLocation".

type StoryAreaTypeSuggestedReaction

type StoryAreaTypeSuggestedReaction struct {
	Type         string       `json:"type"`
	ReactionType ReactionType `json:"reaction_type"`
	IsDark       bool         `json:"is_dark,omitempty"`
	IsFlipped    bool         `json:"is_flipped,omitempty"`
}

StoryAreaTypeSuggestedReaction maps to Telegram Bot API type "StoryAreaTypeSuggestedReaction".

func (*StoryAreaTypeSuggestedReaction) UnmarshalJSON

func (value *StoryAreaTypeSuggestedReaction) UnmarshalJSON(data []byte) error

type StoryAreaTypeUniqueGift

type StoryAreaTypeUniqueGift struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

StoryAreaTypeUniqueGift maps to Telegram Bot API type "StoryAreaTypeUniqueGift".

type StoryAreaTypeWeather

type StoryAreaTypeWeather struct {
	Type            string  `json:"type"`
	Temperature     float64 `json:"temperature"`
	Emoji           string  `json:"emoji"`
	BackgroundColor int64   `json:"background_color"`
}

StoryAreaTypeWeather maps to Telegram Bot API type "StoryAreaTypeWeather".

type SuccessfulPayment

type SuccessfulPayment struct {
	Currency                   string     `json:"currency"`
	TotalAmount                int64      `json:"total_amount"`
	InvoicePayload             string     `json:"invoice_payload"`
	SubscriptionExpirationDate int64      `json:"subscription_expiration_date,omitempty"`
	IsRecurring                bool       `json:"is_recurring,omitempty"`
	IsFirstRecurring           bool       `json:"is_first_recurring,omitempty"`
	ShippingOptionID           string     `json:"shipping_option_id,omitempty"`
	OrderInfo                  *OrderInfo `json:"order_info,omitempty"`
	TelegramPaymentChargeID    string     `json:"telegram_payment_charge_id"`
	ProviderPaymentChargeID    string     `json:"provider_payment_charge_id"`
}

SuccessfulPayment maps to Telegram Bot API type "SuccessfulPayment".

type SuggestedPostApprovalFailed

type SuggestedPostApprovalFailed struct {
	SuggestedPostMessage *Message            `json:"suggested_post_message,omitempty"`
	Price                *SuggestedPostPrice `json:"price"`
}

SuggestedPostApprovalFailed maps to Telegram Bot API type "SuggestedPostApprovalFailed".

type SuggestedPostApproved

type SuggestedPostApproved struct {
	SuggestedPostMessage *Message            `json:"suggested_post_message,omitempty"`
	Price                *SuggestedPostPrice `json:"price,omitempty"`
	SendDate             int64               `json:"send_date"`
}

SuggestedPostApproved maps to Telegram Bot API type "SuggestedPostApproved".

type SuggestedPostDeclined

type SuggestedPostDeclined struct {
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	Comment              string   `json:"comment,omitempty"`
}

SuggestedPostDeclined maps to Telegram Bot API type "SuggestedPostDeclined".

type SuggestedPostInfo

type SuggestedPostInfo struct {
	State    string              `json:"state"`
	Price    *SuggestedPostPrice `json:"price,omitempty"`
	SendDate int64               `json:"send_date,omitempty"`
}

SuggestedPostInfo maps to Telegram Bot API type "SuggestedPostInfo".

type SuggestedPostPaid

type SuggestedPostPaid struct {
	SuggestedPostMessage *Message    `json:"suggested_post_message,omitempty"`
	Currency             string      `json:"currency"`
	Amount               int64       `json:"amount,omitempty"`
	StarAmount           *StarAmount `json:"star_amount,omitempty"`
}

SuggestedPostPaid maps to Telegram Bot API type "SuggestedPostPaid".

type SuggestedPostParameters

type SuggestedPostParameters struct {
	Price    *SuggestedPostPrice `json:"price,omitempty"`
	SendDate int64               `json:"send_date,omitempty"`
}

SuggestedPostParameters maps to Telegram Bot API type "SuggestedPostParameters".

type SuggestedPostPrice

type SuggestedPostPrice struct {
	Currency string `json:"currency"`
	Amount   int64  `json:"amount"`
}

SuggestedPostPrice maps to Telegram Bot API type "SuggestedPostPrice".

type SuggestedPostRefunded

type SuggestedPostRefunded struct {
	SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
	Reason               string   `json:"reason"`
}

SuggestedPostRefunded maps to Telegram Bot API type "SuggestedPostRefunded".

type SwitchInlineQueryChosenChat

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

SwitchInlineQueryChosenChat maps to Telegram Bot API type "SwitchInlineQueryChosenChat".

type TextQuote

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

TextQuote maps to Telegram Bot API type "TextQuote".

type TransactionPartner

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

TransactionPartner is a union type in Telegram Bot API.

type TransactionPartnerAffiliateProgram

type TransactionPartnerAffiliateProgram struct {
	Type               string `json:"type"`
	SponsorUser        *User  `json:"sponsor_user,omitempty"`
	CommissionPerMille int64  `json:"commission_per_mille"`
}

TransactionPartnerAffiliateProgram maps to Telegram Bot API type "TransactionPartnerAffiliateProgram".

type TransactionPartnerChat

type TransactionPartnerChat struct {
	Type string `json:"type"`
	Chat *Chat  `json:"chat"`
	Gift *Gift  `json:"gift,omitempty"`
}

TransactionPartnerChat maps to Telegram Bot API type "TransactionPartnerChat".

type TransactionPartnerFragment

type TransactionPartnerFragment struct {
	Type            string                 `json:"type"`
	WithdrawalState RevenueWithdrawalState `json:"withdrawal_state,omitempty"`
}

TransactionPartnerFragment maps to Telegram Bot API type "TransactionPartnerFragment".

func (*TransactionPartnerFragment) UnmarshalJSON

func (value *TransactionPartnerFragment) UnmarshalJSON(data []byte) error

type TransactionPartnerOther

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

TransactionPartnerOther maps to Telegram Bot API type "TransactionPartnerOther".

type TransactionPartnerTelegramAds

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

TransactionPartnerTelegramAds maps to Telegram Bot API type "TransactionPartnerTelegramAds".

type TransactionPartnerTelegramApi

type TransactionPartnerTelegramApi struct {
	Type         string `json:"type"`
	RequestCount int64  `json:"request_count"`
}

TransactionPartnerTelegramApi maps to Telegram Bot API type "TransactionPartnerTelegramApi".

type TransactionPartnerUser

type TransactionPartnerUser struct {
	Type                        string         `json:"type"`
	TransactionType             string         `json:"transaction_type"`
	User                        *User          `json:"user"`
	Affiliate                   *AffiliateInfo `json:"affiliate,omitempty"`
	InvoicePayload              string         `json:"invoice_payload,omitempty"`
	SubscriptionPeriod          int64          `json:"subscription_period,omitempty"`
	PaidMedia                   []PaidMedia    `json:"paid_media,omitempty"`
	PaidMediaPayload            string         `json:"paid_media_payload,omitempty"`
	Gift                        *Gift          `json:"gift,omitempty"`
	PremiumSubscriptionDuration int64          `json:"premium_subscription_duration,omitempty"`
}

TransactionPartnerUser maps to Telegram Bot API type "TransactionPartnerUser".

func (*TransactionPartnerUser) UnmarshalJSON

func (value *TransactionPartnerUser) UnmarshalJSON(data []byte) error

type TransferBusinessAccountStarsParams

type TransferBusinessAccountStarsParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	StarCount            int64  `json:"star_count"`
}

TransferBusinessAccountStarsParams contains params for Telegram method "transferBusinessAccountStars".

type TransferGiftParams

type TransferGiftParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	OwnedGiftID          string `json:"owned_gift_id"`
	NewOwnerChatID       int64  `json:"new_owner_chat_id"`
	StarCount            int64  `json:"star_count,omitempty"`
}

TransferGiftParams contains params for Telegram method "transferGift".

type UnbanChatMemberParams

type UnbanChatMemberParams struct {
	ChatID       any   `json:"chat_id"`
	UserID       int64 `json:"user_id"`
	OnlyIfBanned bool  `json:"only_if_banned,omitempty"`
}

UnbanChatMemberParams contains params for Telegram method "unbanChatMember".

type UnbanChatSenderChatParams

type UnbanChatSenderChatParams struct {
	ChatID       any   `json:"chat_id"`
	SenderChatID int64 `json:"sender_chat_id"`
}

UnbanChatSenderChatParams contains params for Telegram method "unbanChatSenderChat".

type UnhideGeneralForumTopicParams

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

UnhideGeneralForumTopicParams contains params for Telegram method "unhideGeneralForumTopic".

type UniqueGift

type UniqueGift struct {
	GiftID           string              `json:"gift_id"`
	BaseName         string              `json:"base_name"`
	Name             string              `json:"name"`
	Number           int64               `json:"number"`
	Model            *UniqueGiftModel    `json:"model"`
	Symbol           *UniqueGiftSymbol   `json:"symbol"`
	Backdrop         *UniqueGiftBackdrop `json:"backdrop"`
	IsPremium        bool                `json:"is_premium,omitempty"`
	IsBurned         bool                `json:"is_burned,omitempty"`
	IsFromBlockchain bool                `json:"is_from_blockchain,omitempty"`
	Colors           *UniqueGiftColors   `json:"colors,omitempty"`
	PublisherChat    *Chat               `json:"publisher_chat,omitempty"`
}

UniqueGift maps to Telegram Bot API type "UniqueGift".

type UniqueGiftBackdrop

type UniqueGiftBackdrop struct {
	Name           string                    `json:"name"`
	Colors         *UniqueGiftBackdropColors `json:"colors"`
	RarityPerMille int64                     `json:"rarity_per_mille"`
}

UniqueGiftBackdrop maps to Telegram Bot API type "UniqueGiftBackdrop".

type UniqueGiftBackdropColors

type UniqueGiftBackdropColors struct {
	CenterColor int64 `json:"center_color"`
	EdgeColor   int64 `json:"edge_color"`
	SymbolColor int64 `json:"symbol_color"`
	TextColor   int64 `json:"text_color"`
}

UniqueGiftBackdropColors maps to Telegram Bot API type "UniqueGiftBackdropColors".

type UniqueGiftColors

type UniqueGiftColors struct {
	ModelCustomEmojiID    string  `json:"model_custom_emoji_id"`
	SymbolCustomEmojiID   string  `json:"symbol_custom_emoji_id"`
	LightThemeMainColor   int64   `json:"light_theme_main_color"`
	LightThemeOtherColors []int64 `json:"light_theme_other_colors"`
	DarkThemeMainColor    int64   `json:"dark_theme_main_color"`
	DarkThemeOtherColors  []int64 `json:"dark_theme_other_colors"`
}

UniqueGiftColors maps to Telegram Bot API type "UniqueGiftColors".

type UniqueGiftInfo

type UniqueGiftInfo struct {
	Gift               *UniqueGift `json:"gift"`
	Origin             string      `json:"origin"`
	LastResaleCurrency string      `json:"last_resale_currency,omitempty"`
	LastResaleAmount   int64       `json:"last_resale_amount,omitempty"`
	OwnedGiftID        string      `json:"owned_gift_id,omitempty"`
	TransferStarCount  int64       `json:"transfer_star_count,omitempty"`
	NextTransferDate   int64       `json:"next_transfer_date,omitempty"`
}

UniqueGiftInfo maps to Telegram Bot API type "UniqueGiftInfo".

type UniqueGiftModel

type UniqueGiftModel struct {
	Name           string   `json:"name"`
	Sticker        *Sticker `json:"sticker"`
	RarityPerMille int64    `json:"rarity_per_mille"`
	Rarity         string   `json:"rarity,omitempty"`
}

UniqueGiftModel maps to Telegram Bot API type "UniqueGiftModel".

type UniqueGiftSymbol

type UniqueGiftSymbol struct {
	Name           string   `json:"name"`
	Sticker        *Sticker `json:"sticker"`
	RarityPerMille int64    `json:"rarity_per_mille"`
}

UniqueGiftSymbol maps to Telegram Bot API type "UniqueGiftSymbol".

type UnpinAllChatMessagesParams

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

UnpinAllChatMessagesParams contains params for Telegram method "unpinAllChatMessages".

type UnpinAllForumTopicMessagesParams

type UnpinAllForumTopicMessagesParams struct {
	ChatID          any   `json:"chat_id"`
	MessageThreadID int64 `json:"message_thread_id"`
}

UnpinAllForumTopicMessagesParams contains params for Telegram method "unpinAllForumTopicMessages".

type UnpinAllGeneralForumTopicMessagesParams

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

UnpinAllGeneralForumTopicMessagesParams contains params for Telegram method "unpinAllGeneralForumTopicMessages".

type UnpinChatMessageParams

type UnpinChatMessageParams struct {
	BusinessConnectionID string `json:"business_connection_id,omitempty"`
	ChatID               any    `json:"chat_id"`
	MessageID            int64  `json:"message_id,omitempty"`
}

UnpinChatMessageParams contains params for Telegram method "unpinChatMessage".

type Update

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

Update maps to Telegram Bot API type "Update".

func (*Update) Command

func (update *Update) Command() (string, string, bool)

Command extracts command and args from the effective message text.

func (*Update) EffectiveMessage

func (update *Update) EffectiveMessage() *Message

EffectiveMessage returns the first message-like payload for convenience helpers.

func (*Update) Payload

func (update *Update) Payload() any

Payload returns the typed payload matching the update type.

func (*Update) Type

func (update *Update) Type() UpdateType

Type returns the concrete update type.

type UpdateDispatchError

type UpdateDispatchError struct {
	UpdateID     int64
	UpdateType   UpdateType
	Target       string
	SubscriberID uint64
}

UpdateDispatchError reports that a non-blocking poller dropped an update.

func (*UpdateDispatchError) Error

func (err *UpdateDispatchError) Error() string

type UpdateFilter

type UpdateFilter func(Update) bool

UpdateFilter matches updates for subscription fan-out.

type UpdatePoller

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

UpdatePoller runs getUpdates in the background and fans updates out to channels.

func NewUpdatePoller

func NewUpdatePoller(bot *Bot, opts ...UpdatePollerOption) (*UpdatePoller, error)

NewUpdatePoller creates a long-polling helper on top of Bot.GetUpdates.

func (*UpdatePoller) Done

func (poller *UpdatePoller) Done() <-chan struct{}

Done is closed when the poller exits.

func (*UpdatePoller) Errors

func (poller *UpdatePoller) Errors() <-chan error

Errors returns polling errors. Errors are dropped when the channel buffer is full.

func (*UpdatePoller) Start

func (poller *UpdatePoller) Start(ctx context.Context)

Start launches the background polling goroutine. Calling Start more than once is a no-op.

func (*UpdatePoller) Stop

func (poller *UpdatePoller) Stop()

Stop cancels the background poller and waits for shutdown.

func (*UpdatePoller) Subscribe

func (poller *UpdatePoller) Subscribe(buffer int, filter UpdateFilter) <-chan Update

Subscribe registers a filtered update channel.

func (*UpdatePoller) SubscribeHandle

func (poller *UpdatePoller) SubscribeHandle(buffer int, filter UpdateFilter) *UpdateSubscription

SubscribeHandle registers a filtered update subscription with Unsubscribe support.

func (*UpdatePoller) SubscribeTypes

func (poller *UpdatePoller) SubscribeTypes(buffer int, updateTypes ...UpdateType) <-chan Update

SubscribeTypes registers a channel that receives only the requested update types.

func (*UpdatePoller) SubscribeTypesHandle

func (poller *UpdatePoller) SubscribeTypesHandle(buffer int, updateTypes ...UpdateType) *UpdateSubscription

SubscribeTypesHandle registers a typed update subscription with Unsubscribe support.

func (*UpdatePoller) Updates

func (poller *UpdatePoller) Updates() <-chan Update

Updates enables and returns the fan-out channel containing every update.

type UpdatePollerOption

type UpdatePollerOption func(*UpdatePoller)

UpdatePollerOption configures an UpdatePoller.

func WithPollerAllowedUpdates

func WithPollerAllowedUpdates(updateTypes ...UpdateType) UpdatePollerOption

WithPollerAllowedUpdates sets allowed_updates using typed update names.

func WithPollerBuffer

func WithPollerBuffer(size int) UpdatePollerOption

WithPollerBuffer sets the buffer size for the all-updates channel.

func WithPollerErrorBuffer

func WithPollerErrorBuffer(size int) UpdatePollerOption

WithPollerErrorBuffer sets the buffer size for the error channel.

func WithPollerNonBlockingDispatch

func WithPollerNonBlockingDispatch() UpdatePollerOption

WithPollerNonBlockingDispatch enables non-blocking fan-out. Slow consumers drop updates instead of blocking the poller.

func WithPollerParams

func WithPollerParams(params GetUpdatesParams) UpdatePollerOption

WithPollerParams overrides the base getUpdates parameters used by the poller.

func WithPollerRetryDelay

func WithPollerRetryDelay(delay time.Duration) UpdatePollerOption

WithPollerRetryDelay sets the delay before retrying after getUpdates errors.

type UpdateSubscription

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

UpdateSubscription is a cancellable subscription to poller updates.

func (*UpdateSubscription) ID

func (subscription *UpdateSubscription) ID() uint64

ID returns the internal subscription identifier.

func (*UpdateSubscription) Unsubscribe

func (subscription *UpdateSubscription) Unsubscribe()

Unsubscribe removes the subscription and closes its channel.

func (*UpdateSubscription) Updates

func (subscription *UpdateSubscription) Updates() <-chan Update

Updates returns the subscription channel.

type UpdateType

type UpdateType string

UpdateType is a discriminator for Telegram update payloads.

const (
	UpdateTypeUnknown                 UpdateType = ""
	UpdateTypeMessage                 UpdateType = "message"
	UpdateTypeEditedMessage           UpdateType = "edited_message"
	UpdateTypeChannelPost             UpdateType = "channel_post"
	UpdateTypeEditedChannelPost       UpdateType = "edited_channel_post"
	UpdateTypeBusinessConnection      UpdateType = "business_connection"
	UpdateTypeBusinessMessage         UpdateType = "business_message"
	UpdateTypeEditedBusinessMessage   UpdateType = "edited_business_message"
	UpdateTypeDeletedBusinessMessages UpdateType = "deleted_business_messages"
	UpdateTypeGuestMessage            UpdateType = "guest_message"
	UpdateTypeMessageReaction         UpdateType = "message_reaction"
	UpdateTypeMessageReactionCount    UpdateType = "message_reaction_count"
	UpdateTypeInlineQuery             UpdateType = "inline_query"
	UpdateTypeChosenInlineResult      UpdateType = "chosen_inline_result"
	UpdateTypeCallbackQuery           UpdateType = "callback_query"
	UpdateTypeShippingQuery           UpdateType = "shipping_query"
	UpdateTypePreCheckoutQuery        UpdateType = "pre_checkout_query"
	UpdateTypePurchasedPaidMedia      UpdateType = "purchased_paid_media"
	UpdateTypePoll                    UpdateType = "poll"
	UpdateTypePollAnswer              UpdateType = "poll_answer"
	UpdateTypeMyChatMember            UpdateType = "my_chat_member"
	UpdateTypeChatMember              UpdateType = "chat_member"
	UpdateTypeChatJoinRequest         UpdateType = "chat_join_request"
	UpdateTypeChatBoost               UpdateType = "chat_boost"
	UpdateTypeRemovedChatBoost        UpdateType = "removed_chat_boost"
	UpdateTypeManagedBot              UpdateType = "managed_bot"
	UpdateTypeSubscription            UpdateType = "subscription"
)

type UpgradeGiftParams

type UpgradeGiftParams struct {
	BusinessConnectionID string `json:"business_connection_id"`
	OwnedGiftID          string `json:"owned_gift_id"`
	KeepOriginalDetails  bool   `json:"keep_original_details,omitempty"`
	StarCount            int64  `json:"star_count,omitempty"`
}

UpgradeGiftParams contains params for Telegram method "upgradeGift".

type UploadStickerFileParams

type UploadStickerFileParams struct {
	UserID        int64     `json:"user_id"`
	Sticker       InputFile `json:"sticker"`
	StickerFormat string    `json:"sticker_format"`
}

UploadStickerFileParams contains params for Telegram method "uploadStickerFile".

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"`
	IsPremium                  bool   `json:"is_premium,omitempty"`
	AddedToAttachmentMenu      bool   `json:"added_to_attachment_menu,omitempty"`
	CanJoinGroups              bool   `json:"can_join_groups,omitempty"`
	CanReadAllGroupMessages    bool   `json:"can_read_all_group_messages,omitempty"`
	SupportsGuestQueries       bool   `json:"supports_guest_queries,omitempty"`
	SupportsInlineQueries      bool   `json:"supports_inline_queries,omitempty"`
	CanConnectToBusiness       bool   `json:"can_connect_to_business,omitempty"`
	HasMainWebApp              bool   `json:"has_main_web_app,omitempty"`
	HasTopicsEnabled           bool   `json:"has_topics_enabled,omitempty"`
	AllowsUsersToCreateTopics  bool   `json:"allows_users_to_create_topics,omitempty"`
	CanManageBots              bool   `json:"can_manage_bots,omitempty"`
	SupportsJoinRequestQueries bool   `json:"supports_join_request_queries,omitempty"`
}

User maps to Telegram Bot API type "User".

type UserChatBoosts

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

UserChatBoosts maps to Telegram Bot API type "UserChatBoosts".

type UserProfileAudios

type UserProfileAudios struct {
	TotalCount int64   `json:"total_count"`
	Audios     []Audio `json:"audios"`
}

UserProfileAudios maps to Telegram Bot API type "UserProfileAudios".

type UserProfilePhotos

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

UserProfilePhotos maps to Telegram Bot API type "UserProfilePhotos".

type UserRating

type UserRating struct {
	Level              int64 `json:"level"`
	Rating             int64 `json:"rating"`
	CurrentLevelRating int64 `json:"current_level_rating"`
	NextLevelRating    int64 `json:"next_level_rating,omitempty"`
}

UserRating maps to Telegram Bot API type "UserRating".

type UsersShared

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

UsersShared maps to Telegram Bot API type "UsersShared".

type Venue

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

Venue maps to Telegram Bot API type "Venue".

type VerifyChatParams

type VerifyChatParams struct {
	ChatID            any    `json:"chat_id"`
	CustomDescription string `json:"custom_description,omitempty"`
}

VerifyChatParams contains params for Telegram method "verifyChat".

type VerifyUserParams

type VerifyUserParams struct {
	UserID            int64  `json:"user_id"`
	CustomDescription string `json:"custom_description,omitempty"`
}

VerifyUserParams contains params for Telegram method "verifyUser".

type Video

type Video struct {
	FileID         string         `json:"file_id"`
	FileUniqueID   string         `json:"file_unique_id"`
	Width          int64          `json:"width"`
	Height         int64          `json:"height"`
	Duration       int64          `json:"duration"`
	Thumbnail      *PhotoSize     `json:"thumbnail,omitempty"`
	Cover          []PhotoSize    `json:"cover,omitempty"`
	StartTimestamp int64          `json:"start_timestamp,omitempty"`
	Qualities      []VideoQuality `json:"qualities,omitempty"`
	FileName       string         `json:"file_name,omitempty"`
	MimeType       string         `json:"mime_type,omitempty"`
	FileSize       int64          `json:"file_size,omitempty"`
}

Video maps to Telegram Bot API type "Video".

type VideoChatEnded

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

VideoChatEnded maps to Telegram Bot API type "VideoChatEnded".

type VideoChatParticipantsInvited

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

VideoChatParticipantsInvited maps to Telegram Bot API type "VideoChatParticipantsInvited".

type VideoChatScheduled

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

VideoChatScheduled maps to Telegram Bot API type "VideoChatScheduled".

type VideoChatStarted

type VideoChatStarted struct {
}

VideoChatStarted maps to Telegram Bot API type "VideoChatStarted".

type VideoNote

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

VideoNote maps to Telegram Bot API type "VideoNote".

type VideoQuality

type VideoQuality struct {
	FileID       string `json:"file_id"`
	FileUniqueID string `json:"file_unique_id"`
	Width        int64  `json:"width"`
	Height       int64  `json:"height"`
	Codec        string `json:"codec"`
	FileSize     int64  `json:"file_size,omitempty"`
}

VideoQuality maps to Telegram Bot API type "VideoQuality".

type Voice

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

Voice maps to Telegram Bot API type "Voice".

type WebAppData

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

WebAppData maps to Telegram Bot API type "WebAppData".

type WebAppInfo

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

WebAppInfo maps to Telegram Bot API type "WebAppInfo".

type WebhookInfo

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

WebhookInfo maps to Telegram Bot API type "WebhookInfo".

type WriteAccessAllowed

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

WriteAccessAllowed maps to Telegram Bot API type "WriteAccessAllowed".

Directories

Path Synopsis
cmd
apicheck command
Command apicheck detects unreviewed changes to the module's exported Go API.
Command apicheck detects unreviewed changes to the module's exported Go API.
apigen command
examples
async_updates command
commands command
ext_polling command
quickstart command
webhook command
Package tgbottest provides a local fake Telegram Bot API server for tests.
Package tgbottest provides a local fake Telegram Bot API server for tests.
Package tgutil provides small constructors for common Telegram Bot API values.
Package tgutil provides small constructors for common Telegram Bot API values.

Jump to

Keyboard shortcuts

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