afk

package
v0.0.0-...-251d348 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

func New

func New(afkService Service) *Plugin

func (*Plugin) Commands

func (p *Plugin) Commands() []gotgbot.BotCommand

func (*Plugin) Handlers

func (p *Plugin) Handlers(botInfo *gotgbot.User) []plugin.Handler

func (*Plugin) Name

func (p *Plugin) Name() string

type Service

type Service interface {
	BackAgain(chat *gotgbot.Chat, user *gotgbot.Sender) error
	IsAFK(chat *gotgbot.Chat, user *gotgbot.Sender) (bool, model.AFKData, error)
	IsAFKByUsername(chat *gotgbot.Chat, username string) (bool, model.AFKData, error)
	SetAFK(chat *gotgbot.Chat, user *gotgbot.Sender, now time.Time) error
	SetAFKWithReason(chat *gotgbot.Chat, user *gotgbot.Sender, reason string) error
}

Jump to

Keyboard shortcuts

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