Versions in this module Expand all Collapse all v0 v0.1.0 Nov 18, 2020 Changes in this version + const TelegramURL + type Animation struct + Duration int + FileID string + FileName string + FileSize int + FileUniqueID string + Height int + MIMEType string + Thumb *PhotoSize + Width int + type Audio struct + Duration int + FileID string + FileName string + FileSize int + FileUniqueID string + MIMEType string + Performer string + Thumb *PhotoSize + Title string + type Bot struct + User User + func NewBot(token string, options ...Option) (*Bot, error) + func (bot *Bot) DeleteWebhook(params ...Param) (bool, error) + func (bot *Bot) GetMe() (User, error) + func (bot *Bot) GetUpdates(params ...Param) ([]Update, error) + func (bot *Bot) GetWebhookInfo() (WebhookInfo, error) + func (bot *Bot) MakeRequest(methodName string, params url.Values) (*Response, error) + func (bot *Bot) SendMessage(chatID int, text string, params ...Param) (Message, error) + func (bot *Bot) SetWebhook(url string, params ...Param) (bool, error) + type BotCommand struct + Command string + Description string + type BotError struct + Code int + Description string + func (e *BotError) Error() string + type CallbackGame struct + type CallbackQuery struct + ChatInstance string + Data string + From *User + GameShortName string + ID string + InlineMessageID string + Message *Message + type Chat struct + Bio string + CanSetStickerSet bool + Description string + FirstName string + ID int + InviteLink string + LastName string + LinkedChatID int + Location *ChatLocation + Permissions *ChatPermissions + Photo *ChatPhoto + PinnedMessage *Message + SlowModeDelay int + StickerSetName string + Title string + Type string + Username string + type ChatLocation struct + Address string + Location *Location + type ChatMember struct + CahChangeInfo bool + CanAddWebPagePreviews bool + CanBeEdited bool + CanDeleteMessages bool + CanEditMessages bool + CanInviteUsers bool + CanPinMessages bool + CanPostMessages bool + CanPromoteMembers bool + CanRestrictMembers bool + CanSendMediaMessages bool + CanSendMessages bool + CanSendOtherMessages bool + CanSendPolls bool + CustomTitle string + IsAnonymous bool + IsMember bool + Status string + UntilDate int + User *User + type ChatPermissions struct + CanAddWebPagePreviews bool + CanChangeInfo bool + CanInviteUsers bool + CanPinMessages bool + CanSendMediaMessages bool + CanSendMessages bool + CanSendOtherMessages bool + CanSendPolls bool + type ChatPhoto struct + BigFileID string + BigFileUniqueID string + SmallFileID string + SmallFileUniqueID string + type ChosenInlineResult struct + From *User + InlineMessageID string + Location *Location + Query string + ResultID string + type Contact struct + FirstName string + LastName string + PhoneNumber string + UserID int + VCard string + type Dice struct + Emoji string + Value int + type Document struct + FileID string + FileName string + FileSize int + FileUniqueID string + MIMEType string + Thumb *PhotoSize + type EncryptedCredentials struct + Data string + Hash string + Secret string + type EncryptedPassportElement struct + Data string + Email string + Files []*PassportFile + FrontSide *PassportFile + Hash string + PhoneNumber string + ReverseSide *PassportFile + Selfie *PassportFile + Translation []*PassportFile + Type string + type File struct + FileID string + FilePath string + FileSize string + FileUniqueID string + type ForceReply struct + ForceReply bool + Selective bool + type Game struct + Animation *Animation + Description string + Photo []*PhotoSize + Text string + TextEntities []*MessageEntity + Title string + type GameHighScore struct + Position int + Score int + User *User + type InlineKeyboardButton struct + CallbackData string + CallbackGame *CallbackGame + LoginURL *LoginURL + Pay bool + SwitchInlineQuery string + SwitchInlineQueryCurrentChat string + Text string + URL string + type InlineKeyboardMarkup struct + InlineKeyboard [][]*InlineKeyboardButton + type InlineQuery struct + From *User + ID string + Location *Location + Offset string + Query string + type InlineQueryResultArticle struct + Description string + HideURL bool + ID string + InputMessageContent interface{} + ReplyMarkup *InlineKeyboardMarkup + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + Type string + URL string + type InlineQueryResultAudio struct + AudioDuration int + AudioURL string + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + ParseMode string + Performer string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + type InlineQueryResultCachedAudio struct + AudioFileID string + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Type string + type InlineQueryResultCachedDocument struct + Caption string + CaptionEntities []*MessageEntity + Description string + DocumentFileID string + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + type InlineQueryResultCachedGIF struct + Caption string + CaptionEntities []*MessageEntity + GIFFileID string + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + type InlineQueryResultCachedMPEG4GIF struct + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + MPEG4FileID string + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + type InlineQueryResultCachedPhoto struct + Caption string + CaptionEntities []*MessageEntity + Description string + ID string + InputMessageContent interface{} + ParseMode string + PhotoFileID string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + type InlineQueryResultCachedSticker struct + ID string + InputMessageContent interface{} + ReplyMarkup *InlineKeyboardMarkup + StickerFileID string + Type string + type InlineQueryResultCachedVideo struct + Caption string + CaptionEntities []*MessageEntity + Description string + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + VideoFileID string + type InlineQueryResultCachedVoice struct + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + VoiceFileID string + type InlineQueryResultContact struct + FirstName string + ID string + InputMessageContent interface{} + LastName string + PhoneNumber string + ReplyMarkup *InlineKeyboardMarkup + ThumbHeight int + ThumbURL string + ThumbWidth int + Type string + VCard string + type InlineQueryResultDocument struct + Caption string + CaptionEntities []*MessageEntity + Description string + DocumentURL string + ID string + InputMessageContent interface{} + MIMEType string + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + Type string + type InlineQueryResultGIF struct + Caption string + CaptionEntities []*MessageEntity + GIFDuration int + GIFHeight int + GIFURL string + GIFWidth int + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + ThumbMIMEType string + ThumbURL string + Title string + Type string + type InlineQueryResultGame struct + GameShortName string + ID string + ReplyMarkup *InlineKeyboardMarkup + Type string + type InlineQueryResultLocation struct + Heading int + HorizontalAccuracy float64 + ID string + InputMessageContent interface{} + Latitude float64 + LivePeriod int + Longitude float64 + ProximityAlertRadius int + ReplyMarkup *InlineKeyboardMarkup + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + Type string + type InlineQueryResultMPEG4GIF struct + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + MPEG4Duration int + MPEG4Height int + MPEG4URL string + MPEG4Width int + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + ThumbMIMEType string + ThumbURL string + Title string + Type string + type InlineQueryResultPhoto struct + Caption string + CaptionEntities []*MessageEntity + Description string + ID string + InputMessageContent interface{} + ParseMode string + PhotoHeight int + PhotoURL string + PhotoWidth int + ReplyMarkup *InlineKeyboardMarkup + ThumbURL string + Title string + Type string + type InlineQueryResultVenue struct + Address string + FoursquareID string + FoursquareType string + GooglePlaceID string + GooglePlaceType string + ID string + InputMessageContent interface{} + Latitude float64 + Longitude float64 + ReplyMarkup *InlineKeyboardMarkup + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + Type string + type InlineQueryResultVideo struct + Caption string + CaptionEntities []*MessageEntity + Description string + ID string + InputMessageContent interface{} + MIMEType string + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + ThumbURL string + Title string + Type string + VideoDuration int + VideoHeight int + VideoURL string + VideoWidth int + type InlineQueryResultVoice struct + Caption string + CaptionEntities []*MessageEntity + ID string + InputMessageContent interface{} + ParseMode string + ReplyMarkup *InlineKeyboardMarkup + Title string + Type string + VoiceDuration int + VoiceURL string + type InputContactMessageContent struct + FirstName float64 + LastName string + PhoneNumber float64 + VCard string + type InputLocationMessageContent struct + Heading int + HorizontalAccuracy float64 + Latitude float64 + LivePeriod int + Longitude float64 + ProximityAlertRadius int + type InputMediaAnimation struct + Caption string + CaptionEntities []*MessageEntity + Duration int + Height int + Media string + ParseMode string + Type string + Width int + type InputMediaAudio struct + Caption string + CaptionEntities []*MessageEntity + Duration int + Media string + ParseMode string + Performer string + Title string + Type string + type InputMediaDocument struct + Caption string + CaptionEntities []*MessageEntity + DisableContentTypeDetection bool + Media string + ParseMode string + Type string + type InputMediaPhoto struct + Caption string + CaptionEntities []*MessageEntity + Media string + ParseMode string + Type string + type InputMediaVideo struct + Caption string + CaptionEntities []*MessageEntity + Duration int + Height int + Media string + ParseMode string + SupportsStreaming bool + Type string + Width int + type InputTextMessageContent struct + DisableWebPagePreview bool + Entities []*MessageEntity + MessageText string + ParseMode string + type InputVenueMessageContent struct + Address string + FoursquareID string + FoursquareType string + GooglePlaceID string + GooglePlaceType string + Latitude float64 + Longitude float64 + Title string + type Invoice struct + Currency string + Description string + StartParameter string + Title string + TotalAmount int + type KeyboardButton struct + RequestContact bool + RequestLocation bool + RequestPoll *KeyboardButtonPollType + Text string + type KeyboardButtonPollType struct + Type string + type LabeledPrice struct + Amount int + Label string + type Location struct + Heading int + HorizontalAccuracy float64 + Latitude float64 + LivePeriod int + Longitude float64 + ProximityAlertRadius int + type LoginURL struct + BotUsername string + ForwardText string + RequestWriteAccess bool + URL string + type MaskPosition struct + Point string + Scale float64 + XShift float64 + YShift float64 + type Message struct + Animation *Animation + Audio *Audio + AuthorSignature string + Caption string + CaptionEntities []*MessageEntity + ChannelChatCreated bool + Chat *Chat + ConnectedWebsite string + Contact *Contact + Date int + DeleteChatPhoto bool + Dice *Dice + Document *Document + EditDate int + Entities []*MessageEntity + ForwardDate int + ForwardFrom *User + ForwardFromChat *Chat + ForwardFromMessageID int + ForwardSenderName string + ForwardSignature string + From *User + Game *Game + GroupChatCreated bool + Invoice *Invoice + LeftChatMember *User + Location *Location + MediaGroupID string + MessageID int + MigrateFromChatID int + MigrateToChatID int + NewChatMembers []*User + NewChatPhoto []*PhotoSize + NewChatTitle string + PassportData *PassportData + Photo []*PhotoSize + PinnedMessage *Message + Poll *Poll + ProximityAlertTriggered *ProximityAlertTriggered + ReplyMarkup *InlineKeyboardMarkup + ReplyToMessage *Message + SenderChat *Chat + Sticker *Sticker + SuccessfulPayment *SuccessfulPayment + SupergroupChatCreated bool + Text string + Venue *Venue + ViaBot *User + Video *Video + VideoNote *VideoNote + Voice *Voice + type MessageEntity struct + Language string + Length int + Offset int + Type string + URL string + User *User + type MessageID struct + MessageID int + type Option func(*Bot) + func SetClient(c *http.Client) Option + func SetHostURL(hostURL string) Option + type OrderInfo struct + Email string + Name string + PhoneNumber string + ShippingAddress *ShippingAddress + type Param func(params url.Values) + func SetAllowedUpdates(allowedUpdates ...string) Param + func SetDropPendingUpdates(b bool) Param + func SetIPAddress(address string) Param + func SetLimit(limit int) Param + func SetMaxConnections(count int) Param + func SetOffset(offset int) Param + func SetTimeout(timeout int) Param + type PassportData struct + Credentials *EncryptedCredentials + Data []*EncryptedPassportElement + type PassportElementErrorDataField struct + DataHash string + FieldName string + Message string + Source string + Type string + type PassportElementErrorFile struct + FileHash string + Message string + Source string + Type string + type PassportElementErrorFiles struct + FileHashes []string + Message string + Source string + Type string + type PassportElementErrorFrontSide struct + FileHash string + Message string + Source string + Type string + type PassportElementErrorReverseSide struct + FileHash string + Message string + Source string + Type string + type PassportElementErrorSelfie struct + FileHash string + Message string + Source string + Type string + type PassportElementErrorTranslationFile struct + FileHash string + Message string + Source string + Type string + type PassportElementErrorTranslationFiles struct + FileHashes []string + Message string + Source string + Type string + type PassportElementErrorUnspecified struct + ElementHash string + Message string + Source string + Type string + type PassportFile struct + FileDate int + FileID string + FileSize int + FileUniqueID string + type PhotoSize struct + FileID string + FileSize int + FileUniqueID string + Height int + Width int + type Poll struct + AllowsMultipleAnswers bool + CloseDate int + CorrectOptionID int + Explanation string + ExplanationEntities []*MessageEntity + ID string + IsAnonymous bool + IsClosed bool + OpenPeriod int + Options []*PollOption + Question string + TotalVoterCount int + Type string + type PollAnswer struct + OptionIDs []int + PollID string + User *User + type PollOption struct + Text string + VoterCount int + type PreCheckoutQuery struct + Currency string + From *User + ID string + InvoicePayload string + OrderInfo *OrderInfo + ShippingOptionID string + TotalAmount int + type ProximityAlertTriggered struct + Distance int + Traveler *User + Watcher *User + type ReplyKeyboardMarkup struct + Keyboard [][]*KeyboardButton + OneTimeKeyboard bool + ResizeKeyboard bool + Selective bool + type ReplyKeyboardRemove struct + RemoveKeyboard bool + Selective bool + type Response struct + Description string + ErrorCode int + OK bool + Parameters *ResponseParameters + Result json.RawMessage + func (r *Response) Read(b []byte) (n int, err error) + type ResponseParameters struct + MigrateToChatID int + RetryAfter int + type ShippingAddress struct + City string + CountryCode string + PostCode string + State string + StreetLine1 string + StreetLine2 string + type ShippingOption struct + ID string + Prices []*LabeledPrice + Title string + type ShippingQuery struct + From *User + ID string + InvoicePayload string + ShippingAddress *ShippingAddress + type Sticker struct + Emoji string + FileID string + FileSize int + FileUniqueID string + Height int + IsAnimated bool + MaskPosition *MaskPosition + SetName string + Thumb *PhotoSize + Width int + type StickerSet struct + ContainsMasks bool + IsAnimated bool + Name string + Stickers []*Sticker + Thumb *PhotoSize + Title string + type SuccessfulPayment struct + Currency string + InvoicePayload string + OrderInfo *OrderInfo + ProviderPaymentChargeID string + ShippingOptionID string + TelegramPaymentChargeID string + TotalAmount int + type Update struct + CallbackQuery *CallbackQuery + ChannelPost *Message + ChosenInlineResult *ChosenInlineResult + EditedChannelPost *Message + EditedMessage *Message + InlineQuery *InlineQuery + Message *Message + Poll *Poll + PollAnswer *PollAnswer + PreCheckoutQuery *PreCheckoutQuery + ShippingQuery *ShippingQuery + UpdateID int + type User struct + CanJoinGroups bool + CanReadAllGroupMessages bool + FirstName string + ID int + IsBot bool + LanguageCode string + LastName string + SupportsInlineQueries bool + Username string + type UserProfilePhotos struct + Photos [][]*PhotoSize + TotalCount int + type Venue struct + Address string + FoursquareID string + FoursquareType string + GooglePlaceID string + GooglePlaceType string + Location *Location + Title string + type Video struct + Duration int + FileID string + FileName string + FileSize int + FileUniqueID string + Height int + MIMEType string + Thumb *PhotoSize + Width int + type VideoNote struct + Duration int + FileID string + FileSize int + FileUniqueID string + Length int + Thumb *PhotoSize + type Voice struct + Duration string + FileID string + FileSize string + FileUniqueID string + MIMEType string + type WebhookInfo struct + AllowedUpdates []string + HasCustomCertificate bool + IPAddress string + LastErrorDate int + LastErrorMessage string + MaxConnections int + PendingUpdateCount int + URL string