card action

This commit is contained in:
2025-01-26 14:42:47 +03:00
parent 08cdf44b67
commit 824130df26
27 changed files with 430 additions and 53 deletions

View File

@ -11,6 +11,8 @@ use kernel\services\ModuleService;
class TgBotService
{
public static null|Tgbot $currentDialog = null;
public function create(FormModel $form_model): false|Tgbot
{
$model = new Tgbot();
@ -45,4 +47,13 @@ class TgBotService
return false;
}
public static function isAdmin(): bool
{
if (self::$currentDialog->status === Tgbot::ADMIN_STATUS){
return true;
}
return false;
}
}