Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OutboxBufferSize = 100 // compile time info VERSION = "" )
View Source
var TChatTypeMap = map[string]ChatType{ "private": Private, "group": Group, "supergroup": SuperGroup, "channel": Channel, }
TChatTypeMap maps betwwen string to bot.ChatType
Functions ¶
Types ¶
type ChannelMigratedMessage ¶
type Message ¶
type Message struct {
ID string
From User
Date time.Time
Chat Chat
Text string
Format MessageFormat
ReplyMessageID string
ReceivedAt time.Time
Raw json.RawMessage `json:"-"`
Retry int `json:"-"`
DiscardAfter time.Time `json:"-"`
}
Message represents chat message
type MessageFormat ¶
type MessageFormat string
MessageFormat represents formatting of the message
const ( Text MessageFormat = "" Markdown MessageFormat = "markdown" HTML MessageFormat = "html" )
Available MessageFormat
type TMessage ¶
type TMessage struct {
MessageID int64 `json:"message_id"`
From TUser `json:"from"`
Date int64 `json:"date"`
Chat TChat `json:"chat"`
Text string `json:"text"`
ParseMode string `json:"parse_mode,omitempty"`
MigrateToChatID *int64 `json:"migrate_to_chat_id,omitempty"`
ReceivedAt time.Time `json:"-"`
}
TMessage is Telegram incomming message
type TOutMessage ¶
type TOutMessage struct {
ChatID string `json:"chat_id"`
Text string `json:"text"`
ParseMode string `json:"parse_mode,omitempty"`
}
TOutMessage is Telegram outgoing message
type TResponse ¶
type TResponse struct {
Ok bool `json:"ok"`
Result json.RawMessage `json:"result,omitempty"`
ErrorCode int64 `json:"error_code,omitempty"`
Description string `json:"description"`
}
TResponse represents response from telegram
type TUpdate ¶
type TUpdate struct {
UpdateID int64 `json:"update_id"`
Message json.RawMessage `json:"message"`
}
TUpdate represents an update event from telegram
type TUser ¶
type TUser struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
}
TUser is Telegram User
Click to show internal directories.
Click to hide internal directories.