Moved Objects
This commit is contained in:
parent
848a2a78e3
commit
6c67e97a4b
167 changed files with 368 additions and 373 deletions
12
README.md
12
README.md
|
@ -92,7 +92,7 @@ import('net.nosial.tgbotlib');
|
|||
|
||||
$bot = new TgBotLib\BotOld('<BOT TOKEN>');
|
||||
|
||||
/** @var \TgBotLib\Objects\Telegram\Update $update */
|
||||
/** @var \TgBotLib\Objects\Update $update */
|
||||
foreach ($bot->getUpdates() as $update)
|
||||
{
|
||||
$bot->sendMessage($update->getMessage()->getChat()->getId(), 'Hello World!');
|
||||
|
@ -152,7 +152,7 @@ To implement a single-threaded bot, it's very self-explanatory, you just need to
|
|||
// Loop forever
|
||||
while(true)
|
||||
{
|
||||
/** @var \TgBotLib\Objects\Telegram\Update $update */
|
||||
/** @var \TgBotLib\Objects\Update $update */
|
||||
foreach ($bot->getUpdates() as $update)
|
||||
{
|
||||
$bot->sendMessage($update->getMessage()->getChat()->getId(), 'Hello World!');
|
||||
|
@ -261,9 +261,7 @@ all the information about the update.
|
|||
|
||||
namespace commands;
|
||||
|
||||
use TgBotLib\BotOld;
|
||||
use TgBotLib\Interfaces\CommandInterface;
|
||||
use TgBotLib\Objects\Telegram\Update;
|
||||
use TgBotLib\BotOld;use TgBotLib\Interfaces\CommandInterface;use TgBotLib\Objects\Update;
|
||||
|
||||
class StartCommand extends CommandInterface
|
||||
{
|
||||
|
@ -296,9 +294,7 @@ And the interface EventInterface is used instead of CommandInterface:
|
|||
|
||||
namespace events;
|
||||
|
||||
use TgBotLib\BotOld;
|
||||
use TgBotLib\Interfaces\EventInterface;
|
||||
use TgBotLib\Objects\Telegram\Update;
|
||||
use TgBotLib\BotOld;use TgBotLib\Interfaces\EventInterface;use TgBotLib\Objects\Update;
|
||||
|
||||
class MessageEvent implements EventInterface
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue