Versions in this module Expand all Collapse all v1 v1.0.0 Jan 3, 2016 Changes in this version + const APIEndpoint + const APIForbidden + const ChatFindLocation + const ChatRecordAudio + const ChatRecordVideo + const ChatTyping + const ChatUploadAudio + const ChatUploadDocument + const ChatUploadPhoto + const ChatUploadVideo + const FileEndpoint + 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 int, fileID string) AudioConfig + func NewAudioUpload(chatID int, file interface{}) AudioConfig + type BaseChat struct + ChannelUsername string + ChatID int + ReplyMarkup interface{} + ReplyToMessageID int + type BaseFile struct + File interface{} + FileID string + FilePath 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, http.Handler) + 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 int + 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 int, action string) ChatActionConfig + type Chattable interface + 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 int, fileID string) DocumentConfig + func NewDocumentUpload(chatID int, 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 int + MessageID int + func NewForward(chatID int, fromChatID int, messageID int) ForwardConfig + type GroupChat struct + ID int + Title string + type InlineConfig struct + CacheTime int + InlineQueryID string + IsPersonal bool + NextOffset string + Results []InlineQueryResult + type InlineQuery struct + From User + ID string + Offset string + Query string + type InlineQueryResult struct + ID string + Type string + type InlineQueryResultArticle struct + Description string + DisableWebPagePreview bool + HideURL bool + MessageText string + ParseMode string + ThumbHeight int + ThumbURL string + ThumbWidth int + Title string + URL string + type InlineQueryResultGIF struct + Caption string + DisableWebPagePreview bool + Height int + MessageText string + ParseMode string + ThumbURL string + Title string + URL string + Width int + type InlineQueryResultMPEG4GIF struct + Caption string + DisableWebPagePreview bool + Height int + MessageText string + ParseMode string + ThumbURL string + Title string + URL string + Width int + type InlineQueryResultPhoto struct + Caption string + Description string + DisableWebPagePreview bool + Height int + MessageText string + MimeType string + ParseMode string + ThumbURL string + Title string + URL string + Width int + type InlineQueryResultVideo struct + Description string + DisableWebPagePreview bool + Height int + MessageText string + MimeType string + ParseMode string + ThumbURL string + Title string + URL string + Width int + type Location struct + Latitude float32 + Longitude float32 + type LocationConfig struct + Latitude float64 + Longitude float64 + func NewLocation(chatID int, 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 int + MigrateToChatID int + 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) IsGroup() bool + func (m *Message) Time() time.Time + type MessageConfig struct + DisableWebPagePreview bool + ParseMode string + Text string + func NewMessage(chatID int, text string) MessageConfig + type PhotoConfig struct + Caption string + func NewPhotoShare(chatID int, fileID string) PhotoConfig + func NewPhotoUpload(chatID int, 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 int, fileID string) StickerConfig + func NewStickerUpload(chatID int, file interface{}) StickerConfig + type Update struct + 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 int, fileID string) VideoConfig + func NewVideoUpload(chatID int, file interface{}) VideoConfig + type Voice struct + Duration int + FileID string + FileSize int + MimeType string + type VoiceConfig struct + Duration int + func NewVoiceShare(chatID int, fileID string) VoiceConfig + func NewVoiceUpload(chatID int, file interface{}) VoiceConfig + type WebhookConfig struct + Certificate interface{} + URL *url.URL + func NewWebhook(link string) WebhookConfig + func NewWebhookWithCert(link string, file interface{}) WebhookConfig Incompatible versions in this module v4.6.4+incompatible Oct 8, 2018