Advertisement
Bapen1k

Untitled

Apr 2nd, 2018
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const VK = require('vk-io');
  2.  
  3. const arr = [
  4.   ['login', 'pass'],
  5.   ['login', 'pass']
  6. ]
  7. const user = [];
  8.  
  9. for (let i = 0; i < arr.length; i++) {
  10.   const phone = arr[i][0];
  11.   const pass = arr[i][1];
  12.   user[i] = new VK({
  13.     phone: phone,
  14.     pass: pass
  15.   });
  16.   user[i].auth.iphone().run()
  17.     .then((account) => {
  18.       user[i].setToken(account.token);
  19.       console.log(account.token);
  20.     })
  21.     .catch((err) => {
  22.       console.error(err);
  23.     });
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement