Documentation ¶
Overview ¶
This package define all inline type used in Telegram Bot API.
More information : https://core.telegram.org/bots/api#inline-mode
This package define all type used in Telegram Bot API.
More information : https://core.telegram.org/bots/api#available-types
Index ¶
- type Audio
- type Chat
- type ChosenInlineResult
- type Contact
- type Document
- type File
- type ForceReply
- type GroupChat
- type InlineQuery
- type InlineQueryResult
- type InlineQueryResultArticle
- type InlineQueryResultGif
- type InlineQueryResultMpeg4Gif
- type InlineQueryResultPhoto
- type InlineQueryResultVideo
- type Location
- type Message
- type PhotoSize
- type ReplyKeyboardHide
- type ReplyKeyboardMarkup
- type ReplyMarkup
- type Sticker
- type Update
- type User
- type UserProfilePhotos
- type Video
- type Voice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audio ¶
type Audio struct { // Unique identifier for this file FileId string `json:"file_id"` // Duration of the audio in seconds as defined by sender Duration float64 `json:"duration"` // Optional. Performer of the audio as defined by sender or by audio tags Performer string `json:"performer"` // Optional. Title of the audio as defined by sender or by audio tags Title string `json:"title"` // Optional. MIME type of the file as defined by sender MimeType string `json:"mime_type"` // Optional. File size FileSize float64 `json:"file_size"` }
This object represents an audio file to be treated as music by the Telegram clients. Optional means this variable could be nil or empty.
type Chat ¶
type Chat struct { Id float64 `json:"id"` Type string `json:"type"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Username string `json:"username"` Title string `json:"title"` }
Chat object. Representatives GroupChat and User Chat. Optional means this variable could be nil or empty.
type ChosenInlineResult ¶
type Contact ¶
type Contact struct { PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Username string `json:"username"` }
This object represents a phone contact.
type Document ¶
type Document struct { // Unique file identifier FileId string `json:"file_id"` // Optional. Document thumbnail as defined by sender Thumb PhotoSize `json:"thumb"` // Optional. Original filename as defined by sender FileName string `json:"file_name"` // Optional. MIME type of the file as defined by sender MimeType string `json:"mime_type"` // Optional. File size FileSize float64 `josn:"file_size"` }
This object represents a general file (as opposed to photos, voice messages and audio files). Optional means this variable could be nil or empty.
type ForceReply ¶
func (*ForceReply) ToJson ¶
func (rkm *ForceReply) ToJson() (string, error)
type GroupChat ¶
type GroupChat struct { // Unique identifier for this group chat Id float64 `json:"id"` // Group name Title string `json:"title"` }
GroupChat object. Optional means this variable could be nil or empty.
type InlineQuery ¶
type InlineQueryResult ¶
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct { InlineQueryResult Title string `json:"title"` MessageText string `json:"message_text"` Url string `json:"url,omitempty"` HideUrl bool `json:"hide_url,omitempty"` Description string `json:"description,omitempty"` ThumbUrl string `json:"thumb_url,omitempty"` ThumbWidth float64 `json:"thumb_width,omitempty"` ThumbHeight float64 `json:"thumb_height,omitempty"` }
func NewInlineQueryResultArticl ¶
func NewInlineQueryResultArticl() *InlineQueryResultArticle
type InlineQueryResultGif ¶
type InlineQueryResultGif struct { InlineQueryResult GifUrl string `json:"gif_url"` GifWidth float64 `json:"gif_width,omitempty"` GifHeight float64 `json:"gif_height,omitempty"` ThumbUrl string `json:"thumb_url"` Title string `json:"title,omitempty"` Caption string `json:"caption,omitempty"` MessageText string `json:"message_text,omitempty"` }
func NewInlineQueryResultGif ¶
func NewInlineQueryResultGif() *InlineQueryResultGif
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct { InlineQueryResult Mpeg4Url string `json:"mpeg4_url"` Mpeg4Width float64 `json:"mpeg4_width,omitempty"` Mpeg4Height float64 `json:"mpeg4_height,omitempty"` ThumbUrl string `json:"thumb_url"` Title string `json:"title,omitempty"` Caption string `json:"caption,omitempty"` MessageText string `json:"message_text,omitempty"` }
func NewInlineQueryResultMpeg4Gif ¶
func NewInlineQueryResultMpeg4Gif() *InlineQueryResultMpeg4Gif
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { InlineQueryResult PhotoUrl string `json:"photo_url"` PhotoWidth float64 `json:"photo_width,omitempty"` PhotoHeight float64 `json:"photo_height,omitempty"` ThumbUrl string `json:"thumb_url"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Caption string `json:"caption,omitempty"` MessageText string `json:"message_text,omitempty"` }
func NewInlineQueryResultPhoto ¶
func NewInlineQueryResultPhoto() *InlineQueryResultPhoto
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { InlineQueryResult VideoUrl string `json:"video_url"` MimeType string `json:"mime_type"` MessageText string `json:"message_text"` VideoWidth float64 `json:"video_width,omitempty"` VideoHeight float64 `json:"video_height,omitempty"` VideoDuration float64 `json:"video_duration,omitempty"` Title string `json:"title"` ThumbUrl string `json:"thumb_url"` Description string `json:"description,omitempty"` }
func NewInlineQueryResultVideo ¶
func NewInlineQueryResultVideo() *InlineQueryResultVideo
type Message ¶
type Message struct { // Unique message identifier Message_Id float64 `josn:"message_id"` // Sender From *User `json:"from"` // Date the message was sent. Date float64 `json:"date"` // Conversation the message belongs to. Chat *Chat `json:"chat"` // Optional. For forwarded messages, sender of the original message ForwardFrom *User `json:"forward_from,omitempty"` // Optional. For forwarded messages, date the original message was sent. ForwardDate float64 `json:"forward_date,omitempty"` // Optional. For text messages Text string `json:"text,omitempty"` // Optional. Message is an audio file Audio *Audio `json:"audio,omitempty"` // Optional. Message is a general file Document *Document `json:"document,omitempty"` // Optional. Message is a photo Photo *[]*PhotoSize `json:"photo,omitempty"` // Optional. Message is a sticker Sticker *Sticker `json:"sticker,omitempty"` // Optional. Message is a video Video *Video `json:"video,omitempty"` // Optional. Message is a voice message Voice *Voice `json:"voice,omitempty"` // Optional. Caption for the photo or video Caption string `json:"caption,omitempty"` // Optional. Message is a shared contact Contact *Contact `json:"contact,omitempty"` // Optional. Message is a shared location Location *Location `json:"location,omitempty"` // Optional. A new member was added to the group NewChatParticipant *User `json:"new_chat_participant,omitempty"` // Optional. A member was removed from the group LeftChatParticipant *User `json:"left_chat_participant,omitempty"` // Optional. A group title was changed to this value NewChatTitle string `json:"new_chat_title,omitempty"` // Optional. A group photo was change to this value NewChatPhoto *[]*PhotoSize `json:"new_chat_photo,omitempty"` // Optional. Informs that the group photo was deleted DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"` // Optional. Informs that the group has been created GroupChatCreated bool `json:"group_chat_created,omitempty"` }
Message object. Optional means this variable could be nil or empty.
type PhotoSize ¶
type PhotoSize struct { // Unique identifier for this file FileId string `json:"file_id"` // Photo width Width float64 `json:"width"` // Photo height Height float64 `json:"height"` // Optional. File size FileSize float64 `json:"file_size"` }
This object represents one size of a photo or a file / sticker thumbnail. Optional means this variable could be nil or empty.
type ReplyKeyboardHide ¶
type ReplyKeyboardHide struct { HideKeyboard bool `json:"hide_keyboard"` Selective bool `json:"selective"` }
func (*ReplyKeyboardHide) ToJson ¶
func (rkm *ReplyKeyboardHide) ToJson() (string, error)
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct { Keyboard [][]string `json:"keyboard"` ResizeKeyboard bool `json:"resize_keyboard,omitempty"` OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"` Selective bool `json:"selective,omitempty"` }
func (*ReplyKeyboardMarkup) ToJson ¶
func (rkm *ReplyKeyboardMarkup) ToJson() (string, error)
type ReplyMarkup ¶
type Sticker ¶
type Sticker struct { // Unique identifier for this file FileId string `json:"file_id"` // Optional. Sticker thumbnail in .webp or .jpg format Thumb PhotoSize `json:"thumb"` // Optional. File size FileSize float64 `josn:"file_size"` // contains filtered or unexported fields }
This object represents a sticker. Optional means this variable could be nil or empty.
type Update ¶
type Update struct { // The update‘s unique identifier. UpdateId float64 `json:"update_id"` // Optional. New incoming message of any kind Message *Message `json:"message,omitempty"` // Optional. New incoming inline query InlineQuery *InlineQuery `json:"inline_query,omitempty"` // Optional. The result of a inline query that was chosen by a user and sent to their chat partner ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"` }
Update object. Optional means this variable could be nil or empty.
type User ¶
type User struct { // Unique identifier for this user or bot Id float64 `json:"id"` // User‘s or bot’s first name FirstName string `json:"first_name"` // Optional. User‘s or bot’s last name LastName string `json:"last_name"` // Optional. User‘s or bot’s username Username string `json:"username"` }
User object. Optional means this variable could be nil or empty.