Closed amigolj closed 2 years ago
Same problem. anybody or the package authors. Please help. Thanks.
Update your composer.json to use the master branch, as there hasn't been a tagged version just yet.
"php-telegram-bot/laravel": "dev-master"
Update your composer.json to use the master branch, as there hasn't been a tagged version just yet.
"php-telegram-bot/laravel": "dev-master"
Hi I get the following error in the " composer update "command. What is the problem? "laravel/framework": "^8.65",
`Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi
Longman\TelegramBot\Exception\TelegramException
API KEY not defined!
at C:\xampp\htdocs\laravel8-bot\vendor\longman\telegram-bot\src\Telegram.php:210 206▕ */ 207▕ public function __construct(string $api_key, string $bot_username = '') 208▕ { 209▕ if (empty($api_key)) { ➜ 210▕ throw new TelegramException('API KEY not defined!'); 211▕ } 212▕ preg_match('/(\d+):[\w-]+/', $api_key, $matches); 213▕ if (!isset($matches[1])) { 214▕ throw new TelegramException('Invalid API KEY defined!');
1 C:\xampp\htdocs\laravel8-bot\vendor\php-telegram-bot\laravel\src\Laravel\ServiceProvider.php:61 Longman\TelegramBot\Telegram::__construct("", "")
2 C:\xampp\htdocs\laravel8-bot\vendor\laravel\framework\src\Illuminate\Container\Container.php:873 PhpTelegramBot\Laravel\ServiceProvider::PhpTelegramBot\Laravel{closure}(Object(Illuminate\Foundation\Application), []) Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1`
@arminkit The warning about swiftmailer has nothing to do with this library, so that can be ignored for the sake of this issue.
Be sure to publish the config file:
php artisan vendor:publish --provider="PhpTelegramBot\Laravel\ServiceProvider"
Then update your configuration in config/phptelegrambot.php
and add the correct API key.
@arminkit add PHP_TELEGRAM_BOT_API_KEY=
Hi I try install package but I get this errors. Its fresh install only laravel and this package This my composer.json "require": { "php": "^7.3|^8.0", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.54", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5", "longman/telegram-bot": "^0.74.0", "php-telegram-bot/laravel": "^1.0" },
Problem 1