mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-27 20:35:38 -05:00
*dies of cringe*
This commit is contained in:
parent
455b9a2f80
commit
b7a43c04a6
@ -10,9 +10,9 @@ import {requestServerData, mpModuleDisabled, refreshTimerSecs, playtimeStat} fro
|
|||||||
|
|
||||||
async function fetchData(client:TClient, interaction:Discord.ChatInputCommandInteraction, serverName:string):Promise<FSData|Discord.InteractionResponse> {
|
async function fetchData(client:TClient, interaction:Discord.ChatInputCommandInteraction, serverName:string):Promise<FSData|Discord.InteractionResponse> {
|
||||||
const db = await client.MPServer.findInCache();
|
const db = await client.MPServer.findInCache();
|
||||||
const {dss} = await requestServerData(client, db.find(x=>x.serverName === serverName));
|
const data = 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.');
|
if (!data) return interaction.reply('Ran into a '+RanIntoHumor+' while trying to retrieve server data, please try again later.');
|
||||||
return dss as FSData;
|
return data.dss as FSData;
|
||||||
}
|
}
|
||||||
|
|
||||||
const logPrefix = 'MPDB';
|
const logPrefix = 'MPDB';
|
||||||
|
Loading…
Reference in New Issue
Block a user