card action
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user