telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

Method [replyKeyboardMarkup] does not exist ?

Open BehroozBvk opened this issue 7 years ago • 13 comments

Hi , I use the develop version and I want to create a response, but with the following error, I can: [2017-11-08 00:06:47] local.ERROR: Method [replyKeyboardMarkup] does not exist. {"exception":"[object] (BadMethodCallException(code: 0): Method [replyKeyboardMarkup] does not exist. at C:\\xampp\\htdocs\ eservitionBot\\vendor\\irazasyed\\telegram-bot-sdk\\src\\Api.php:98)

Mycode :

$keyboard = [
                    ['test1','test1','test1']
                ];
                $reply_markup = Telegram::replyKeyboardMarkup([
                    'keyboard' => $keyboard,
                    'resize_keyboard' => true,
                    'one_time_keyboard' => true
                ]);

                Telegram::sendPhoto([
                    'chat_id' => $chat_id,
                    'photo' => 'AgADBAADMakxGy85YFOiekhnRNtSr1od-hkABPvv-7v-92YinTgCAAEC',
                    'caption' =>   'hi',
                    'reply_markup' => $reply_markup
                ]);```

Is this method defined in this version?

BehroozBvk avatar Nov 07 '17 20:11 BehroozBvk

Someone has no suggestion?

BehroozBvk avatar Nov 11 '17 16:11 BehroozBvk

The problem solved by adding the following code in the Api.php file has been resolved.

public function replyKeyboardMarkup(array $params) { return Keyboard::make($params); }

Why is the patch upgraded this way irregularly instead of getting better?

BehroozBvk avatar Nov 20 '17 08:11 BehroozBvk

Telegram::replyKeyboardMarkup is deprecated! Use Telegram\Bot\Keyboard\Keyboard::make(array $params = []) instead. To be removed in next major version.

Why not use $reply_markup = Keyboard::make($params); directly?

ghost avatar Nov 30 '17 15:11 ghost

Telegram::replyKeyboardMarkup is deprecated! Use Telegram\Bot\Keyboard\Keyboard::make(array $params = []) instead. To be removed in next major version.

Why not use $reply_markup = Keyboard::make($params); directly?

is more information available about this ? can i find related information from Telegram documents ?

Milad-jfr avatar Apr 18 '20 21:04 Milad-jfr

Actually the replyKeyboardMarkup is deprecated so what you will use now is use Telegram\Bot\Keyboard\Keyboard and then

$reply_markup = Keyboard::make([
    'keyboard' => $keyboard, 
    'resize_keyboard' => true, 
    'one_time_keyboard' => true
]); 

MahbodHastam avatar May 04 '20 21:05 MahbodHastam

@MahbodHastam where to get the documentation for v 3.0?( Without documentation, like a blind person!

Itsmaqsud avatar May 05 '20 09:05 Itsmaqsud

its a little weird about this package. The Developer providing ver 2 on website and docs are for ver 2 . then it passed more than one year from that version and now developers use ver 3 ( dev version ) because of outdated live version(v2). so everyone looks for ver 3 docs on the web ! , and it seems The Developer does not have any plan for Update !

Milad-jfr avatar May 05 '20 17:05 Milad-jfr

its a little weird about this package. Developer providing ver 2 on website and docs are for ver 2 . then it passed more than one year from that version and now developers use ver 3 ( dev version ) because of outdated live version(v2). so everyone looks for ver 3 docs on the web ! , and it seems The Developer does not have any plan for Update !

I spoke with the developer, he has already developed version 4.0! Soon plans to make a release, I hope with the documentation :) LMAO

Itsmaqsud avatar May 05 '20 18:05 Itsmaqsud

Yes, 4.0 will be released with documentation and tutorials.

Xibel avatar May 05 '20 21:05 Xibel

А сроки кто то называл какие то? А то вообще печаль без доки нормальной

dmdevelops avatar Jun 02 '20 12:06 dmdevelops

А сроки кто то называл какие то? А то вообще печаль без доки нормальной

Товарищ) вы нашли альтернативное решение или продолжили использовать эту либу?

paulvales avatar Apr 12 '21 09:04 paulvales

Any updates on the updated documentation? A year has passed.

shokanshi avatar Jun 05 '21 13:06 shokanshi

please update the documentation.

ZekiJohn avatar Nov 03 '21 08:11 ZekiJohn