From 9ec6768b5692d1b571137c95098b5999163ec1eb Mon Sep 17 00:00:00 2001 From: KillerBossOriginal <“killerbossoriginal@outlook.it”> Date: Thu, 7 Dec 2023 13:10:33 +0100 Subject: [PATCH] credits balance also a string --- src/CreditsManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CreditsManager.ts b/src/CreditsManager.ts index 945526d..cad4510 100644 --- a/src/CreditsManager.ts +++ b/src/CreditsManager.ts @@ -15,7 +15,7 @@ export default class CreditsManager { * @param {number} id - The ID of the user. * @return {Promise} The balance of the user. */ - async balance(id: number) { + async balance(id: string|number) { let req = await axios.get(`${this.URL}/credits/${id}`); if (req.status == 404) throw new Error("User not found"); return req.data.credits;