Documentation
¶
Index ¶
- func AlertCallback(bot *tgbotapi.BotAPI, cbId string, message string, ...) (tgbotapi.Message, error)
- func CreatePermanentInviteLink(token string, chatId int64) (ret string, err error)
- func EditMessage(bot *tgbotapi.BotAPI, chatId int64, editMessageID int, text string, ...) (tgbotapi.Message, error)
- func EditMessageCaption(bot *tgbotapi.BotAPI, chatId int64, editMessageID int, caption string, ...) (tgbotapi.Message, error)
- func GenUserLink(userID int64) string
- func GenUserNameLink(userName string) string
- func GetChatDesc(bot *tgbotapi.BotAPI, chatID int64) (tgbotapi.Chat, error)
- func HtmlLinkText(showText, linkText string) string
- func ImpGroup() group
- func ImpInline() inLine
- func MarkdownCopyText(showText string) string
- func MarkdownLinkText(showText, linkText string) string
- func PingMessage(bot *tgbotapi.BotAPI, chatID int64, messagaId int, notifaicationFlag bool) error
- func SendAnimation(bot *tgbotapi.BotAPI, chatID int64, ...) (messageID int, animationFileId string, err error)
- func SendMessage(bot *tgbotapi.BotAPI, chatId int64, message string, ...) (*tgbotapi.Message, error)
- func SendMessageByAutoDel(bot *tgbotapi.BotAPI, chatId int64, message string, ...) error
- func SendMessageByToken(token string, toChatId int64, message string, configFn func(values url.Values)) error
- func SendPhoto(bot *tgbotapi.BotAPI, chatId int64, ...) (messageID int, imageFileId string, err error)
- func SendPhotoByToken(token string, toChatId int64, photoName string, photoData []byte, ...) error
- func WebhookHandler(w http.ResponseWriter, r *http.Request, cbFun func(update tgbotapi.Update))
- type BotInfo
- type ChatResp
- type ErrStatus
- type InviteTempData
- type TelegramChat
- type TelegramUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlertCallback ¶ added in v1.0.22
func CreatePermanentInviteLink ¶ added in v1.0.17
生成群永久链接,这个链接中永久的,唯一的,多次生成,则新的替换成旧的 。
func EditMessage ¶ added in v1.0.21
func EditMessageCaption ¶ added in v1.0.21
func GenUserLink ¶ added in v1.0.12
func GenUserNameLink ¶ added in v1.1.0
func GetChatDesc ¶ added in v1.1.0
func HtmlLinkText ¶ added in v1.0.11
func MarkdownCopyText ¶ added in v1.0.11
func MarkdownLinkText ¶ added in v1.0.11
关于markdown 格式的特别显示
func PingMessage ¶ added in v1.1.4
func SendAnimation ¶ added in v1.0.8
func SendAnimation(bot *tgbotapi.BotAPI, chatID int64, animationFileFn func() tgbotapi.RequestFileData, configCb func(photoConfig *tgbotapi.AnimationConfig)) (messageID int, animationFileId string, err error)
func SendMessage ¶
func SendMessageByAutoDel ¶ added in v1.0.10
func SendMessageByToken ¶ added in v1.0.4
func SendPhoto ¶ added in v1.0.6
func SendPhoto(bot *tgbotapi.BotAPI, chatId int64, imageFileFn func() tgbotapi.RequestFileData, configCb func(photoConfig *tgbotapi.PhotoConfig)) (messageID int, imageFileId string, err error)
func SendPhotoByToken ¶ added in v1.0.18
func WebhookHandler ¶ added in v1.0.19
Types ¶
type BotInfo ¶ added in v1.1.5
type BotInfo struct { Ok bool `json:"ok"` Result struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` CanJoinGroups bool `json:"can_join_groups"` CanReadAllGroupMessages bool `json:"can_read_all_group_messages"` SupportsInlineQueries bool `json:"supports_inline_queries"` } `json:"result"` }
func GetBotInfo ¶ added in v1.1.5
type InviteTempData ¶ added in v1.0.17
type TelegramChat ¶ added in v1.1.2
type TelegramChat struct { ID int64 `json:"id"` Type string `json:"type"` // "group", "supergroup", "channel" Title string `json:"title"` // 群组或频道的名称 Username string `json:"username"` // 可能为空 Description string `json:"description"` // 仅频道有 InviteLink string `json:"invite_link"` }
群组/频道信息
func GetChatByToken ¶ added in v1.1.1
type TelegramUser ¶ added in v1.1.2
type TelegramUser struct { ID int64 `json:"id"` Type string `json:"type"` // 必须是 "private" Username string `json:"username"` // 可能为空 FirstName string `json:"first_name"` LastName string `json:"last_name"` }
用户信息
func GetUserByToken ¶ added in v1.1.2
Click to show internal directories.
Click to hide internal directories.