Skip to content

Telegraph Facade #639

Closed
Closed

Description

@mrStanislav

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!

Activity

  1. locked and limited conversation to collaborators on Sep 5, 2024
  2. converted this issue into a discussion #640 on Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions