Documentation ¶
Index ¶
- Constants
- Variables
- type Bot
- func (telepher Bot) AddStickerToSet(user_id int, name string, emojis string, png_sticker types.InputFile, ...) (*types.Message, error)
- func (telepher Bot) AnswerCallbackQuery(callback_query_id string) (bool, error)
- func (telepher Bot) CanJoinGroups() bool
- func (telepher Bot) CanReadAllGroupMessages() bool
- func (telepher Bot) Command(trigger string, commandHandler func(Bot, *types.Message))
- func (telepher Bot) CommandHandler(trigger string, msg *types.Message)
- func (telepher Bot) CopyMessage(chat_id int, from_chat_id int, message_id int, option interface{}) (*types.MessageId, error)
- func (telepher Bot) CreateChatInviteLink(chat_id int, option interface{}) (*types.ChatInviteLink, error)
- func (telepher Bot) CreateNewStickerSet(user_id int, name string, title string, emojis string, ...) (*types.Message, error)
- func (telepher Bot) DeleteChatPhoto(chat_id int) (bool, error)
- func (telepher Bot) DeleteChatStickerSet(chat_id int) (bool, error)
- func (telepher Bot) DeleteMessage(chat_id int, message_id int) (*types.Message, error)
- func (telepher Bot) DeleteStickerFromSet(sticker string) (bool, error)
- func (telepher Bot) EditChatInviteLink(chat_id int, invite_link string, option interface{}) (*types.ChatInviteLink, error)
- func (telepher Bot) EditMessageCaption() (*types.Message, error)
- func (telepher Bot) EditMessageLiveLocation(latitude float64, longitude float64, option interface{}) (*types.Message, error)
- func (telepher Bot) EditMessageReplyMarkup() (*types.Message, error)
- func (telepher Bot) EditMessageText(text string) (*types.Message, error)
- func (telepher Bot) ExportChatInviteLink(chat_id int) (string, error)
- func (telepher Bot) FirstName() string
- func (telepher Bot) ForwardMessage(chat_id int, from_chat_id int, message_id int, option interface{}) (*types.Message, error)
- func (telepher Bot) GetChat(chat_id int) (*types.Chat, error)
- func (telepher Bot) GetChatAdministrators(chat_id int) (*[]types.ChatMember, error)
- func (telepher Bot) GetChatMember(chat_id int, user_id int) (*types.ChatMember, error)
- func (telepher Bot) GetChatMembersCount(chat_id int) (int, error)
- func (telepher Bot) GetFile(file_id string) (*types.File, error)
- func (telepher Bot) GetMe() (*types.User, error)
- func (telepher Bot) GetMyCommands() ([]*types.BotCommand, error)
- func (telepher Bot) GetStickerSet(name string) (*types.StickerSet, error)
- func (telepher Bot) GetUpdates(offset int, limit int) ([]types.Update, error)
- func (telepher Bot) GetUserProfilePhotos(user_id int, option interface{}) (*types.UserProfilePhotos, error)
- func (telepher Bot) Hears(trigger string, handler interface{}, handlerOptions *HandlerOptions)
- func (telepher Bot) ID() int
- func (telepher Bot) IsBot() bool
- func (telepher Bot) KickChatMember(chat_id int, user_id int, option interface{}) (bool, error)
- func (telepher Bot) LanguageCode() string
- func (telepher Bot) LastName() string
- func (telepher Bot) LeaveChat(chat_id int) (bool, error)
- func (telepher *Bot) On(Type string, handler interface{}, handlerOptions *HandlerOptions)
- func (telepher Bot) PinChatMessage(chat_id int, message_id int) (bool, error)
- func (telepher Bot) Poll(ch chan types.Update)
- func (telepher Bot) PromoteChatMember(chat_id int, user_id int, option interface{}) (bool, error)
- func (telepher Bot) RestrictChatMember(chat_id int, user_id int, permissions *types.ChatPermissions, ...) (bool, error)
- func (telepher Bot) RevokeChatInviteLink(chat_id int, invite_link string) (*types.ChatInviteLink, error)
- func (telepher Bot) SendAnimation(chat_id int, animation types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendAudio(chat_id int, photo types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendChatAction(chat_id int, action string) (*types.Message, error)
- func (telepher Bot) SendContact(chat_id int, phone_number string, first_name string, option interface{}) (*types.Message, error)
- func (telepher Bot) SendDice(chat_id int, option interface{}) (*types.Message, error)
- func (telepher Bot) SendDocument(chat_id int, document types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendLocation(chat_id int, latitude float64, longitude float64, option interface{}) (*types.Message, error)
- func (telepher Bot) SendMessage(chat_id int, text string, option interface{}) (*types.Message, error)
- func (telepher Bot) SendPhoto(chat_id int, photo types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendPoll(chat_id int, question string, poll_options []string, option interface{}) (*types.Message, error)
- func (telepher Bot) SendSticker(chat_id int, video_note types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendVenue(chat_id int, latitude float64, longitude float64, title string, address string, ...) (*types.Message, error)
- func (telepher Bot) SendVideo(chat_id int, video types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendVideoNote(chat_id int, video_note types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SendVoice(chat_id int, voice types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) SetChatAdministratorCustomTitle(chat_id int, user_id int, custom_title string) (bool, error)
- func (telepher Bot) SetChatDescription(chat_id int, description string) (bool, error)
- func (telepher Bot) SetChatPermissions(chat_id int, permissions *types.ChatPermissions) (bool, error)
- func (telepher Bot) SetChatPhoto(chat_id int, photo types.InputFile) (*types.Message, error)
- func (telepher Bot) SetChatStickerSet(chat_id int, stickersetname string) (bool, error)
- func (telepher Bot) SetChatTitle(chat_id int, title string) (bool, error)
- func (telepher Bot) SetMyCommands(command []types.BotCommand) (bool, error)
- func (telepher Bot) SetStickerPositionInSet(sticker string, position int) (bool, error)
- func (telepher Bot) SetStickerSetThumb(name string, user_id int) (bool, error)
- func (telepher Bot) Start()
- func (telepher Bot) StopMessageLiveLocation(option interface{}) (*types.Message, error)
- func (telepher Bot) StopPoll(chat_id int, message_id int) (*types.Message, error)
- func (telepher Bot) SupportsInlineQueries() bool
- func (telepher Bot) UnbanChatMember(chat_id int, user_id int, option interface{}) (bool, error)
- func (telepher Bot) UnpinAllChatMessages(chat_id int) (bool, error)
- func (telepher Bot) UnpinChatMessage(chat_id int, message_id int) (bool, error)
- func (telepher Bot) UploadStickerFile(user_id int, png_sticker types.InputFile, option interface{}) (*types.Message, error)
- func (telepher Bot) UserName() string
- type Commands
- type Handler
- type HandlerOptions
- type InlineKeyboard
- type KeyboardOptions
- type Options
- type ParseMode
- type ReplyKeyboard
- type Settings
Constants ¶
View Source
const ( DefaultBaseURL = "https://api.telegram.org/bot" DefaultBaseFileURL = "https://api.telegram.org/file/bot" DefaultParseMode = "" DefaultCheckBool = true )
View Source
const ( Message = "message" EditedMessage = "edited_message" ChannelPost = "channel_post" EditedChannelPost = "edited_channel_post" InlineQuery = "inline_query" ChosenInlineResult = "chosen_inline_result" CallbackQuery = "callback_query" ShippingQuery = "shipping_query" PreCheckoutQuery = "pre_checkout_query" Poll = "poll" PollAnswer = "inline_query" MyChatMember = "my_chat_member" ChatMember = "chat_member" Text = "text" )
events
View Source
const DefaultHandlerGroup = 0
Variables ¶
View Source
var DefaultClient = &http.Client{ Timeout: time.Second * 10, }
View Source
var PARSE_MODES = []string{"markdownv2", "html", "markdown", ""}
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Token string BaseURL string BaseFileURL string Handlers map[int][]Handler Commands map[string][]Commands Client *http.Client ParseMode string Update chan types.Update Self *types.User }
func (Bot) AddStickerToSet ¶
func (Bot) AnswerCallbackQuery ¶
func (Bot) CanJoinGroups ¶
func (Bot) CanReadAllGroupMessages ¶
func (Bot) CopyMessage ¶
func (Bot) CreateChatInviteLink ¶
func (telepher Bot) CreateChatInviteLink(chat_id int, option interface{}) (*types.ChatInviteLink, error)
func (Bot) CreateNewStickerSet ¶
func (Bot) DeleteChatStickerSet ¶
func (Bot) DeleteMessage ¶
func (Bot) DeleteStickerFromSet ¶
func (Bot) EditChatInviteLink ¶
func (Bot) EditMessageLiveLocation ¶
func (Bot) EditMessageReplyMarkup ¶
func (Bot) EditMessageText ¶
func (Bot) ExportChatInviteLink ¶
func (Bot) ForwardMessage ¶
func (Bot) GetChatAdministrators ¶
func (telepher Bot) GetChatAdministrators(chat_id int) (*[]types.ChatMember, error)
func (Bot) GetChatMember ¶
func (Bot) GetMyCommands ¶
func (telepher Bot) GetMyCommands() ([]*types.BotCommand, error)
func (Bot) GetStickerSet ¶
func (telepher Bot) GetStickerSet(name string) (*types.StickerSet, error)
func (Bot) GetUpdates ¶
func (Bot) GetUserProfilePhotos ¶
func (telepher Bot) GetUserProfilePhotos(user_id int, option interface{}) (*types.UserProfilePhotos, error)
func (Bot) Hears ¶
func (telepher Bot) Hears(trigger string, handler interface{}, handlerOptions *HandlerOptions)
func (Bot) KickChatMember ¶
func (Bot) LanguageCode ¶
func (*Bot) On ¶
func (telepher *Bot) On(Type string, handler interface{}, handlerOptions *HandlerOptions)
func (Bot) PinChatMessage ¶
func (Bot) PromoteChatMember ¶
func (Bot) RestrictChatMember ¶
func (Bot) RevokeChatInviteLink ¶
func (Bot) SendAnimation ¶
func (Bot) SendChatAction ¶
func (Bot) SendContact ¶
func (Bot) SendDocument ¶
func (Bot) SendLocation ¶
func (Bot) SendMessage ¶
func (Bot) SendSticker ¶
func (Bot) SendVideoNote ¶
func (Bot) SetChatAdministratorCustomTitle ¶
func (Bot) SetChatDescription ¶
func (Bot) SetChatPermissions ¶
func (Bot) SetChatPhoto ¶
func (Bot) SetChatStickerSet ¶
func (Bot) SetMyCommands ¶
func (telepher Bot) SetMyCommands(command []types.BotCommand) (bool, error)
func (Bot) SetStickerPositionInSet ¶
func (Bot) SetStickerSetThumb ¶
func (Bot) StopMessageLiveLocation ¶
func (Bot) SupportsInlineQueries ¶
func (Bot) UnbanChatMember ¶
func (Bot) UnpinAllChatMessages ¶
func (Bot) UnpinChatMessage ¶
func (Bot) UploadStickerFile ¶
type Commands ¶
type Commands struct { Command string HandlerOptions *HandlerOptions // contains filtered or unexported fields }
type Handler ¶
type Handler struct { Type string Trigger *regexp.Regexp HandlerOptions *HandlerOptions // contains filtered or unexported fields }
type HandlerOptions ¶
type HandlerOptions struct { GroupID int // contains filtered or unexported fields }
type InlineKeyboard ¶
type InlineKeyboard struct { }
func InlineKeyboardMarkup ¶
func InlineKeyboardMarkup() *InlineKeyboard
func (InlineKeyboard) Parse ¶
func (inlineKeyboard InlineKeyboard) Parse(buttons ...[]types.InlineKeyboardButton) types.ReplyMarkup
func (InlineKeyboard) Row ¶
func (inline InlineKeyboard) Row(InlineButton ...types.InlineKeyboardButton) []types.InlineKeyboardButton
type KeyboardOptions ¶
type Options ¶
type Options struct { ParseMode string Entities []types.MessageEntity DisableWebPagePreview bool DisableNotification bool ReplyToMessageID int AllowSendingWithoutReply bool ReplyMarkup *types.ReplyMarkup Caption string CaptionEntities []types.MessageEntity Params url.Values }
type ReplyKeyboard ¶
func ReplyKeyboardMarkup ¶
func ReplyKeyboardMarkup(keyboardOptions *KeyboardOptions) *ReplyKeyboard
func (ReplyKeyboard) Parse ¶
func (replyKeyboard ReplyKeyboard) Parse(buttons ...[]types.KeyboardButton) types.ReplyMarkup
func (ReplyKeyboard) Row ¶
func (keyboard ReplyKeyboard) Row(keyboardButton ...types.KeyboardButton) []types.KeyboardButton
Source Files ¶
Click to show internal directories.
Click to hide internal directories.