diff --git a/Commands/CallbackqueryCommand.php b/Commands/CallbackqueryCommand.php index 0b3c768..8dcdab6 100644 --- a/Commands/CallbackqueryCommand.php +++ b/Commands/CallbackqueryCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Request; /** * Callback query command @@ -40,8 +40,8 @@ class CallbackqueryCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/CancelCommand.php b/Commands/CancelCommand.php index 468f081..148d23a 100644 --- a/Commands/CancelCommand.php +++ b/Commands/CancelCommand.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Request; /** * User "/cancel" command @@ -52,8 +52,8 @@ class CancelCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { @@ -78,8 +78,8 @@ public function execute() * * @param string $text * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ private function removeKeyboard($text) { @@ -93,8 +93,8 @@ private function removeKeyboard($text) /** * Command execute method if MySQL is required but not available * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function executeNoDb() { diff --git a/Commands/ChannelchatcreatedCommand.php b/Commands/ChannelchatcreatedCommand.php index 8c07884..6bf4dff 100644 --- a/Commands/ChannelchatcreatedCommand.php +++ b/Commands/ChannelchatcreatedCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Channel chat created command @@ -37,8 +37,8 @@ class ChannelchatcreatedCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/ChannelpostCommand.php b/Commands/ChannelpostCommand.php index 10ed436..f2f1749 100644 --- a/Commands/ChannelpostCommand.php +++ b/Commands/ChannelpostCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Channel post command @@ -37,8 +37,8 @@ class ChannelpostCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/ChoseninlineresultCommand.php b/Commands/ChoseninlineresultCommand.php index b1d5cdf..f5a95f6 100644 --- a/Commands/ChoseninlineresultCommand.php +++ b/Commands/ChoseninlineresultCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Chosen inline result command @@ -37,8 +37,8 @@ class ChoseninlineresultCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/DateCommand.php b/Commands/DateCommand.php index 31d5e49..e4f5b98 100644 --- a/Commands/DateCommand.php +++ b/Commands/DateCommand.php @@ -8,13 +8,13 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\TelegramLog; /** * User "/date" command @@ -183,7 +183,7 @@ private function validateResponseData($data) * @param string $location * * @return string - * @throws \Longman\TelegramBot\Exception\TelegramException + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ private function getFormattedDate($location) { @@ -206,8 +206,8 @@ private function getFormattedDate($location) /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/DeletechatphotoCommand.php b/Commands/DeletechatphotoCommand.php index f910715..5bfb050 100644 --- a/Commands/DeletechatphotoCommand.php +++ b/Commands/DeletechatphotoCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Delete chat photo command @@ -37,8 +37,8 @@ class DeletechatphotoCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/EchoCommand.php b/Commands/EchoCommand.php index ac7864c..0fac6bc 100644 --- a/Commands/EchoCommand.php +++ b/Commands/EchoCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * User "/echo" command @@ -43,8 +43,8 @@ class EchoCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/EditedchannelpostCommand.php b/Commands/EditedchannelpostCommand.php index a85a050..ba5e14d 100644 --- a/Commands/EditedchannelpostCommand.php +++ b/Commands/EditedchannelpostCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Edited channel post command @@ -37,8 +37,8 @@ class EditedchannelpostCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/EditedmessageCommand.php b/Commands/EditedmessageCommand.php index 199b590..880cbf2 100644 --- a/Commands/EditedmessageCommand.php +++ b/Commands/EditedmessageCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Edited message command @@ -37,8 +37,8 @@ class EditedmessageCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/EditmessageCommand.php b/Commands/EditmessageCommand.php index 2b33994..40c49fe 100644 --- a/Commands/EditmessageCommand.php +++ b/Commands/EditmessageCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * User "/editmessage" command @@ -43,8 +43,8 @@ class EditmessageCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/ForcereplyCommand.php b/Commands/ForcereplyCommand.php index a0ca31f..4099ac8 100644 --- a/Commands/ForcereplyCommand.php +++ b/Commands/ForcereplyCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Request; /** * User "/forcereply" command @@ -44,8 +44,8 @@ class ForcereplyCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/GenericCommand.php b/Commands/GenericCommand.php index 8deb8d8..a5916e1 100644 --- a/Commands/GenericCommand.php +++ b/Commands/GenericCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Request; /** * Generic command @@ -38,8 +38,8 @@ class GenericCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/GenericmessageCommand.php b/Commands/GenericmessageCommand.php index 7c843d9..9307470 100644 --- a/Commands/GenericmessageCommand.php +++ b/Commands/GenericmessageCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Request; /** * Generic message command @@ -44,8 +44,8 @@ class GenericmessageCommand extends SystemCommand /** * Command execute method if MySQL is required but not available * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function executeNoDb() { @@ -56,8 +56,8 @@ public function executeNoDb() /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/GroupchatcreatedCommand.php b/Commands/GroupchatcreatedCommand.php index cbe3ed2..898a304 100644 --- a/Commands/GroupchatcreatedCommand.php +++ b/Commands/GroupchatcreatedCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Group chat created command @@ -37,8 +37,8 @@ class GroupchatcreatedCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/HelpCommand.php b/Commands/HelpCommand.php index a32c093..626ea79 100644 --- a/Commands/HelpCommand.php +++ b/Commands/HelpCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\Command; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\Command; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * User "/help" command diff --git a/Commands/HidekeyboardCommand.php b/Commands/HidekeyboardCommand.php index f2190a3..c5fc077 100644 --- a/Commands/HidekeyboardCommand.php +++ b/Commands/HidekeyboardCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Request; /** * User "/hidekeyboard" command @@ -44,8 +44,8 @@ class HidekeyboardCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/ImageCommand.php b/Commands/ImageCommand.php index e6d2597..9f6ec52 100644 --- a/Commands/ImageCommand.php +++ b/Commands/ImageCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * User "/image" command @@ -43,8 +43,8 @@ class ImageCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/InlinekeyboardCommand.php b/Commands/InlinekeyboardCommand.php index a5553fa..4adaa4a 100644 --- a/Commands/InlinekeyboardCommand.php +++ b/Commands/InlinekeyboardCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\InlineKeyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\InlineKeyboard; +use PhpTelegramBot\Core\Request; /** * User "/inlinekeyboard" command @@ -44,8 +44,8 @@ class InlinekeyboardCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/InlinequeryCommand.php b/Commands/InlinequeryCommand.php index a1976b9..b5d11bd 100644 --- a/Commands/InlinequeryCommand.php +++ b/Commands/InlinequeryCommand.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\InlineQuery\InlineQueryResultArticle; -use Longman\TelegramBot\Entities\InputMessageContent\InputTextMessageContent; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\InlineQuery\InlineQueryResultArticle; +use PhpTelegramBot\Core\Entities\InputMessageContent\InputTextMessageContent; +use PhpTelegramBot\Core\Request; /** * Inline query command @@ -40,8 +40,8 @@ class InlinequeryCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/KeyboardCommand.php b/Commands/KeyboardCommand.php index 8b294e0..bad6a27 100644 --- a/Commands/KeyboardCommand.php +++ b/Commands/KeyboardCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Request; /** * User "/keyboard" command @@ -44,8 +44,8 @@ class KeyboardCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/LeftchatmemberCommand.php b/Commands/LeftchatmemberCommand.php index 5062d58..f83e8be 100644 --- a/Commands/LeftchatmemberCommand.php +++ b/Commands/LeftchatmemberCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Left chat member command @@ -37,8 +37,8 @@ class LeftchatmemberCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/MarkdownCommand.php b/Commands/MarkdownCommand.php index d8c25be..79c5853 100644 --- a/Commands/MarkdownCommand.php +++ b/Commands/MarkdownCommand.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\ReplyKeyboardMarkup; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\ReplyKeyboardMarkup; +use PhpTelegramBot\Core\Request; /** * User "/markdown" command @@ -44,8 +44,8 @@ class MarkdownCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/MigratefromchatidCommand.php b/Commands/MigratefromchatidCommand.php index 9ee043a..17b17e9 100644 --- a/Commands/MigratefromchatidCommand.php +++ b/Commands/MigratefromchatidCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Migrate from chat id command @@ -37,8 +37,8 @@ class MigratefromchatidCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/MigratetochatidCommand.php b/Commands/MigratetochatidCommand.php index cf91478..a18b08d 100644 --- a/Commands/MigratetochatidCommand.php +++ b/Commands/MigratetochatidCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Migrate to chat id command @@ -37,8 +37,8 @@ class MigratetochatidCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/NewchatmembersCommand.php b/Commands/NewchatmembersCommand.php index a5f2e13..d0bb879 100644 --- a/Commands/NewchatmembersCommand.php +++ b/Commands/NewchatmembersCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Request; /** * New chat member command @@ -36,8 +36,8 @@ class NewchatmembersCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/NewchatphotoCommand.php b/Commands/NewchatphotoCommand.php index 31381fc..62d660f 100644 --- a/Commands/NewchatphotoCommand.php +++ b/Commands/NewchatphotoCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * New chat photo command @@ -37,8 +37,8 @@ class NewchatphotoCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/NewchattitleCommand.php b/Commands/NewchattitleCommand.php index 0855669..9f6cb46 100644 --- a/Commands/NewchattitleCommand.php +++ b/Commands/NewchattitleCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * New chat title command @@ -37,8 +37,8 @@ class NewchattitleCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/PinnedmessageCommand.php b/Commands/PinnedmessageCommand.php index a5a7f2b..85611c9 100644 --- a/Commands/PinnedmessageCommand.php +++ b/Commands/PinnedmessageCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Pinned message command @@ -37,8 +37,8 @@ class PinnedmessageCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/SlapCommand.php b/Commands/SlapCommand.php index 4bf3452..e889349 100644 --- a/Commands/SlapCommand.php +++ b/Commands/SlapCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * User "/slap" command @@ -43,8 +43,8 @@ class SlapCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/StartCommand.php b/Commands/StartCommand.php index 5fe300b..dfd5c3c 100644 --- a/Commands/StartCommand.php +++ b/Commands/StartCommand.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Request; /** * Start command @@ -48,8 +48,8 @@ class StartCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/SupergroupchatcreatedCommand.php b/Commands/SupergroupchatcreatedCommand.php index a84661a..1a13931 100644 --- a/Commands/SupergroupchatcreatedCommand.php +++ b/Commands/SupergroupchatcreatedCommand.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Super group chat created command @@ -37,8 +37,8 @@ class SupergroupchatcreatedCommand extends SystemCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/SurveyCommand.php b/Commands/SurveyCommand.php index 36a43fb..9c7fdce 100644 --- a/Commands/SurveyCommand.php +++ b/Commands/SurveyCommand.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Entities\KeyboardButton; -use Longman\TelegramBot\Entities\PhotoSize; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Entities\KeyboardButton; +use PhpTelegramBot\Core\Entities\PhotoSize; +use PhpTelegramBot\Core\Request; /** * User "/survey" command @@ -57,15 +57,15 @@ class SurveyCommand extends UserCommand /** * Conversation Object * - * @var \Longman\TelegramBot\Conversation + * @var \PhpTelegramBot\Core\Conversation */ protected $conversation; /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/UploadCommand.php b/Commands/UploadCommand.php index 6c65355..d97de48 100644 --- a/Commands/UploadCommand.php +++ b/Commands/UploadCommand.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Request; /** * User "/upload" command diff --git a/Commands/WeatherCommand.php b/Commands/WeatherCommand.php index b5021ee..c677340 100644 --- a/Commands/WeatherCommand.php +++ b/Commands/WeatherCommand.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; use Exception; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\TelegramLog; /** * User "/weather" command @@ -124,8 +124,8 @@ private function getWeatherString(array $data) /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/Commands/WhoamiCommand.php b/Commands/WhoamiCommand.php index 98bed32..bafb004 100644 --- a/Commands/WhoamiCommand.php +++ b/Commands/WhoamiCommand.php @@ -10,13 +10,13 @@ * Written by Marco Boretto */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\File; -use Longman\TelegramBot\Entities\PhotoSize; -use Longman\TelegramBot\Entities\UserProfilePhotos; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\File; +use PhpTelegramBot\Core\Entities\PhotoSize; +use PhpTelegramBot\Core\Entities\UserProfilePhotos; +use PhpTelegramBot\Core\Request; /** * User "/whoami" command @@ -53,8 +53,8 @@ class WhoamiCommand extends UserCommand /** * Command execute method * - * @return \Longman\TelegramBot\Entities\ServerResponse - * @throws \Longman\TelegramBot\Exception\TelegramException + * @return \PhpTelegramBot\Core\Entities\ServerResponse + * @throws \PhpTelegramBot\Core\Exception\TelegramException */ public function execute() { diff --git a/composer.json b/composer.json index 1689ef2..6fa4418 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "telegram-bot/example-bot", + "name": "php-telegram-bot/example-bot", "type": "project", "description": "PHP Telegram Bot Example", "keywords": ["telegram", "bot", "example"], @@ -17,6 +17,6 @@ } ], "require": { - "longman/telegram-bot": "*" + "php-telegram-bot/core": "*" } } diff --git a/cron.php b/cron.php index 56852e1..3d3a4ca 100644 --- a/cron.php +++ b/cron.php @@ -38,7 +38,7 @@ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Add commands paths containing your custom commands $telegram->addCommandsPaths($commands_paths); @@ -53,7 +53,7 @@ // https://github.com/php-telegram-bot/core/blob/master/doc/01-utils.md#logging // // (this example requires Monolog: composer require monolog/monolog) - //Longman\TelegramBot\TelegramLog::initialize( + //PhpTelegramBot\Core\TelegramLog::initialize( // new Monolog\Logger('telegram_bot', [ // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_debug.log", Logger::DEBUG))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_error.log", Logger::ERROR))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), @@ -77,12 +77,12 @@ // Run user selected commands $telegram->runCommands($commands); -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // Silence is golden! //echo $e; // Log telegram errors - Longman\TelegramBot\TelegramLog::error($e); -} catch (Longman\TelegramBot\Exception\TelegramLogException $e) { + PhpTelegramBot\Core\TelegramLog::error($e); +} catch (PhpTelegramBot\Core\Exception\TelegramLogException $e) { // Silence is golden! // Uncomment this to catch log initialisation errors //echo $e; diff --git a/getUpdatesCLI.php b/getUpdatesCLI.php index 39bb0d7..cee4fc7 100644 --- a/getUpdatesCLI.php +++ b/getUpdatesCLI.php @@ -36,7 +36,7 @@ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Add commands paths containing your custom commands $telegram->addCommandsPaths($commands_paths); @@ -51,7 +51,7 @@ // https://github.com/php-telegram-bot/core/blob/master/doc/01-utils.md#logging // // (this example requires Monolog: composer require monolog/monolog) - //Longman\TelegramBot\TelegramLog::initialize( + //PhpTelegramBot\Core\TelegramLog::initialize( // new Monolog\Logger('telegram_bot', [ // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_debug.log", Logger::DEBUG))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_error.log", Logger::ERROR))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), @@ -82,11 +82,11 @@ echo date('Y-m-d H:i:s', time()) . ' - Failed to fetch updates' . PHP_EOL; echo $server_response->printError(); } -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { echo $e->getMessage(); // Log telegram errors - Longman\TelegramBot\TelegramLog::error($e); -} catch (Longman\TelegramBot\Exception\TelegramLogException $e) { + PhpTelegramBot\Core\TelegramLog::error($e); +} catch (PhpTelegramBot\Core\Exception\TelegramLogException $e) { // Catch log initialisation errors echo $e->getMessage(); } diff --git a/hook.php b/hook.php index 0b690d1..e68cc80 100644 --- a/hook.php +++ b/hook.php @@ -35,7 +35,7 @@ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Add commands paths containing your custom commands $telegram->addCommandsPaths($commands_paths); @@ -50,7 +50,7 @@ // https://github.com/php-telegram-bot/core/blob/master/doc/01-utils.md#logging // // (this example requires Monolog: composer require monolog/monolog) - //Longman\TelegramBot\TelegramLog::initialize( + //PhpTelegramBot\Core\TelegramLog::initialize( // new Monolog\Logger('telegram_bot', [ // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_debug.log", Logger::DEBUG))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), // (new Monolog\Handler\StreamHandler(__DIR__ . "/{$bot_username}_error.log", Logger::ERROR))->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true)), @@ -74,12 +74,12 @@ // Handle telegram webhook request $telegram->handle(); -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // Silence is golden! //echo $e; // Log telegram errors - Longman\TelegramBot\TelegramLog::error($e); -} catch (Longman\TelegramBot\Exception\TelegramLogException $e) { + PhpTelegramBot\Core\TelegramLog::error($e); +} catch (PhpTelegramBot\Core\Exception\TelegramLogException $e) { // Silence is golden! // Uncomment this to catch log initialisation errors //echo $e; diff --git a/manager.php b/manager.php index cf00a14..1256fb6 100644 --- a/manager.php +++ b/manager.php @@ -77,12 +77,12 @@ // Run the bot! $bot->run(); -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // Silence is golden! //echo $e; // Log telegram errors - Longman\TelegramBot\TelegramLog::error($e); -} catch (Longman\TelegramBot\Exception\TelegramLogException $e) { + PhpTelegramBot\Core\TelegramLog::error($e); +} catch (PhpTelegramBot\Core\Exception\TelegramLogException $e) { // Silence is golden! // Uncomment this to catch log initialisation errors //echo $e; diff --git a/set.php b/set.php index b887e9e..bf17012 100644 --- a/set.php +++ b/set.php @@ -17,7 +17,7 @@ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Set webhook $result = $telegram->setWebhook($hook_url); @@ -28,6 +28,6 @@ if ($result->isOk()) { echo $result->getDescription(); } -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { echo $e->getMessage(); } diff --git a/unset.php b/unset.php index b2c3aa3..ec77c76 100644 --- a/unset.php +++ b/unset.php @@ -14,7 +14,7 @@ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Delete webhook $result = $telegram->deleteWebhook(); @@ -22,6 +22,6 @@ if ($result->isOk()) { echo $result->getDescription(); } -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { echo $e->getMessage(); }