From 94e41c5269078dcad822c68b97bf9971be182506 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:52:20 +1100 Subject: [PATCH] *dies of cringe* --- src/commands/mp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 5693ee2..ef5f99a 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -10,9 +10,9 @@ import {requestServerData, mpModuleDisabled, refreshTimerSecs, playtimeStat} fro async function fetchData(client:TClient, interaction:Discord.ChatInputCommandInteraction, serverName:string):Promise { const db = await client.MPServer.findInCache(); - const {dss} = await requestServerData(client, db.find(x=>x.serverName === serverName)); - if (!dss) return interaction.reply('Ran into a '+RanIntoHumor+' while trying to retrieve server data, please try again later.'); - return dss as FSData; + const data = await requestServerData(client, db.find(x=>x.serverName === serverName)); + if (!data) return interaction.reply('Ran into a '+RanIntoHumor+' while trying to retrieve server data, please try again later.'); + return data.dss as FSData; } const logPrefix = 'MPDB';