westacks / telebot

Easy way to create Telegram bots in PHP
https://westacks.github.io/telebot/
MIT License
282 stars 44 forks source link

class ReplyKeyboardMarkup error #16

Closed sukidiong closed 3 years ago

sukidiong commented 3 years ago

I'm getting an error when i'm using

$keyboard = Keyboard::create([
    'keyboard' => [[[
                'text' => 'Test Keyboard Button',
            ]]],
        ]);

The error is "Unable to cast "boolean" variable to type "bookean".

I think there is a mistake in the bolded part of the code below.

class ReplyKeyboardMarkup extends Keyboard
{
    protected function relations()
    {
        return [
            'keyboard' => [[KeyboardButton::class]],
            'resize_keyboard' => 'boolean',
            'one_time_keyboard' => 'boolean',
            'selective' => 'bookean', // typo in boolean
        ];
    }
}
punyflash commented 3 years ago

Thanks a lot! Fixed in 3370c20dcd446a1ba609cc40d42592f2304836bf. Please update your library to version 1.10.3 to fix issue in your project.