telegram-bot-go: github.com/meinside/telegram-bot-go Index | Files

package telegrambot

import "github.com/meinside/telegram-bot-go"

Package telegrambot / Telegram Bot API helper

https://core.telegram.org/bots/api

Created on : 2015.10.06, meinside@gmail.com

Index

Package Files

bot.go methods.go methods_options.go types.go types_helper.go

Constants

const (
    MessageEntityTypeMention     = "mention"
    MessageEntityTypeHashTag     = "hashtag"
    MessageEntityTypeCashTag     = "cashtag"
    MessageEntityTypeBotCommand  = "bot_command"
    MessageEntityTypeURL         = "url"
    MessageEntityTypeEmail       = "email"
    MessageEntityTypePhoneNumber = "phone_number"
    MessageEntityTypeBold        = "bold"
    MessageEntityTypeItalic      = "italic"
    MessageEntityTypeCode        = "code"
    MessageEntityTypePre         = "pre"
    MessageEntityTypeTextLink    = "text_link"
    MessageEntityTypeTextMention = "text_mention"
)

MessageEntityType strings

func GenCertAndKey Uses

func GenCertAndKey(domain string, outCertFilepath string, outKeyFilepath string, expiresInDays int) error

GenCertAndKey generates a certificate and a private key file with given domain. (`OpenSSL` is needed.)

func NewInlineKeyboardButtonsAsRowsWithCallbackData Uses

func NewInlineKeyboardButtonsAsRowsWithCallbackData(values map[string]string) [][]InlineKeyboardButton

NewInlineKeyboardButtonsAsRowsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons (as rows) with callback data

type APIResponseBase Uses

type APIResponseBase struct {
    Ok          bool                   `json:"ok"`
    Description *string                `json:"description,omitempty"`
    Parameters  *APIResponseParameters `json:"parameters,omitempty"`
}

APIResponseBase is a base of API responses

type APIResponseBool Uses

type APIResponseBool struct {
    APIResponseBase
    Result bool `json:"result,omitempty"`
}

APIResponseBool is an API response with result type: bool

type APIResponseChat Uses

type APIResponseChat struct {
    APIResponseBase
    Result *Chat `json:"result,omitempty"`
}

APIResponseChat is an API response with result type: Chat

type APIResponseChatAdministrators Uses

type APIResponseChatAdministrators struct {
    APIResponseBase
    Result []ChatMember `json:"result,omitempty"`
}

APIResponseChatAdministrators is an API response with result type: ChatAdministrators

type APIResponseChatMember Uses

type APIResponseChatMember struct {
    APIResponseBase
    Result *ChatMember `json:"result,omitempty"`
}

APIResponseChatMember is an API response with result type: ChatMember

type APIResponseFile Uses

type APIResponseFile struct {
    APIResponseBase
    Result *File `json:"result,omitempty"`
}

APIResponseFile is an API response with result type: File

type APIResponseGameHighScores Uses

type APIResponseGameHighScores struct {
    APIResponseBase
    Result []GameHighScore `json:"result,omitempty"`
}

APIResponseGameHighScores is an API response with result type: GameHighScores

type APIResponseInt Uses

type APIResponseInt struct {
    APIResponseBase
    Result int `json:"result,omitempty"`
}

APIResponseInt is an API response with result type: int

type APIResponseMessage Uses

type APIResponseMessage struct {
    APIResponseBase
    Result *Message `json:"result,omitempty"`
}

APIResponseMessage is an API response with result type: Message

type APIResponseMessageOrBool Uses

type APIResponseMessageOrBool struct {
    APIResponseBase
    ResultMessage *Message
    ResultBool    *bool
}

APIResponseMessageOrBool is an API response with result type: Message or bool

type APIResponseMessages Uses

type APIResponseMessages struct {
    APIResponseBase
    Result []*Message `json:"result,omitempty"`
}

APIResponseMessages is an API response with result type: []Message

type APIResponseParameters Uses

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

APIResponseParameters is parameters in API responses

https://core.telegram.org/bots/api#responseparameters

type APIResponseStickerSet Uses

type APIResponseStickerSet struct {
    APIResponseBase
    Result *StickerSet `json:"result,omitempty"`
}

APIResponseStickerSet is an API response with result type: StickerSet

type APIResponseString Uses

type APIResponseString struct {
    APIResponseBase
    Result *string `json:"result,omitempty"`
}

APIResponseString is an API response with result type: string

type APIResponseUpdates Uses

type APIResponseUpdates struct {
    APIResponseBase
    Result []Update `json:"result,omitempty"`
}

APIResponseUpdates is an API response with result type: Update

type APIResponseUser Uses

type APIResponseUser struct {
    APIResponseBase
    Result *User `json:"result,omitempty"`
}

APIResponseUser is an API response with result type: User

type APIResponseUserProfilePhotos Uses

type APIResponseUserProfilePhotos struct {
    APIResponseBase
    Result *UserProfilePhotos `json:"result,omitempty"`
}

APIResponseUserProfilePhotos is an API response with result type: UserProfilePhotos

type APIResponseWebhookInfo Uses

type APIResponseWebhookInfo struct {
    APIResponseBase
    Result *WebhookInfo `json:"result,omitempty"`
}

APIResponseWebhookInfo is an API response with result type: WebhookInfo

type AllowedUpdate Uses

type AllowedUpdate string

AllowedUpdate is a type for 'allowed_updates'

const (
    AllowMessage            AllowedUpdate = "message"
    AllowEditedMessage      AllowedUpdate = "edited_message"
    AllowChannelPost        AllowedUpdate = "channel_post"
    AllowEditedChannelPost  AllowedUpdate = "edited_channel_post"
    AllowInlineQuery        AllowedUpdate = "inline_query"
    AllowChosenInlineResult AllowedUpdate = "chosen_inline_result"
    AllowCallbackQuery      AllowedUpdate = "callback_query"
    AllowShippingQuery      AllowedUpdate = "shipping_query"
    AllowPreCheckoutQuery   AllowedUpdate = "pre_checkout_query"
)

AllowedUpdate type constants constants constants constants

type Animation Uses

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

Animation is a struct of Animation

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

type Audio Uses

type Audio struct {
    FileID    string    `json:"file_id"`
    Duration  int       `json:"duration"`
    Performer *string   `json:"performer,omitempty"`
    Title     *string   `json:"title,omitempty"`
    MimeType  *string   `json:"mime_type,omitempty"`
    FileSize  int       `json:"file_size,omitempty"`
    Thumb     PhotoSize `json:"thumb,omitempty"`
}

Audio is a struct for an audio file

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

type Bot Uses

type Bot struct {
    Verbose bool // print verbose log messages or not
    // contains filtered or unexported fields
}

Bot struct

func NewClient Uses

func NewClient(token string) *Bot

NewClient gets a new bot API client with given token string.

func (*Bot) AddStickerToSet Uses

func (b *Bot) AddStickerToSet(userID int, name string, sticker InputFile, emojis string, options OptionsAddStickerToSet) (result APIResponseBool)

AddStickerToSet adds a sticker to set.

https://core.telegram.org/bots/api#addstickertoset

func (*Bot) AnswerCallbackQuery Uses

func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options OptionsAnswerCallbackQuery) (result APIResponseBool)

AnswerCallbackQuery answers a callback query

https://core.telegram.org/bots/api#answercallbackquery

func (*Bot) AnswerInlineQuery Uses

func (b *Bot) AnswerInlineQuery(inlineQueryID string, results []interface{}, options OptionsAnswerInlineQuery) (result APIResponseBool)

AnswerInlineQuery sends answers to an inline query.

results = array of InlineQueryResultArticle, InlineQueryResultPhoto, InlineQueryResultGif, InlineQueryResultMpeg4Gif, or InlineQueryResultVideo.

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

func (*Bot) AnswerPreCheckoutQuery Uses

func (b *Bot) AnswerPreCheckoutQuery(preCheckoutQueryID string, ok bool, errorMessage *string) (result APIResponseBool)

AnswerPreCheckoutQuery answers a pre-checkout query.

https://core.telegram.org/bots/api#answerprecheckoutquery

func (*Bot) AnswerShippingQuery Uses

func (b *Bot) AnswerShippingQuery(shippingQueryID string, ok bool, shippingOptions []ShippingOption, errorMessage *string) (result APIResponseBool)

AnswerShippingQuery answers a shipping query.

if ok is true, shippingOptions should be provided. otherwise, errorMessage should be provided.

https://core.telegram.org/bots/api#answershippingquery

func (*Bot) CreateNewStickerSet Uses

func (b *Bot) CreateNewStickerSet(userID int, name, title string, sticker InputFile, emojis string, options OptionsCreateNewStickerSet) (result APIResponseBool)

CreateNewStickerSet creates a new sticker set.

https://core.telegram.org/bots/api#createnewstickerset

func (*Bot) DeleteChatPhoto Uses

func (b *Bot) DeleteChatPhoto(chatID ChatID) (result APIResponseBool)

DeleteChatPhoto deletes a chat photo

https://core.telegram.org/bots/api#deletechatphoto

func (*Bot) DeleteChatStickerSet Uses

func (b *Bot) DeleteChatStickerSet(chatID ChatID) (result APIResponseBool)

DeleteChatStickerSet deletes a chat sticker set

https://core.telegram.org/bots/api#deletechatstickerset

func (*Bot) DeleteMessage Uses

func (b *Bot) DeleteMessage(chatID ChatID, messageID int) (result APIResponseBool)

DeleteMessage deletes a message

https://core.telegram.org/bots/api#deletemessage

func (*Bot) DeleteStickerFromSet Uses

func (b *Bot) DeleteStickerFromSet(sticker string) (result APIResponseBool)

DeleteStickerFromSet deletes a sticker from set.

https://core.telegram.org/bots/api#deletestickerfromset

func (*Bot) DeleteWebhook Uses

func (b *Bot) DeleteWebhook() (result APIResponseBool)

DeleteWebhook deletes webhook for this bot. (Function GetUpdates will not work if webhook is set, so in that case you'll need to delete it)

https://core.telegram.org/bots/api#deletewebhook

func (*Bot) EditMessageCaption Uses

func (b *Bot) EditMessageCaption(caption string, options OptionsEditMessageCaption) (result APIResponseMessageOrBool)

EditMessageCaption edits caption of a message

https://core.telegram.org/bots/api#editmessagecaption

func (*Bot) EditMessageLiveLocation Uses

func (b *Bot) EditMessageLiveLocation(latitude, longitude float32, options OptionsEditMessageLiveLocation) (result APIResponseMessageOrBool)

EditMessageLiveLocation edits live location of a message

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#editmessagelivelocation

func (*Bot) EditMessageMedia Uses

func (b *Bot) EditMessageMedia(media InputMedia, options OptionsEditMessageMedia) (result APIResponseMessageOrBool)

EditMessageMedia edites a media message

https://core.telegram.org/bots/api#editmessagemedia

func (*Bot) EditMessageReplyMarkup Uses

func (b *Bot) EditMessageReplyMarkup(options OptionsEditMessageReplyMarkup) (result APIResponseMessageOrBool)

EditMessageReplyMarkup edits reply markup of a message

https://core.telegram.org/bots/api#editmessagereplymarkup

func (*Bot) EditMessageText Uses

func (b *Bot) EditMessageText(text string, options OptionsEditMessageText) (result APIResponseMessageOrBool)

EditMessageText edits text of a message

https://core.telegram.org/bots/api#editmessagetext

func (b *Bot) ExportChatInviteLink(chatID ChatID) (result APIResponseString)

ExportChatInviteLink exports a chat invite link

https://core.telegram.org/bots/api#exportchatinvitelink

func (*Bot) ForwardMessage Uses

func (b *Bot) ForwardMessage(chatID, fromChatID ChatID, messageID int, options OptionsForwardMessage) (result APIResponseMessage)

ForwardMessage forwards a message.

https://core.telegram.org/bots/api#forwardmessage

func (*Bot) GetChat Uses

func (b *Bot) GetChat(chatID ChatID) (result APIResponseChat)

GetChat gets a chat

https://core.telegram.org/bots/api#getchat

func (*Bot) GetChatAdministrators Uses

func (b *Bot) GetChatAdministrators(chatID ChatID) (result APIResponseChatAdministrators)

GetChatAdministrators gets chat administrators

https://core.telegram.org/bots/api#getchatadministrators

func (*Bot) GetChatMember Uses

func (b *Bot) GetChatMember(chatID ChatID, userID int) (result APIResponseChatMember)

GetChatMember gets a chat member

https://core.telegram.org/bots/api#getchatmember

func (*Bot) GetChatMembersCount Uses

func (b *Bot) GetChatMembersCount(chatID ChatID) (result APIResponseInt)

GetChatMembersCount gets chat members' count

https://core.telegram.org/bots/api#getchatmemberscount

func (*Bot) GetFile Uses

func (b *Bot) GetFile(fileID string) (result APIResponseFile)

GetFile gets file info and prepare for download.

https://core.telegram.org/bots/api#getfile

func (*Bot) GetFileURL Uses

func (b *Bot) GetFileURL(file File) string

GetFileURL gets download link from a given File.

func (*Bot) GetGameHighScores Uses

func (b *Bot) GetGameHighScores(userID int, options OptionsGetGameHighScores) (result APIResponseGameHighScores)

GetGameHighScores gets high scores of a game.

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

https://core.telegram.org/bots/api#getgamehighscores

func (*Bot) GetMe Uses

func (b *Bot) GetMe() (result APIResponseUser)

GetMe gets info of this bot.

https://core.telegram.org/bots/api#getme

func (*Bot) GetStickerSet Uses

func (b *Bot) GetStickerSet(name string) (result APIResponseStickerSet)

GetStickerSet gets a sticker set.

https://core.telegram.org/bots/api#getstickerset

func (*Bot) GetUpdates Uses

func (b *Bot) GetUpdates(options OptionsGetUpdates) (result APIResponseUpdates)

GetUpdates retrieves updates from Telegram bot API.

https://core.telegram.org/bots/api#getupdates

func (*Bot) GetUserProfilePhotos Uses

func (b *Bot) GetUserProfilePhotos(userID int, options OptionsGetUserProfilePhotos) (result APIResponseUserProfilePhotos)

GetUserProfilePhotos gets user profile photos.

https://core.telegram.org/bots/api#getuserprofilephotos

func (*Bot) GetWebhookInfo Uses

func (b *Bot) GetWebhookInfo() (result APIResponseWebhookInfo)

GetWebhookInfo gets webhook info for this bot.

https://core.telegram.org/bots/api#getwebhookinfo

func (*Bot) KickChatMember Uses

func (b *Bot) KickChatMember(chatID ChatID, userID int) (result APIResponseBool)

KickChatMember kicks a chat member

https://core.telegram.org/bots/api#kickchatmember

func (*Bot) KickChatMemberUntil Uses

func (b *Bot) KickChatMemberUntil(chatID ChatID, userID int, untilDate int) (result APIResponseBool)

KickChatMemberUntil kicks a chat member until given date

func (*Bot) LeaveChat Uses

func (b *Bot) LeaveChat(chatID ChatID) (result APIResponseBool)

LeaveChat leaves a chat

https://core.telegram.org/bots/api#leavechat

func (*Bot) PinChatMessage Uses

func (b *Bot) PinChatMessage(chatID ChatID, messageID int, options OptionsPinChatMessage) (result APIResponseBool)

PinChatMessage pins a chat message

https://core.telegram.org/bots/api#pinchatmessage

func (*Bot) PromoteChatMember Uses

func (b *Bot) PromoteChatMember(chatID ChatID, userID int, options OptionsPromoteChatMember) (result APIResponseBool)

PromoteChatMember promotes a chat member

https://core.telegram.org/bots/api#promotechatmember

func (*Bot) RestrictChatMember Uses

func (b *Bot) RestrictChatMember(chatID ChatID, userID int, options OptionsRestrictChatMember) (result APIResponseBool)

RestrictChatMember restricts a chat member

https://core.telegram.org/bots/api#restrictchatmember

func (*Bot) SendAnimation Uses

func (b *Bot) SendAnimation(chatID ChatID, animation InputFile, options OptionsSendAnimation) (result APIResponseMessage)

SendAnimation sends an animation.

https://core.telegram.org/bots/api#sendanimation

func (*Bot) SendAudio Uses

func (b *Bot) SendAudio(chatID ChatID, audio InputFile, options OptionsSendAudio) (result APIResponseMessage)

SendAudio sends an audio file. (.mp3 format only, will be played with external players)

https://core.telegram.org/bots/api#sendaudio

func (*Bot) SendChatAction Uses

func (b *Bot) SendChatAction(chatID ChatID, action ChatAction) (result APIResponseBool)

SendChatAction sends chat actions.

https://core.telegram.org/bots/api#sendchataction

func (*Bot) SendContact Uses

func (b *Bot) SendContact(chatID ChatID, phoneNumber, firstName string, options OptionsSendContact) (result APIResponseMessage)

SendContact sends contacts.

https://core.telegram.org/bots/api#sendcontact

func (*Bot) SendDocument Uses

func (b *Bot) SendDocument(chatID ChatID, document InputFile, options OptionsSendDocument) (result APIResponseMessage)

SendDocument sends a general file.

https://core.telegram.org/bots/api#senddocument

func (*Bot) SendGame Uses

func (b *Bot) SendGame(chatID ChatID, gameShortName string, options OptionsSendGame) (result APIResponseMessage)

SendGame sends a game.

https://core.telegram.org/bots/api#sendgame

func (*Bot) SendInvoice Uses

func (b *Bot) SendInvoice(chatID int64, title, description, payload, providerToken, startParameter, currency string, prices []LabeledPrice, options OptionsSendInvoice) (result APIResponseMessage)

SendInvoice sends an invoice.

https://core.telegram.org/bots/api#sendinvoice

func (*Bot) SendLocation Uses

func (b *Bot) SendLocation(chatID ChatID, latitude, longitude float32, options OptionsSendLocation) (result APIResponseMessage)

SendLocation sends locations.

https://core.telegram.org/bots/api#sendlocation

func (*Bot) SendMediaGroup Uses

func (b *Bot) SendMediaGroup(chatID ChatID, media []InputMedia, options OptionsSendMediaGroup) (result APIResponseMessages)

SendMediaGroup sends a group of photos or videos as an album.

https://core.telegram.org/bots/api#sendmediagroup

func (*Bot) SendMessage Uses

func (b *Bot) SendMessage(chatID ChatID, text string, options OptionsSendMessage) (result APIResponseMessage)

SendMessage sends a message to the bot.

https://core.telegram.org/bots/api#sendmessage

func (*Bot) SendPhoto Uses

func (b *Bot) SendPhoto(chatID ChatID, photo InputFile, options OptionsSendPhoto) (result APIResponseMessage)

SendPhoto sends a photo.

https://core.telegram.org/bots/api#sendphoto

func (*Bot) SendSticker Uses

func (b *Bot) SendSticker(chatID ChatID, sticker InputFile, options OptionsSendSticker) (result APIResponseMessage)

SendSticker sends a sticker.

https://core.telegram.org/bots/api#sendsticker

func (*Bot) SendVenue Uses

func (b *Bot) SendVenue(chatID ChatID, latitude, longitude float32, title, address string, options OptionsSendVenue) (result APIResponseMessage)

SendVenue sends venues.

https://core.telegram.org/bots/api#sendvenue

func (*Bot) SendVideo Uses

func (b *Bot) SendVideo(chatID ChatID, video InputFile, options OptionsSendVideo) (result APIResponseMessage)

SendVideo sends a video file.

https://core.telegram.org/bots/api#sendvideo

func (*Bot) SendVideoNote Uses

func (b *Bot) SendVideoNote(chatID ChatID, videoNote InputFile, options OptionsSendVideoNote) (result APIResponseMessage)

SendVideoNote sends a video note.

videoNote cannot be a remote http url (not supported yet)

https://core.telegram.org/bots/api#sendvideonote

func (*Bot) SendVoice Uses

func (b *Bot) SendVoice(chatID ChatID, voice InputFile, options OptionsSendVoice) (result APIResponseMessage)

SendVoice sends a voice file. (.ogg format only, will be played with Telegram itself))

https://core.telegram.org/bots/api#sendvoice

func (*Bot) SetChatDescription Uses

func (b *Bot) SetChatDescription(chatID ChatID, description string) (result APIResponseBool)

SetChatDescription sets a chat description

https://core.telegram.org/bots/api#setchatdescription

func (*Bot) SetChatPhoto Uses

func (b *Bot) SetChatPhoto(chatID ChatID, photo InputFile) (result APIResponseBool)

SetChatPhoto sets a chat photo

https://core.telegram.org/bots/api#setchatphoto

func (*Bot) SetChatStickerSet Uses

func (b *Bot) SetChatStickerSet(chatID ChatID, stickerSetName string) (result APIResponseBool)

SetChatStickerSet sets a chat sticker set

https://core.telegram.org/bots/api#setchatstickerset

func (*Bot) SetChatTitle Uses

func (b *Bot) SetChatTitle(chatID ChatID, title string) (result APIResponseBool)

SetChatTitle sets a chat title

https://core.telegram.org/bots/api#setchattitle

func (*Bot) SetGameScore Uses

func (b *Bot) SetGameScore(userID int, score int, options OptionsSetGameScore) (result APIResponseMessageOrBool)

SetGameScore sets score of a game.

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: force, and disable_edit_message

https://core.telegram.org/bots/api#setgamescore

func (*Bot) SetStickerPositionInSet Uses

func (b *Bot) SetStickerPositionInSet(sticker string, position int) (result APIResponseBool)

SetStickerPositionInSet sets sticker position in set.

https://core.telegram.org/bots/api#setstickerpositioninset

func (*Bot) SetWebhook Uses

func (b *Bot) SetWebhook(host string, port int, certFilepath string) (result APIResponseBool)

SetWebhook sets webhook url and certificate for receiving incoming updates.

func (*Bot) SetWebhookWithOptions Uses

func (b *Bot) SetWebhookWithOptions(host string, port int, certFilepath string, maxConnections int, allowedUpdates []UpdateType) (result APIResponseBool)

SetWebhookWithOptions sets webhook url, certificate, and various options for receiving incoming updates.

port should be one of: 443, 80, 88, or 8443. default maxConnections = 40

https://core.telegram.org/bots/api#setwebhook

func (*Bot) StartMonitoringUpdates Uses

func (b *Bot) StartMonitoringUpdates(updateOffset int, interval int, updateHandler func(b *Bot, update Update, err error))

StartMonitoringUpdates retrieves updates from API server constantly. If webhook is registered, it may not work properly. So make sure webhook is deleted, or not registered.

func (*Bot) StartWebhookServerAndWait Uses

func (b *Bot) StartWebhookServerAndWait(certFilepath string, keyFilepath string, webhookHandler func(b *Bot, webhook Update, err error))

StartWebhookServerAndWait starts a webhook server(and waits forever). Function SetWebhook(host, port, certFilepath) should be called priorly to setup host, port, and certification file. Certification file(.pem) and a private key is needed. Incoming webhooks will be received through webhookHandler function.

https://core.telegram.org/bots/self-signed

func (*Bot) StopMessageLiveLocation Uses

func (b *Bot) StopMessageLiveLocation(options OptionsStopMessageLiveLocation) (result APIResponseMessageOrBool)

StopMessageLiveLocation stops live location of a message

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#stopmessagelivelocation

func (*Bot) UnbanChatMember Uses

func (b *Bot) UnbanChatMember(chatID ChatID, userID int) (result APIResponseBool)

UnbanChatMember unbans a chat member

https://core.telegram.org/bots/api#unbanchatmember

func (*Bot) UnpinChatMessage Uses

func (b *Bot) UnpinChatMessage(chatID ChatID) (result APIResponseBool)

UnpinChatMessage unpins a chat message

https://core.telegram.org/bots/api#unpinchatmessage

func (*Bot) UploadStickerFile Uses

func (b *Bot) UploadStickerFile(userID int, sticker InputFile) (result APIResponseFile)

UploadStickerFile uploads a sticker file.

https://core.telegram.org/bots/api#uploadstickerfile

type CallbackGame Uses

type CallbackGame struct {
}

CallbackGame is for callback of games

https://core.telegram.org/bots/api#callbackgame

type CallbackQuery Uses

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

CallbackQuery is a struct for a callback query

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

func (CallbackQuery) String Uses

func (q CallbackQuery) String() string

String function for CallbackQuery

type Chat Uses

type Chat struct {
    ID                          int64      `json:"id"`
    Type                        ChatType   `json:"type"`
    Title                       *string    `json:"title,omitempty"`
    Username                    *string    `json:"username,omitempty"`
    FirstName                   *string    `json:"first_name,omitempty"`
    LastName                    *string    `json:"last_name,omitempty"`
    AllMembersAreAdministrators bool       `json:"all_members_are_administrators,omitempty"`
    Photo                       *ChatPhoto `json:"photo,omitempty"`
    Description                 *string    `json:"description,omitempty"`
    InviteLink                  *string    `json:"invite_link,omitempty"`
    PinnedMessage               *Message   `json:"pinned_message,omitempty"`
    StickerSetName              *string    `json:"sticker_set_name,omitempty"`
    CanSetStickerSet            bool       `json:"can_set_sticker_set,omitempty"`
}

Chat is a struct of a chat

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

func (Chat) String Uses

func (c Chat) String() string

String function for Chat

type ChatAction Uses

type ChatAction string

ChatAction is a type of action in chats

const (
    ChatActionTyping          ChatAction = "typing"
    ChatActionUploadPhoto     ChatAction = "upload_photo"
    ChatActionRecordVideo     ChatAction = "record_video"
    ChatActionUploadVideo     ChatAction = "upload_video"
    ChatActionRecordAudio     ChatAction = "record_audio"
    ChatActionUploadAudio     ChatAction = "upload_audio"
    ChatActionUploadDocument  ChatAction = "upload_document"
    ChatActionFindLocation    ChatAction = "find_location"
    ChatActionRecordVideoNote ChatAction = "record_video_note"
    ChatActionUploadVideoNote ChatAction = "upload_video_note"
)

ChatAction strings

type ChatID Uses

type ChatID interface{}

ChatID can be `Message.Chat.Id`, or target channel name (in string, eg. "@channelusername")

type ChatMember Uses

type ChatMember struct {
    User                  User             `json:"user"`
    Status                ChatMemberStatus `json:"status"`
    UntilDate             int              `json:"until_date,omitempty"`
    CanBeEdited           bool             `json:"can_be_edited,omitempty"`
    CanChangeInfo         bool             `json:"can_change_info,omitempty"`
    CanPostMessages       bool             `json:"can_post_messages,omitempty"`
    CanEditMessages       bool             `json:"can_edit_messages,omitempty"`
    CanDeleteMessages     bool             `json:"can_delete_messages,omitempty"`
    CanInviteUsers        bool             `json:"can_invite_users,omitempty"`
    CanRestrictMembers    bool             `json:"can_restrict_members,omitempty"`
    CanPinMessages        bool             `json:"can_pin_messages,omitempty"`
    CanPromoteMembers     bool             `json:"can_promote_members,omitempty"`
    CanSendMessages       bool             `json:"can_send_messages,omitempty"`
    CanSendMediaMessages  bool             `json:"can_send_media_messages,omitempty"`
    CanSendOtherMessages  bool             `json:"can_send_other_messages,omitempty"`
    CanAddWebPagePreviews bool             `json:"can_add_web_page_previews,omitempty"`
}

ChatMember is a struct of a chat member

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

type ChatMemberStatus Uses

type ChatMemberStatus string

ChatMemberStatus is a status of chat member

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

const (
    ChatMemberStatusCreator       ChatMemberStatus = "creator"
    ChatMemberStatusAdministrator ChatMemberStatus = "administrator"
    ChatMemberStatusMember        ChatMemberStatus = "member"
    ChatMemberStatusLeft          ChatMemberStatus = "left"
    ChatMemberStatusKicked        ChatMemberStatus = "kicked"
)

ChatMemberStatus strings

type ChatPhoto Uses

type ChatPhoto struct {
    SmallFileID string `json:"small_file_id"`
    BigFileID   string `json:"big_file_id"`
}

ChatPhoto is a struct for a chat photo

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

type ChatType Uses

type ChatType string

ChatType is a type of Chat

const (
    ChatTypePrivate ChatType = "private"
    ChatTypeGroup   ChatType = "group"
    ChatTypeChannel ChatType = "channel"
)

ChatType strings

type ChosenInlineResult Uses

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 is a struct for a chosen inline result

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

func (ChosenInlineResult) String Uses

func (c ChosenInlineResult) String() string

String function for ChosenInlineResult

type Contact Uses

type Contact struct {
    PhoneNumber string  `json:"phone_number"`
    FirstName   string  `json:"first_name"`
    LastName    *string `json:"last_name,omitempty"`
    UserID      int     `json:"user_id,omitempty"`
    VCard       *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
}

Contact is a struct for a contact info

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

type Document Uses

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

Document is a struct for an ordinary file

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

type DocumentMimeType Uses

type DocumentMimeType string

DocumentMimeType is a document mime type for an inline query

const (
    DocumentMimeTypePdf DocumentMimeType = "application/pdf"
    DocumentMimeTypeZip DocumentMimeType = "application/zip"
)

DocumentMimeType strings

type File Uses

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

File is a struct for a file

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

type ForceReply Uses

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

ForceReply is a struct for force-reply

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

type Game Uses

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 is a struct of Game

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

type GameHighScore Uses

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

GameHighScore is a struct of GameHighScore

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

type InlineKeyboardButton Uses

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

InlineKeyboardButton is a struct for InlineKeyboardButtons

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

func NewInlineKeyboardButtonsAsColumnsWithCallbackData Uses

func NewInlineKeyboardButtonsAsColumnsWithCallbackData(values map[string]string) []InlineKeyboardButton

NewInlineKeyboardButtonsAsColumnsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons (as columns) with callback data

func NewInlineKeyboardButtonsWithCallbackData Uses

func NewInlineKeyboardButtonsWithCallbackData(values map[string]string) []InlineKeyboardButton

NewInlineKeyboardButtonsWithCallbackData is a helper function for generating an array of InlineKeyboardButtons with callback data

func NewInlineKeyboardButtonsWithSwitchInlineQuery Uses

func NewInlineKeyboardButtonsWithSwitchInlineQuery(values map[string]string) []InlineKeyboardButton

NewInlineKeyboardButtonsWithSwitchInlineQuery is a helper function for generating an array of InlineKeyboardButtons with switch inline query

func NewInlineKeyboardButtonsWithURL Uses

func NewInlineKeyboardButtonsWithURL(values map[string]string) []InlineKeyboardButton

NewInlineKeyboardButtonsWithURL is a helper function for generating an array of InlineKeyboardButtons with urls

type InlineKeyboardMarkup Uses

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

InlineKeyboardMarkup is a struct for InlineKeyboardMarkup

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

type InlineQuery Uses

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

InlineQuery is a struct of an inline query

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

func (InlineQuery) String Uses

func (i InlineQuery) String() string

String function for InlineQuery

type InlineQueryResult Uses

type InlineQueryResult struct {
    Type InlineQueryResultType `json:"type"`
    ID   string                `json:"id"`
}

InlineQueryResult is a struct for inline query results

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

type InlineQueryResultArticle Uses

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

InlineQueryResultArticle is a struct for InlineQueryResultArticle

func NewInlineQueryResultArticle Uses

func NewInlineQueryResultArticle(title, messageText, description string) (newArticle *InlineQueryResultArticle, generatedID *string)

NewInlineQueryResultArticle is a helper function for generating a new InlineQueryResultArticle

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

type InlineQueryResultAudio Uses

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

InlineQueryResultAudio is a struct of InlineQueryResultAudio

func NewInlineQueryResultAudio Uses

func NewInlineQueryResultAudio(audioURL, title string) (newAudio *InlineQueryResultAudio, generatedID *string)

NewInlineQueryResultAudio is a helper function for generating a new InlineQueryResultAudio

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

type InlineQueryResultCachedAudio Uses

type InlineQueryResultCachedAudio struct {
    InlineQueryResult
    AudioFileID         string                `json:"audio_file_id"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedAudio is a struct of InlineQueryResultCachedAudio

func NewInlineQueryResultCachedAudio Uses

func NewInlineQueryResultCachedAudio(audioFileID string) (newAudio *InlineQueryResultCachedAudio, generatedID *string)

NewInlineQueryResultCachedAudio is a helper function for generating a new InlineQueryResultCachedAudio

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

type InlineQueryResultCachedDocument Uses

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

InlineQueryResultCachedDocument is a struct of InlineQueryResultCachedDocument

func NewInlineQueryResultCachedDocument Uses

func NewInlineQueryResultCachedDocument(title, documentFileID string) (newDocument *InlineQueryResultCachedDocument, generatedID *string)

NewInlineQueryResultCachedDocument is a helper function for generating a new InlineQueryResultCachedDocument

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

type InlineQueryResultCachedGif Uses

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

InlineQueryResultCachedGif is a struct of InlineQueryResultCachedGif

func NewInlineQueryResultCachedGif Uses

func NewInlineQueryResultCachedGif(gifFileID string) (newGif *InlineQueryResultCachedGif, generatedID *string)

NewInlineQueryResultCachedGif is a helper function for generating a new InlineQueryResultCachedGif

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

type InlineQueryResultCachedMpeg4Gif Uses

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

InlineQueryResultCachedMpeg4Gif is a struct of InlineQueryResultCachedMpeg4Gif

func NewInlineQueryResultCachedMpeg4Gif Uses

func NewInlineQueryResultCachedMpeg4Gif(mpeg4FileID string) (newMpeg4Gif *InlineQueryResultCachedMpeg4Gif, generatedID *string)

NewInlineQueryResultCachedMpeg4Gif is a helper function for generating a new InlineQueryResultCachedMpeg4Gif

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

type InlineQueryResultCachedPhoto Uses

type InlineQueryResultCachedPhoto struct {
    InlineQueryResult
    PhotoFileID         string                `json:"photo_file_id"`
    Title               *string               `json:"title,omitempty"`
    Description         *string               `json:"description,omitempty"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultCachedPhoto is a struct of InlineQueryResultCachedPhoto

func NewInlineQueryResultCachedPhoto Uses

func NewInlineQueryResultCachedPhoto(photoFileID string) (newPhoto *InlineQueryResultCachedPhoto, generatedID *string)

NewInlineQueryResultCachedPhoto is a helper function for generating a new InlineQueryResultCachedPhoto

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

type InlineQueryResultCachedSticker Uses

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

InlineQueryResultCachedSticker is a struct of InlineQueryResultCachedSticker

func NewInlineQueryResultCachedSticker Uses

func NewInlineQueryResultCachedSticker(stickerFileID string) (newSticker *InlineQueryResultCachedSticker, generatedID *string)

NewInlineQueryResultCachedSticker is a helper function for generating a new InlineQueryResultCachedSticker

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

type InlineQueryResultCachedVideo Uses

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

InlineQueryResultCachedVideo is a struct of InlineQueryResultCachedVideo

func NewInlineQueryResultCachedVideo Uses

func NewInlineQueryResultCachedVideo(title, videoFileID string) (newVideo *InlineQueryResultCachedVideo, generatedID *string)

NewInlineQueryResultCachedVideo is a helper function for generating a new InlineQueryResultCachedVideo

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

type InlineQueryResultCachedVoice Uses

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

InlineQueryResultCachedVoice is a struct of InlineQueryResultCachedVoice

func NewInlineQueryResultCachedVoice Uses

func NewInlineQueryResultCachedVoice(title, voiceFileID string) (newVoice *InlineQueryResultCachedVoice, generatedID *string)

NewInlineQueryResultCachedVoice is a helper function for generating a new InlineQueryResultCachedVoice

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

type InlineQueryResultContact Uses

type InlineQueryResultContact struct {
    InlineQueryResult
    PhoneNumber         string                `json:"phone_number"`
    FirstName           string                `json:"first_name"`
    LastName            *string               `json:"last_name,omitempty"`
    VCard               *string               `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
    ThumbURL            *string               `json:"thumb_url,omitempty"`
    ThumbWidth          int                   `json:"thumb_width,omitempty"`
    ThumbHeight         int                   `json:"thumb_height,omitempty"`
}

InlineQueryResultContact is a struct of InlineQueryResultContact

func NewInlineQueryResultContact Uses

func NewInlineQueryResultContact(phoneNumber, firstName string) (newContact *InlineQueryResultContact, generatedID *string)

NewInlineQueryResultContact is a helper function for generating a new InlineQueryResultContact

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

type InlineQueryResultDocument Uses

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

InlineQueryResultDocument is a struct of InlineQueryResultDocument

func NewInlineQueryResultDocument Uses

func NewInlineQueryResultDocument(documentURL, title string, mimeType DocumentMimeType) (newDocument *InlineQueryResultDocument, generatedID *string)

NewInlineQueryResultDocument is a helper function for generating a new InlineQueryResultDocument

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

type InlineQueryResultGame Uses

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

InlineQueryResultGame is a struct of InlineQueryResultGame

type InlineQueryResultGif Uses

type InlineQueryResultGif struct {
    InlineQueryResult
    GifURL              string                `json:"gif_url"`
    GifWidth            int                   `json:"gif_width,omitempty"`
    GifHeight           int                   `json:"gif_height,omitempty"`
    GifDuration         int                   `json:"gif_duration,omitempty"`
    ThumbURL            string                `json:"thumb_url"`
    Title               *string               `json:"title,omitempty"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultGif is a struct for InlineQueryResultGif

func NewInlineQueryResultGif Uses

func NewInlineQueryResultGif(gifURL, thumbURL string) (newGif *InlineQueryResultGif, generatedID *string)

NewInlineQueryResultGif is a helper function for generating a new InlineQueryResultGif

Gif must be in gif format, < 1MB.

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

type InlineQueryResultLocation Uses

type InlineQueryResultLocation struct {
    InlineQueryResult
    Latitude            float32               `json:"latitude"`
    Longitude           float32               `json:"longitude"`
    Title               string                `json:"title"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
    ThumbURL            *string               `json:"thumb_url,omitempty"`
    ThumbWidth          int                   `json:"thumb_width,omitempty"`
    ThumbHeight         int                   `json:"thumb_height,omitempty"`
}

InlineQueryResultLocation is a struct of InlineQueryResultLocation

func NewInlineQueryResultLocation Uses

func NewInlineQueryResultLocation(latitude, longitude float32, title string) (newLocation *InlineQueryResultLocation, generatedID *string)

NewInlineQueryResultLocation is a helper function for generating a new InlineQueryResultLocation

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

type InlineQueryResultMpeg4Gif Uses

type InlineQueryResultMpeg4Gif struct {
    InlineQueryResult
    Mpeg4URL            string                `json:"mpeg4_url"`
    Mpeg4Width          int                   `json:"mpeg4_width,omitempty"`
    Mpeg4Height         int                   `json:"mpeg4_height,omitempty"`
    Mpeg4Duration       int                   `json:"mpeg4_duration,omitempty"`
    ThumbURL            string                `json:"thumb_url"`
    Title               *string               `json:"title,omitempty"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultMpeg4Gif is a struct for InlineQueryResultMpeg4Gif

func NewInlineQueryResultMpeg4Gif Uses

func NewInlineQueryResultMpeg4Gif(mpeg4URL, thumbURL string) (newMpeg4Gif *InlineQueryResultMpeg4Gif, generatedID *string)

NewInlineQueryResultMpeg4Gif is a helper function for generating a new InlineQueryResultMpeg4Gif

Mpeg4 must be in H.264/MPEG-4 AVC video(wihout sound) format, < 1MB.

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

type InlineQueryResultPhoto Uses

type InlineQueryResultPhoto struct {
    InlineQueryResult
    PhotoURL            string                `json:"photo_url"`
    PhotoWidth          int                   `json:"photo_width,omitempty"`
    PhotoHeight         int                   `json:"photo_height,omitempty"`
    ThumbURL            string                `json:"thumb_url"`
    Title               *string               `json:"title,omitempty"`
    Description         *string               `json:"description,omitempty"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultPhoto is a struct for InlineQueryResultPhoto

func NewInlineQueryResultPhoto Uses

func NewInlineQueryResultPhoto(photoURL, thumbURL string) (newPhoto *InlineQueryResultPhoto, generatedID *string)

NewInlineQueryResultPhoto is a helper function for generating a new InlineQueryResultPhoto

Photo must be in jpeg format, < 5MB.

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

type InlineQueryResultType Uses

type InlineQueryResultType string

InlineQueryResultType is a type of inline query result

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

InlineQueryResultType strings

type InlineQueryResultVenue Uses

type InlineQueryResultVenue struct {
    InlineQueryResult
    Latitude            float32               `json:"latitude"`
    Longitude           float32               `json:"longitude"`
    Title               string                `json:"title"`
    Address             string                `json:"address"`
    FoursquareID        *string               `json:"foursquare_id,omitempty"`
    FoursquareType      *string               `json:"foursquare_type,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
    ThumbURL            *string               `json:"thumb_url,omitempty"`
    ThumbWidth          int                   `json:"thumb_width,omitempty"`
    ThumbHeight         int                   `json:"thumb_height,omitempty"`
}

InlineQueryResultVenue is a struct of InlineQueryResultVenue

func NewInlineQueryResultVenue Uses

func NewInlineQueryResultVenue(latitude, longitude float32, title, address string) (newVenue *InlineQueryResultVenue, generatedID *string)

NewInlineQueryResultVenue is a helper function for generating a new InlineQueryResultVenue

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

type InlineQueryResultVideo Uses

type InlineQueryResultVideo struct {
    InlineQueryResult
    VideoURL            string                `json:"video_url"`
    MimeType            VideoMimeType         `json:"mime_type"`
    ThumbURL            string                `json:"thumb_url"`
    Title               string                `json:"title"`
    Caption             *string               `json:"caption,omitempty"`
    ParseMode           *ParseMode            `json:"parse_mode,omitempty"`
    VideoWidth          int                   `json:"video_width,omitempty"`
    VideoHeight         int                   `json:"video_height,omitempty"`
    VideoDuration       int                   `json:"video_duration,omitempty"`
    Description         *string               `json:"description,omitempty"`
    ReplyMarkup         *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
    InputMessageContent *InputMessageContent  `json:"input_message_content,omitempty"`
}

InlineQueryResultVideo is a struct of InlineQueryResultVideo

func NewInlineQueryResultVideo Uses

func NewInlineQueryResultVideo(videoURL, thumbURL, title string, mimeType VideoMimeType) (newVideo *InlineQueryResultVideo, generatedID *string)

NewInlineQueryResultVideo is a helper function for generating a new InlineQueryResultVideo

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

type InlineQueryResultVoice Uses

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

InlineQueryResultVoice is a struct of InlineQueryResultVoice

func NewInlineQueryResultVoice Uses

func NewInlineQueryResultVoice(voiceURL, title string) (newVoice *InlineQueryResultVoice, generatedID *string)

NewInlineQueryResultVoice is a helper function for generating a new InlineQueryResultVoice

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

type InputContactMessageContent Uses

type InputContactMessageContent struct {
    PhoneNumber string  `json:"phone_number"`
    FirstName   string  `json:"first_name"`
    LastName    *string `json:"last_name,omitempty"`
    VCard       *string `json:"vcard,omitempty"` // https://en.wikipedia.org/wiki/VCard
}

InputContactMessageContent is a struct of InputContactMessageContent

type InputFile Uses

type InputFile struct {
    Filepath *string
    URL      *string
    Bytes    []byte
    FileID   *string
}

InputFile represents contents of a file to be uploaded. Can be generated with InputFileFromXXX() functions in types_helper.go

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

func InputFileFromBytes Uses

func InputFileFromBytes(bytes []byte) InputFile

InputFileFromBytes generates an InputFile from given bytes array

func InputFileFromFileID Uses

func InputFileFromFileID(fileID string) InputFile

InputFileFromFileID generates an InputFile from given file id

func InputFileFromFilepath Uses

func InputFileFromFilepath(filepath string) InputFile

InputFileFromFilepath generates an InputFile from given filepath

func InputFileFromURL Uses

func InputFileFromURL(url string) InputFile

InputFileFromURL generates an InputFile from given url

type InputLocationMessageContent Uses

type InputLocationMessageContent struct {
    Latitude  float32 `json:"latitude"`
    Longitude float32 `json:"longitude"`
}

InputLocationMessageContent is a struct of InputLocationMessageContent

type InputMedia Uses

type InputMedia struct {
    Type              InputMediaType `json:"type"`
    Media             string         `json:"media"`
    Thumb             InputFile      `json:"thumb,omitempty"` // video, animation, audio, document
    Caption           string         `json:"caption,omitempty"`
    ParseMode         ParseMode      `json:"parse_mode,omitempty"`
    Width             int            `json:"width,omitempty"`              // video, animation
    Height            int            `json:"height,omitempty"`             // video, animation
    Duration          int            `json:"duration,omitempty"`           // video, animation
    Performer         string         `json:"performer,omitempty"`          // audio only
    Title             string         `json:"title,omitempty"`              // audio only
    SupportsStreaming bool           `json:"supports_streaming,omitempty"` // video only
}

InputMedia represents the content of a media message to be sent.

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

type InputMediaType Uses

type InputMediaType string

InputMediaType is a type of InputMedia

const (
    InputMediaAnimation InputMediaType = "animation" // https://core.telegram.org/bots/api#inputmediaanimation
    InputMediaDocument  InputMediaType = "document"  // https://core.telegram.org/bots/api#inputmediadocument
    InputMediaAudio     InputMediaType = "audio"     // https://core.telegram.org/bots/api#inputmediaaudio
    InputMediaPhoto     InputMediaType = "photo"     // https://core.telegram.org/bots/api#inputmediaphoto
    InputMediaVideo     InputMediaType = "video"     // https://core.telegram.org/bots/api#inputmediavideo
)

InputMediaType strings

type InputMessageContent Uses

type InputMessageContent interface{}

InputMessageContent is a generic type of input message content types

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

type InputTextMessageContent Uses

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

InputTextMessageContent is a struct of InputTextMessageContent

type InputVenueMessageContent Uses

type InputVenueMessageContent struct {
    Latitude       float32 `json:"latitude"`
    Longitude      float32 `json:"longitude"`
    Title          string  `json:"title"`
    Address        string  `json:"address"`
    FoursquareID   *string `json:"foursquare_id,omitempty"`
    FoursquareType *string `json:"foursquare_type,omitempty"`
}

InputVenueMessageContent is a struct of InputVenueMessageContent

type Invoice Uses

type Invoice struct {
    Title          string `json:"title"`
    Description    string `json:"description"`
    StartParameter string `json:"start_parameter"`
    Currency       string `json:"currency"`     // https://core.telegram.org/bots/payments#supported-currencies
    TotalAmount    int    `json:"total_amount"` // https://core.telegram.org/bots/payments/currencies.json
}

Invoice is a struct of Invoice

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

type KeyboardButton Uses

type KeyboardButton struct {
    Text            string `json:"text"`
    RequestContact  bool   `json:"request_contact,omitempty"`
    RequestLocation bool   `json:"request_location,omitempty"`
}

KeyboardButton is a struct of a keyboard button

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

func NewKeyboardButtons Uses

func NewKeyboardButtons(texts ...string) []KeyboardButton

NewKeyboardButtons is a helper function for generating an array of KeyboardButtons

type LabeledPrice Uses

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

LabeledPrice is a struct of labeled prices

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

type Location Uses

type Location struct {
    Longitude float32 `json:"longitude"`
    Latitude  float32 `json:"latitude"`
}

Location is a struct for a location

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

type MaskPosition Uses

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

MaskPosition is a struct for a mask position

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

type MaskPositionPoint Uses

type MaskPositionPoint string

MaskPositionPoint is a point in MaskPosition

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

const (
    MaskPositionForehead MaskPositionPoint = "forehead"
    MaskPositionEyes     MaskPositionPoint = "eyes"
    MaskPositionMouth    MaskPositionPoint = "mouth"
    MaskPositionChin     MaskPositionPoint = "chin"
)

MaskPosition points

type Message Uses

type Message struct {
    MessageID             int                `json:"message_id"`
    From                  *User              `json:"from,omitempty"`
    Date                  int                `json:"date"`
    Chat                  Chat               `json:"chat"`
    ForwardFrom           *User              `json:"forward_from,omitempty"`
    ForwardFromChat       *Chat              `json:"forward_from_chat,omitempty"`
    ForwardFromMessageID  int                `json:"forward_from_message_id,omitempty"`
    ForwardSignature      *string            `json:"forward_signature,omitempty"`
    ForwardDate           int                `json:"forward_date,omitempty"`
    ReplyToMessage        *Message           `json:"reply_to_message,omitempty"`
    EditDate              int                `json:"edit_date,omitempty"`
    AuthorSignature       *string            `json:"author_signature,omitempty"`
    Text                  *string            `json:"text,omitempty"`
    Entities              []MessageEntity    `json:"entities,omitempty"`
    CaptionEntities       []MessageEntity    `json:"caption_entities,omitempty"`
    Audio                 *Audio             `json:"audio,omitempty"`
    Document              *Document          `json:"document,omitempty"`
    Animation             *Animation         `json:"animation,omitempty"`
    Game                  *Game              `json:"game,omitempty"`
    Photo                 []PhotoSize        `json:"photo,omitempty"`
    Sticker               *Sticker           `json:"sticker,omitempty"`
    Video                 *Video             `json:"video,omitempty"`
    Voice                 *Voice             `json:"voice,omitempty"`
    VideoNote             *VideoNote         `json:"video_note,omitempty"`
    Caption               *string            `json:"caption,omitempty"`
    Contact               *Contact           `json:"contact,omitempty"`
    Location              *Location          `json:"location,omitempty"`
    Venue                 *Venue             `json:"venue,omitempty"`
    NewChatMembers        []User             `json:"new_chat_members,omitempty"`
    LeftChatMember        *User              `json:"left_chat_member,omitempty"`
    NewChatTitle          *string            `json:"new_chat_title,omitempty"`
    NewChatPhoto          []PhotoSize        `json:"new_chat_photo,omitempty"`
    DeleteChatPhoto       bool               `json:"delete_chat_photo,omitempty"`
    GroupChatCreated      bool               `json:"group_chat_created,omitempty"`
    SupergroupChatCreated bool               `json:"supergroup_chat_created,omitempty"`
    ChannelChatCreated    bool               `json:"channel_chat_created,omitempty"`
    MigrateToChatID       int64              `json:"migrate_to_chat_id,omitempty"`
    MigrateFromChatID     int64              `json:"migrate_from_chat_id,omitempty"`
    PinnedMessage         *Message           `json:"pinned_message,omitempty"`
    Invoice               *Invoice           `json:"invoice,omitempty"`
    SuccessfulPayment     *SuccessfulPayment `json:"successful_payment,omitempty"`
    ConnectedWebsite      *string            `json:"connected_website,omitempty"`
}

Message is a struct of a message

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

func (*Message) HasAnimation Uses

func (m *Message) HasAnimation() bool

HasAnimation checks if Message has Animation.

func (*Message) HasAudio Uses

func (m *Message) HasAudio() bool

HasAudio checks if Message has Audio.

func (*Message) HasCaption Uses

func (m *Message) HasCaption() bool

HasCaption checks if Message has Caption.

func (*Message) HasChannelChatCreated Uses

func (m *Message) HasChannelChatCreated() bool

HasChannelChatCreated checks if Message has ChannelChatCreated.

func (*Message) HasContact Uses

func (m *Message) HasContact() bool

HasContact checks if Message has Contact.

func (*Message) HasDeleteChatPhoto Uses

func (m *Message) HasDeleteChatPhoto() bool

HasDeleteChatPhoto checks if Message has DeleteChatPhoto.

func (*Message) HasDocument Uses

func (m *Message) HasDocument() bool

HasDocument checks if Message has Document.

func (*Message) HasForwardFrom Uses

func (m *Message) HasForwardFrom() bool

HasForwardFrom checks if Message has Forward.

func (*Message) HasForwardFromChat Uses

func (m *Message) HasForwardFromChat() bool

HasForwardFromChat checks if Message has Forward from chat.

func (*Message) HasGame Uses

func (m *Message) HasGame() bool

HasGame checks if Message has Game.

func (*Message) HasGroupChatCreated Uses

func (m *Message) HasGroupChatCreated() bool

HasGroupChatCreated checks if Message has GroupChatCreated.

func (*Message) HasLeftChatMember Uses

func (m *Message) HasLeftChatMember() bool

HasLeftChatMember checks if Message has LeftChatParticipant.

func (*Message) HasLocation Uses

func (m *Message) HasLocation() bool

HasLocation checks if Message has Location.

func (*Message) HasMessageEntities Uses

func (m *Message) HasMessageEntities() bool

HasMessageEntities checks if Message has MessageEntities

func (*Message) HasMigrateFromChatID Uses

func (m *Message) HasMigrateFromChatID() bool

HasMigrateFromChatID checks if Message has MigrateFromChatId.

func (*Message) HasMigrateToChatID Uses

func (m *Message) HasMigrateToChatID() bool

HasMigrateToChatID checks if Message has MigrateToChatId.

func (*Message) HasNewChatMembers Uses

func (m *Message) HasNewChatMembers() bool

HasNewChatMembers checks if Message has NewChatParticipant.

func (*Message) HasNewChatPhoto Uses

func (m *Message) HasNewChatPhoto() bool

HasNewChatPhoto checks if Message has NewChatPhoto.

func (*Message) HasNewChatTitle Uses

func (m *Message) HasNewChatTitle() bool

HasNewChatTitle checks if Message has NewChatTitle.

func (*Message) HasPhoto Uses

func (m *Message) HasPhoto() bool

HasPhoto checks if Message has Photo.

func (*Message) HasPinnedMessage Uses

func (m *Message) HasPinnedMessage() bool

HasPinnedMessage checks if Message has PinnedMessage.

func (*Message) HasReplyTo Uses

func (m *Message) HasReplyTo() bool

HasReplyTo checks if Message has ReplyTo.

func (*Message) HasSticker Uses

func (m *Message) HasSticker() bool

HasSticker checks if Message has Sticker.

func (*Message) HasSupergroupChatCreated Uses

func (m *Message) HasSupergroupChatCreated() bool

HasSupergroupChatCreated checks if Message has SupergroupChatCreated.

func (*Message) HasText Uses

func (m *Message) HasText() bool

HasText checks if Message has Text.

func (*Message) HasVenue Uses

func (m *Message) HasVenue() bool

HasVenue checks if Message has Venue.

func (*Message) HasVideo Uses

func (m *Message) HasVideo() bool

HasVideo checks if Message has Video.

func (*Message) HasVoice Uses

func (m *Message) HasVoice() bool

HasVoice checks if Message has Voice.

func (*Message) LargestPhoto Uses

func (m *Message) LargestPhoto() PhotoSize

LargestPhoto returns a photo with the largest file size.

func (Message) String Uses

func (m Message) String() string

String function for Message

type MessageEntity Uses

type MessageEntity struct {
    Type   MessageEntityType `json:"type"`
    Offset int               `json:"offset"`
    Length int               `json:"length"`
    URL    *string           `json:"url,omitempty"`  // for Type == "text_link" only,
    User   *User             `json:"user,omitempty"` // for Type == "text_mention" only,
}

MessageEntity is a struct of a message entity

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

type MessageEntityType Uses

type MessageEntityType string

MessageEntityType is a type of MessageEntity

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

type MethodOptions Uses

type MethodOptions map[string]interface{}

MethodOptions is a type for methods' options parameter.

type OptionsAddStickerToSet Uses

type OptionsAddStickerToSet MethodOptions

OptionsAddStickerToSet struct for AddStickerToSet()

options include: mask_position

https://core.telegram.org/bots/api#addstickertoset

func (OptionsAddStickerToSet) SetMaskPosition Uses

func (o OptionsAddStickerToSet) SetMaskPosition(maskPosition MaskPosition) OptionsAddStickerToSet

SetMaskPosition sets the mask_position value of OptionsAddStickerToSet.

type OptionsAnswerCallbackQuery Uses

type OptionsAnswerCallbackQuery MethodOptions

OptionsAnswerCallbackQuery struct for AnswerCallbackQuery().

options include: text, show_alert, url, and cache_time

https://core.telegram.org/bots/api#answercallbackquery

func (OptionsAnswerCallbackQuery) SetCacheTime Uses

func (o OptionsAnswerCallbackQuery) SetCacheTime(cacheTime int) OptionsAnswerCallbackQuery

SetCacheTime sets the cache_time value of OptionsAnswerCallbackQuery.

func (OptionsAnswerCallbackQuery) SetURL Uses

func (o OptionsAnswerCallbackQuery) SetURL(url string) OptionsAnswerCallbackQuery

SetURL sets the url value of OptionsAnswerCallbackQuery.

type OptionsAnswerInlineQuery Uses

type OptionsAnswerInlineQuery MethodOptions

OptionsAnswerInlineQuery struct for AnswerInlineQuery().

options include: cache_time, is_personal, next_offset, switch_pm_text, and switch_pm_parameter.

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

func (OptionsAnswerInlineQuery) SetCacheTime Uses

func (o OptionsAnswerInlineQuery) SetCacheTime(cacheTime int) OptionsAnswerInlineQuery

SetCacheTime sets the cache_time value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetIsPersonal Uses

func (o OptionsAnswerInlineQuery) SetIsPersonal(isPersonal bool) OptionsAnswerInlineQuery

SetIsPersonal sets the is_personal value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetNextOffset Uses

func (o OptionsAnswerInlineQuery) SetNextOffset(nextOffset string) OptionsAnswerInlineQuery

SetNextOffset sets the next_offset value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetSwitchPmParameter Uses

func (o OptionsAnswerInlineQuery) SetSwitchPmParameter(switchPmParam string) OptionsAnswerInlineQuery

SetSwitchPmParameter sets the switch_pm_parameter value of OptionsAnswerInlineQuery.

func (OptionsAnswerInlineQuery) SetSwitchPmText Uses

func (o OptionsAnswerInlineQuery) SetSwitchPmText(switchPmText string) OptionsAnswerInlineQuery

SetSwitchPmText sets the switch_pm_text value of OptionsAnswerInlineQuery.

type OptionsCreateNewStickerSet Uses

type OptionsCreateNewStickerSet MethodOptions

OptionsCreateNewStickerSet struct for CreateNewStickerSet().

options include: contains_masks and mask_position

https://core.telegram.org/bots/api#createnewstickerset

func (OptionsCreateNewStickerSet) SetContainsMasks Uses

func (o OptionsCreateNewStickerSet) SetContainsMasks(containsMasks bool) OptionsCreateNewStickerSet

SetContainsMasks sets the contains_masks value of OptionsCreateNewStickerSet.

func (OptionsCreateNewStickerSet) SetMaskPosition Uses

func (o OptionsCreateNewStickerSet) SetMaskPosition(maskPosition MaskPosition) OptionsCreateNewStickerSet

SetMaskPosition sets the mask_position value of OptionsCreateNewStickerSet.

type OptionsEditMessageCaption Uses

type OptionsEditMessageCaption MethodOptions

OptionsEditMessageCaption struct for EditMessageCaption().

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: parse_mode, or reply_markup

https://core.telegram.org/bots/api#editmessagecaption

func (OptionsEditMessageCaption) SetCaption Uses

func (o OptionsEditMessageCaption) SetCaption(caption string) OptionsEditMessageCaption

SetCaption sets the caption value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetIDs Uses

func (o OptionsEditMessageCaption) SetIDs(chatID ChatID, messageID int) OptionsEditMessageCaption

SetIDs sets the chat_id and message_id values of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetInlineMessageID Uses

func (o OptionsEditMessageCaption) SetInlineMessageID(inlineMessageID string) OptionsEditMessageCaption

SetInlineMessageID sets the inline_message_id value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetParseMode Uses

func (o OptionsEditMessageCaption) SetParseMode(parseMode ParseMode) OptionsEditMessageCaption

SetParseMode sets the parse_mode value of OptionsEditMessageCaption.

func (OptionsEditMessageCaption) SetReplyMarkup Uses

func (o OptionsEditMessageCaption) SetReplyMarkup(replyMarkup interface{}) OptionsEditMessageCaption

SetReplyMarkup sets the reply_markup value of OptionsEditMessageCaption.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OptionsEditMessageLiveLocation Uses

type OptionsEditMessageLiveLocation MethodOptions

OptionsEditMessageLiveLocation struct for EditMessageLiveLocation()

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#editmessagelivelocation

func (OptionsEditMessageLiveLocation) SetIDs Uses

func (o OptionsEditMessageLiveLocation) SetIDs(chatID ChatID, messageID int) OptionsEditMessageLiveLocation

SetIDs sets the chat_id and message_id values of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetInlineMessageID Uses

func (o OptionsEditMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsEditMessageLiveLocation

SetInlineMessageID sets the inline_message_id value of OptionsEditMessageLiveLocation.

func (OptionsEditMessageLiveLocation) SetReplyMarkup Uses

func (o OptionsEditMessageLiveLocation) SetReplyMarkup(replyMarkup interface{}) OptionsEditMessageLiveLocation

SetReplyMarkup sets the reply_markup value of OptionsEditMessageLiveLocation.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OptionsEditMessageMedia Uses

type OptionsEditMessageMedia MethodOptions

OptionsEditMessageMedia struct for EditMessageMedia()

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#editmessagemedia

func (OptionsEditMessageMedia) SetIDs Uses

func (o OptionsEditMessageMedia) SetIDs(chatID ChatID, messageID int) OptionsEditMessageMedia

SetIDs sets the chat_id and message_id values of OptionsEditMessageMedia.

func (OptionsEditMessageMedia) SetInlineMessageID Uses

func (o OptionsEditMessageMedia) SetInlineMessageID(inlineMessageID string) OptionsEditMessageMedia

SetInlineMessageID sets the inline_message_id value of OptionsEditMessageMedia.

func (OptionsEditMessageMedia) SetReplyMarkup Uses

func (o OptionsEditMessageMedia) SetReplyMarkup(replyMarkup interface{}) OptionsEditMessageMedia

SetReplyMarkup sets the reply_markup value of OptionsEditMessageMedia.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OptionsEditMessageReplyMarkup Uses

type OptionsEditMessageReplyMarkup MethodOptions

OptionsEditMessageReplyMarkup struct for EditMessageReplyMarkup()

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#editmessagereplymarkup

func (OptionsEditMessageReplyMarkup) SetIDs Uses

func (o OptionsEditMessageReplyMarkup) SetIDs(chatID ChatID, messageID int) OptionsEditMessageReplyMarkup

SetIDs sets the chat_id and message_id values of OptionsEditMessageReplyMarkup.

func (OptionsEditMessageReplyMarkup) SetInlineMessageID Uses

func (o OptionsEditMessageReplyMarkup) SetInlineMessageID(inlineMessageID string) OptionsEditMessageReplyMarkup

SetInlineMessageID sets the inline_message_id value of OptionsEditMessageReplyMarkup.

func (OptionsEditMessageReplyMarkup) SetReplyMarkup Uses

func (o OptionsEditMessageReplyMarkup) SetReplyMarkup(replyMarkup interface{}) OptionsEditMessageReplyMarkup

SetReplyMarkup sets the reply_markup value of OptionsEditMessageReplyMarkup.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OptionsEditMessageText Uses

type OptionsEditMessageText MethodOptions

OptionsEditMessageText struct for EditMessageText()

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: parse_mode, disable_web_page_preview, and reply_markup

https://core.telegram.org/bots/api#editmessagetext

func (OptionsEditMessageText) SetDisableWebPagePreview Uses

func (o OptionsEditMessageText) SetDisableWebPagePreview(disable bool) OptionsEditMessageText

SetDisableWebPagePreview sets the disable_web_page_preview value of OptionsEditMessageText.

func (OptionsEditMessageText) SetIDs Uses

func (o OptionsEditMessageText) SetIDs(chatID ChatID, messageID int) OptionsEditMessageText

SetIDs sets the chat_id and message_id values of OptionsEditMessageText.

func (OptionsEditMessageText) SetInlineMessageID Uses

func (o OptionsEditMessageText) SetInlineMessageID(inlineMessageID string) OptionsEditMessageText

SetInlineMessageID sets the inline_message_id value of OptionsEditMessageText.

func (OptionsEditMessageText) SetParseMode Uses

func (o OptionsEditMessageText) SetParseMode(parseMode ParseMode) OptionsEditMessageText

SetParseMode sets the parse_mode value of OptionsEditMessageText.

func (OptionsEditMessageText) SetReplyMarkup Uses

func (o OptionsEditMessageText) SetReplyMarkup(replyMarkup interface{}) OptionsEditMessageText

SetReplyMarkup sets the reply_markup value of OptionsEditMessageText.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OptionsForwardMessage Uses

type OptionsForwardMessage MethodOptions

OptionsForwardMessage struct for ForwardMessage().

options include: disable_notification

https://core.telegram.org/bots/api#forwardmessage

func (OptionsForwardMessage) SetDisableNotification Uses

func (o OptionsForwardMessage) SetDisableNotification(disable bool) OptionsForwardMessage

SetDisableNotification sets the disable_notification value of OptionsForwardMessage.

type OptionsGetGameHighScores Uses

type OptionsGetGameHighScores MethodOptions

OptionsGetGameHighScores struct for GetGameHighScores().

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

https://core.telegram.org/bots/api#getgamehighscores

func (OptionsGetGameHighScores) SetIDs Uses

func (o OptionsGetGameHighScores) SetIDs(chatID ChatID, messageID int) OptionsGetGameHighScores

SetIDs sets the chat_id and message_id values of OptionsGetGameHighScores.

func (OptionsGetGameHighScores) SetInlineMessageID Uses

func (o OptionsGetGameHighScores) SetInlineMessageID(inlineMessageID string) OptionsGetGameHighScores

SetInlineMessageID sets the inline_message_id value of OptionsGetGameHighScores.

type OptionsGetUpdates Uses

type OptionsGetUpdates MethodOptions

OptionsGetUpdates struct for GetUpdates().

options include: offset, limit, timeout, and allowed_updates.

https://core.telegram.org/bots/api#getupdates

func (OptionsGetUpdates) SetAllowedUpdates Uses

func (o OptionsGetUpdates) SetAllowedUpdates(allowedUpdates []AllowedUpdate) OptionsGetUpdates

SetAllowedUpdates sets the allowed_updates value of OptionsGetUpdates.

func (OptionsGetUpdates) SetLimit Uses

func (o OptionsGetUpdates) SetLimit(limit int) OptionsGetUpdates

SetLimit sets the limit value of OptionsGetUpdates.

func (OptionsGetUpdates) SetOffset Uses

func (o OptionsGetUpdates) SetOffset(offset int) OptionsGetUpdates

SetOffset sets the offset value of OptionsGetUpdates.

func (OptionsGetUpdates) SetTimeout Uses

func (o OptionsGetUpdates) SetTimeout(timeout int) OptionsGetUpdates

SetTimeout sets the timeout value of OptionsGetUpdates.

type OptionsGetUserProfilePhotos Uses

type OptionsGetUserProfilePhotos MethodOptions

OptionsGetUserProfilePhotos struct for GetUserProfilePhotos().

options include: offset and limit.

https://core.telegram.org/bots/api#getuserprofilephotos

func (OptionsGetUserProfilePhotos) SetLimit Uses

func (o OptionsGetUserProfilePhotos) SetLimit(limit int) OptionsGetUserProfilePhotos

SetLimit sets the limit value of OptionsGetUserProfilePhotos.

func (OptionsGetUserProfilePhotos) SetOffset Uses

func (o OptionsGetUserProfilePhotos) SetOffset(offset int) OptionsGetUserProfilePhotos

SetOffset sets the offset value of OptionsGetUserProfilePhotos.

type OptionsPinChatMessage Uses

type OptionsPinChatMessage MethodOptions

OptionsPinChatMessage struct for PinChatMessage

options include: disable_notification

https://core.telegram.org/bots/api#pinchatmessage

func (OptionsPinChatMessage) SetDisableNotification Uses

func (o OptionsPinChatMessage) SetDisableNotification(disable bool) OptionsPinChatMessage

SetDisableNotification sets the disable_notification value of OptionsPinChatMessage.

type OptionsPromoteChatMember Uses

type OptionsPromoteChatMember MethodOptions

OptionsPromoteChatMember struct for PromoteChatMember().

options include: can_change_info, can_post_messages, can_edit_messages, can_delete_messages, can_invite_users, can_restrict_members, can_pin_messages, and can_promote_members

https://core.telegram.org/bots/api#promotechatmember

func (OptionsPromoteChatMember) SetCanChangeInfo Uses

func (o OptionsPromoteChatMember) SetCanChangeInfo(can bool) OptionsPromoteChatMember

SetCanChangeInfo sets the can_change_info value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanDeleteMessages Uses

func (o OptionsPromoteChatMember) SetCanDeleteMessages(can bool) OptionsPromoteChatMember

SetCanDeleteMessages sets the can_delete_messages value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanEditMessages Uses

func (o OptionsPromoteChatMember) SetCanEditMessages(can bool) OptionsPromoteChatMember

SetCanEditMessages sets the can_edit_messages value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanInviteUsers Uses

func (o OptionsPromoteChatMember) SetCanInviteUsers(can bool) OptionsPromoteChatMember

SetCanInviteUsers sets the can_invite_users value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPinMessages Uses

func (o OptionsPromoteChatMember) SetCanPinMessages(can bool) OptionsPromoteChatMember

SetCanPinMessages sets the can_pin_messages value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPostMessages Uses

func (o OptionsPromoteChatMember) SetCanPostMessages(can bool) OptionsPromoteChatMember

SetCanPostMessages sets the can_post_messages value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanPromoteMembers Uses

func (o OptionsPromoteChatMember) SetCanPromoteMembers(can bool) OptionsPromoteChatMember

SetCanPromoteMembers sets the can_promote_members value of OptionsPromoteChatMember.

func (OptionsPromoteChatMember) SetCanRestrictMembers Uses

func (o OptionsPromoteChatMember) SetCanRestrictMembers(can bool) OptionsPromoteChatMember

SetCanRestrictMembers sets the can_restrict_members value of OptionsPromoteChatMember.

type OptionsRestrictChatMember Uses

type OptionsRestrictChatMember MethodOptions

OptionsRestrictChatMember struct for RestrictChatMember()

options include: until_date, can_send_messages, can_send_media_messages, can_send_other_messages, and can_add_web_page_previews

https://core.telegram.org/bots/api#restrictchatmember

func (OptionsRestrictChatMember) SetCanAddWebPagePreviews Uses

func (o OptionsRestrictChatMember) SetCanAddWebPagePreviews(can bool) OptionsRestrictChatMember

SetCanAddWebPagePreviews sets the can_add_web_page_previews value of OptionsRestrictChatMember.

func (OptionsRestrictChatMember) SetCanSendMediaMessages Uses

func (o OptionsRestrictChatMember) SetCanSendMediaMessages(can bool) OptionsRestrictChatMember

SetCanSendMediaMessages sets the can_send_media_messages value of OptionsRestrictChatMember.

func (OptionsRestrictChatMember) SetCanSendMessages Uses

func (o OptionsRestrictChatMember) SetCanSendMessages(can bool) OptionsRestrictChatMember

SetCanSendMessages sets the can_send_messages value of OptionsRestrictChatMember.

func (OptionsRestrictChatMember) SetCanSendOtherMessages Uses

func (o OptionsRestrictChatMember) SetCanSendOtherMessages(can bool) OptionsRestrictChatMember

SetCanSendOtherMessages sets the can_send_other_messages value of OptionsRestrictChatMember.

func (OptionsRestrictChatMember) SetUntilDate Uses

func (o OptionsRestrictChatMember) SetUntilDate(until int) OptionsRestrictChatMember

SetUntilDate sets the until_date value of OptionsRestrictChatMember.

type OptionsSendAnimation Uses

type OptionsSendAnimation MethodOptions

OptionsSendAnimation struct for SendAnimation().

options include: duration, width, height, thumb, caption, parse_mode, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendanimation

func (OptionsSendAnimation) SetCaption Uses

func (o OptionsSendAnimation) SetCaption(caption string) OptionsSendAnimation

SetCaption sets the caption value of OptionsSendAnimation.

func (OptionsSendAnimation) SetDisableNotification Uses

func (o OptionsSendAnimation) SetDisableNotification(disable bool) OptionsSendAnimation

SetDisableNotification sets the disable_notification value of OptionsSendAnimation.

func (OptionsSendAnimation) SetDuration Uses

func (o OptionsSendAnimation) SetDuration(duration int) OptionsSendAnimation

SetDuration sets the duration value of OptionsSendAnimation.

func (OptionsSendAnimation) SetHeight Uses

func (o OptionsSendAnimation) SetHeight(height int) OptionsSendAnimation

SetHeight sets the height value of OptionsSendAnimation.

func (OptionsSendAnimation) SetParseMode Uses

func (o OptionsSendAnimation) SetParseMode(parseMode ParseMode) OptionsSendAnimation

SetParseMode sets the parse_mode value of OptionsSendAnimation.

func (OptionsSendAnimation) SetReplyMarkup Uses

func (o OptionsSendAnimation) SetReplyMarkup(replyMarkup interface{}) OptionsSendAnimation

SetReplyMarkup sets the reply_markup value of OptionsSendAnimation.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendAnimation) SetReplyToMessageID Uses

func (o OptionsSendAnimation) SetReplyToMessageID(replyToMessageID int) OptionsSendAnimation

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendAnimation.

func (OptionsSendAnimation) SetThumb Uses

func (o OptionsSendAnimation) SetThumb(thumb interface{}) OptionsSendAnimation

SetThumb sets the thumb value of OptionsSendAnimation.

thumb can be one of InputFile or string.

func (OptionsSendAnimation) SetWidth Uses

func (o OptionsSendAnimation) SetWidth(width int) OptionsSendAnimation

SetWidth sets the width value of OptionsSendAnimation.

type OptionsSendAudio Uses

type OptionsSendAudio MethodOptions

OptionsSendAudio struct for SendAudio().

options include: caption, parse_mode, duration, performer, title, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendaudio

func (OptionsSendAudio) SetCaption Uses

func (o OptionsSendAudio) SetCaption(caption string) OptionsSendAudio

SetCaption sets the caption value of OptionsSendAudio.

func (OptionsSendAudio) SetDuration Uses

func (o OptionsSendAudio) SetDuration(duration int) OptionsSendAudio

SetDuration sets the duration value of OptionsSendAudio.

func (OptionsSendAudio) SetParseMode Uses

func (o OptionsSendAudio) SetParseMode(parseMode ParseMode) OptionsSendAudio

SetParseMode sets the parse_mode value of OptionsSendAudio.

func (OptionsSendAudio) SetPerformer Uses

func (o OptionsSendAudio) SetPerformer(performer string) OptionsSendAudio

SetPerformer sets the performer value of OptionsSendAudio.

func (OptionsSendAudio) SetThumb Uses

func (o OptionsSendAudio) SetThumb(thumb interface{}) OptionsSendAudio

SetThumb sets the thumb value of OptionsSendAudio.

thumb can be one of InputFile or string.

func (OptionsSendAudio) SetTitle Uses

func (o OptionsSendAudio) SetTitle(title string) OptionsSendAudio

SetTitle sets the title value of OptionsSendAudio.

type OptionsSendContact Uses

type OptionsSendContact MethodOptions

OptionsSendContact struct for SendContact()

options include: last_name, vcard, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendcontact

func (OptionsSendContact) SetDisableNotification Uses

func (o OptionsSendContact) SetDisableNotification(disable bool) OptionsSendContact

SetDisableNotification sets the disable_notification value of OptionsSendContact.

func (OptionsSendContact) SetLastName Uses

func (o OptionsSendContact) SetLastName(lastName string) OptionsSendContact

SetLastName sets the last_name value of OptionsSendContact.

func (OptionsSendContact) SetReplyMarkup Uses

func (o OptionsSendContact) SetReplyMarkup(replyMarkup interface{}) OptionsSendContact

SetReplyMarkup sets the reply_markup value of OptionsSendContact.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendContact) SetReplyToMessageID Uses

func (o OptionsSendContact) SetReplyToMessageID(replyToMessageID int) OptionsSendContact

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendContact.

func (OptionsSendContact) SetVCard Uses

func (o OptionsSendContact) SetVCard(vCard string) OptionsSendContact

SetVCard sets the vcard value of OptionsSendContact.

type OptionsSendDocument Uses

type OptionsSendDocument MethodOptions

OptionsSendDocument struct for SendDocument().

options include: caption, parse_mode, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#senddocument

func (OptionsSendDocument) SetCaption Uses

func (o OptionsSendDocument) SetCaption(caption string) OptionsSendDocument

SetCaption sets the caption value of OptionsSendDocument.

func (OptionsSendDocument) SetDisableNotification Uses

func (o OptionsSendDocument) SetDisableNotification(disable bool) OptionsSendDocument

SetDisableNotification sets the disable_notification value of OptionsSendDocument.

func (OptionsSendDocument) SetParseMode Uses

func (o OptionsSendDocument) SetParseMode(parseMode ParseMode) OptionsSendDocument

SetParseMode sets the parse_mode value of OptionsSendDocument.

func (OptionsSendDocument) SetReplyMarkup Uses

func (o OptionsSendDocument) SetReplyMarkup(replyMarkup interface{}) OptionsSendDocument

SetReplyMarkup sets the reply_markup value of OptionsSendDocument.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendDocument) SetReplyToMessageID Uses

func (o OptionsSendDocument) SetReplyToMessageID(replyToMessageID int) OptionsSendDocument

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendDocument.

func (OptionsSendDocument) SetThumb Uses

func (o OptionsSendDocument) SetThumb(thumb interface{}) OptionsSendDocument

SetThumb sets the thumb value of OptionsSendDocument.

thumb can be one of InputFile or string.

type OptionsSendGame Uses

type OptionsSendGame MethodOptions

OptionsSendGame struct for SendGame()

options include: disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendgame

func (OptionsSendGame) SetDisableNotification Uses

func (o OptionsSendGame) SetDisableNotification(disable bool) OptionsSendGame

SetDisableNotification sets the disable_notification value of OptionsSendGame.

func (OptionsSendGame) SetReplyMarkup Uses

func (o OptionsSendGame) SetReplyMarkup(replyMarkup interface{}) OptionsSendGame

SetReplyMarkup sets the reply_markup value of OptionsSendGame.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendGame) SetReplyToMessageID Uses

func (o OptionsSendGame) SetReplyToMessageID(replyToMessageID int) OptionsSendGame

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendGame.

type OptionsSendInvoice Uses

type OptionsSendInvoice MethodOptions

OptionsSendInvoice struct for SendInvoice().

options include: provider_data, photo_url, photo_size, photo_width, photo_height, need_name, need_phone_number, need_email, need_shipping_address, send_phone_number_to_provider, send_email_to_provider, is_flexible, disable_notification, reply_to_message_id, and reply_markup

https://core.telegram.org/bots/api#sendinvoice

func (OptionsSendInvoice) SetDisableNotification Uses

func (o OptionsSendInvoice) SetDisableNotification(disable bool) OptionsSendInvoice

SetDisableNotification sets the disable_notification value of OptionsSendInvoice.

func (OptionsSendInvoice) SetIsFlexible Uses

func (o OptionsSendInvoice) SetIsFlexible(isFlexible bool) OptionsSendInvoice

SetIsFlexible sets the is_flexible value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedEmail Uses

func (o OptionsSendInvoice) SetNeedEmail(needEmail bool) OptionsSendInvoice

SetNeedEmail sets the need_email value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedName Uses

func (o OptionsSendInvoice) SetNeedName(needName bool) OptionsSendInvoice

SetNeedName sets the need_name value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedPhoneNumber Uses

func (o OptionsSendInvoice) SetNeedPhoneNumber(needPhoneNumber bool) OptionsSendInvoice

SetNeedPhoneNumber sets the need_phone_number value of OptionsSendInvoice.

func (OptionsSendInvoice) SetNeedShippingAddress Uses

func (o OptionsSendInvoice) SetNeedShippingAddress(needShippingAddr bool) OptionsSendInvoice

SetNeedShippingAddress sets the need_shipping_address value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoHeight Uses

func (o OptionsSendInvoice) SetPhotoHeight(photoHeight int) OptionsSendInvoice

SetPhotoHeight sets the photo_height value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoSize Uses

func (o OptionsSendInvoice) SetPhotoSize(photoSize int) OptionsSendInvoice

SetPhotoSize sets the photo_size value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoURL Uses

func (o OptionsSendInvoice) SetPhotoURL(photoURL string) OptionsSendInvoice

SetPhotoURL sets the photo_url value of OptionsSendInvoice.

func (OptionsSendInvoice) SetPhotoWidth Uses

func (o OptionsSendInvoice) SetPhotoWidth(photoWidth int) OptionsSendInvoice

SetPhotoWidth sets the photoWidth value of OptionsSendInvoice.

func (OptionsSendInvoice) SetProviderData Uses

func (o OptionsSendInvoice) SetProviderData(providerData string) OptionsSendInvoice

SetProviderData sets the provider_data value of OptionsSendInvoice.

func (OptionsSendInvoice) SetReplyMarkup Uses

func (o OptionsSendInvoice) SetReplyMarkup(replyMarkup interface{}) OptionsSendInvoice

SetReplyMarkup sets the reply_markup value of OptionsSendInvoice.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendInvoice) SetReplyToMessageID Uses

func (o OptionsSendInvoice) SetReplyToMessageID(replyToMessageID int) OptionsSendInvoice

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSendEmailToProvider Uses

func (o OptionsSendInvoice) SetSendEmailToProvider(sendEmailToProvider bool) OptionsSendInvoice

SetSendEmailToProvider sets the send_email_to_provider value of OptionsSendInvoice.

func (OptionsSendInvoice) SetSendPhoneNumberToProvider Uses

func (o OptionsSendInvoice) SetSendPhoneNumberToProvider(sendPhoneNumberToProvider bool) OptionsSendInvoice

SetSendPhoneNumberToProvider sets the send_phone_number_to_provider value of OptionsSendInvoice.

type OptionsSendLocation Uses

type OptionsSendLocation MethodOptions

OptionsSendLocation struct for SendLocation()

options include: disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendlocation

func (OptionsSendLocation) SetDisableNotification Uses

func (o OptionsSendLocation) SetDisableNotification(disable bool) OptionsSendLocation

SetDisableNotification sets the disable_notification value of OptionsSendLocation.

func (OptionsSendLocation) SetLivePeriod Uses

func (o OptionsSendLocation) SetLivePeriod(livePeriod int) OptionsSendLocation

SetLivePeriod sets the live_period value of OptionsSendLocation.

func (OptionsSendLocation) SetReplyMarkup Uses

func (o OptionsSendLocation) SetReplyMarkup(replyMarkup interface{}) OptionsSendLocation

SetReplyMarkup sets the reply_markup value of OptionsSendLocation.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendLocation) SetReplyToMessageID Uses

func (o OptionsSendLocation) SetReplyToMessageID(replyToMessageID int) OptionsSendLocation

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendLocation.

type OptionsSendMediaGroup Uses

type OptionsSendMediaGroup MethodOptions

OptionsSendMediaGroup struct for SendMediaGroup().

options include: disable_notification, and reply_to_message_id

https://core.telegram.org/bots/api#sendmediagroup

func (OptionsSendMediaGroup) SetDisableNotification Uses

func (o OptionsSendMediaGroup) SetDisableNotification(disable bool) OptionsSendMediaGroup

SetDisableNotification sets the disable_notification value of OptionsSendMediaGroup.

func (OptionsSendMediaGroup) SetReplyToMessageID Uses

func (o OptionsSendMediaGroup) SetReplyToMessageID(replyToMessageID int) OptionsSendMediaGroup

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendMediaGroup.

type OptionsSendMessage Uses

type OptionsSendMessage MethodOptions

OptionsSendMessage struct for SendMessage().

options include: parse_mode, disable_web_page_preview, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendmessage

func (OptionsSendMessage) SetDisableNotification Uses

func (o OptionsSendMessage) SetDisableNotification(disable bool) OptionsSendMessage

SetDisableNotification sets the disable_notification value of OptionsSendMessage.

func (OptionsSendMessage) SetDisableWebPagePreview Uses

func (o OptionsSendMessage) SetDisableWebPagePreview(disable bool) OptionsSendMessage

SetDisableWebPagePreview sets the disable_web_page_preview value of OptionsSendMessage.

func (OptionsSendMessage) SetParseMode Uses

func (o OptionsSendMessage) SetParseMode(parseMode ParseMode) OptionsSendMessage

SetParseMode sets the parse_mode value of OptionsSendMessage.

func (OptionsSendMessage) SetReplyMarkup Uses

func (o OptionsSendMessage) SetReplyMarkup(replyMarkup interface{}) OptionsSendMessage

SetReplyMarkup sets the reply_markup value of OptionsSendMessage.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendMessage) SetReplyToMessageID Uses

func (o OptionsSendMessage) SetReplyToMessageID(replyToMessageID int) OptionsSendMessage

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendMessage.

type OptionsSendPhoto Uses

type OptionsSendPhoto MethodOptions

OptionsSendPhoto struct for SendPhoto().

options include: caption, parse_mode, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendphoto

func (OptionsSendPhoto) SetCaption Uses

func (o OptionsSendPhoto) SetCaption(caption string) OptionsSendPhoto

SetCaption sets the caption value of OptionsSendPhoto.

func (OptionsSendPhoto) SetDisableNotification Uses

func (o OptionsSendPhoto) SetDisableNotification(disable bool) OptionsSendPhoto

SetDisableNotification sets the disable_notification value of OptionsSendPhoto.

func (OptionsSendPhoto) SetParseMode Uses

func (o OptionsSendPhoto) SetParseMode(parseMode ParseMode) OptionsSendPhoto

SetParseMode sets the parse_mode value of OptionsSendPhoto.

func (OptionsSendPhoto) SetReplyMarkup Uses

func (o OptionsSendPhoto) SetReplyMarkup(replyMarkup interface{}) OptionsSendPhoto

SetReplyMarkup sets the reply_markup value of OptionsSendPhoto.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendPhoto) SetReplyToMessageID Uses

func (o OptionsSendPhoto) SetReplyToMessageID(replyToMessageID int) OptionsSendPhoto

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendPhoto.

type OptionsSendSticker Uses

type OptionsSendSticker MethodOptions

OptionsSendSticker struct for SendSticker().

options include: disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendsticker

func (OptionsSendSticker) SetDisableNotification Uses

func (o OptionsSendSticker) SetDisableNotification(disable bool) OptionsSendSticker

SetDisableNotification sets the disable_notification value of OptionsSendSticker.

func (OptionsSendSticker) SetReplyMarkup Uses

func (o OptionsSendSticker) SetReplyMarkup(replyMarkup interface{}) OptionsSendSticker

SetReplyMarkup sets the reply_markup value of OptionsSendSticker.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendSticker) SetReplyToMessageID Uses

func (o OptionsSendSticker) SetReplyToMessageID(replyToMessageID int) OptionsSendSticker

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendSticker.

type OptionsSendVenue Uses

type OptionsSendVenue MethodOptions

OptionsSendVenue struct for SendVenue().

options include: foursquare_id, foursquare_type, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendvenue

func (OptionsSendVenue) SetDisableNotification Uses

func (o OptionsSendVenue) SetDisableNotification(disable bool) OptionsSendVenue

SetDisableNotification sets the disable_notification value of OptionsSendVenue.

func (OptionsSendVenue) SetFoursquareID Uses

func (o OptionsSendVenue) SetFoursquareID(foursquareID string) OptionsSendVenue

SetFoursquareID sets the foursquare_id value of OptionsSendVenue.

func (OptionsSendVenue) SetFoursquareType Uses

func (o OptionsSendVenue) SetFoursquareType(foursquareType string) OptionsSendVenue

SetFoursquareType sets the foursquare_type value of OptionsSendVenue.

func (OptionsSendVenue) SetReplyMarkup Uses

func (o OptionsSendVenue) SetReplyMarkup(replyMarkup interface{}) OptionsSendVenue

SetReplyMarkup sets the reply_markup value of OptionsSendVenue.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVenue) SetReplyToMessageID Uses

func (o OptionsSendVenue) SetReplyToMessageID(replyToMessageID int) OptionsSendVenue

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendVenue.

type OptionsSendVideo Uses

type OptionsSendVideo MethodOptions

OptionsSendVideo struct for SendVideo().

options include: duration, caption, parse_mode, supports_streaming, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendvideo

func (OptionsSendVideo) SetCaption Uses

func (o OptionsSendVideo) SetCaption(caption string) OptionsSendVideo

SetCaption sets the caption value of OptionsSendVideo.

func (OptionsSendVideo) SetDisableNotification Uses

func (o OptionsSendVideo) SetDisableNotification(disable bool) OptionsSendVideo

SetDisableNotification sets the disable_notification value of OptionsSendVideo.

func (OptionsSendVideo) SetDuration Uses

func (o OptionsSendVideo) SetDuration(duration int) OptionsSendVideo

SetDuration sets the duration value of OptionsSendVideo.

func (OptionsSendVideo) SetHeight Uses

func (o OptionsSendVideo) SetHeight(height int) OptionsSendVideo

SetHeight sets the height value of OptionsSendVideo.

func (OptionsSendVideo) SetParseMode Uses

func (o OptionsSendVideo) SetParseMode(parseMode ParseMode) OptionsSendVideo

SetParseMode sets the parse_mode value of OptionsSendVideo.

func (OptionsSendVideo) SetReplyMarkup Uses

func (o OptionsSendVideo) SetReplyMarkup(replyMarkup interface{}) OptionsSendVideo

SetReplyMarkup sets the reply_markup value of OptionsSendVideo.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVideo) SetReplyToMessageID Uses

func (o OptionsSendVideo) SetReplyToMessageID(replyToMessageID int) OptionsSendVideo

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendVideo.

func (OptionsSendVideo) SetSupportsStreaming Uses

func (o OptionsSendVideo) SetSupportsStreaming(supportsStreaming bool) OptionsSendVideo

SetSupportsStreaming sets the supports_streaming value of OptionsSendVideo.

func (OptionsSendVideo) SetThumb Uses

func (o OptionsSendVideo) SetThumb(thumb interface{}) OptionsSendVideo

SetThumb sets the thumb value of OptionsSendVideo.

thumb can be one of InputFile or string.

func (OptionsSendVideo) SetWidth Uses

func (o OptionsSendVideo) SetWidth(width int) OptionsSendVideo

SetWidth sets the width value of OptionsSendVideo.

type OptionsSendVideoNote Uses

type OptionsSendVideoNote MethodOptions

OptionsSendVideoNote struct for SendVideoNote().

options include: duration, length, disable_notification, reply_to_message_id, and reply_markup. (XXX: API returns 'Bad Request: wrong video note length' when length is not given / 2017.05.19.)

https://core.telegram.org/bots/api#sendvideonote

func (OptionsSendVideoNote) SetDisableNotification Uses

func (o OptionsSendVideoNote) SetDisableNotification(disable bool) OptionsSendVideoNote

SetDisableNotification sets the disable_notification value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetDuration Uses

func (o OptionsSendVideoNote) SetDuration(duration int) OptionsSendVideoNote

SetDuration sets the duration value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetLength Uses

func (o OptionsSendVideoNote) SetLength(length int) OptionsSendVideoNote

SetLength sets the duration value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetReplyMarkup Uses

func (o OptionsSendVideoNote) SetReplyMarkup(replyMarkup interface{}) OptionsSendVideoNote

SetReplyMarkup sets the reply_markup value of OptionsSendVideoNote.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVideoNote) SetReplyToMessageID Uses

func (o OptionsSendVideoNote) SetReplyToMessageID(replyToMessageID int) OptionsSendVideoNote

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendVideoNote.

func (OptionsSendVideoNote) SetThumb Uses

func (o OptionsSendVideoNote) SetThumb(thumb interface{}) OptionsSendVideoNote

SetThumb sets the thumb value of OptionsSendVideoNote.

thumb can be one of InputFile or string.

type OptionsSendVoice Uses

type OptionsSendVoice MethodOptions

OptionsSendVoice struct for SendVoice().

options include: caption, parse_mode, duration, disable_notification, reply_to_message_id, and reply_markup.

https://core.telegram.org/bots/api#sendvoice

func (OptionsSendVoice) SetCaption Uses

func (o OptionsSendVoice) SetCaption(caption string) OptionsSendVoice

SetCaption sets the caption value of OptionsSendVoice.

func (OptionsSendVoice) SetDisableNotification Uses

func (o OptionsSendVoice) SetDisableNotification(disable bool) OptionsSendVoice

SetDisableNotification sets the disable_notification value of OptionsSendVoice.

func (OptionsSendVoice) SetDuration Uses

func (o OptionsSendVoice) SetDuration(duration int) OptionsSendVoice

SetDuration sets the duration value of OptionsSendVoice.

func (OptionsSendVoice) SetParseMode Uses

func (o OptionsSendVoice) SetParseMode(parseMode ParseMode) OptionsSendVoice

SetParseMode sets the parse_mode value of OptionsSendVoice.

func (OptionsSendVoice) SetReplyMarkup Uses

func (o OptionsSendVoice) SetReplyMarkup(replyMarkup interface{}) OptionsSendVoice

SetReplyMarkup sets the reply_markup value of OptionsSendVoice.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

func (OptionsSendVoice) SetReplyToMessageID Uses

func (o OptionsSendVoice) SetReplyToMessageID(replyToMessageID int) OptionsSendVoice

SetReplyToMessageID sets the reply_to_message_id value of OptionsSendVoice.

type OptionsSetGameScore Uses

type OptionsSetGameScore MethodOptions

OptionsSetGameScore struct for SetGameScore().

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: force, and disable_edit_message

https://core.telegram.org/bots/api#setgamescore

func (OptionsSetGameScore) SetDisableEditMessage Uses

func (o OptionsSetGameScore) SetDisableEditMessage(disableEditMessage bool) OptionsSetGameScore

SetDisableEditMessage sets the disable_edit_message value of OptionsSetGameScore.

func (OptionsSetGameScore) SetForce Uses

func (o OptionsSetGameScore) SetForce(force bool) OptionsSetGameScore

SetForce sets the force value of OptionsSetGameScore.

func (OptionsSetGameScore) SetIDs Uses

func (o OptionsSetGameScore) SetIDs(chatID ChatID, messageID int) OptionsSetGameScore

SetIDs sets the chat_id and message_id values of OptionsSetGameScore.

func (OptionsSetGameScore) SetInlineMessageID Uses

func (o OptionsSetGameScore) SetInlineMessageID(inlineMessageID string) OptionsSetGameScore

SetInlineMessageID sets the inline_message_id value of OptionsSetGameScore.

type OptionsStopMessageLiveLocation Uses

type OptionsStopMessageLiveLocation MethodOptions

OptionsStopMessageLiveLocation struct for StopMessageLiveLocation()

required options: chat_id + message_id (when inline_message_id is not given)

or inline_message_id (when chat_id & message_id is not given)

other options: reply_markup

https://core.telegram.org/bots/api#stopmessagelivelocation

func (OptionsStopMessageLiveLocation) SetIDs Uses

func (o OptionsStopMessageLiveLocation) SetIDs(chatID ChatID, messageID int) OptionsStopMessageLiveLocation

SetIDs sets the chat_id and message_id values of OptionsStopMessageLiveLocation.

func (OptionsStopMessageLiveLocation) SetInlineMessageID Uses

func (o OptionsStopMessageLiveLocation) SetInlineMessageID(inlineMessageID string) OptionsStopMessageLiveLocation

SetInlineMessageID sets the inline_message_id value of OptionsStopMessageLiveLocation.

func (OptionsStopMessageLiveLocation) SetReplyMarkup Uses

func (o OptionsStopMessageLiveLocation) SetReplyMarkup(replyMarkup interface{}) OptionsStopMessageLiveLocation

SetReplyMarkup sets the reply_markup value of OptionsStopMessageLiveLocation.

replyMarkup can be one of InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, or ForceReply.

type OrderInfo Uses

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 is a struct of order info

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

type ParseMode Uses

type ParseMode string // parse_mode

ParseMode is a mode of parse

const (
    ParseModeMarkdown ParseMode = "Markdown"
    ParseModeHTML     ParseMode = "HTML"
)

ParseMode strings

type PhotoSize Uses

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

PhotoSize is a struct of a photo's size

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

type PreCheckoutQuery Uses

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

PreCheckoutQuery is a struct for a precheckout query

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

type ReplyKeyboardMarkup Uses

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

ReplyKeyboardMarkup is a struct for reply keyboard markups

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

type ReplyKeyboardRemove Uses

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

ReplyKeyboardRemove is a struct for ReplyKeyboardRemove

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

type ShippingAddress Uses

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 is a struct of shipping address

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

type ShippingOption Uses

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

ShippingOption is a struct of an option of the shipping

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

type ShippingQuery Uses

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

ShippingQuery is a struct for a shipping query

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

type Sticker Uses

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

Sticker is a struct of a sticker

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

type StickerSet Uses

type StickerSet struct {
    Name          *string   `json:"name"`
    Title         *string   `json:"title"`
    ContainsMasks bool      `json:"contains_masks"`
    Stickers      []Sticker `json:"stickers"`
}

StickerSet is a struct of a sticker set

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

type SuccessfulPayment Uses

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

SuccessfulPayment is a struct of successful payments

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

type Update Uses

type Update struct {
    UpdateID           int                 `json:"update_id"`
    Message            *Message            `json:"message,omitempty"`
    EditedMessage      *Message            `json:"edited_message,omitempty"`
    ChannelPost        *Message            `json:"channel_post,omitempty"`
    EditedChannelPost  *Message            `json:"edited_channel_post,omitempty"`
    InlineQuery        *InlineQuery        `json:"inline_query,omitempty"`
    ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"`
    CallbackQuery      *CallbackQuery      `json:"callback_query,omitempty"`
    ShippingQuery      *ShippingQuery      `json:"shipping_query,omitempty"`
    PreCheckoutQuery   *PreCheckoutQuery   `json:"pre_checkout_query,omitempty"`
}

Update is a struct of an update

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

func (*Update) HasCallbackQuery Uses

func (u *Update) HasCallbackQuery() bool

HasCallbackQuery checks if Update has CallbackQuery

func (*Update) HasChosenInlineResult Uses

func (u *Update) HasChosenInlineResult() bool

HasChosenInlineResult checks if Update has ChosenInlineResult

func (*Update) HasEditedMessage Uses

func (u *Update) HasEditedMessage() bool

HasEditedMessage checks if Update has EditedMessage.

func (*Update) HasInlineQuery Uses

func (u *Update) HasInlineQuery() bool

HasInlineQuery checks if Update has InlineQuery

func (*Update) HasMessage Uses

func (u *Update) HasMessage() bool

HasMessage checks if Update has Message.

func (*Update) HasPreCheckoutQuery Uses

func (u *Update) HasPreCheckoutQuery() bool

HasPreCheckoutQuery checks if Update has PreCheckoutQuery

func (*Update) HasShippingQuery Uses

func (u *Update) HasShippingQuery() bool

HasShippingQuery checks if Update has ShippingQuery

func (Update) String Uses

func (u Update) String() string

String function for Update

type UpdateType Uses

type UpdateType string

UpdateType is a type of updates (for allowed_updates)

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

const (
    UpdateTypeMessage            UpdateType = "message"
    UpdateTypeEditedMessage      UpdateType = "edited_message"
    UpdateTypeChannelPost        UpdateType = "channel_post"
    UpdateTypeEditedChannelPost  UpdateType = "edited_channel_post"
    UpdateTypeInlineQuery        UpdateType = "inline_query"
    UpdateTypeChosenInlineResult UpdateType = "chosen_inline_result"
    UpdateTypeCallbackQuery      UpdateType = "callback_query"
)

UpdateType strings

type User Uses

type User struct {
    ID           int     `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"` // https://en.wikipedia.org/wiki/IETF_language_tag
}

User is a struct of a user

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

func (u User) InlineLink() string

InlineLink generates an inline link for User

func (User) String Uses

func (u User) String() string

String function for User

type UserProfilePhotos Uses

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

UserProfilePhotos is a struct for user profile photos

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

type Venue Uses

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

Venue is a struct of a venue

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

type Video Uses

type Video struct {
    FileID   string     `json:"file_id"`
    Width    int        `json:"width"`
    Height   int        `json:"height"`
    Duration int        `json:"duration"`
    Thumb    *PhotoSize `json:"thumb,omitempty"`
    MimeType *string    `json:"mime_type,omitempty"`
    FileSize int        `json:"file_size,omitempty"`
}

Video is a struct for a video file

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

type VideoMimeType Uses

type VideoMimeType string

VideoMimeType is a video mime type for an inline query

const (
    VideoMimeTypeHTML VideoMimeType = "text/html"
    VideoMimeTypeMp4  VideoMimeType = "video/mp4"
)

VideoMimeType strings

type VideoNote Uses

type VideoNote struct {
    FileID   string     `json:"file_id"`
    Length   int        `json:"length"`
    Duration int        `json:"duration"`
    Thumb    *PhotoSize `json:"thumb,omitempty"`
    FileSize int        `json:"file_size,omitempty"`
}

VideoNote is a struct for a video note

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

type Voice Uses

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

Voice is a struct for a voice file

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

type WebhookInfo Uses

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

WebhookInfo is a struct of webhook info

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

Package telegrambot imports 17 packages (graph) and is imported by 2 packages. Updated 2018-11-20. Refresh now. Tools for package owners.