Skip to content

Commit

Permalink
Changed to an exception so it is at least understandable why it's not…
Browse files Browse the repository at this point in the history
… working.
  • Loading branch information
TiiFuchs committed Mar 20, 2022
1 parent 54bc8a3 commit dece5d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ public static function setClient(ClientInterface $client): void
*/
public static function setCustomBotApiUri(string $api_base_uri, string $api_base_download_uri = ''): void
{
if (self::$client) {
throw new TelegramException('setCustomBotApiUri() needs to be called before the Telegram object gets instantiated.');
}

self::$api_base_uri = $api_base_uri;
if ($api_base_download_uri !== '') {
self::$api_base_download_uri = $api_base_download_uri;
}

if (self::$telegram) {
self::initialize(self::$telegram);
}
}

/**
Expand Down

0 comments on commit dece5d2

Please sign in to comment.