Use static rpc endpoints

This commit is contained in:
Daniil Gentili 2019-07-27 12:37:05 +02:00
parent b38366dd55
commit 60efcb67c5
2 changed files with 3 additions and 3 deletions

View File

@ -23,8 +23,8 @@ trait Methods
{
public function mk_methods()
{
$bots = json_decode(file_get_contents('https://rpc.pwrtelegram.xyz/?bot'), true)['result'];
$errors = json_decode(file_get_contents('https://rpc.pwrtelegram.xyz/?all'), true);
$bots = json_decode(file_get_contents('https://rpc.madelineproto.xyz/bot.json'), true)['result'];
$errors = json_decode(file_get_contents('https://rpc.madelineproto.xyz/v1.json'), true);
$errors['result'] = array_merge_recursive(...$errors['result']);
foreach (glob('methods/'.$this->any) as $unlink) {
unlink($unlink);

View File

@ -176,7 +176,7 @@ class Magic
}
}
$res = json_decode(@file_get_contents('https://rpc.pwrtelegram.xyz/?allv3'), true);
$res = json_decode(@file_get_contents('https://rpc.madelineproto.xyz/v3.json'), true);
if (isset($res['ok']) && $res['ok']) {
RPCErrorException::$errorMethodMap = $res['result'];
RPCErrorException::$descriptions += $res['human_result'];