commands

package
v0.0.0-...-d9ce59d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgNeedMoreArgsForRename = "You need to enter new username with /rename_user command"
)
View Source
const (
	StartTrackSuccessMsg = "You are now tracked!"
)
View Source
const (
	StopTrackSuccessMsg = "You are now not tracked!"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandProcessor

type CommandProcessor interface {
	GetUser(id int64) (domain.User, error)
	AddUser(user domain.User) error
	UpdateUser(user domain.User) error
	DeleteUser(id int64) error
}

type CommandService

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

func NewCommandService

func NewCommandService(
	bot *tgbotapi.BotAPI,
	commandProcessor CommandProcessor,
) *CommandService

func (*CommandService) HandleUpdate

func (svc *CommandService) HandleUpdate(update tgbotapi.Update)

func (*CommandService) Help

func (svc *CommandService) Help(inputMessage *tgbotapi.Message)

func (*CommandService) RenameUser

func (svc *CommandService) RenameUser(inputMessage *tgbotapi.Message)

func (*CommandService) StartTrack

func (svc *CommandService) StartTrack(inputMessage *tgbotapi.Message)

func (*CommandService) StopTrack

func (svc *CommandService) StopTrack(inputMessage *tgbotapi.Message)

func (*CommandService) UserInfo

func (svc *CommandService) UserInfo(inputMessage *tgbotapi.Message)

Jump to

Keyboard shortcuts

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