<?php

use inc\fileStorage;
use Database\{Users,Settings};

if ($text == patternAdmin('setCoinLock')) {
    Users::updateCommand($chatid, 'setCoinLock');
    $get = Settings::getSettings('countLockCoin');
    $Telegram->SendMessage($chatid, str_replace('#coin', $get, msg('setCoinLock')), 'html', false, $button_backhome);
} elseif ($command == 'setCoinLock' && $text != patternAdmin('back')) {
    Users::updateCommand($chatid, null);
    if (preg_match('/^[0-9]*$/', $text)) {
        Settings::updateSettings('countLockCoin', $text);
    }
    $Telegram->SendMessage($chatid, msg('done'), 'html', false, $button_settings);
}

