Skip to content

Commit

Permalink
fix: use aoiError
Browse files Browse the repository at this point in the history
  • Loading branch information
Faf4a committed Jul 2, 2024
1 parent 8485629 commit 5ef2b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions/stopTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async (d) => {
"setTimeout",
id,
);
if (!timeout) return d.error(`AoiError: Timeout ID ${id} not found.`);
if (!timeout) return d.aoiError.fnError(d, "custom", { inside: data.inside }, "Invalid Timeout ID Provided In");

if ((timeout.value.__duration__ - Date.now()) <= MAX_SAFE_INTEGER) {
clearTimeout(timeout.value.__id__);
Expand All @@ -23,4 +23,4 @@ module.exports = async (d) => {
return {
code: d.util.setCode(data),
};
};
};

0 comments on commit 5ef2b98

Please sign in to comment.