1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 20:30:58 -05:00

Attempt to prevent MPModule from requesting the hidden server

This commit is contained in:
AnxietyisReal 2024-01-10 09:45:30 +11:00
parent 2bf6a71c98
commit 7f389c3eb9

View File

@ -87,11 +87,13 @@ export default async(client:TClient)=>{
// Locate the Multifarm server via port and call the webhook with that server's details. (Adddi's server) // Locate the Multifarm server via port and call the webhook with that server's details. (Adddi's server)
let hookId = isBotInDevMode ? '1098524887557099520' : '1159998634604109897'; let hookId = isBotInDevMode ? '1098524887557099520' : '1159998634604109897';
let msgId = isBotInDevMode ? '1159855742535352462' : '1160098458997370941'; let msgId = isBotInDevMode ? '1159855742535352462' : '1160098458997370941';
const mfServer = cachedServers.find(s=>s.ip.split(':')[1] === '18001' && s.isActive); const mfServer = cachedServers.filter(s=>s.isActive).find(s=>s.ip.split(':')[1] === '18001');
if (mfServer && mfServer.isActive) multifarmWebhook(client, mfServer, hookId, msgId); if (mfServer) multifarmWebhook(client, mfServer, hookId, msgId);
} }
async function multifarmWebhook(client:TClient, server:IServer, webhookId:string, messageId:string) { async function multifarmWebhook(client:TClient, server:IServer, webhookId:string, messageId:string) {
if (!server.isActive) return;
const txtMapping = { const txtMapping = {
genericBools: { 'false': 'Off', 'true': 'On' }, genericBools: { 'false': 'Off', 'true': 'On' },
growthMode: { '1': 'Yes', '2': 'No', '3': 'Growth paused' }, growthMode: { '1': 'Yes', '2': 'No', '3': 'Growth paused' },