debug button/menu interactions

This commit is contained in:
SowinskiBraeden committed 2022-08-29 21:26:22 -07:00
1 parent eebda1c209
commit 70d3858baf
12 files changed
+844 -834

No files matched your search

+2 -2
View File
@@ -57,7 +57,7 @@ module.exports = {
}
const targetUserID = args[0].options[0].value.replace('<@!', '').replace('>', '');
let banking = await client.dbo.collection("banks").findOne({"account.userID": targetUserID}).then(banking => banking);
let banking = await client.dbo.collection("banks").findOne({"banking.userID": targetUserID}).then(banking => banking);
if (!banking) {
banking = {
@@ -103,7 +103,7 @@ module.exports = {
const newTargetBalance = banking.guilds[GuildDB.serverID].account.balance - args[0].options[1].value;
client.dbo.collection("banks").updateOne({"account.userID":targetUserID},{$set:{[`banking.guilds.${GuildDB.serverID}.account.balance`]:newTargetBalance}}, function(err, res) {
client.dbo.collection("banks").updateOne({"banking.userID":targetUserID},{$set:{[`banking.guilds.${GuildDB.serverID}.account.balance`]:newTargetBalance}}, function(err, res) {
if (err) {
client.error(err);
const embed = new EmbedBuilder()