Documentation ¶
Index ¶
- type CallbackQuery
- type Chat
- type ChatAdministratorRights
- type ChatInviteLink
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- type ChatMemberBanned
- type ChatMemberLeft
- type ChatMemberMember
- type ChatMemberOwner
- type ChatMemberRestricted
- type ChatMemberUpdated
- type ChatPermissions
- type ChatPhoto
- type ChatShared
- type Dice
- type ForceReply
- type IKeyboard
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InputMedia
- type InputMediaAnimation
- type InputMediaAudio
- type InputMediaDocument
- type InputMediaPhoto
- type InputMediaVideo
- type Keyboard
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestUser
- type MenuButton
- type Message
- type MessageAutoDeleteTimerChanged
- type Poll
- type PollAnswer
- type PollOption
- type ProximityAlertTriggered
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type SwitchInlineQueryChosenChat
- type UserShared
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackQuery ¶
type CallbackQuery struct { Id string `json:"id"` From *user_dto.User `json:"from"` Message *Message `json:"message,omitempty"` InlineMessageId string `json:"inline_message_id,omitempty"` ChatInstance string `json:"chat_instance,omitempty"` Data string `json:"data,omitempty"` GameShortName string `json:"game_short_name,omitempty"` }
type Chat ¶
type Chat struct { Id int64 `json:"id"` Type string `json:"type"` Title string `json:"title"` Username string `json:"username"` FirstName string `json:"first_name"` LastName string `json:"last_name"` EmojiStatusCustomEmojiId string `json:"added_to_attachment_menu"` Bio string `json:"bio"` Description string `json:"description"` InviteLink string `json:"invite_link"` Permissions string `json:"permissions"` StickerSetName string `json:"sticker_set_name"` Photo ChatPhoto `json:"photo"` ActiveUsernames []string `json:"active_usernames"` EmojiStatusExpirationDate int `json:"emoji_status_expiration_date"` SlowModeDelay int `json:"slow_mode_delay"` MessageAutoDeleteTime int `json:"message_auto_delete_time"` HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled"` HasHiddenMembers bool `json:"has_hidden_members"` HasProtectedContent bool `json:"has_protected_content"` CanSetStickerSet bool `json:"can_set_sticker_set"` IsForum bool `json:"is_forum"` HasPrivateForwards bool `json:"has_private_forwards"` HasRestrictedVoiceAndVideoMessages bool `json:"has_restricted_voice_and_video_messages"` JoinToSendMessages bool `json:"join_to_send_messages"` JoinByRequest bool `json:"join_by_request"` LinkedChatId int `json:"linked_chat_id"` Location ChatLocation `json:"location"` PinnedMessage *Message `json:"pinned_message"` }
type ChatAdministratorRights ¶
type ChatAdministratorRights struct { IsAnonymous bool `json:"is_anonymous"` CanManageChat bool `json:"can_manage_chat"` CanDeleteMessages bool `json:"can_delete_messages"` CanManageVideoChats bool `json:"can_manage_video_chats"` CanRestrictMembers bool `json:"can_restrict_members"` CanPromoteMembers bool `json:"can_promote_members"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPostMessages bool `json:"can_post_messages,omitempty"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanPostStories bool `json:"can_post_stories,omitempty"` CanEditStories bool `json:"can_edit_stories,omitempty"` CanDeleteStories bool `json:"can_delete_stories,omitempty"` CanManageTopics bool `json:"can_manage_topics,omitempty"` }
type ChatInviteLink ¶
type ChatInviteLink struct { InviteLink string `json:"invite_link"` Creator user_dto.User `json:"creator"` CreatesJoinRequest bool `json:"creates_join_request"` IsPrimary bool `json:"is_primary"` IsRevoked bool `json:"is_revoked"` Name string `json:"name,omitempty"` ExpireDate int64 `json:"expire_date,omitempty"` MemberLimit int `json:"member_limit,omitempty"` PendingJoinRequestCount int `json:"pending_join_request_count,omitempty"` }
type ChatJoinRequest ¶
type ChatLocation ¶
type ChatMember ¶
type ChatMember struct { Status string `json:"status"` User *user_dto.User `json:"user"` IsAnonymous bool `json:"is_anonymous,omitempty"` CustomTitle string `json:"custom_title,omitempty"` CanBeEdited bool `json:"can_be_edited,omitempty"` CanManageChat bool `json:"can_manage_chat,omitempty"` CanDeleteMessages bool `json:"ican_delete_messagess_anonymous,omitempty"` CanManageVideoChats bool `json:"can_manage_video_chats,omitempty"` CanRestrictMembers bool `json:"can_restrict_members,omitempty"` CanPromoteMembers bool `json:"can_promote_members,omitempty"` CanChangeInfo bool `json:"can_change_info,omitempty"` CanInviteUsers bool `json:"can_invite_users,omitempty"` CanPostMessages bool `json:"can_post_messages,omitempty"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanPostStories bool `json:"can_post_stories,omitempty"` CanEditStories bool `json:"can_edit_stories,omitempty"` CanDeleteStories bool `json:"can_delete_stories,omitempty"` CanManageTopics bool `json:"can_manage_topics,omitempty"` IsMember bool `json:"is_member,omitempty"` CanSendMessages bool `json:"can_send_messages,omitempty"` CanSendAudios bool `json:"can_send_audios,omitempty"` CanSendDocuments bool `json:"can_send_documents,omitempty"` CanSendPhotos bool `json:"can_send_photos,omitempty"` CanSendVideos bool `json:"can_send_videos,omitempty"` CanSendVideoNotes bool `json:"can_send_video_notes,omitempty"` CanSendVoiceNotes bool `json:"can_send_voice_notes,omitempty"` CanSendPolls bool `json:"can_send_polls,omitempty"` CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"` CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"` UntilDate int `json:"until_date,omitempty"` }
type ChatMemberAdministrator ¶
type ChatMemberAdministrator struct { Status string `json:"status"` User user_dto.User `json:"user"` CanBeEdited bool `json:"can_be_edited"` IsAnonymous bool `json:"is_anonymous"` CanManageChat bool `json:"can_manage_chat"` CanDeleteMessages bool `json:"ican_delete_messagess_anonymous"` CanManageVideoChats bool `json:"can_manage_video_chats"` CanRestrictMembers bool `json:"can_restrict_members"` CanPromoteMembers bool `json:"can_promote_members"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPostMessages bool `json:"can_post_messages,omitempty"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanPostStories bool `json:"can_post_stories,omitempty"` CanEditStories bool `json:"can_edit_stories,omitempty"` CanDeleteStories bool `json:"can_delete_stories,omitempty"` CanManageTopics bool `json:"can_manage_topics,omitempty"` CustomTitle string `json:"custom_title,omitempty"` }
type ChatMemberBanned ¶
type ChatMemberLeft ¶
type ChatMemberMember ¶
type ChatMemberOwner ¶
type ChatMemberRestricted ¶
type ChatMemberRestricted struct { Status string `json:"status"` User user_dto.User `json:"user"` IsMember bool `json:"is_member"` CanSendMessages bool `json:"can_send_messages"` CanSendAudios bool `json:"can_send_audios"` CanSendDocuments bool `json:"can_send_documents"` CanSendPhotos bool `json:"can_send_photos"` CanSendVideos bool `json:"can_send_videos"` CanSendVideoNotes bool `json:"can_send_video_notes"` CanSendVoiceNotes bool `json:"can_send_voice_notes"` CanSendPolls bool `json:"can_send_polls"` CanSendOtherMessages bool `json:"can_send_other_messages"` CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPinMessages bool `json:"can_pin_messages"` CanManageTopics bool `json:"can_manage_topics"` UntilDate int `json:"until_date"` }
type ChatMemberUpdated ¶
type ChatMemberUpdated struct { Chat Chat `json:"chat"` From user_dto.User `json:"from"` Date int `json:"date"` OldChatMember ChatMember `json:"old_chat_member"` NewChatMember ChatMember `json:"new_chat_member"` InviteLink ChatMember `json:"invite_link,omitempty"` ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link,omitempty"` }
type ChatPermissions ¶
type ChatPermissions struct { CanSendMessages bool `json:"can_send_messages"` CanSendAudios bool `json:"can_send_audios"` CanSendDocuments bool `json:"can_send_documents"` CanSendPhotos bool `json:"can_send_photos"` CanSendVideos bool `json:"can_send_videos"` CanSendVideoNotes bool `json:"can_send_video_notes"` CanSendVoiceNotes bool `json:"can_send_voice_notes"` CanSendPolls bool `json:"can_send_polls"` CanSendOtherMessages bool `json:"can_send_other_messages"` CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPinMessages bool `json:"can_pin_messages"` CanManageTopics bool `json:"can_manage_topics"` }
type ChatPhoto ¶
type ForceReply ¶
type ForceReply struct { InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` ForceReply bool `json:"force_reply,omitempty"` Selective bool `json:"selective,omitempty"` }
https://core.telegram.org/bots/api#forcereply
func (*ForceReply) GetType ¶
func (k *ForceReply) GetType()
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { Text string `json:"text"` Url string `json:"url,omitempty"` CallbackData string `json:"callback_data,omitempty"` WebApp *utils_dto.WebAppInfo `json:"web_app,omitempty"` LoginUrl *utils_dto.LoginUrl `json:"login_url,omitempty"` SwitchInlineQuery string `json:"switch_inline_query,omitempty"` SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"` SwitchInlineQueryChosenChat SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"` CallbackGame any `json:"callback_game,omitempty"` Pay bool `json:"pay,omitempty"` }
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard,omitempty"`
}
https://core.telegram.org/bots/api#inlinekeyboardmarkup
func (*InlineKeyboardMarkup) GetType ¶
func (k *InlineKeyboardMarkup) GetType()
type InputMedia ¶
type InputMedia interface {
GetTypeMedia() string
}
type InputMediaAnimation ¶
type InputMediaAnimation struct { Type string `json:"type"` Media string `json:"media"` Thumbnail string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Duration int `json:"duration,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` }
https://core.telegram.org/bots/api#inputmediaanimation
func (*InputMediaAnimation) GetTypeMedia ¶
func (m *InputMediaAnimation) GetTypeMedia() string
type InputMediaAudio ¶
type InputMediaAudio struct { Type string `json:"type"` Media string `json:"media"` Thumbnail string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` Duration int `json:"duration,omitempty"` Performer string `json:"performer,omitempty"` Title string `json:"title,omitempty"` }
https://core.telegram.org/bots/api#inputmediaaudio
func (*InputMediaAudio) GetTypeMedia ¶
func (m *InputMediaAudio) GetTypeMedia() string
type InputMediaDocument ¶
type InputMediaDocument struct { Type string `json:"type"` Media string `json:"media"` Thumbnail string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"` }
https://core.telegram.org/bots/api#inputmediadocument
func (*InputMediaDocument) GetTypeMedia ¶
func (m *InputMediaDocument) GetTypeMedia() string
type InputMediaPhoto ¶
type InputMediaPhoto struct { Type string `json:"type"` Media string `json:"media"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` }
https://core.telegram.org/bots/api#inputmediaphoto
func (*InputMediaPhoto) GetTypeMedia ¶
func (m *InputMediaPhoto) GetTypeMedia() string
type InputMediaVideo ¶
type InputMediaVideo struct { Type string `json:"type"` Media string `json:"media"` Thumbnail string `json:"thumbnail,omitempty"` Caption string `json:"caption,omitempty"` ParseMode string `json:"parse_mode,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Duration int `json:"duration,omitempty"` SupportsStreaming bool `json:"supports_streaming,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` }
https://core.telegram.org/bots/api#inputmediavideo
func (*InputMediaVideo) GetTypeMedia ¶
func (m *InputMediaVideo) GetTypeMedia() string
type KeyboardButton ¶
type KeyboardButton struct { Text string `json:"text"` RequestUser *KeyboardButtonRequestUser `json:"is_persistent,omitempty"` RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"` RequestContact *bool `json:"request_contact,omitempty"` RequestLocation *bool `json:"request_location,omitempty"` RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"` WebApp *utils_dto.WebAppInfo `json:"web_app,omitempty"` }
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
Type int64 `json:"type,omitempty"`
}
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct { RequestId int64 `json:"request_id"` ChatIsChannel bool `json:"chat_is_channel,omitempty"` ChatIsForum bool `json:"chat_is_forum,omitempty"` ChatHasUsername bool `json:"chat_has_username,omitempty"` ChatIsCreated bool `json:"chat_is_created,omitempty"` BotIsMember bool `json:"bot_is_member,omitempty"` UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"` }
https://core.telegram.org/bots/api#keyboardbuttonrequestchat
type KeyboardButtonRequestUser ¶
type KeyboardButtonRequestUser struct { RequestId int64 `json:"request_id"` UserIsNot bool `json:"user_is_bot,omitempty"` UserIsPremium bool `json:"user_is_premium,omitempty"` }
https://core.telegram.org/bots/api#keyboardbuttonrequestuser
type MenuButton ¶
type MenuButton struct { Type string `json:"type"` Text string `json:"text"` WebApp *utils_dto.WebAppInfo `json:"web_app"` }
type Message ¶
type Message struct { MessageId int `json:"message_id"` MessageThreadId int `json:"message_thread_id"` Text string `json:"text"` From user_dto.User `json:"from"` SenderChat Chat `json:"sender_chat"` Date int `json:"date"` Chat Chat `json:"chat"` ForwardFrom *user_dto.User `json:"forward_from,omitempty"` ForwardFromChat *Chat `json:"forward_from_chat,omitempty"` ForwardFromMessageId int `json:"forward_from_message_id,omitempty"` ForwardSignature string `json:"forward_signature,omitempty"` ForwardSenderName string `json:"forward_sender_name,omitempty"` ForwardDate int `json:"forward_date,omitempty"` IsTopicMessage bool `json:"is_topic_message,omitempty"` IsAutomaticForward bool `json:"is_automatic_forward,omitempty"` ReplyToMessage *Message `json:"reply_to_message,omitempty"` ViaBot *user_dto.User `json:"via_bot,omitempty"` EditDate int `json:"edit_date,omitempty"` HasProtectedContent bool `json:"has_protected_content,omitempty"` MediaGroupId string `json:"media_group_id,omitempty"` AuthorSignature string `json:"author_signature,omitempty"` Entities []message_entity_dto.MessageEntity `json:"entities,omitempty"` Animation *utils_dto.Animation `json:"animation,omitempty"` Audio *utils_dto.Audio `json:"audio,omitempty"` Document *utils_dto.Document `json:"document,omitempty"` Photo []*utils_dto.PhotoSize `json:"photo,omitempty"` Sticker *stickers_dto.Sticker `json:"sticker,omitempty"` Story any `json:"story,omitempty"` Video *video_dto.Video `json:"video,omitempty"` VideoNote *video_dto.VideoNote `json:"video_note,omitempty"` Voice *utils_dto.Voice `json:"voice,omitempty"` Caption string `json:"caption,omitempty"` CaptionEntities []message_entity_dto.MessageEntity `json:"caption_entities,omitempty"` HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"` Contact *user_dto.Contact `json:"contact,omitempty"` Dice Dice `json:"dice,omitempty"` Game *game_dto.Game `json:"game,omitempty"` Poll *Poll `json:"poll,omitempty"` Venue *utils_dto.Venue `json:"venue,omitempty"` Location *utils_dto.Location `json:"location,omitempty"` NewChatMembers []*user_dto.User `json:"new_chat_members,omitempty"` LeftChatMember *user_dto.User `json:"left_chat_member,omitempty"` NewChatTitle string `json:"new_chat_title,omitempty"` NewChatPhoto []*utils_dto.PhotoSize `json:"new_chat_photo,omitempty"` DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"` GroupChatCreated bool `json:"group_chat_created,omitempty"` SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"` ChannelChatCreated bool `json:"channel_chat_created,omitempty"` MessageAutoDeleteTimerChanged MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"` MigrateToChatId int `json:"migrate_to_chat_id,omitempty"` MigrateFromChatId int `json:"migrate_from_chat_id,omitempty"` PinnedMessage *Message `json:"pinned_message,omitempty"` Invoice *payment_dto.Invoice `json:"invoice,omitempty"` SuccessfulPayment *payment_dto.SuccessfulPayment `json:"successful_payment,omitempty"` ConnectedWebsite string `json:"connected_website,omitempty"` WriteAccessAllowed *utils_dto.WriteAccessAllowed `json:"write_access_allowed,omitempty"` PassportData *passport_dto.PassportData `json:"passport_data,omitempty"` ProximityAlertTriggered ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` ForumTopicCreated *forum_dto.ForumTopicCreated `json:"forum_topic_created,omitempty"` ForumTopicEdited *forum_dto.ForumTopicEdited `json:"forum_topic_edited,omitempty"` ForumTopicClosed any `json:"forum_topic_closed,omitempty"` ForumTopicReopened any `json:"forum_topic_reopened,omitempty"` GeneralForumTopicHidden any `json:"general_forum_topic_hidden,omitempty"` VideoChatScheduled *video_dto.VideoChatScheduled `json:"video_chat_scheduled,omitempty"` VideoChatStarted any `json:"video_chat_started,omitempty"` VideoChatParticipantsInvited *video_dto.VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"` WebAppData *utils_dto.WebAppData `json:"web_app_data,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}
https://core.telegram.org/bots/api#messageautodeletetimerchanged
type Poll ¶
type Poll struct { Id string `json:"id"` Question string `json:"question"` Explanation string `json:"explanation,omitempty"` Type string `json:"type"` TotalVoterCount int `json:"total_voter_count"` CorrectOptionId int `json:"correct_option_id,omitempty"` OpenPeriod int `json:"open_period,omitempty"` CloseDate int `json:"close_date,omitempty"` ExplanationEntities []*message_entity_dto.MessageEntity `json:"explanation_entities,omitempty"` Options []PollOption `json:"options"` IsClosed bool `json:"is_closed"` IsAnonymous bool `json:"is_anonymous"` AllowsMultipleAnswers bool `json:"allows_multiple_answers"` }
type PollAnswer ¶
type PollOption ¶
type ProximityAlertTriggered ¶
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct { Keyboard [][]KeyboardButton `json:"keyboard"` IsPersistent bool `json:"is_persistent,omitempty"` ResizeKeyboard bool `json:"resize_keyboard,omitempty"` OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"` Selective bool `json:"selective,omitempty"` InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` }
https://core.telegram.org/bots/api#replykeyboardmarkup
func (*ReplyKeyboardMarkup) GetType ¶
func (k *ReplyKeyboardMarkup) GetType()
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct { RemoveKeyboard bool `json:"remove_keyboard"` Selective bool `json:"selective,omitempty"` }
https://core.telegram.org/bots/api#replykeyboardremove
func (*ReplyKeyboardRemove) GetType ¶
func (k *ReplyKeyboardRemove) GetType()
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct { Query string `json:"query,omitempty"` AllowUserChats bool `json:"allow_user_chats,omitempty"` AllowBotChats bool `json:"allow_bot_chats,omitempty"` AllowGroupChats bool `json:"allow_group_chats,omitempty"` AllowChannelChats bool `json:"allow_channel_chats,omitempty"` }
https://core.telegram.org/bots/api#switchinlinequerychosenchat