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
+82 -25
View File
@@ -1,31 +1,88 @@
const { EmbedBuilder } = require('discord.js')
const { mClient } = require('../../../index')
require('dotenv').config()
module.exports = {
name: 'nutsCooldown',
description: 'shows nut cooldown',
aliases: ['ncd'],
async execute(message, args) {
const db = mClient.db(process.env.M_DB)
const nutsColl = db.collection('items_cooldowns')
const cooldown = await nutsColl.findOne({ userID: message.author.id })
const {
EmbedBuilder
} = require("discord.js");
let content = `Du kannst wieder nussen! :)`
let thumbnail = 'https://cdn-icons-png.flaticon.com/512/7451/7451659.png'
let title = 'Go Nuts!'
if (cooldown) {
content = `<t:${cooldown.cooldown}:R> kannst du wieder nussen! ;)`
thumbnail = 'https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png'
title = 'To Nut or Not to Nut...'
const {
getCooldown,
getUnixTime
} = require(
"../../../utils/nutEconomy"
);
module.exports = {
name:
"nutsCooldown",
description:
"shows nut cooldown",
aliases: [
"ncd"
],
async execute(
message,
args
) {
const cooldown =
await getCooldown(
message.author.id,
"nut"
);
const now =
getUnixTime();
let content =
"Du kannst wieder nussen! :)";
let thumbnail =
"https://cdn-icons-png.flaticon.com/512/7451/7451659.png";
let title =
"Go Nuts!";
if (
cooldown >
now
) {
content =
`<t:${cooldown}:R> kannst du wieder nussen! ;)`;
thumbnail =
"https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png";
title =
"To Nut or Not to Nut...";
}
const embed = new EmbedBuilder()
.setThumbnail(thumbnail)
.setTitle(title)
.setDescription(content)
const embed =
new EmbedBuilder()
.setThumbnail(
thumbnail
)
.setTitle(
title
)
.setDescription(
content
);
await message.reply({
embeds: [embed]
})
embeds: [
embed
]
});
}
}
};