Skip to content

Commit

Permalink
fix: drpg timer crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciborn committed Sep 1, 2022
1 parent 1587acc commit e125c8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aldebaran",
"version": "4.1.0",
"version": "4.1.2",
"description": "Utility",
"main": "src/app.ts",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/bots/DiscordRPG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default async (ctx: DiscordMessageContext) => {
const hpMatches = [...ctx.content.matchAll(adv3HealthRegex)];
if (hpMatches) {
const playerHP = Number(hpMatches[0][1]);
const petHP = hpMatches[1][1] ? Number(hpMatches[1][1]) : 0;
const petHP = hpMatches[1] ? Number(hpMatches[1][1]) : 0;
return percentageCheck(user, ctx, playerHP, petHP);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/timer/DiscordRPG/sides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async (ctx: DiscordMessageContext<true>) => {
if (deleteSetting === "on") {
setTimeout(() => msg.delete(), 180000);
}
});
}).catch(() => {});
author.timers.sides = null;
}, 299250);

Expand Down Expand Up @@ -72,6 +72,6 @@ export default async (ctx: DiscordMessageContext<true>) => {
});
}
});
});
}).catch(() => {});
}
};

0 comments on commit e125c8d

Please sign in to comment.