Moved all db logic to db functions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import db from "src/drizzle/db.js"
|
||||
import { getVerify } from "src/drizzle/functions"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/interfaces"
|
||||
import { getHeadURL, getIGN, getUUID } from "~/utils/Hypixel.js"
|
||||
@@ -37,9 +38,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
const verifyData = await db.query.verifies.findFirst({
|
||||
where: ({ uuid: uuidfromdb }, { eq }) => eq(uuidfromdb, uuid)
|
||||
})
|
||||
const verifyData = await getVerify({ uuid })
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
|
||||
Reference in New Issue
Block a user