fixed Birthday Event, Renamed DB Colls
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = {
|
||||
let description = interaction.message.embeds[0].data.description
|
||||
const target = await interaction.guild.members.fetch(description.split(' ')[0].slice(2, -1))
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
const reason = `[-] Quick Menu Dishonor`
|
||||
const theirHonorLevel = await honorsColl.findOne({ userID: target.id })
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
let description = interaction.message.embeds[0].data.description
|
||||
const target = await interaction.guild.members.fetch(description.split(' ')[0].slice(2, -1))
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const reasonsColl = db.collection('honor-reasons')
|
||||
const reasonsColl = db.collection('history_honors')
|
||||
const history = await reasonsColl.findOne({ userID: target.user.id })
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
let description = interaction.message.embeds[0].data.description
|
||||
const target = await interaction.guild.members.fetch(description.split(' ')[0].slice(2, -1))
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
const reason = `[+] Quick Menu Honor`
|
||||
const theirHonorLevel = await honorsColl.findOne({ userID: target.id })
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ module.exports = {
|
||||
const reason = `${temp[1].slice(7, -1)}`
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const reasonsColl = db.collection('honor-reasons')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
const reasonsColl = db.collection('history_honors')
|
||||
const theirHonorLevel = await honorsColl.findOne({ userID: target.id })
|
||||
|
||||
await honorsColl.findOneAndUpdate({ userID: target.id }, { $inc: { honors: honor } }, { upsert: true })
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
description: 'navigate a page up',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
const min = 0
|
||||
let skip = interaction.message.embeds[0].data.description.split('.')
|
||||
skip = Number(skip[0]) - 6
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
description: 'navigate a page down',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
const max = await honorsColl.countDocuments()
|
||||
let skip = interaction.message.embeds[0].data.description.split('.')
|
||||
skip = Number(skip[0]) +4
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
description: 'navigate to your own placement',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const honorsColl = db.collection('honors')
|
||||
const honorsColl = db.collection('items_honors')
|
||||
|
||||
const self = await honorsColl.find({ userID: interaction.user.id }).toArray()
|
||||
const all = await honorsColl.find().sort({ honors: -1 }).toArray()
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = {
|
||||
const to = await interaction.message.guild.members.fetch(temp[6].slice(2,-1))
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const nutsColl = db.collection('nuts')
|
||||
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 })
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ module.exports = {
|
||||
const to = await interaction.message.guild.members.fetch(temp[6].slice(2,-1))
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const nutsColl = db.collection('nuts')
|
||||
const nutsColl = db.collection('items_nuts')
|
||||
|
||||
const yourBalance = await nutsColl.findOne({ userID: from.id })
|
||||
const theirBalance = await nutsColl.findOne({ userID: to.id })
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
description: 'navigate a page up',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const nutsColl = db.collection('nuts')
|
||||
const nutsColl = db.collection('items_nuts')
|
||||
const min = 0
|
||||
let skip = interaction.message.embeds[0].data.description.split('.')
|
||||
skip = Number(skip[0]) - 6
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
description: 'navigate a page down',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const nutsColl = db.collection('nuts')
|
||||
const nutsColl = db.collection('items_nuts')
|
||||
const max = await nutsColl.countDocuments({ nuts: { $gt: 0 } })
|
||||
let skip = interaction.message.embeds[0].data.description.split('.')
|
||||
skip = Number(skip[0]) +4
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
description: 'navigate to your own placement',
|
||||
async execute(interaction) {
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const nutsColl = db.collection('nuts')
|
||||
const nutsColl = db.collection('items_nuts')
|
||||
|
||||
const self = await nutsColl.find({ userID: interaction.user.id }).toArray()
|
||||
const all = await nutsColl.find({ nuts: { $gt: 0 } }).sort({ nuts: -1 }).toArray()
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply()
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const quotesColl = db.collection('quotes')
|
||||
const quotesColl = db.collection('items_quotes')
|
||||
const maxValue = await quotesColl.countDocuments({ $and: [{ guildID: interaction.guild.id }, { count: { $gt: 0 } }] })
|
||||
|
||||
let skip = interaction.message.embeds[0].data.fields[0].value.split('.')
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply()
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const quotesColl = db.collection('quotes')
|
||||
const quotesColl = db.collection('items_quotes')
|
||||
const maxValue = await quotesColl.countDocuments({ $and: [{ guildID: interaction.guild.id }, { count: { $gt: 0 } }] })
|
||||
|
||||
let skip = interaction.message.embeds[0].data.fields[0].value.split('.')
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = {
|
||||
if (!target) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const quotesColl = db.collection('quotes')
|
||||
const quotesColl = db.collection('items_quotes')
|
||||
const quotes = await quotesColl.find({ by: target.id }).toArray()
|
||||
|
||||
var index = Number((await interaction.message.embeds[0].data.title).split(' ')[2].slice(1))
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = {
|
||||
if (!target) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
const quotesColl = db.collection('quotes')
|
||||
const quotesColl = db.collection('items_quotes')
|
||||
const quotes = await quotesColl.find({ by: target.id }).toArray()
|
||||
|
||||
var index = Number((await interaction.message.embeds[0].data.title).split(' ')[2].slice(1))
|
||||
|
||||
Reference in New Issue
Block a user