Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Telegraph Facade #640

Unanswered
mrStanislav asked this question in Q&A
Discussion options

Hello!

Please tell me, I have this error:

No TelegraphChat defined for this request {"exception":"[object] (DefStudio\Telegraph\Exceptions\TelegraphException(code: 0): No TelegraphChat defined for this request

Code from docs:

namespace App\Http\Controllers;
use DefStudio\Telegraph\Facades\Telegraph;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use DefStudio\Telegraph\Handlers\WebhookHandler;
use DefStudio\Telegraph\Keyboard\Keyboard;
use DefStudio\Telegraph\Keyboard\ReplyKeyboard;
use DefStudio\Telegraph\Models\TelegraphChat;
use DefStudio\Telegraph\Models\TelegraphBot;
use DefStudio\Telegraph\Keyboard\Button;
class WebhookController extends WebhookHandler
{
 public function test()
 {
 Telegraph::message('hello world')
 ->keyboard(Keyboard::make()->buttons([
 Button::make("🗑️ Delete")->action("delete")->param('id', 1),
 Button::make("📖 Mark as Read")->action("read")->param('id', 2),
 Button::make("👀 Open")->url('https://test.it'),
 ])->chunk(2))->send();
 }

Thanks in advance!

You must be logged in to vote

Replies: 1 comment

Comment options

Hi, you should set the destination Chat where you want to send your message, otherwise telegraph doesn't know where to sent it

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #639 on September 05, 2024 08:55.

AltStyle によって変換されたページ (->オリジナル) /