diff --git a/magna.php b/magna.php index 9091ed00..7966ed29 100755 --- a/magna.php +++ b/magna.php @@ -95,7 +95,7 @@ $calls = []; $users = []; $offset = 0; while (1) { - $updates = $MadelineProto->API->get_updates(['offset' => $offset, 'limit' => 500, 'timeout' => 0]); // Just like in the bot API, you can specify an offset, a limit and a timeout + $updates = $MadelineProto->API->get_updates(['offset' => $offset, 'limit' => 5000, 'timeout' => 0]); // Just like in the bot API, you can specify an offset, a limit and a timeout foreach ($MadelineProto->programmed_call as $key => $pair) { list($user, $time) = $pair; if ($time < time()) { diff --git a/songs.php b/songs.php index 6d9035e9..a02727f4 100644 --- a/songs.php +++ b/songs.php @@ -1,13 +1,6 @@ 'input.raw', - 'Parov Stelar - Booty Swing' => 'inputa.raw', - 'Parov Stelar - All night' => 'inpute.raw', - 'Caravan Palace - Lone Digger' => 'inputb.raw', - 'Postmodern Jukebox - Thrift Shop' => 'inputd.raw', -]; -$songs = glob('*raw'); +$songs = glob('xmas/*raw'); for ($x = 0; $x < count($songs); $x++) { shuffle($songs); } diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index b15b5fc8..c7439263 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -156,7 +156,9 @@ trait UpdateHandler public function check_msg_id($message) { - $peer_id = $this->get_info($message['to_id'])['bot_api_id']; + try { + $peer_id = $this->get_info($message['to_id'])['bot_api_id']; + } catch (\danog\MadelineProto\Exception $e) { return true; } $message_id = $message['id']; if (!isset($this->msg_ids[$peer_id]) || $message_id > $this->msg_ids[$peer_id]) {