瀏覽代碼

Update examples

painor 4 年之前
父節點
當前提交
e1fe1d0d0f
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 1
      examples/simpleLogin.html
  2. 1 3
      examples/simpleLogin.js

+ 1 - 1
examples/simpleLogin.html

@@ -37,7 +37,7 @@
 
 </form>
 </body>
-<script src="https://painor.dev/gramjs.js?version=0.0.2"></script>
+<script src="../browser/gramjs.js"></script>
 <!--Loading the library-->
 <script src="betterLogging.js"></script>
 <!--beautifies the ouput (this rewrites console.log)-->

+ 1 - 3
examples/simpleLogin.js

@@ -64,9 +64,7 @@ const client = new TelegramClient(new StringSession(''), apiId, apiHash) // you
 // client.session.setDC(2, '149.154.167.40', 80)
 
 client.start({
-    phone: phoneCallback,
-    password: passwordCallback,
-    code: codeCallback,
+    botAuthToken: phoneCallback,
 }).then(() => {
     console.log('%c you should now be connected', 'color:#B54128')
     console.log('%c your string session is ' + client.session.save(), 'color:#B54128')