autodelete

package
v0.0.0-...-66cef22 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertAutodel

func InsertAutodel(data AutodelData, seconds int64) error

Insert a message to be deleted into the database:

- data : Data to be entered. - seconds : Expiration time in seconds.

func RunAutodel

func RunAutodel(bot *gotgbot.Bot)

Runs an autodelete ticker job that runs every minute and queries the db for expired messages and deletes them.

Types

type AutodelData

type AutodelData struct {
	ChatID    int64     `db:"chat_id"`
	MessageID int64     `db:"message_id"`
	ExpTime   time.Time `db:"exp_time"`
}

Data to be entered into the autodelete db.

Jump to

Keyboard shortcuts

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