forked from mirzaev/pot-php
fixed by garden/campanula
This commit is contained in:
@@ -8,7 +8,6 @@ namespace ${REPO_OWNER}\${REPO_NAME}\models\telegram;
|
||||
use ${REPO_OWNER}\${REPO_NAME}\models\core,
|
||||
${REPO_OWNER}\${REPO_NAME}\models\account,
|
||||
${REPO_OWNER}\${REPO_NAME}\models\settings,
|
||||
${REPO_OWNER}\${REPO_NAME}\models\telegram\settings as telegram_settings,
|
||||
${REPO_OWNER}\${REPO_NAME}\models\telegram\processes\language\select as process_language_select;
|
||||
|
||||
// Library for languages support
|
||||
@@ -77,47 +76,11 @@ final class commands extends core
|
||||
|
||||
// Initializing the title
|
||||
$$title = '📋 *' . $$localization['menu_title'] . '*';
|
||||
|
||||
// Initializing accounts
|
||||
/* $$accounts_message = '*' . $$localization['menu_accounts'] . ':* ' . ((new account)->database->count() ?? 0); */
|
||||
|
||||
// Initializing the account tariff
|
||||
$$tariff = $$account->tariff();
|
||||
|
||||
// Declaring the tariff button
|
||||
$$tariff_button = [];
|
||||
|
||||
if ($$tariff instanceof tariff) {
|
||||
// Initialized the account tariff
|
||||
|
||||
// Initializing the tariff button
|
||||
$$tariff_button = [
|
||||
'text' => '🔐 ' . $$tariff->type->label($$language) . ' (' . $$tariff->used . '/' . $$tariff->tokens . ')',
|
||||
'callback_data' => 'tariffs'
|
||||
];
|
||||
} else {
|
||||
|
||||
// Initialized the account tariff
|
||||
|
||||
// Initializing the tariff button
|
||||
$$tariff_button = [
|
||||
'text' => '⚠️ ' . $$localization['menu_tariff_empty'],
|
||||
'callback_data' => 'tariffs'
|
||||
];
|
||||
}
|
||||
|
||||
// Initializing the account chat
|
||||
$$chat = $$account->chat();
|
||||
|
||||
// Initializing the chto text
|
||||
$$howto = $$localization['menu_howto'];
|
||||
|
||||
|
||||
// Sending the message
|
||||
$$context->sendMessage(
|
||||
<<<TXT
|
||||
$$title
|
||||
|
||||
$$howto
|
||||
TXT,
|
||||
[
|
||||
'reply_markup' => [
|
||||
|
||||
Reference in New Issue
Block a user