Versions in this module Expand all Collapse all v3 v3.0.0 Mar 24, 2016 Changes in this version + const APIEndpoint + const ChatFindLocation + const ChatRecordAudio + const ChatRecordVideo + const ChatTyping + const ChatUploadAudio + const ChatUploadDocument + const ChatUploadPhoto + const ChatUploadVideo + const ErrAPIForbidden + const ErrBadFileType + const FileEndpoint + const ModeHTML + const ModeMarkdown + type APIResponse struct + Description string + ErrorCode int + Ok bool + Result json.RawMessage + type Audio struct + Duration int + FileID string + FileSize int + MimeType string + Performer string + Title string + type AudioConfig struct + Duration int + Performer string + Title string + func NewAudioShare(chatID int64, fileID string) AudioConfig + func NewAudioUpload(chatID int64, file interface{}) AudioConfig + type BaseChat struct + ChannelUsername string + ChatID int64 + DisableNotification bool + ReplyMarkup interface{} + ReplyToMessageID int + type BaseFile struct + File interface{} + FileID string + FileSize int + MimeType string + UseExisting bool + type BotAPI struct + Client *http.Client + Debug bool + Self User + Token string + func NewBotAPI(token string) (*BotAPI, error) + func NewBotAPIWithClient(token string, client *http.Client) (*BotAPI, error) + func (bot *BotAPI) AnswerInlineQuery(config InlineConfig) (APIResponse, error) + func (bot *BotAPI) GetFile(config FileConfig) (File, error) + func (bot *BotAPI) GetFileDirectURL(fileID string) (string, error) + func (bot *BotAPI) GetMe() (User, error) + func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) + func (bot *BotAPI) GetUpdatesChan(config UpdateConfig) (<-chan Update, error) + func (bot *BotAPI) GetUserProfilePhotos(config UserProfilePhotosConfig) (UserProfilePhotos, error) + func (bot *BotAPI) IsMessageToMe(message Message) bool + func (bot *BotAPI) ListenForWebhook(pattern string) <-chan Update + func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse, error) + func (bot *BotAPI) RemoveWebhook() (APIResponse, error) + func (bot *BotAPI) Send(c Chattable) (Message, error) + func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error) + func (bot *BotAPI) UploadFile(endpoint string, params map[string]string, fieldname string, file interface{}) (APIResponse, error) + type Chat struct + FirstName string + ID int64 + LastName string + Title string + Type string + UserName string + func (c *Chat) IsChannel() bool + func (c *Chat) IsGroup() bool + func (c *Chat) IsPrivate() bool + func (c *Chat) IsSuperGroup() bool + type ChatActionConfig struct + Action string + func NewChatAction(chatID int64, action string) ChatActionConfig + type Chattable interface + type ChosenInlineResult struct + From User + Query string + ResultID string + type Contact struct + FirstName string + LastName string + PhoneNumber string + UserID int + type Document struct + FileID string + FileName string + FileSize int + MimeType string + Thumbnail PhotoSize + type DocumentConfig struct + func NewDocumentShare(chatID int64, fileID string) DocumentConfig + func NewDocumentUpload(chatID int64, file interface{}) DocumentConfig + type File struct + FileID string + FilePath string + FileSize int + func (f *File) Link(token string) string + type FileBytes struct + Bytes []byte + Name string + type FileConfig struct + FileID string + type FileReader struct + Name string + Reader io.Reader + Size int64 + type Fileable interface + type ForceReply struct + ForceReply bool + Selective bool + type ForwardConfig struct + FromChannelUsername string + FromChatID int64 + MessageID int + func NewForward(chatID int64, fromChatID int64, messageID int) ForwardConfig + type GroupChat struct + ID int + Title string + type InlineConfig struct + CacheTime int + InlineQueryID string + IsPersonal bool + NextOffset string + Results []interface{} + type InlineQuery struct + From User + ID string + Offset string + Query string + type InlineQueryResultArticle struct + Description string + DisableWebPagePreview bool + HideURL bool + ID string + MessageText string + ParseMode string + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + Type string + URL string + func NewInlineQueryResultArticle(id, title, messageText string) InlineQueryResultArticle + type InlineQueryResultGIF struct + Caption string + DisableWebPagePreview bool + Height int + ID string + MessageText string + ParseMode string + ThumbURL string + Title string + Type string + URL string + Width int + func NewInlineQueryResultGIF(id, url string) InlineQueryResultGIF + type InlineQueryResultMPEG4GIF struct + Caption string + DisableWebPagePreview bool + Height int + ID string + MessageText string + ParseMode string + ThumbURL string + Title string + Type string + URL string + Width int + func NewInlineQueryResultMPEG4GIF(id, url string) InlineQueryResultMPEG4GIF + type InlineQueryResultPhoto struct + Caption string + Description string + DisableWebPagePreview bool + Height int + ID string + MessageText string + MimeType string + ParseMode string + ThumbURL string + Title string + Type string + URL string + Width int + func NewInlineQueryResultPhoto(id, url string) InlineQueryResultPhoto + type InlineQueryResultVideo struct + Description string + DisableWebPagePreview bool + Height int + ID string + MessageText string + MimeType string + ParseMode string + ThumbURL string + Title string + Type string + URL string + Width int + func NewInlineQueryResultVideo(id, url string) InlineQueryResultVideo + type Location struct + Latitude float32 + Longitude float32 + type LocationConfig struct + Latitude float64 + Longitude float64 + func NewLocation(chatID int64, latitude float64, longitude float64) LocationConfig + type Message struct + Audio Audio + Caption string + ChannelChatCreated bool + Chat Chat + Contact Contact + Date int + DeleteChatPhoto bool + Document Document + ForwardDate int + ForwardFrom User + From User + GroupChatCreated bool + LeftChatParticipant User + Location Location + MessageID int + MigrateFromChatID int64 + MigrateToChatID int64 + NewChatParticipant User + NewChatPhoto []PhotoSize + NewChatTitle string + Photo []PhotoSize + ReplyToMessage *Message + Sticker Sticker + SuperGroupChatCreated bool + Text string + Video Video + Voice Voice + func (m *Message) Command() string + func (m *Message) CommandArguments() string + func (m *Message) IsCommand() bool + func (m *Message) Time() time.Time + type MessageConfig struct + DisableWebPagePreview bool + ParseMode string + Text string + func NewMessage(chatID int64, text string) MessageConfig + type PhotoConfig struct + Caption string + func NewPhotoShare(chatID int64, fileID string) PhotoConfig + func NewPhotoUpload(chatID int64, file interface{}) PhotoConfig + type PhotoSize struct + FileID string + FileSize int + Height int + Width int + type ReplyKeyboardHide struct + HideKeyboard bool + Selective bool + type ReplyKeyboardMarkup struct + Keyboard [][]string + OneTimeKeyboard bool + ResizeKeyboard bool + Selective bool + type Sticker struct + FileID string + FileSize int + Height int + Thumbnail PhotoSize + Width int + type StickerConfig struct + func NewStickerShare(chatID int64, fileID string) StickerConfig + func NewStickerUpload(chatID int64, file interface{}) StickerConfig + type Update struct + ChosenInlineResult ChosenInlineResult + InlineQuery InlineQuery + Message Message + UpdateID int + type UpdateConfig struct + Limit int + Offset int + Timeout int + func NewUpdate(offset int) UpdateConfig + type User struct + FirstName string + ID int + LastName string + UserName string + func (u *User) String() string + type UserProfilePhotos struct + Photos []PhotoSize + TotalCount int + type UserProfilePhotosConfig struct + Limit int + Offset int + UserID int + func NewUserProfilePhotos(userID int) UserProfilePhotosConfig + type Video struct + Duration int + FileID string + FileSize int + Height int + MimeType string + Thumbnail PhotoSize + Width int + type VideoConfig struct + Caption string + Duration int + func NewVideoShare(chatID int64, fileID string) VideoConfig + func NewVideoUpload(chatID int64, file interface{}) VideoConfig + type Voice struct + Duration int + FileID string + FileSize int + MimeType string + type VoiceConfig struct + Duration int + func NewVoiceShare(chatID int64, fileID string) VoiceConfig + func NewVoiceUpload(chatID int64, file interface{}) VoiceConfig + type WebhookConfig struct + Certificate interface{} + URL *url.URL + func NewWebhook(link string) WebhookConfig + func NewWebhookWithCert(link string, file interface{}) WebhookConfig Other modules containing this package gopkg.in/telegram-bot-api.v1 gopkg.in/telegram-bot-api.v2 gopkg.in/telegram-bot-api.v4