Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <?php
  2.  
  3. if (!file_exists('madeline.php')) {
  4. copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
  5. }
  6. include 'madeline.php';
  7.  
  8.  
  9.  
  10. class EventHandler extends \danog\MadelineProto\EventHandler
  11. {
  12. public function onUpdateNewMessage($update)
  13. {
  14. \danog\MadelineProto\Logger::log($update);
  15. }
  16.  
  17. public function updateNewEncryptedMessage($update)
  18. {
  19. $this->onUpdateNewMessage($update);
  20. }
  21.  
  22.  
  23. public function onUpdateNewChannelMessage($update)
  24. {
  25. $this->onUpdateNewMessage($update);
  26. }
  27.  
  28. }
  29.  
  30.  
  31.  
  32. $settings['app_info']['api_id']=;
  33. $settings['app_info']['api_hash']='';
  34. $MadelineProto = new \danog\MadelineProto\API('session.madeline', $settings);
  35. $MadelineProto->settings = $settings;
  36. $MadelineProto->start();
  37.  
  38. $MadelineProto->setEventHandler('\EventHandler');
  39. $MadelineProto->loop();
  40.  
  41. echo 'OK, done!'.PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement