converted ShaiBot casino to Nut Economy
This commit is contained in:
@@ -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?`)
|
||||
|
||||
Reference in New Issue
Block a user