Giter Club home page Giter Club logo

Comments (5)

viiy avatar viiy commented on July 3, 2024 2

@arminkit add PHP_TELEGRAM_BOT_API_KEY= to your .env

from laravel.

shaikhfoysal avatar shaikhfoysal commented on July 3, 2024 1

Same problem. anybody or the package authors. Please help. Thanks.

from laravel.

noplanman avatar noplanman commented on July 3, 2024 1

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"

from laravel.

noplanman avatar noplanman commented on July 3, 2024 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.

from laravel.

arminkit avatar arminkit commented on July 3, 2024

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`

from laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.