Explorar o código

show traceback on getMe error

painor %!s(int64=4) %!d(string=hai) anos
pai
achega
e306b04977
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      gramjs/client/users.ts

+ 3 - 0
gramjs/client/users.ts

@@ -72,6 +72,9 @@ export async function getMe(client: TelegramClient, inputPeer = false): Promise<
         }
         return inputPeer ? client._selfInputPeer : me;
     } catch (e) {
+        if (client._log.canSend('error')){
+            console.log(e);
+        }
         throw new Error("Could not get me");
     }
 }