1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 04:54:45 +01:00
This commit is contained in:
Daniil Gentili 2023-08-31 18:50:48 +02:00
parent 7cfa861347
commit e7fc3ccc53
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
4 changed files with 8 additions and 3 deletions

2
docs

@ -1 +1 @@
Subproject commit f9479b5ed73a5140b98bb70bb48f3c8b3e551a38
Subproject commit 4600ecd205dfda11d056ccf772e4f5a3b92db8a3

View File

@ -535,7 +535,13 @@ final class Blacklist {
\fwrite($handle, "use Amp\\Cancellation;\n");
\fwrite($handle, "use Amp\\Http\\Server\\Request as ServerRequest;\n");
\fwrite($handle, "use danog\\MadelineProto\\Broadcast\\Action;\n");
$had = [];
foreach (ClassFinder::getClassesInNamespace(\danog\MadelineProto\EventHandler::class, ClassFinder::RECURSIVE_MODE) as $class) {
$name = \basename(\str_replace('\\', '//', $class));
if (isset($had[$name])) {
continue;
}
$had[$name] = true;
\fwrite($handle, "use $class;\n");
}
/** @psalm-suppress UndefinedClass */

View File

@ -225,7 +225,7 @@ trait Methods
$header .= "YOU CANNOT USE THIS METHOD IN MADELINEPROTO\n\n\n\n\n";
}
if (\in_array($method, ['messages.getHistory', 'messages.getMessages', 'channels.getMessages'], true)) {
$header .= "# Warning: flood wait\n**Warning: this method is prone to rate limiting with flood waits, please use the [updates event handler, instead »](/docs/UPDATES.html#async-event-driven)**\n\n";
$header .= "# Warning: flood wait\n**Warning: this method is prone to rate limiting with flood waits, **which can lead to !!! ACCOUNT BANS !!!**, please use the [updates event handler, instead (which is 100% safe) »](/docs/UPDATES.html#async-event-driven)**\n\n";
$header .= "# Warning: non-realtime results\n**Warning: this method is not suitable for receiving messages in real-time from chats and users, please use the [updates event handler, instead »](/docs/UPDATES.html#async-event-driven)**\n\n";
$header .= "# Warning: this is probably NOT what you need\nYou probably need to use the [updates event handler, instead »](/docs/UPDATES.html#async-event-driven) :)\n\n";
}

View File

@ -36,7 +36,6 @@ use danog\MadelineProto\EventHandler\Message\Entities\Spoiler;
use danog\MadelineProto\EventHandler\Message\Entities\Url;
use danog\MadelineProto\EventHandler\Participant\Admin;
use danog\MadelineProto\EventHandler\Participant\Member;
use danog\MadelineProto\EventHandler\Participant\Rights\Admin;
use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\Ipc\Client;
use danog\MadelineProto\Ipc\EventHandlerProxy;