Documentation
¶
Index ¶
- func BuildResultStyling(ctx context.Context, resp *types.SearchResponse, botUsername ...string) []styling.StyledTextOption
- func BuildSearchReplyMarkup(ctx context.Context, currentPage int64, data types.SearchRequest) (*tg.ReplyInlineMarkup, error)
- func GetChatDBFromUpdateArgs(ctx *ext.Context, update *ext.Update) (*database.IndexChat, error)
- func GetMessageByID(ctx *ext.Context, chatID int64, msgID int) (*tg.Message, error)
- func GetUpdateChatID(u *ext.Update) int64
- func GetUpdatePeerUser(u *ext.Update) *tg.PeerUser
- func MD5Hash(str string) string
- func NewDownloader(file TGFile) *downloader.Builder
- type MessageMediaExtractResult
- type TGFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildResultStyling ¶
func BuildResultStyling(ctx context.Context, resp *types.SearchResponse, botUsername ...string) []styling.StyledTextOption
func BuildSearchReplyMarkup ¶
func BuildSearchReplyMarkup(ctx context.Context, currentPage int64, data types.SearchRequest) (*tg.ReplyInlineMarkup, error)
func GetChatDBFromUpdateArgs ¶
func GetMessageByID ¶ added in v0.12.0
func GetUpdateChatID ¶ added in v0.8.0
func NewDownloader ¶ added in v0.12.0
func NewDownloader(file TGFile) *downloader.Builder
Types ¶
type MessageMediaExtractResult ¶ added in v1.0.0
type MessageMediaExtractResult struct {
Text string
Ocred string
Type types.MessageType
}
func ExtractMessageMediaText ¶ added in v0.17.1
func ExtractMessageMediaText(ctx context.Context, client *ext.Context, media tg.MessageMediaClass, downloadMedia bool) *MessageMediaExtractResult
type TGFile ¶ added in v0.12.0
type TGFile interface {
Location() tg.InputFileLocationClass
Client() downloader.Client // witch client to use for downloading
Size() int64
Name() string
}
func FileFromMedia ¶ added in v0.12.0
func FileFromMedia(media tg.MessageMediaClass, client downloader.Client) (TGFile, error)
func NewTGFile ¶ added in v0.12.0
func NewTGFile( location tg.InputFileLocationClass, client downloader.Client, size int64, name string, ) TGFile
Click to show internal directories.
Click to hide internal directories.