Api icon indicating copy to clipboard operation
Api copied to clipboard

Object of class TelegramBot\Api\Types\Inline\InlineKeyboardMarkup could not be converted to int

Open luxueqi1234 opened this issue 1 year ago • 5 comments

image i only try a test

luxueqi1234 avatar Mar 07 '23 11:03 luxueqi1234

I some question , i need help

amu1433 avatar Mar 20 '23 04:03 amu1433

lost a param $bot->sendmessage($chatId,$messageText, null, false, null, null,$keyboard)

luxueqi1234 avatar Mar 20 '23 04:03 luxueqi1234

I some question , i need help

add a null in front of $keyboard

luxueqi1234 avatar Mar 20 '23 09:03 luxueqi1234

@amu1433 Sorry for the late reply, did you solve your problem?

bernard-ng avatar Mar 29 '23 04:03 bernard-ng

For php ^8.0 you can use named arguments:

$api->sendMessage(
    chatId: $update->getMessage()->getChat()->getId(),
    text: $text,
    replyMarkup: new InlineKeyboardMarkup(/**/),
);

BoShurik avatar Apr 28 '23 07:04 BoShurik