converted ShaiBot casino to Nut Economy

This commit is contained in:
2026-08-19 14:10:38 +02:00
parent a126de21d4
commit 1957991182
55 changed files with 8905 additions and 751 deletions
+14
View File
@@ -0,0 +1,14 @@
const {
showNutHub
} = require("../../utils/nutHub");
module.exports = {
name: "nutHubBack",
async execute(interaction) {
return showNutHub(
interaction
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
showNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutHubBlackjack",
async execute(
interaction
) {
return showNutBlackjack(
interaction
);
}
};
+20
View File
@@ -0,0 +1,20 @@
const {
startNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackBet10",
async execute(
interaction
) {
return startNutBlackjack(
interaction,
10
);
}
};
+20
View File
@@ -0,0 +1,20 @@
const {
startNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackBet100",
async execute(
interaction
) {
return startNutBlackjack(
interaction,
100
);
}
};
+20
View File
@@ -0,0 +1,20 @@
const {
startNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackBet1000",
async execute(
interaction
) {
return startNutBlackjack(
interaction,
1000
);
}
};
+20
View File
@@ -0,0 +1,20 @@
const {
startNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackBet50",
async execute(
interaction
) {
return startNutBlackjack(
interaction,
50
);
}
};
+20
View File
@@ -0,0 +1,20 @@
const {
startNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackBet500",
async execute(
interaction
) {
return startNutBlackjack(
interaction,
500
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
doubleNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackDouble",
async execute(
interaction
) {
return doubleNutBlackjack(
interaction
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
hitNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackHit",
async execute(
interaction
) {
return hitNutBlackjack(
interaction
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
standNutBlackjack
} = require(
"../../utils/nutBlackjack"
);
module.exports = {
name:
"nutBlackjackStand",
async execute(
interaction
) {
return standNutBlackjack(
interaction
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
showNutHeist
} = require(
"../../utils/nutHeist"
);
module.exports = {
name:
"nutHubHeist",
async execute(
interaction
) {
return showNutHeist(
interaction
);
}
};
+22
View File
@@ -0,0 +1,22 @@
// buttons/nutHub/heistHack.js
const {
performNutHeist
} = require(
"../../utils/nutHeist"
);
module.exports = {
name:
"nutHeistHack",
async execute(
interaction
) {
return performNutHeist(
interaction,
"Hack"
);
}
};
+22
View File
@@ -0,0 +1,22 @@
// buttons/nutHub/heistSmash.js
const {
performNutHeist
} = require(
"../../utils/nutHeist"
);
module.exports = {
name:
"nutHeistSmash",
async execute(
interaction
) {
return performNutHeist(
interaction,
"Smash"
);
}
};
+22
View File
@@ -0,0 +1,22 @@
// buttons/nutHub/heistSneak.js
const {
performNutHeist
} = require(
"../../utils/nutHeist"
);
module.exports = {
name:
"nutHeistSneak",
async execute(
interaction
) {
return performNutHeist(
interaction,
"Sneak"
);
}
};
+21
View File
@@ -0,0 +1,21 @@
// buttons/nutHub/roulette.js
const {
showNutRoulette
} = require(
"../../utils/nutRoulette"
);
module.exports = {
name:
"nutHubRoulette",
async execute(
interaction
) {
return showNutRoulette(
interaction
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBet10.js
const {
chooseNutRouletteBet
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBet10",
async execute(interaction) {
return chooseNutRouletteBet(
interaction,
10
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBet100.js
const {
chooseNutRouletteBet
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBet100",
async execute(interaction) {
return chooseNutRouletteBet(
interaction,
100
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBet1000.js
const {
chooseNutRouletteBet
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBet1000",
async execute(interaction) {
return chooseNutRouletteBet(
interaction,
1000
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBet50.js
const {
chooseNutRouletteBet
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBet50",
async execute(interaction) {
return chooseNutRouletteBet(
interaction,
50
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBet500.js
const {
chooseNutRouletteBet
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBet500",
async execute(interaction) {
return chooseNutRouletteBet(
interaction,
500
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteBlack.js
const {
playNutRoulette
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteBlack",
async execute(interaction) {
return playNutRoulette(
interaction,
"Black"
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteEven.js
const {
playNutRoulette
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteEven",
async execute(interaction) {
return playNutRoulette(
interaction,
"Even"
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteOdd.js
const {
playNutRoulette
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteOdd",
async execute(interaction) {
return playNutRoulette(
interaction,
"Odd"
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteRed.js
const {
playNutRoulette
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteRed",
async execute(interaction) {
return playNutRoulette(
interaction,
"Red"
);
}
};
+15
View File
@@ -0,0 +1,15 @@
// buttons/nutHub/rouletteZero.js
const {
playNutRoulette
} = require("../../utils/nutRoulette");
module.exports = {
name: "nutRouletteZero",
async execute(interaction) {
return playNutRoulette(
interaction,
"Zero"
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutSlotsBet10",
async execute(
interaction
) {
return playNutSlots(
interaction,
10
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutSlotsBet100",
async execute(
interaction
) {
return playNutSlots(
interaction,
100
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutSlotsBet1000",
async execute(
interaction
) {
return playNutSlots(
interaction,
1000
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutSlotsBet50",
async execute(
interaction
) {
return playNutSlots(
interaction,
50
);
}
};
+19
View File
@@ -0,0 +1,19 @@
const {
playNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutSlotsBet500",
async execute(
interaction
) {
return playNutSlots(
interaction,
500
);
}
};
+21
View File
@@ -0,0 +1,21 @@
// buttons/nutHub/slots.js
const {
showNutSlots
} = require(
"../../utils/nutSlots"
);
module.exports = {
name:
"nutHubSlots",
async execute(
interaction
) {
return showNutSlots(
interaction
);
}
};
+4 -4
View File
@@ -13,11 +13,11 @@ module.exports = {
const db = mClient.db(process.env.M_DB)
const nutsColl = db.collection('items_nuts')
await nutsColl.findOneAndUpdate({ userID: from.id }, { $inc: { nuts: -amount } }, { upsert: true })
await nutsColl.findOneAndUpdate({ userID: to.id }, { $inc: { nuts: +amount } }, { upsert: true })
await nutsColl.findOneAndUpdate({ userId: from.id }, { $inc: { nuts: -amount } }, { upsert: true })
await nutsColl.findOneAndUpdate({ userId: to.id }, { $inc: { nuts: +amount } }, { upsert: true })
const yourBalance = await nutsColl.findOne({ userID: from.id })
const theirBalance = await nutsColl.findOne({ userID: to.id })
const yourBalance = await nutsColl.findOne({ userId: from.id })
const theirBalance = await nutsColl.findOne({ userId: to.id })
const embed = new EmbedBuilder()
.setTitle('Gib Nuss!')
.setDescription(`Willst du wirklich **${amount}** Nüsse an <@${to.id}> senden?`)
+2 -2
View File
@@ -12,8 +12,8 @@ module.exports = {
const db = mClient.db(process.env.M_DB)
const nutsColl = db.collection('items_nuts')
const yourBalance = await nutsColl.findOne({ userID: from.id })
const theirBalance = await nutsColl.findOne({ userID: to.id })
const yourBalance = await nutsColl.findOne({ userId: from.id })
const theirBalance = await nutsColl.findOne({ userId: to.id })
const embed = new EmbedBuilder()
.setTitle('Gib Nuss!')
+1 -1
View File
@@ -19,7 +19,7 @@ module.exports = {
let fields
nutsData.forEach((data) => {
skip++
fields = (fields ? fields : '') + (`${skip}. <@${data.userID}> : ${data.nuts} Nuts\r\n`)
fields = (fields ? fields : '') + (`${skip}. <@${data.userId}> : ${data.nuts} Nuts\r\n`)
})
const embed = new EmbedBuilder()
.setTitle('Nuts Leaderboard')
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = {
let fields
nutsData.forEach((data) => {
skip++
fields = (fields ? fields : '') + (`${skip}. <@${data.userID}> : ${data.nuts} Nuts\r\n`)
fields = (fields ? fields : '') + (`${skip}. <@${data.userId}> : ${data.nuts} Nuts\r\n`)
})
const embed = new EmbedBuilder()
.setTitle('Nuts Leaderboard')
+3 -3
View File
@@ -8,7 +8,7 @@ module.exports = {
const db = mClient.db(process.env.M_DB)
const nutsColl = db.collection('items_nuts')
const self = await nutsColl.find({ userID: interaction.user.id }).toArray()
const self = await nutsColl.find({ userId: interaction.user.id }).toArray()
const all = await nutsColl.find({ nuts: { $gt: 0 } }).sort({ nuts: -1 }).toArray()
function findIndex(){
@@ -16,7 +16,7 @@ module.exports = {
for (let i = 0; i < all.length; i++) {
index++
if (all[i].nuts === self[0].nuts) {
return index
return index - 1
}
}
}
@@ -27,7 +27,7 @@ module.exports = {
let fields
nutsData.forEach((data) => {
skip++
fields = (fields ? fields : '') + (`${skip}. <@${data.userID}> : ${data.nuts} Nuts\r\n`)
fields = (fields ? fields : '') + (`${skip}. <@${data.userId}> : ${data.nuts} Nuts\r\n`)
})
const embed = new EmbedBuilder()
.setTitle('Nuts Leaderboard')