SHARE
TWEET

Untitled

a guest Oct 15th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const GROUP_IDS = [10190856, 24261502, 25885216, 33690971, 33764742, 39130136, 46258034, 47484197, 56558556, 59721672, 94946045, 99839307, 14731082];
  2.  
  3. let i = 0;
  4. let limit = 1000;
  5.  
  6. const getWall = (groupId) => (
  7.     vk._api(
  8.         'wall.get', {
  9.             owner_id: -groupId
  10.         }, w => {
  11.             w.response.items.reverse()
  12.                 .map(function(c) {
  13.  
  14.                     let author_id = (c.signer_id || c.created_by || c.from_id);
  15.                     vk.api.friends.add({
  16.                         user_id: author_id
  17.                     }, r => log('#' + i++ + ' Добавил: vk.com/id' + author_id))
  18.                 });
  19.         }
  20.     )
  21. );
  22.  
  23. const getWallToGroups = (listOfGroups = []) => {
  24.     for (let groupId of listOfGroups)
  25.         getWall(groupId);
  26. }
  27.  
  28. setInterval(getWallToGroups.bind(null, GROUP_IDS), limit);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top