package routines import ( "git.dragon-labs.de/alphyron/group_helper/cli" "git.dragon-labs.de/alphyron/group_helper/models" "git.dragon-labs.de/alphyron/group_helper/telegram" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" ) type commandRoutine struct { CommandManager *cli.CommandManager } func NewCommandRoutine(commandManager *cli.CommandManager) telegram.Routine { return &commandRoutine{CommandManager: commandManager} } func (cr commandRoutine) Update(update *tgbotapi.Update, group *models.Group) error { _, err := cr.CommandManager.ExecuteUpdate(update, group) return err }