Apply fixes from StyleCI
This commit is contained in:
parent
d95e46e292
commit
306125a931
@ -102,8 +102,10 @@ $calls = [];
|
|||||||
$offset = $update['update_id'] + 1; // Just like in the bot API, the offset must be set to the last update_id
|
$offset = $update['update_id'] + 1; // Just like in the bot API, the offset must be set to the last update_id
|
||||||
switch ($update['update']['_']) {
|
switch ($update['update']['_']) {
|
||||||
case 'updateNewMessage':
|
case 'updateNewMessage':
|
||||||
include('songs.php');
|
include 'songs.php';
|
||||||
if ($update['update']['message']['out'] || $update['update']['message']['to_id']['_'] !== 'peerUser' || !isset($update['update']['message']['from_id'])) continue;
|
if ($update['update']['message']['out'] || $update['update']['message']['to_id']['_'] !== 'peerUser' || !isset($update['update']['message']['from_id'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$MadelineProto->messages->sendMessage(['peer' => $update['update']['message']['from_id'], 'message' => 'Call me!']);
|
$MadelineProto->messages->sendMessage(['peer' => $update['update']['message']['from_id'], 'message' => 'Call me!']);
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
|
@ -8,4 +8,6 @@ $songs = [
|
|||||||
// 'Swingrowers - Butterfly' => 'inputc.raw',
|
// 'Swingrowers - Butterfly' => 'inputc.raw',
|
||||||
// 'Postmodern Jukebox - Thrift Shop' => 'inputd.raw',
|
// 'Postmodern Jukebox - Thrift Shop' => 'inputd.raw',
|
||||||
];
|
];
|
||||||
for ($x = 0; $x < count($songs); $x++) { shuffle($songs); }
|
for ($x = 0; $x < count($songs); $x++) {
|
||||||
|
shuffle($songs);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user