<?php

use  Database\{Users, Settings};
use inc\fileStorage;
if ($text == patternAdmin('botType')) {
    Users::updateCommand($chatid, 'setTypeBot');
    $Telegram->SendMessage($chatid, msg('def'), 'html', false, $button_bottype);
} elseif ($command == 'setTypeBot' && $text != patternAdmin('back')) {
    $Telegram->SendMessage($chatid, msg('done'), 'html', false, $button_settings);
    Users::updateCommand($chatid, null);
    if ($text == patternAdmin('typeCoin')) {
        Settings::updateSettings('type', 'coin');
    } elseif ($text == patternAdmin('typeInvite')) {
        Settings::updateSettings('type', 'invite');
    } elseif ($text == patternAdmin('typeOff')) {
        Settings::updateSettings('type', 'off');
    }
    fileStorage::removeFile('bot');

}

