Documentation ¶
Index ¶
- func AnswerCallbackQuery()
- func EditMessageText(token string, opts map[string]any) error
- func SetMyCommands(token string, opts map[string]any) error
- type BotCommand
- type BotCommandScope
- type CallbackQuery
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type Message
- type MessageEntity
- type Result
- type Sticker
- type Update
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnswerCallbackQuery ¶
func AnswerCallbackQuery()
func EditMessageText ¶
opts.chat_id? {string}
opts.message_id? {string}
opts.inline_message_id? {string}
opts.text {string}
opts.parse_mode? {MarkdownV2 | HTML | Markdown}
opts.entities? {[]MessageEntity}
opts.disable_web_page_preview? {bool}
opts.reply_markup {InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply}
Types ¶
type BotCommand ¶
type BotCommandScope ¶
type CallbackQuery ¶
type InlineKeyboardButton ¶
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboards [][]*InlineKeyboardButton `json:"inline_keyboard"`
}
type InlineQuery ¶
type Message ¶
type Message struct { MessageId int `json:"message_id"` From *struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` Language string `json:"language_code"` } `json:"from"` Chat *struct { Id int `json:"id"` FirstName string `json:"first_name"` Username string `json:"username"` Type string `json:"type"` AllMembersAreAdministrators bool `json:"all_members_are_administrators"` } `json:"chat"` Date int `json:"date"` Text string `json:"text,omitempty"` Sticker *Sticker `json:"sticker,omitempty"` LeftChatParticipant *struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` } `json:"left_chat_participant,omitempty"` LeftChatMember *struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` } `json:"left_chat_member,omitempty"` // https://core.telegram.org/bots/api#messageentity Entities []*MessageEntity `json:"entities,omitempty"` NewChatParticipant *struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` } `json:"new_chat_participant,omitempty"` NewChatMember *struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` } `json:"new_chat_member,omitempty"` NewChatMembers []*struct { Id int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` } `json:"new_chat_members,omitempty"` }
func SendMessage ¶
opts.chat_id {string | int}
opts.message_thread_id? {int}
opts.text {string}
opts.parse_mode? {MarkdownV2 | HTML | Markdown}
opts.entities? {[]MessageEntity}
opts.disable_web_page_preview? {bool}
opts.disable_notification {bool}
opts.protect_content {bool}
opts.reply_to_message_id {int}
opts.allow_sending_without_reply {bool}
opts.reply_markup {InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply}
type MessageEntity ¶
type MessageEntity struct { Offset int `json:"offset"` Length int `json:"length"` /* mention | hashtag | cashtag | bot_command | url | email | phone_number | bold | italic | text_mention | spoiler | strikethrough | underline ...*/ Type string `json:"type"` Url string `json:"url"` User *User `json:"user"` Language string `json:"language"` CustomEmojiId string `json:"custom_emoji_id"` }
type Sticker ¶
type Sticker struct { Thumbnail *struct { FileId string `json:"file_id"` FileUniqueId string `json:"file_unique_id"` FileSize int `json:"file_size"` Width int `json:"width"` Height int `json:"height"` } `json:"thumbnail,omitempty"` Thumb *struct { FileId string `json:"file_id"` FileUniqueId string `json:"file_unique_id"` FileSize int `json:"file_size"` Width int `json:"width"` Height int `json:"height"` } `json:"thumb,omitempty"` FileId string `json:"file_id,omitempty"` FileUniqueId string `json:"file_unique_id,omitempty"` FileSize int `json:"file_size,omitempty"` }
type Update ¶
type Update struct { UpdateId int `json:"update_id"` Message *Message `json:"message,omitempty"` CallbackQuery *CallbackQuery `json:"callback_query,omitempty"` InlineQuery *InlineQuery `json:"inline_query,omitempty"` }