telegram

package
v0.0.0-...-79821a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_QUALITY     = 4320 // 8K
	FAST_DELETE_TIMEOUT = 1
	TIME_SHIFT_MSG      = 500
	DEFAULT_TIMEOUT     = FAST_DELETE_TIMEOUT
)
View Source
const (
	ActualState     = "ActualState"
	CleanHistory    = "CleanHistory"
	RemoveFromQueue = "RemoveFromQueue"
	ViewQueue       = "ViewQueue"
	LinksForUtil    = "LinksForUtil"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func (*Bot) Bot

func (b *Bot) Bot() *tgbotapi.BotAPI

func (*Bot) Processor

func (b *Bot) Processor(ctx context.Context)

type BotConfig

type BotConfig struct {
	Token         string
	AllowedChatID []string
	AdminChatID   []string
}

type BotModel

type BotModel interface {
	Processor(ctx context.Context)
	Bot() *tgbotapi.BotAPI
}

func NewBot

func NewBot(conf BotConfig, db persistent.SQLRepo) BotModel

type MODE

type MODE int
const (
	DownloadMode MODE = iota + 1
	RemoveMode
)

type Quality

type Quality int
const (
	FHD Quality = iota + 1
)

type UserState

type UserState struct {
	IsAdmin bool
	Mode    MODE
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL