defstudio / telegraph

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

Buttons do not send a response:( #538

Closed Freshblood1121 closed 8 months ago

Freshblood1121 commented 8 months ago

oil Hello, when you click on a button with an action. It doesn't happen.

public function hello()
    {
         Telegraph::message('hello world')
            ->keyboard(Keyboard::make()->buttons([
                Button::make('  1993  ')->action('start'),
                Button::make('  1994  ')->action('finish'),
                Button::make('  1995  ')->action('good'),
                Button::make('  1996  ')->action('mixefuytud'),
                Button::make('  1997  ')->action('circle'),
                Button::make('  1998  ')->action('round'),
                Button::make('  1999  ')->action('QWDQ'),
                Button::make('  2000 ')->action('wgeweg'),
                Button::make('  2001  ')->action('rokyu'),
                Button::make('  2002  ')->action('rourt'),
                Button::make('  2003  ')->action('mixed'), //here
                Button::make('  2004  ')->action('rosdgd'),
                Button::make('  <-  ')->action('rounre'),
                Button::make('    ')->action('blabla'),
                Button::make('    ')->action('oks'),
            ])->chunk(3))->send();
    }

    public function mixed()
    {
        //typing...
        $this->chat->action(ChatActions::TYPING)->send();
        $this->chat->message('wow')->send();
    }
Freshblood1121 commented 8 months ago

Ok, I should have seen it while the server loaded the code :)