Skip to content

Commit

Permalink
[entities/aoc] Remove the sendLoop
Browse files Browse the repository at this point in the history
  • Loading branch information
lexisother committed Nov 4, 2024
1 parent 47e3b06 commit 01ac07f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/entities/aoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ abstract class AOCViewerEntity<T> extends WatcherEntity {
// <https://codeberg.org/Ven/bot/src/commit/e29d10e70de664ccd5f47d9e2140c15bc4762aa0/src/aoc.ts>
export class AOCLeaderboardEntity extends AOCViewerEntity<Leaderboard> {
public leaderboard: Leaderboard;
public sendLoop: NodeJS.Timer;

public constructor(c: CCBot, data: AOCViewerEntityData) {
super(c, "aoc-viewer", data);
this.leaderboard = { members: {} }; // dummy to satisfy type

this.sendLoop = setInterval(this.postMessage, 1000 * 60 * 15);
}

public parseEndpointResponse(data: Leaderboard): void {
Expand All @@ -95,7 +92,6 @@ export class AOCLeaderboardEntity extends AOCViewerEntity<Leaderboard> {

public onKill(transferOwnership: boolean): void {
super.onKill(transferOwnership);
clearInterval(this.sendLoop);
}

public async postMessage(): Promise<void> {
Expand Down

0 comments on commit 01ac07f

Please sign in to comment.