mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-17 21:43:59 +00:00
* support passwordless auth (using Authenticator app) * update readme * feat: added mobile app tasks (daily check in + read to earn) * fix some stuff * make ReadToEarn use the delay config * fix daily reward search per week * reorder mobile tasks * fix message * Search fixes, reformatting and types --------- Co-authored-by: TheNetsky <56271887+TheNetsky@users.noreply.github.com>
64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
import { Page } from 'playwright'
|
|
|
|
import { MicrosoftRewardsBot } from '../index'
|
|
|
|
import { Search } from './activities/Search'
|
|
import { ABC } from './activities/ABC'
|
|
import { Poll } from './activities/Poll'
|
|
import { Quiz } from './activities/Quiz'
|
|
import { ThisOrThat } from './activities/ThisOrThat'
|
|
import { UrlReward } from './activities/UrlReward'
|
|
import { ReadToEarn } from './activities/ReadToEarn'
|
|
import { DailyCheckIn } from './activities/DailyCheckIn'
|
|
|
|
import { DashboardData } from '../interface/DashboardData'
|
|
|
|
|
|
export default class Activities {
|
|
private bot: MicrosoftRewardsBot
|
|
|
|
constructor(bot: MicrosoftRewardsBot) {
|
|
this.bot = bot
|
|
}
|
|
|
|
doSearch = async (page: Page, data: DashboardData): Promise<void> => {
|
|
const search = new Search(this.bot)
|
|
await search.doSearch(page, data)
|
|
}
|
|
|
|
doABC = async (page: Page): Promise<void> => {
|
|
const abc = new ABC(this.bot)
|
|
await abc.doABC(page)
|
|
}
|
|
|
|
doPoll = async (page: Page): Promise<void> => {
|
|
const poll = new Poll(this.bot)
|
|
await poll.doPoll(page)
|
|
}
|
|
|
|
doThisOrThat = async (page: Page): Promise<void> => {
|
|
const thisOrThat = new ThisOrThat(this.bot)
|
|
await thisOrThat.doThisOrThat(page)
|
|
}
|
|
|
|
doQuiz = async (page: Page): Promise<void> => {
|
|
const quiz = new Quiz(this.bot)
|
|
await quiz.doQuiz(page)
|
|
}
|
|
|
|
doUrlReward = async (page: Page): Promise<void> => {
|
|
const urlReward = new UrlReward(this.bot)
|
|
await urlReward.doUrlReward(page)
|
|
}
|
|
|
|
doReadToEarn = async (accessToken: string, data: DashboardData): Promise<void> => {
|
|
const readToEarn = new ReadToEarn(this.bot)
|
|
await readToEarn.doReadToEarn(accessToken, data)
|
|
}
|
|
|
|
doDailyCheckIn = async (accessToken: string, data: DashboardData): Promise<void> => {
|
|
const dailyCheckIn = new DailyCheckIn(this.bot)
|
|
await dailyCheckIn.doDailyCheckIn(accessToken, data)
|
|
}
|
|
|
|
} |