Closed decadence closed 5 years ago
Ok, I forgot how array_replace_recursive
works. So my chat_id will have priority.
But there is another problem: we have to load driver manually (like say
method does):
$bot->setDriver(DriverManager::loadFromName(TelegramDriver::class, $config));
$bot->sendRequest("pinChatMessage", [
"chat_id" => $chatId,
"message_id" => 40,
]);
Can you loadDriver
inside sendRequest
like in say
method?
Because by default it's NullDriver
which does nothing and it was hard to debug.
You can call loadDriver
in your bootstrap file. From the docs:
DriverManager::loadDriver(\BotMan\Drivers\Telegram\TelegramDriver::class);
// Create BotMan instance
BotManFactory::create($config);
It's different thing. You have to setDriver even if you loadDriver before (say method does it for example). Without loadDriver nothing is going to work at all.
anyone found a solution to this?
Let's say I want
sendRequest
with custom chat_id like this withouthears
method:This is not going to work because
sendRequest
always replaces my chat_id with Message.In case we are not in
hears
method it will be null so nothing works. Can you provide a way to pass custom chat_id?