fixed Birthday Event, Renamed DB Colls

This commit is contained in:
2026-04-06 15:47:54 +02:00
parent ea18387c75
commit 0769a482fb
33 changed files with 281 additions and 196 deletions
+5 -5
View File
@@ -48,7 +48,7 @@ async function quotesAdd(interaction) {
}
const db = mClient.db(process.env.M_DB)
const quotesColl = db.collection('quotes')
const quotesColl = db.collection('items_quotes')
const found = await quotesColl.findOne({ messageID: messageID })
if (found) { return await interaction.editReply({ content: 'Quote Already in Database', ephemeral: true }) }
await quotesColl.findOneAndUpdate({ messageID: messageID }, {
@@ -87,7 +87,7 @@ async function quotesRemove(interaction) {
const id = await interaction.options.getString('id')
const db = mClient.db(process.env.M_DB)
const quotesColl = db.collection('quotes')
const quotesColl = db.collection('items_quotes')
const found = await quotesColl.findOne({ messageID: id })
if (!found) { return await interaction.reply({ content: 'ID not found!', ephemeral: true }) }
@@ -98,7 +98,7 @@ async function quotesRemove(interaction) {
async function quotesSearch(interaction) {
const id = interaction.options.getString("id")
const db = mClient.db(process.env.M_DB)
const quotesColl = db.collection('quotes')
const quotesColl = db.collection('items_quotes')
const found = await quotesColl.findOne({ messageID: id })
if (!found) { return await interaction.reply({ content: 'ID not found!', ephemeral: true }) }
@@ -158,7 +158,7 @@ async function quotesSearch(interaction) {
async function quotesRandom(interaction) {
var user = interaction.options.getUser("by")
const db = mClient.db(process.env.M_DB)
const quotesColl = db.collection('quotes')
const quotesColl = db.collection('items_quotes')
var rdm
if (user) {
rdm = await quotesColl.aggregate([
@@ -269,7 +269,7 @@ async function quotesList(interaction) {
}
async function quotesLeaderboard(interaction) {
const db = mClient.db(process.env.M_DB)
const quotesColl = db.collection('quotes')
const quotesColl = db.collection('items_quotes')
let skip = 0
const minValue = 0
const maxValue = await quotesColl.countDocuments({ $and: [{ guildID: interaction.guild.id }, { count: { $gt: 0 } }] })