mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 17:56:15 +00:00
feat: add free rewards redemption feature; require phone number in account config
This commit is contained in:
@@ -134,6 +134,17 @@ export class DesktopFlow {
|
||||
}
|
||||
}
|
||||
|
||||
// Do free rewards redemption
|
||||
if (this.bot.config.workers.doFreeRewards) {
|
||||
try {
|
||||
await this.bot.workers.doFreeRewards(workerPage)
|
||||
} catch (rewardsError) {
|
||||
const errorMsg = rewardsError instanceof Error ? rewardsError.message : String(rewardsError)
|
||||
this.bot.log(false, 'DESKTOP-FLOW', `Free rewards redemption failed: ${errorMsg}`, 'error')
|
||||
// Don't throw - continue flow
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch points BEFORE closing (avoid page closed reload error)
|
||||
const after = await this.bot.browser.func.getCurrentPoints().catch(() => initial)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user