Small fix
This commit is contained in:
parent
5a26ff0d18
commit
72b30bedfe
@ -95,7 +95,7 @@ $calls = [];
|
|||||||
$users = [];
|
$users = [];
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
while (1) {
|
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) {
|
foreach ($MadelineProto->programmed_call as $key => $pair) {
|
||||||
list($user, $time) = $pair;
|
list($user, $time) = $pair;
|
||||||
if ($time < time()) {
|
if ($time < time()) {
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$songs = [
|
$songs = glob('xmas/*raw');
|
||||||
'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');
|
|
||||||
for ($x = 0; $x < count($songs); $x++) {
|
for ($x = 0; $x < count($songs); $x++) {
|
||||||
shuffle($songs);
|
shuffle($songs);
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,9 @@ trait UpdateHandler
|
|||||||
|
|
||||||
public function check_msg_id($message)
|
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'];
|
$message_id = $message['id'];
|
||||||
|
|
||||||
if (!isset($this->msg_ids[$peer_id]) || $message_id > $this->msg_ids[$peer_id]) {
|
if (!isset($this->msg_ids[$peer_id]) || $message_id > $this->msg_ids[$peer_id]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user