yolkbot 0.1.2-alpha.17 → 0.1.2-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/build/global.js +1 -1
- package/browser/build/module.js +1 -1
- package/package.json +1 -1
- package/src/bot.js +2 -2
- package/src/types/bot.d.ts +1 -0
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -1724,11 +1724,11 @@ export class Bot {
|
|
|
1724
1724
|
if (typeof response === 'string') return response;
|
|
1725
1725
|
|
|
1726
1726
|
this.account.cw.limit = response.limit;
|
|
1727
|
-
this.account.cw.atLimit = response.limit
|
|
1727
|
+
this.account.cw.atLimit = response.limit >= 5;
|
|
1728
1728
|
|
|
1729
1729
|
// if there is a "span", that means that it's under the daily limit and you can play again soon
|
|
1730
1730
|
// if there is a "period", that means that the account is done for the day and must wait a long time
|
|
1731
|
-
this.account.cw.secondsUntilPlay =
|
|
1731
|
+
this.account.cw.secondsUntilPlay = (this.cw.atLimit ? response.period : response.span) || 0;
|
|
1732
1732
|
this.account.cw.canPlayAgain = Date.now() + (this.account.cw.secondsUntilPlay * 1000);
|
|
1733
1733
|
|
|
1734
1734
|
return this.account.cw;
|
package/src/types/bot.d.ts
CHANGED
|
@@ -232,6 +232,7 @@ export class Bot {
|
|
|
232
232
|
createPrivateGame(opts: { region: string; mode: string; map: string }): Promise<RawGameData>;
|
|
233
233
|
join(botName: string, data: string | RawGameData): Promise<void>;
|
|
234
234
|
|
|
235
|
+
processPacket(data: number[]): void;
|
|
235
236
|
dispatch(disp: ADispatch): void;
|
|
236
237
|
update(): void;
|
|
237
238
|
|