Documentation
¶
Index ¶
Constants ¶
View Source
const (
PER_SEARCH_LIMIT = 12
)
Variables ¶
View Source
var MessageTypeToEmoji = map[MessageType]string{ MessageTypeText: "💬", MessageTypePhoto: "🖼️", MessageTypeVideo: "🎥", MessageTypeDocument: "📄", MessageTypeVoice: "🎙️", MessageTypeAudio: "🎵", MessageTypePoll: "📊", MessageTypeStory: "🪟", }
View Source
var (
StickerFileNames = []string{"sticker.webp", "sticker.webm"}
)
Functions ¶
This section is empty.
Types ¶
type MessageDocument ¶
type MessageDocument struct {
// Telegram MessageID
ID int64 `json:"id"`
Type int `json:"type"`
// The original text of the message
Message string `json:"message"`
// The ID of the user who sent the message
UserID int64 `json:"user_id"`
ChatID int64 `json:"chat_id"`
Timestamp int64 `json:"timestamp"`
}
type MessageSearchResponse ¶
type MessageSearchResponse struct {
Hits []SearchHit `json:"hits,omitempty"`
ProcessingTimeMs int64 `json:"processingTimeMs,omitempty"`
Offset int64 `json:"offset,omitempty"`
Limit int64 `json:"limit,omitempty"`
EstimatedTotalHits int64 `json:"estimatedTotalHits,omitempty"`
SemanticHitCount int64 `json:"semanticHitCount,omitempty"`
Raw any
}
type MessageType ¶
type MessageType int
const ( MessageTypeText MessageType = iota MessageTypePhoto MessageTypeVideo MessageTypeDocument MessageTypeVoice MessageTypeAudio MessageTypePoll MessageTypeStory )
type SearchRequest ¶
Click to show internal directories.
Click to hide internal directories.