diff --git a/docs b/docs index bf3c9a39f..b5aa55944 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit bf3c9a39fd1d7ee6d7497109e7ee4d6666b87d42 +Subproject commit b5aa55944beab3de3384a300fdcc5c629557fd83 diff --git a/examples/combinedBot.php b/examples/combinedBot.php index 23617ad48..0c72fbb33 100755 --- a/examples/combinedBot.php +++ b/examples/combinedBot.php @@ -36,7 +36,7 @@ if (file_exists('vendor/autoload.php')) { /** * Event handler class. */ -class MyEventHandler extends EventHandler +class CombinedEventHandler extends EventHandler { /** * @var int|string Username or ID of bot admin @@ -75,8 +75,8 @@ class MyEventHandler extends EventHandler } $MadelineProtos = []; -foreach (['session1.madeline', 'session2.madeline', 'session3.madeline'] as $session => $message) { +foreach (['session1.madeline', 'session2.madeline', 'session3.madeline'] as $session) { $MadelineProtos []= new API($session); } -API::startAndLoopMulti($MadelineProtos, MyEventHandler::class); +API::startAndLoopMulti($MadelineProtos, CombinedEventHandler::class); diff --git a/examples/libtgvoipbot.php b/examples/libtgvoipbot.php index 90e177778..9402951b2 100644 --- a/examples/libtgvoipbot.php +++ b/examples/libtgvoipbot.php @@ -24,7 +24,7 @@ if (class_exists(API::class)) { require_once 'madeline.php'; } -class MyEventHandler extends SimpleEventHandler +class LibtgvoipEventHandler extends SimpleEventHandler { // !!! Change this to your username! !!! private const ADMIN = 'danogentili'; @@ -70,4 +70,4 @@ if (!getenv('TOKEN')) { throw new AssertionError("You must define a TOKEN environment variable with the token of the bot!"); } -MyEventHandler::startAndLoopBot($argv[1] ?? 'libtgvoipbot.madeline', getenv('TOKEN')); +LibtgvoipEventHandler::startAndLoopBot($argv[1] ?? 'libtgvoipbot.madeline', getenv('TOKEN')); diff --git a/examples/simpleBot.php b/examples/simpleBot.php index d3b769d13..ce79fc97c 100644 --- a/examples/simpleBot.php +++ b/examples/simpleBot.php @@ -24,7 +24,7 @@ if (file_exists('vendor/autoload.php')) { require_once 'madeline.php'; } -class MyEventHandler extends SimpleEventHandler +class BasicEventHandler extends SimpleEventHandler { // !!! Change this to your username !!! public const ADMIN = "@me"; @@ -66,4 +66,4 @@ class MyEventHandler extends SimpleEventHandler } } -MyEventHandler::startAndLoop('bot.madeline'); +BasicEventHandler::startAndLoop('bot.madeline');