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
@@ -5,7 +5,7 @@ function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
async function honorHoner(interaction) {
const db = mClient.db(process.env.M_DB)
const honorsColl = db.collection('honors')
const honorsColl = db.collection('items_honors')
const target = await interaction.options.getUser('target')
const reason = `[+] ${await interaction.options.getString('reason') ?? 'No reason provided'}`
@@ -40,7 +40,7 @@ async function honorHoner(interaction) {
}
async function honerDishonor(interaction) {
const db = mClient.db(process.env.M_DB)
const honorsColl = db.collection('honors')
const honorsColl = db.collection('items_honors')
const target = await interaction.options.getUser('target')
const reason = `[-] ${await interaction.options.getString('reason') ?? 'No reason provided'}`
@@ -93,7 +93,7 @@ async function honorLeaderboard(interaction) {
.setCustomId('honors_leaderboard_right')
)
const db = mClient.db(process.env.M_DB)
const honorsColl = db.collection('honors')
const honorsColl = db.collection('items_honors')
let skip = 0
const honorsData = await honorsColl.find({}).sort({ honors: -1 }).skip(skip).limit(5).toArray()
let fields
@@ -116,7 +116,7 @@ async function honorHistory(interaction) {
var target = interaction.options.getUser('target')
if (!target) { target = interaction.user }
const db = mClient.db(process.env.M_DB)
const reasonsColl = db.collection('honor-reasons')
const reasonsColl = db.collection('history_honors')
var history = await reasonsColl.findOne({ userID: target.id })
const embed = new EmbedBuilder()
@@ -136,7 +136,7 @@ async function honorCheck(interaction) {
var target = interaction.options.getUser('target')
if (!target) { target = interaction.user }
const db = mClient.db(process.env.M_DB)
const honorsColl = db.collection('honors')
const honorsColl = db.collection('items_honors')
var honors = await honorsColl.findOne({ userID: target.id })
honors = honors?.honors ?? 0