From 0dc69816db50e9f08968deede90e20f4f28ade34 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 8 Sep 2023 20:06:17 +1000 Subject: [PATCH] Filter multifarm chat --- src/commands/mp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 43a6f2b..c872266 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -17,7 +17,7 @@ export default { async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ if (client.uptime < 35000) return interaction.reply('I have just restarted, please wait for MPLoop to finish initializing.') const serverSelector = interaction.options.getString('server'); - 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)); + if (['468835769092669461', '1149238561934151690'].includes(interaction.channelId) && !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/undici'}}).then(r=>r.json() as Promise);