Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from mrepol742/master
Browse files Browse the repository at this point in the history
Initial Commit
  • Loading branch information
mrepol742 authored Jan 22, 2024
2 parents d6fd065 + 1b8c6ee commit a23862e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4485,13 +4485,19 @@ async function ai(api, event) {
return;
}
}
getUserProfile(id, async function (name) {
getUserProfile(event.senderID, async function (name) {
if (!name.balance) {
sendMessage(api, event, "You have no balance to continue.");
sendMessage(api, event, "You have 0 $ balance yet.");
} else if (1000 > name.balance) {
sendMessage(api, event, "You don't have enough balance to continue!");
sendMessage(api, event, "You don't have enough balance!");
} else {
sendMessage(api, event, utils.formatOutput("Balance", [formatDecNum((name.balance / 1000) * 0.007) + "$ " + name.firstName], "github.com/prj-orion"));
getUserProfile(id, async function (name) {
if (!name.balance) {
sendMessage(api, event, name + " have 0 $ balance.");
} else {
sendMessage(api, event, utils.formatOutput("Balance", [formatDecNum((name.balance / 1000) * 0.007) + "$ " + name.firstName], "github.com/prj-orion"));
}
});
name.balance -= 1000;
}
});
Expand Down

0 comments on commit a23862e

Please sign in to comment.