Browse Source

show traceback on getMe error

painor 4 năm trước cách đây
mục cha
commit
e306b04977
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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");
     }
 }