Versions in this module Expand all Collapse all v2 v2.0.0 Dec 11, 2017 Changes in this version + const OnAddedToGroup + const OnAudio + const OnCallback + const OnChannelPost + const OnContact + const OnDocument + const OnEdited + const OnEditedChannelPost + const OnGroupPhotoDeleted + const OnLocation + const OnMigration + const OnNewGroupPhoto + const OnNewGroupTitle + const OnPhoto + const OnPinned + const OnQuery + const OnSticker + const OnText + const OnUserJoined + const OnUserLeft + const OnVenue + const OnVideo + const OnVideoNote + const OnVoice + var ErrCouldNotUpdate = errors.New("getUpdates() failed") + func Forever() int64 + type Album []InputMedia + type ArticleResult struct + Description string + HideURL bool + Text string + ThumbURL string + Title string + URL string + type Audio struct + Caption string + Duration int + MIME string + Performer string + Title string + func (a *Audio) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type AudioResult struct + Cache string + Duration int + Performer string + Title string + URL string + type Bot struct + Me *User + Poller Poller + Token string + Updates chan Update + func NewBot(pref Settings) (*Bot, error) + func (b *Bot) AdminsOf(chat *Chat) ([]ChatMember, error) + func (b *Bot) Answer(query *Query, response *QueryResponse) error + func (b *Bot) Ban(chat *Chat, member *ChatMember) error + func (b *Bot) ChatByID(id string) (*Chat, error) + func (b *Bot) ChatMemberOf(chat *Chat, user *User) (*ChatMember, error) + func (b *Bot) Delete(message Editable) error + func (b *Bot) DeleteGroupPhoto(chat *Chat) error + func (b *Bot) DeleteGroupStickerSet(chat *Chat) error + func (b *Bot) Download(f *File, localFilename string) error + func (b *Bot) Edit(message Editable, what interface{}, options ...interface{}) (*Message, error) + func (b *Bot) EditCaption(originalMsg Editable, caption string) (*Message, error) + func (b *Bot) FileByID(fileID string) (File, error) + func (b *Bot) FileURLByID(fileID string) (string, error) + func (b *Bot) Forward(to Recipient, what *Message, options ...interface{}) (*Message, error) + func (b *Bot) GetInviteLink(chat *Chat) (string, error) + func (b *Bot) Handle(endpoint interface{}, handler interface{}) + func (b *Bot) Leave(chat *Chat) error + func (b *Bot) Len(chat *Chat) (int, error) + func (b *Bot) Notify(recipient Recipient, action ChatAction) error + func (b *Bot) Pin(message Editable, options ...interface{}) error + func (b *Bot) ProfilePhotosOf(user *User) ([]Photo, error) + func (b *Bot) Promote(chat *Chat, member *ChatMember) error + func (b *Bot) Raw(method string, payload interface{}) ([]byte, error) + func (b *Bot) Reply(to *Message, what interface{}, options ...interface{}) (*Message, error) + func (b *Bot) Respond(callback *Callback, responseOptional ...*CallbackResponse) error + func (b *Bot) Restrict(chat *Chat, member *ChatMember) error + func (b *Bot) Send(to Recipient, what interface{}, options ...interface{}) (*Message, error) + func (b *Bot) SendAlbum(to Recipient, a Album, options ...interface{}) ([]Message, error) + func (b *Bot) SetGroupDescription(chat *Chat, description string) error + func (b *Bot) SetGroupPhoto(chat *Chat, p *Photo) error + func (b *Bot) SetGroupStickerSet(chat *Chat, setName string) error + func (b *Bot) SetGroupTitle(chat *Chat, newTitle string) error + func (b *Bot) Start() + func (b *Bot) Stop() + func (b *Bot) StopLiveLocation(message Editable, options ...interface{}) (*Message, error) + func (b *Bot) Unban(chat *Chat, user *User) error + func (b *Bot) Unpin(chat *Chat) error + type Callback struct + Data string + ID string + Message *Message + MessageID string + Sender *User + type CallbackEndpoint interface + CallbackUnique func() string + type CallbackResponse struct + CallbackID string + ShowAlert bool + Text string + URL string + type Chat struct + FirstName string + ID int64 + LastName string + Title string + Type ChatType + Username string + func (c *Chat) Recipient() string + type ChatAction string + const FindingLocation + const RecordingAudio + const RecordingVideo + const Typing + const UploadingAudio + const UploadingDocument + const UploadingPhoto + const UploadingVNote + const UploadingVideo + type ChatMember struct + RestrictedUntil int64 + Role MemberStatus + User *User + type ChatType string + const ChatChannel + const ChatGroup + const ChatPrivate + const ChatSuperGroup + type Contact struct + FirstName string + LastName string + PhoneNumber string + UserID int + type ContactResult struct + FirstName string + LastName string + PhoneNumber string + ThumbURL string + type Document struct + Caption string + FileName string + MIME string + Thumbnail *Photo + func (d *Document) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type DocumentResult struct + Cache string + Caption string + Description string + MIME string + ThumbURL string + Title string + URL string + type Editable interface + MessageSig func() (messageID int, chatID int64) + type EntityType string + const EntityBold + const EntityCode + const EntityCodeBlock + const EntityCommand + const EntityEmail + const EntityHashtag + const EntityItalic + const EntityMention + const EntityTMention + const EntityTextLink + const EntityURL + type File struct + FileID string + FileLocal string + FilePath string + FileSize int + FileURL string + func FromDisk(filename string) File + func FromURL(url string) File + func (f *File) InCloud() bool + func (f *File) OnDisk() bool + type GifResult struct + Cache string + Caption string + Height int + ThumbURL string + Title string + URL string + Width int + type InlineButton struct + Action func(*Callback) + Data string + InlineQuery string + Text string + URL string + Unique string + func (t *InlineButton) CallbackUnique() string + type InlineKeyboardMarkup struct + InlineKeyboard [][]InlineButton + type InputContactMessageContent struct + FirstName string + LastName string + PhoneNumber string + func (input *InputContactMessageContent) IsInputMessageContent() bool + type InputLocationMessageContent struct + Lat float32 + Lng float32 + func (input *InputLocationMessageContent) IsInputMessageContent() bool + type InputMedia interface + MediaFile func() *File + type InputMessageContent interface + IsInputMessageContent func() bool + type InputTextMessageContent struct + DisablePreview bool + ParseMode string + Text string + func (input *InputTextMessageContent) IsInputMessageContent() bool + type InputVenueMessageContent struct + Address string + FoursquareID string + Lat float32 + Lng float32 + Title string + func (input *InputVenueMessageContent) IsInputMessageContent() bool + type Location struct + Lat float32 + LivePeriod int + Lng float32 + func (x *Location) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type LocationResult struct + ThumbURL string + Title string + type LongPoller struct + LastUpdateID int + Timeout time.Duration + func (p *LongPoller) Poll(b *Bot, dest chan Update, stop chan struct{}) + type MaskFeature string + const FeatureChin + const FeatureEyes + const FeatureForehead + const FeatureMouth + type MaskPosition struct + Feature MaskFeature + Scale float32 + XShift float32 + YShift float32 + type MemberStatus string + const Administrator + const Creator + const Kicked + const Left + const Member + const Restricted + type Message struct + AlbumID string + Audio *Audio + Caption string + CaptionEntities []MessageEntity + ChannelCreated bool + Chat *Chat + Contact *Contact + Document *Document + Entities []MessageEntity + GroupCreated bool + GroupPhotoDeleted bool + ID int + LastEdit int64 + Location *Location + MigrateFrom int64 + MigrateTo int64 + NewGroupPhoto *Photo + NewGroupTitle string + OriginalChat *Chat + OriginalSender *User + OriginalUnixtime int + Payload string + Photo *Photo + PinnedMessage *Message + ReplyTo *Message + Sender *User + Signature string + Sticker *Sticker + SuperGroupCreated bool + Text string + Unixtime int64 + UserJoined *User + UserLeft *User + UsersJoined []User + Venue *Venue + Video *Video + VideoNote *VideoNote + Voice *Voice + func (m *Message) FromChannel() bool + func (m *Message) FromGroup() bool + func (m *Message) IsForwarded() bool + func (m *Message) IsReply() bool + func (m *Message) IsService() bool + func (m *Message) LastEdited() time.Time + func (m *Message) MessageSig() (int, int64) + func (m *Message) Private() bool + func (m *Message) Time() time.Time + type MessageEntity struct + Length int + Offset int + Type EntityType + URL string + User *User + type MiddlewarePoller struct + Capacity int + Filter func(*Update) bool + Poller Poller + func NewMiddlewarePoller(original Poller, filter func(*Update) bool) *MiddlewarePoller + func (p *MiddlewarePoller) Poll(b *Bot, dest chan Update, stop chan struct{}) + type Mpeg4GifResult struct + Cache string + Caption string + Height int + ThumbURL string + Title string + URL string + Width int + type Option int + const ForceReply + const NoPreview + const OneTimeKeyboard + const Silent + type ParseMode string + const ModeDefault + const ModeHTML + const ModeMarkdown + type Photo struct + Caption string + Height int + Width int + func (p *Photo) MediaFile() *File + func (p *Photo) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + func (p *Photo) UnmarshalJSON(jsonStr []byte) error + type PhotoResult struct + Cache string + Caption string + Description string + Height int + ThumbURL string + Title string + URL string + Width int + type Poller interface + Poll func(b *Bot, updates chan Update, stop chan struct{}) + type Query struct + From User + ID string + Location *Location + Offset string + Text string + type QueryResponse struct + CacheTime int + IsPersonal bool + NextOffset string + QueryID string + Results Results + SwitchPMParameter string + SwitchPMText string + type Recipient interface + Recipient func() string + type ReplyButton struct + Action func(*Callback) + Contact bool + Location bool + Text string + func (t *ReplyButton) CallbackUnique() string + type ReplyMarkup struct + ForceReply bool + InlineKeyboard [][]InlineButton + OneTimeKeyboard bool + ReplyKeyboard [][]ReplyButton + ResizeReplyKeyboard bool + Selective bool + type Result interface + ResultID func() string + SetResultID func(string) + type ResultBase struct + Content *InputMessageContent + ID string + ReplyMarkup *InlineKeyboardMarkup + Type string + func (r *ResultBase) ResultID() string + func (r *ResultBase) SetResultID(id string) + type Results []Result + func (results Results) MarshalJSON() ([]byte, error) + type Rights struct + CanAddPreviews bool + CanBeEdited bool + CanChangeInfo bool + CanDeleteMessages bool + CanEditMessages bool + CanInviteUsers bool + CanPinMessages bool + CanPostMessages bool + CanPromoteMembers bool + CanRestrictMembers bool + CanSendMedia bool + CanSendMessages bool + CanSendOther bool + func AdminRights() Rights + func NoRestrictions() Rights + func NoRights() Rights + type SendOptions struct + DisableNotification bool + DisableWebPagePreview bool + ParseMode ParseMode + ReplyMarkup *ReplyMarkup + ReplyTo *Message + type Sendable interface + Send func(*Bot, Recipient, *SendOptions) (*Message, error) + type Settings struct + Poller Poller + Reporter func(error) + Token string + Updates int + type Sticker struct + Emoji string + Height int + MaskPosition *MaskPosition + SetName string + Thumbnail *Photo + Width int + func (s *Sticker) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type StickerResult struct + Cache string + type StoredMessage struct + ChatID int64 + MessageID int + func (x StoredMessage) MessageSig() (int, int64) + type Update struct + Callback *Callback + ChannelPost *Message + EditedChannelPost *Message + EditedMessage *Message + ID int + Message *Message + Query *Query + type User struct + FirstName string + ID int + LastName string + Username string + func (u *User) Recipient() string + type Venue struct + Address string + FoursquareID string + Location Location + Title string + func (v *Venue) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type VenueResult struct + Address string + FoursquareID string + ThumbURL string + Title string + type Video struct + Caption string + Duration int + Height int + MIME string + Thumbnail *Photo + Width int + func (v *Video) MediaFile() *File + func (v *Video) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type VideoNote struct + Duration int + Thumbnail *Photo + func (v *VideoNote) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type VideoResult struct + Cache string + Caption string + Description string + Duration int + Height int + MIME string + ThumbURL string + Title string + URL string + Width int + type Voice struct + Duration int + MIME string + func (v *Voice) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) + type VoiceResult struct + Cache string + Duration int + Title string + URL string