debug button/menu interactions
This commit is contained in:
12 files changed
+844
-834
No files matched your search
+2
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user