Skip to content

Commit

Permalink
Add some accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
zzarcon committed Apr 14, 2019
1 parent 7ed1f28 commit 4af3e66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ src/*.js
src/**/*.json
example/**/*.json
dist
debug.png
debug.png
example/accounts.ts
8 changes: 5 additions & 3 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import LuckyBot from '../src';
import {getAccount} from './accounts';

const run = async () => {
const user = process.env.LUCKYBOT_USER;
Expand All @@ -12,15 +13,16 @@ const run = async () => {
const bot = new LuckyBot(user, pass, {debug: true, cookiePath});

await bot.login();
await getUser(bot, 'zzarcon');
// await likeFollowersPhotos(bot);
await likeFollowersPhotos(bot);
// await likeHashtag(bot);
console.log('CLOSE...');
await bot.close();
};

const likeFollowersPhotos = async (bot: LuckyBot) => {
const likedMedias = await bot.likeFollowersPhotos('5465909933', {maxLikes: 2});
const accountId = getAccount();
console.log('likeFollowersPhotos', {accountId});
const likedMedias = await bot.likeFollowersPhotos(accountId, {maxLikes: 2});
console.log({likedMedias});
}

Expand Down

0 comments on commit 4af3e66

Please sign in to comment.