Small fix

This commit is contained in:
Daniil Gentili 2017-12-25 16:06:37 +00:00
parent 5a26ff0d18
commit 72b30bedfe
3 changed files with 5 additions and 10 deletions

View File

@ -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()) {

View File

@ -1,13 +1,6 @@
<?php
$songs = [
'Aronchupa - Little Swing' => '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);
}

View File

@ -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]) {