From efabd7ead416844ffa203c591e1726b9a4b72d87 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 25 Aug 2023 02:31:32 +1000 Subject: [PATCH] attempt #2 --- src/commands/mp.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/mp.ts b/src/commands/mp.ts index d7592a4..df79ca6 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -17,7 +17,8 @@ export default { if (interaction.channelId === '468835769092669461' && !client.isStaff(interaction.member) && ['status', 'players'].includes(interaction.options.getSubcommand())) return interaction.reply('Please use <#739084625862852715> for `/mp status/players` commands to prevent clutter in this channel.').then(()=>setTimeout(()=>interaction.deleteReply(), 6000)); const database = await client.MPServer._content.findById(interaction.guildId); - const endpoint = await fetch(database[serverSelector]?.ip+'/feed/dedicated-server-stats.json?code='+database[serverSelector]?.code, {signal: AbortSignal.timeout(7500),headers:{'User-Agent':`Daggerbot - MPdata/fetch`}}).then(r=>r.json() as Promise); + let endpoint:any; + if (interaction.options.getSubcommand() !== 'maintenance') endpoint = await fetch(database[serverSelector].ip+'/feed/dedicated-server-stats.json?code='+database[serverSelector].code, {signal: AbortSignal.timeout(7500),headers:{'User-Agent':`Daggerbot - MPdata/fetch`}}).then(r=>r.json() as Promise); const embed = new client.embed(); ({ players: async()=>{