<<< Back

Patterns update


Logrus (2023-03-08 22:06:34):

пример для кода в шаблоне поведения

if (strpos($details['source'], 'telegram') !== false) {
 $id = mb_substr($details['source'], 8);
 $chat_id = SQLSelectOne("SELECT * FROM tlg_user WHERE ID=" . $id);

 include_once(DIR_MODULES . 'telegram/telegram.class.php');
 $telegram_module = new telegram();
 $telegram_module->sendMessageToUser($chat_id['USER_ID'], $text);
} else {
 say($text, 1);
}
(0)
 

Please login to leave comments. Join us!