D
D
Dmitry2021-11-20 14:10:57
PHP
Dmitry, 2021-11-20 14:10:57

How to remove the inscription, who invited to the Telegram chat?

Hello everyone, tell me how to remove the inscription who invited to the Telegram group in php, I read a lot of sites, on a foreign site they wrote to the person who asked, add Request:: sendMessage () to each update event, I was also answered on YouTube through Request, but not it doesn’t work, but when I run it on Python, everything disappears and works perfectly, but my hosting is not very friendly with Python, so php or js.

In the code, I tried several options and none of them wants to work. On Python, the lines who joined or left the group are answered by these lines: text1 = "MessageActionChatDeleteUser" text2 = "MessageActionChatAddUser"

On php deleteMessage, but does not want to work.

error_reporting(E_ALL); // вывод ошибок
include('vendor/autoload.php'); //Подключаем библиотеку

$webhook = 'moy_sayt_put_k_papke';
$is_log = true;

$access_token = 'moy_token';
$api = 'https://api.telegram.org/bot'
$request = json_decode(file_get_contents('php://input'), TRUE);
put_log_in($request);


bot.sendMessage(chatId, messageText, {
    "disable_notification": true,
});

Request::deleteMessage([
    'chat_id'    => $this->getMessage()->getChat()->getId(),
    'message_id' => $this->getMessage()->getMessageId(),
]);


$url = "$website/sendMessage?chat_id=$chat_id&text=$text&    disable_notification=true";
file_get_contents($url);  // It works perfect`



$url = "$website/sendMessage?chat_id=$chat_id&text=$text&    disable_notification=true";
file_get_contents($url);  // It works perfect`



$datatosend=[
    'chat_id'=> $myChatId,
    'text'=> $myText,
    'parse_mode' => 'Markdown',
    'disable_notification' => 'true',
    'inline_keyboard' => $inline_keyboard
];


composer.json file
{
    "require": {
        "irazasyed/telegram-bot-sdk": "2.0",
        "telegram-bot/api": "^2.3"
    "phpunit/php-timer": "^5.0"
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question