Renommage types any et fix /crack

This commit is contained in:
Angels-dev
2024-09-12 00:31:52 +02:00
parent e2e980bc47
commit f9d592ebc2
13 changed files with 32 additions and 30 deletions

View File

@@ -3,8 +3,8 @@ import { SlashCommandBuilder, ChatInputCommandInteraction, EmbedBuilder, APIEmbe
import dbGuildInit from '../../utils/dbGuildInit'
import dbGuild from '../../schemas/guild'
const parseObject = (obj: any, prefix = ''): { name: string, value: any }[] => {
let fields: { name: string, value: any }[] = []
const parseObject = (obj: object, prefix = ''): { name: string, value: object | string | boolean }[] => {
let fields: { name: string, value: object | string | boolean }[] = []
for (let [key, value] of Object.entries(obj)) {
if (typeof value === 'object') fields.push(...parseObject(value, `${prefix}${key}.`))