bot

package
v0.0.0-...-e3dc589 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const SOURCES_PAGE_LIMIT = 5

Variables

This section is empty.

Functions

func RunBot

func RunBot(appDB *db.DB, token string, config *Config) error

Types

type Config

type Config struct {
	WebhookAddress                 string
	CertFilePath                   string
	PrivKeyFilePath                string
	IsDev                          bool
	LogPath                        string
	DefaultActiveSourceTimeoutMins int
	DeactivatorIntervalMins        int
	Port                           int
}

type Handlers

type Handlers struct {
	LibraryUUIDLifetime time.Duration
	// contains filtered or unexported fields
}

type SourceDeactiver

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

func NewSourceDeactiver

func NewSourceDeactiver(db *db.DB, b *bot.Bot, isDev bool, logPath string, ctx context.Context) (*SourceDeactiver, error)

func (*SourceDeactiver) Schedule

func (sd *SourceDeactiver) Schedule(intervalMins int)

func (*SourceDeactiver) Stop

func (sd *SourceDeactiver) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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