Size: a a a

MadelineProto 🇷🇺

2021 October 14

DG

Daniil Gentili in MadelineProto 🇷🇺
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
This whole code is wrong
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
Copy this code
источник

N

No name in MadelineProto 🇷🇺
<?php

error_reporting(0);
if (!file_exists('madeline.php')) {
   copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$offset = 0;

register_shutdown_function('shutdown_function', $lock);
closeConnection();

while (true) {
   $updates = $MadelineProto->get_updates(['offset' => $offset, 'limit' => 50, 'timeout' => 0]);
   \danog\MadelineProto\Logger::log($updates);
   foreach ($updates as $update) {
       $offset = $update['update_id'] + 1;
    $up = $update['update']['_'];
               if ($up == 'updateNewMessage' or $up == 'updateNewChannelMessage' or $up == 'updateEditChannelMessage') {
$chatID = $MadelineProto->get_info($update['update']);
$type = $chatID['type'];
$chatID = $chatID['bot_api_id'];
$userID = $update['update']['message']['from_id'];
$msg = $update['update']['message']['message'];
$msg_id = $update['update']['message']['id'];
               try {
}catch(Exception $e){
}
catch(\danog\MadelineProto\RPCErrorException $e){
 $MadelineProto->messages->sendMessage(['peer' => 1911961328, 'message' => $e]);
}
catch(\danog\MadelineProto\Exception $e){
}
catch(\danog\MadelineProto\TL\Conversion\Exception $e){
}
}
}
}

if ($msg=="Bot on") {
$MadelineProto->messages->sendMessage(['peer' => '$chatID', 'message' => "Bot is on"]);

}
?>
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
Wrong
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
^
источник

N

No name in MadelineProto 🇷🇺
I didn't understand him
источник

N

No name in MadelineProto 🇷🇺
sendmessage not work
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
Because the code is wrong
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
please follow docs.madelineproto.xyz/docs/UPDATES.html for the correct code
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
источник

N

No name in MadelineProto 🇷🇺
Which place should I take a?
источник

N

No name in MadelineProto 🇷🇺
write me example for sendmessage the same...
источник

DG

Daniil Gentili in MadelineProto 🇷🇺
источник

N

No name in MadelineProto 🇷🇺
It’s incomprehensible to me that I didn’t work with it
источник

N

No name in MadelineProto 🇷🇺
источник

Б

Бобир Юсупов... in MadelineProto 🇷🇺
как пройти через это место?
источник

N

No name in MadelineProto 🇷🇺
Fully Exit and Re-enter
источник

Б

Бобир Юсупов... in MadelineProto 🇷🇺
again the same thing happens
источник

Б

Бобир Юсупов... in MadelineProto 🇷🇺
who can help
источник