We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54bc8a3 commit dece5d2Copy full SHA for dece5d2
src/Request.php
@@ -323,14 +323,14 @@ public static function setClient(ClientInterface $client): void
323
*/
324
public static function setCustomBotApiUri(string $api_base_uri, string $api_base_download_uri = ''): void
325
{
326
+ if (self::$client) {
327
+ throw new TelegramException('setCustomBotApiUri() needs to be called before the Telegram object gets instantiated.');
328
+ }
329
+
330
self::$api_base_uri = $api_base_uri;
331
if ($api_base_download_uri !== '') {
332
self::$api_base_download_uri = $api_base_download_uri;
333
}
-
- if (self::$telegram) {
- self::initialize(self::$telegram);
- }
334
335
336
/**
0 commit comments