Skip to content

O lukianova/hw20 - #242

Open
olgalukianova250782 wants to merge 28 commits into
OLukianova/hw6from
OLukianova/hw20
Open

olgalukianova250782 wants to merge 28 commits into
OLukianova/hw6from
OLukianova/hw20

Conversation

@olgalukianova250782

Copy link
Copy Markdown

No description provided.

Comment thread routes/api.php
$text = $result['message']['text']; // Текст сообщения
$chat = $result['message']['chat']['id']; // Уникальный идентификатор пользователя

switch ($text) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут я уже давал комментарий, в долгосрочной перспективе слеловало бы разбить на файлы-контроллеры каждое действие

Comment thread routes/api.php
$telegram->sendMessage(['chat_id' => $chat, 'text' => $message]);
break;
case '/teachers':
$message = 'Английский - Новикова Н.Н.,'.PHP_EOL.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь конечно несерьезно - текст заглушка по сути

Comment thread routes/api.php
'/ch - '.Config::LANG[3].PHP_EOL;
$telegram->sendMessage(['chat_id' => $chat, 'text' => $message]);
break;
case '/en':

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а тут команды не зависят от контекста.. то есть я на любом шаге бота могу это отправить... и не важно, ранее я был в /lang или /schedule...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants