change/simplify err function handles

This commit is contained in:
SowinskiBraeden authored and GitHub committed 2023-09-04 10:52:16 -07:00
1 parent cbdbd18051
commit 317c48de36
19 files changed
+61 -61

No files matched your search

+2 -2
View File
@@ -155,7 +155,7 @@ module.exports = {
const newBalance = banking.guilds[GuildDB.serverID].balance - args[0].options[1].value;
client.dbo.collection("users").updateOne({"user.userID":interaction.member.user.id},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newBalance}}, function(err, res) {
client.dbo.collection("users").updateOne({"user.userID":interaction.member.user.id},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newBalance}}, (err, res) => {
if (err) return client.sendInternalError(interaction, err);
});
@@ -181,7 +181,7 @@ module.exports = {
const newTargetBalance = targetUserBanking.guilds[GuildDB.serverID].balance + args[0].options[1].value;
client.dbo.collection("users").updateOne({"user.userID":targetUserID},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newTargetBalance}}, function(err, res) {
client.dbo.collection("users").updateOne({"user.userID":targetUserID},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newTargetBalance}}, (err, res) => {
if (err) return client.sendInternalError(interaction, err);
});