telegram-bot-essentials/user-management

Admin bot-user list with filters, sections and interaction logging for telegram-bot-essentials/essence

Maintainers

Package info

github.com/Telegram-Bot-Essentials/user-management

pkg:composer/telegram-bot-essentials/user-management

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 1

Stars: 0

Open Issues: 0

v0.0.16 2026-09-01 12:17 UTC

README

Latest Version tests License: MIT

Gives admins a browsable, sortable, filterable list of bot users, a per-user detail screen built from pluggable sections, and automatic interaction logging — on top of telegram-bot-essentials/essence.

Other packages (notably user-wallet) extend the list by registering their own sort, filter, section, or header block rather than forking the admin UI.

Installation

composer require telegram-bot-essentials/user-management
php artisan migrate

# optional — change the default sort/filter
php artisan vendor:publish --tag=tbe-user-management-config

Install it, and admins get a working "Users" menu immediately.

Extension points

Helper Registers Purpose
botUserSorts() BotUserSort A sortable/displayable column in the list
botUserFilters() BotUserFilter A single-select list filter (reachability filters ship built-in)
userManagementStats() UserStat A block in the list header
userManagementSections() UserSection A button or inline block on the per-user detail screen
botUserSorts()->addSort(new BotUserSort(
    key: 'wallet_balance',
    label: __('my-package::bot_users.sorts.wallet_balance'),
    apply: fn ($query, $direction) => $query->leftJoin(/* ... */)->orderBy(/* ... */)->select('bot_users.*'),
    display: fn (BotUser $user) => $user->wallet_balance ?? '0',
    active: fn () => settings()->get('billing.user_wallet.status'),
));

active must be a Closure for anything conditional on a per-bot setting — it's evaluated per request, after wHook()->bot() resolves, not once at boot.

Every update a user generates is logged to bot_user_actions automatically once the package is installed; reachability transitions are logged separately off essence's BotUserStatusChanged event.

Documentation

Full documentation — every DTO, the filtering and stats APIs, interaction logging, and how User Wallet plugs in — lives on the Telegram Bot Essentials documentation site under Modules → User Management.

License

MIT.