Open
Description
PHP version
8.0
irazasyed/telegram-bot-sdk version
v3.14.0
Laravel version (if any)
11
Code To Reproduce the bug
hi, i want to get a bot name from token, i made this method in TelegramService Class:
public static function getBotNameByToken($token)
{
$bot_name = null;
$bots = Telegram::getBots();
foreach (array_keys($bots) as $name) {
if (Telegram::bot($name)->getAccessToken() == $token) {
$bot_name = $name;
break;
}
}
return $bot_name;
}
the problem is Telegram::getBots() is returning an empty array, it used to work but suddenly its just returning empty, i registered a few bots in the telegram.php config file, and when i do Telegram::bot('bot_name') its working, but they will not get included in getBots method anymore, why is that??
Error stacktrace (if any)
No response