defstudio / telegraph

Telegraph is a Laravel package for fluently interacting with Telegram Bots
MIT License
674 stars 116 forks source link

Keyboard and Buttons #534

Closed Freshblood1121 closed 7 months ago

Freshblood1121 commented 7 months ago

My buttons are not showing up at all, please help... Telegraph::message('hello world') ->keyboard(Keyboard::make()->buttons([ Button::make('Delete')->action('delete')->param('id', '42'), Button::make('open')->url('https://test.it'), Button::make('Web App')->webApp('https://web-app.test.it'), Button::make('Login Url')->loginUrl('https://loginUrl.test.it'), ]))->send();

or

$this->chat->message('uh')->keyboard(Keyboard::make()->buttons([ Button::make('i')->url('google.com'), Button::make('1')->url('google.com'), Button::make('e')->url('google.com'), ]))->send();

All this gives one error:((((

Снимок экрана 2024-02-25 071502

fabio-ivona commented 7 months ago

You should have an entry in your laravel logs, could you check?

Freshblood1121 commented 7 months ago

@fabio-ivona my error:

[2024-02-25 09:58:28] local.DEBUG: Telegraph webhook message {"text":"/hello"} [2024-02-25 09:58:28] local.INFO: {"ok":false,"error_code":400,"description":"Bad Request: BOT_DOMAIN_INVALID"}

fabio-ivona commented 7 months ago

What's your app domain? You need a valid https url

Freshblood1121 commented 7 months ago

Oh, I needed to activate "inline mode in BotFather, solved<3