Pārlūkot izejas kodu

Update examples

painor 4 gadi atpakaļ
vecāks
revīzija
e1fe1d0d0f
2 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 1 1
      examples/simpleLogin.html
  2. 1 3
      examples/simpleLogin.js

+ 1 - 1
examples/simpleLogin.html

@@ -37,7 +37,7 @@
 
 
 </form>
 </form>
 </body>
 </body>
-<script src="https://painor.dev/gramjs.js?version=0.0.2"></script>
+<script src="../browser/gramjs.js"></script>
 <!--Loading the library-->
 <!--Loading the library-->
 <script src="betterLogging.js"></script>
 <script src="betterLogging.js"></script>
 <!--beautifies the ouput (this rewrites console.log)-->
 <!--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.session.setDC(2, '149.154.167.40', 80)
 
 
 client.start({
 client.start({
-    phone: phoneCallback,
-    password: passwordCallback,
-    code: codeCallback,
+    botAuthToken: phoneCallback,
 }).then(() => {
 }).then(() => {
     console.log('%c you should now be connected', 'color:#B54128')
     console.log('%c you should now be connected', 'color:#B54128')
     console.log('%c your string session is ' + client.session.save(), 'color:#B54128')
     console.log('%c your string session is ' + client.session.save(), 'color:#B54128')