Documentation ¶
Index ¶
- type Bot
- func (b *Bot) AddButtons(chatID int, buttonData ...string) error
- func (b *Bot) AnswerCallback(callbackID, text string, showAlert bool) error
- func (b *Bot) CreateKeyboard(chatId int, maxColumns ...int)
- func (b *Bot) DeleteKeyboard(chatID int)
- func (b *Bot) DeleteMessage(message Message) error
- func (b *Bot) DownloadFile(fileId, filename string) error
- func (b *Bot) DownloadFileToMemory(fileId string) ([]byte, error)
- func (b *Bot) EditMessage(m Message, text string) (Message, error)
- func (b *Bot) ReplyMessage(s string, m Message) error
- func (b *Bot) SendMediaGroup(files []InputMedia, c Chat, options MediaOptions) error
- func (b *Bot) SendMessage(s string, c Chat) (Message, error)
- func (b *Bot) SendPhoto(file string, caption string, c Chat, options MediaOptions) error
- func (b *Bot) SendPhotoFromMemory(data []byte, caption string, c Chat, options MediaOptions) error
- func (b *Bot) SendVideo(file string, caption string, c Chat, options MediaOptions) error
- func (b *Bot) SendVideoFromMemory(data []byte, caption string, c Chat, options MediaOptions) error
- func (b *Bot) SetHandler(fn func(Update)) bool
- func (b *Bot) UpdateHandler(_ http.ResponseWriter, r *http.Request)
- type Chat
- type InlineKeyboard
- type InputMedia
- type MediaOptions
- type Message
- type Result
- type TResponse
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Me user `json:"result"` APIURL string // contains filtered or unexported fields }
Bot : Main Bot Struct
func (*Bot) AddButtons ¶
AddButtons : Add Buttons For InlineKeyboard
func (*Bot) AnswerCallback ¶
AnswerCallback : Answer Call Back Query From InlineKeyboard
func (*Bot) CreateKeyboard ¶
func (*Bot) DeleteKeyboard ¶
DeleteKeyboard : Delete Current Keyboard
func (*Bot) DeleteMessage ¶
DeleteMessage : Delete The Specified Message
func (*Bot) DownloadFile ¶ added in v1.0.1
func (*Bot) DownloadFileToMemory ¶ added in v1.0.1
func (*Bot) EditMessage ¶
EditMessage : Edit An Existing Message
func (*Bot) SendMediaGroup ¶ added in v1.0.1
func (b *Bot) SendMediaGroup(files []InputMedia, c Chat, options MediaOptions) error
SendMediaGroup : Send A Group Of Media Files It Only Works With Local Files For Now
func (*Bot) SendMessage ¶
SendMessage : Send A Message To A User
func (*Bot) SendPhotoFromMemory ¶ added in v1.0.1
func (*Bot) SendVideoFromMemory ¶ added in v1.0.1
func (*Bot) SetHandler ¶
SetHandler : Set Function To Be Run When New Updates Are Received
func (*Bot) UpdateHandler ¶
func (b *Bot) UpdateHandler(_ http.ResponseWriter, r *http.Request)
UpdateHandler : Handles New Updates From Telegram
type InlineKeyboard ¶
InlineKeyboard : Structure To Hold The Keyboard To Be Sent
type InputMedia ¶ added in v1.0.1
type InputMedia struct { Type string `json:"type"` Media string `json:"media"` Caption string `json:"caption,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Duration int `json:"duration,omitempty"` SupportsStreaming bool `json:"supports_streaming,omitempty"` }
type MediaOptions ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.