I'm using irazasyed/telegram-bot-sdk to make a telegram bot.
but when I installed the dev-develop
first I got this error :
Cannot use Telegram\Bot\Objects\Message as Message because the name is already in use {"exception":"[object]
(Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 64): Cannot use Telegram\\Bot\\Objects\\Message as Message because the name is already in use at D:\\wamp\\www\\botshop\\vendor\\irazasyed\\telegram-bot-sdk\\src\\Methods\\Payments.php:5)
But after that when I commented use Telegram\Bot\Objects\Message;
in line 5 of Payments.php , error not shown again.
But another problem was created that said :
Declaration of App\Commands\StartCommand::handle($arguments) must be compatible with Telegram\Bot\Commands\Command::handle()
this is a simple StartCommand
that is also used by itself package in all example of creating new command :
class StartCommand extends Command
{
protected $name = "start";
protected $description = "Start Command to get you started";
public function handle($arguments)
{
$this->replyWithMessage(['text' => 'Hello! Welcome to our bot, Here are our available commands:']);
}
}
I'm using php7.0.10 and laravel 5.5.