Versions in this module Expand all Collapse all v1 v1.0.0 Feb 23, 2021 v1.0.0-rc.1 Feb 25, 2021 v1.0.0-alpha.0 Feb 23, 2021 v0 v0.0.0 Feb 23, 2021 Changes in this version + const DISABLE_NOTIFICATION + const DISABLE_WEB_PAGE_PREVIEW + const FIND_LOCATION + const PARSE_HTML + const PARSE_MARKDOWN + const RECORD_AUDIO + const RECORD_VIDEO + const RECORD_VIDEO_NOTE + const TYPING + const UPLOAD_AUDIO + const UPLOAD_DOCUMENT + const UPLOAD_PHOTO + const UPLOAD_VIDEO + const UPLOAD_VIDEO_NOTE + func SendGetRequest(url string) []byte + func SendPostForm(destUrl string, keyVals map[string]string) ([]byte, error) + func SendPostRequest(url string, filename string, filetype string) []byte + type APIResponseBase struct + Description string + ErrorCode int + Ok bool + type APIResponseCommands struct + Result []BotCommand + type APIResponseMessage struct + Result *Message + type APIResponseUpdate struct + Result []*Update + type Api string + func NewApi(token string) Api + func (a Api) AnswerCallbackQuery(id, text string, showAlert bool) (response APIResponseMessage) + func (a Api) Command(command, description string) BotCommand + func (a Api) DeleteMessage(chatId int64, messageId int) (response APIResponseMessage) + func (a Api) DeleteWebhook() (response APIResponseUpdate) + func (a Api) EditMessageReplyMarkup(chatId int64, messageId int, keyboard []byte) (response APIResponseMessage) + func (a Api) EditMessageText(chatId int64, messageId int, text string, opts ...Option) (response APIResponseMessage) + func (a Api) EditMessageTextWithKeyboard(chatId int64, messageId int, text string, keyboard []byte, opts ...Option) (response APIResponseMessage) + func (a Api) GetChat(chatId int64) (response Chat) + func (a Api) GetMyCommands() (response APIResponseCommands) + func (a Api) GetStickerSet(name string) (response StickerSet) + func (a Api) GetUpdates(offset, timeout int) (response APIResponseUpdate) + func (a Api) InlineKbdBtn(text, url, callbackData string) InlineButton + func (a Api) InlineKbdBtnCbd(text, callbackData string) InlineButton + func (a Api) InlineKbdBtnUrl(text, url string) InlineButton + func (a Api) InlineKbdMarkup(inlineKbdRows ...InlineKbdRow) (jsn []byte) + func (a Api) InlineKbdRow(inlineButtons ...InlineButton) InlineKbdRow + func (a Api) KeyboardButton(text string, requestContact, requestLocation bool) Button + func (a Api) KeyboardMarkup(resizeKeyboard, oneTimeKeyboard, selective bool, keyboardRows ...KbdRow) (kbd []byte) + func (a Api) KeyboardRemove(selective bool) (kbdrmv []byte) + func (a Api) KeyboardRow(buttons ...Button) (kbdRow KbdRow) + func (a Api) SendAnimation(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendAnimationByID(animationId string, chatId int64) (response APIResponseMessage) + func (a Api) SendAudio(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendAudioByID(audioId, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendChatAction(action ChatAction, chatId int64) (response APIResponseMessage) + func (a Api) SendContact(phoneNumber, firstName, lastName string, chatId int64) (response APIResponseMessage) + func (a Api) SendDocument(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendDocumentByID(documentId, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendMessage(text string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendMessageReply(text string, chatId int64, messageId int, opts ...Option) (response APIResponseMessage) + func (a Api) SendMessageWithKeyboard(text string, chatId int64, keyboard []byte, opts ...Option) (response APIResponseMessage) + func (a Api) SendPhoto(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendPhotoByID(photoId, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendPhotoWithKeyboard(filename, caption string, chatId int64, keyboard []byte, opts ...Option) (response APIResponseMessage) + func (a Api) SendStickerByID(stickerId string, chatId int64) (response APIResponseMessage) + func (a Api) SendVideo(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendVideoByID(videoId, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendVideoNoteByID(videoId string, chatId int64) (response APIResponseMessage) + func (a Api) SendVoice(filename, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SendVoiceByID(voiceId, caption string, chatId int64, opts ...Option) (response APIResponseMessage) + func (a Api) SetMyCommands(commands ...BotCommand) (response APIResponseCommands) + func (a Api) SetWebhook(url string) (response APIResponseUpdate) + type Audio struct + Duration int + FileId string + FileSize int + MimeType string + Performer string + Thumb *PhotoSize + Title string + type Bot interface + Update func(*Update) + type BotCommand struct + Command string + Description string + type Button struct + RequestContact bool + RequestLocation bool + Text string + type CallbackQuery struct + Data string + ID string + InlineMessageId string + Message *Message + User *User + type Chat struct + AllMembersAreAdmin bool + Description string + FirstName string + ID int64 + InviteLink string + LastName string + PinnedMessage *Message + Title string + Type string + Username string + type ChatAction string + type ChosenInlineResult struct + ID string + InlineMessageId string + Query string + User *User + type Contact struct + FirstName string + LastName string + PhoneNumber string + UserID int + Vcard string + type Dispatcher struct + func NewDispatcher(token string, newBot NewBotFn) Dispatcher + func (d *Dispatcher) AddSession(chatId int64) + func (d *Dispatcher) DelSession(chatId int64) + func (d *Dispatcher) ListenWebhook(url string, internalPort int) + func (d *Dispatcher) Poll() + type Document struct + FileId string + FileName string + FileSize int + MimeType string + Thumb *PhotoSize + type InlineButton struct + CallbackData string + Text string + URL string + type InlineKbdRow []InlineButton + type InlineKeyboard struct + InlineKeyboard []InlineKbdRow + type InlineQuery struct + ID string + Offset string + Query string + User *User + type KbdRow []Button + type Keyboard struct + Keyboard []KbdRow + OneTimeKeyboard bool + ResizeKeyboard bool + Selective bool + type KeyboardRemove struct + RemoveKeyboard bool + Selective bool + type Location struct + Latitude float32 + Longitude float32 + type MaskPosition struct + Point string + Scale float32 + XShift float32 + YShift float32 + type Message struct + Audio *Audio + Caption string + Chat *Chat + Contact *Contact + Date int64 + Document *Document + Entities []*MessageEntity + ID int + LeftChatMember *User + Location *Location + MediaGroupId string + NewChatMember []*User + Photo []*PhotoSize + PinnedMessage *Message + Sticker *Sticker + Text string + User *User + Video *Video + VideoNote *VideoNote + Voice *Voice + type MessageEntity struct + Length int + Offset int + Type string + Url string + User *User + type NewBotFn func(chatId int64) Bot + type Option string + type PhotoSize struct + FileId string + FileSize int + Height int + Width int + type Sticker struct + Emoji string + FileId string + FileSize int + Height int + MaskPosition MaskPosition + SetName string + Thumb *PhotoSize + Width int + type StickerSet struct + ContainsMasks bool + Name string + Stickers []*Sticker + Title string + type Update struct + CallbackQuery *CallbackQuery + ChannelPost *Message + ChosenInlineResult *ChosenInlineResult + EditedChannelPost *Message + EditedMessage *Message + ID int + InlineQuery *InlineQuery + Message *Message + type User struct + FirstName string + ID int + IsBot bool + LanguageCode string + LastName string + Username string + type Video struct + Duration int + FileId string + FileSize int + Height int + MimeType string + Thumb *PhotoSize + Width int + type VideoNote struct + Duration int + FileId string + FileSize int + Length int + Thumb *PhotoSize + type Voice struct + Duration int + FileId string + FileSize int + MimeType string Other modules containing this package github.com/NicoNex/echotron/v2 github.com/NicoNex/echotron/v3