Moved from sequlize to drizzleorm

This commit is contained in:
2024-10-02 23:37:09 +02:00
parent 20e6e2e86d
commit 0890712b1b
37 changed files with 1110 additions and 247 deletions

View File

@@ -1,7 +1,9 @@
import { devMessage, embedColor } from "config/options.js"
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js"
import { eq } from "drizzle-orm"
import { IButton } from "interfaces"
import guildapp from "schemas/guildAppTag.js"
import db from "src/db/db.js"
import { guildApps } from "src/db/schema.js"
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, hypixelLevel, skywarsLevel } from "utils/Hypixel.js"
export default {
@@ -14,7 +16,9 @@ export default {
const message = interaction.message
const embed = message.embeds[0]
const applicantId = embed.footer!.text.split(" ")[1]
const guildappdata = await guildapp.findOne({ where: { userID: applicantId } })
const guildappdata = await db.query.guildApps.findFirst({
where: eq(guildApps.userID, applicantId)
})
const uuid = guildappdata!.uuid
const player = await getPlayer(uuid)