Skip to content

Commit

Permalink
rm old func
Browse files Browse the repository at this point in the history
  • Loading branch information
Niceygy committed Jul 19, 2024
1 parent b8912a3 commit 9fb531d
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,28 +196,6 @@ const checkBW = async (word) => {
}
};

/**
*
* @param {Number} userId
* @param {Number} balance
*/
const saveEconomy = async (userId, balance) => {
if (!connected || !db) {
await connectToDB();
}

const economyNew = economicModule({ userId, balance });

economyNew.save((err) => {
if (err) {
console.error(err);
return false;
}
});

//consoleMessage("Data added to DB!", "mongoDB"); //for debugging only
return true;
};

/**
* @param {Number} UserID ID of the user who`s level you need to save.
Expand Down Expand Up @@ -272,18 +250,6 @@ const getXP = async (userId) => {
return userRank.xp ?? 0;
};

const getEconomy = async (userId) => {
if (!connected || !db) {
await connectToDB();
}

const userEconomy = await economicModule.findOne({ userId });

//consoleMessage("Data recived from DB!");
//consoleMessage(userEconomy);
return userEconomy;
};

/**
* @param {Number} startTime Start time of the bot
* @example await startTime("time")
Expand Down Expand Up @@ -561,7 +527,6 @@ module.exports = {
addIgnoredChannel,
checkIgnoredChannel,
saveEconomy,
getEconomy,
saveWelcomeToggle,
checkBW,
getWelcomeToggle,
Expand Down

0 comments on commit 9fb531d

Please sign in to comment.