From e23ef7b19ade6c88aef004dfc8bb8bccce8cee84 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 26 Dec 2023 12:05:24 +1100 Subject: [PATCH] Fix MPModule's webhook --- src/config.json | 7 ++++--- src/interfaces.d.ts | 3 ++- src/modules/MPModule.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config.json b/src/config.json index 8a1cf74..eba4827 100644 --- a/src/config.json +++ b/src/config.json @@ -1,6 +1,6 @@ { "configName": "Daggerbot", - "embedColor": "#0052cf", + "embedColor": "#ffffff", "embedColorBackup": "#0052cf", "embedColorGreen": "#57f287", "embedColorYellow": "#ffea00", @@ -14,7 +14,7 @@ ], "botSwitches": { "dailyMsgsBackup": true, - "registerCommands": true, + "registerCommands": false, "commands": true, "logs": true, "mpSys": true, @@ -78,7 +78,8 @@ "bankick_log": "1048341961901363352", "punishment_log": "1102751034754998302", "dcmod_chat": "742324777934520350", - "mpmod_chat": "516344221452599306" + "mpmod_chat": "516344221452599306", + "multifarm_chat": "1149238561934151690" } } } diff --git a/src/interfaces.d.ts b/src/interfaces.d.ts index 853a060..543a824 100644 --- a/src/interfaces.d.ts +++ b/src/interfaces.d.ts @@ -157,7 +157,8 @@ export interface Config { bankick_log: string, punishment_log: string, dcmod_chat: string, - mpmod_chat: string + mpmod_chat: string, + multifarm_chat: string } } } diff --git a/src/modules/MPModule.ts b/src/modules/MPModule.ts index 8fe6a0e..a087766 100644 --- a/src/modules/MPModule.ts +++ b/src/modules/MPModule.ts @@ -124,7 +124,7 @@ async function multifarmWebhook(client:TClient, server:IServer, webhookId:string {name: 'Fuel Usage', value: getMappedValue(txtMapping.fuelUsage, csg?.settings.fuelUsage, dataUnavailable), inline: true}, {name: 'Dirt Interval', value: getMappedValue(txtMapping.dirtInterval, csg?.settings.dirtInterval, dataUnavailable), inline: true} ]; - return new HookMgr(client, 'thismeanswar', webhookId).edit(messageId, { + return new HookMgr(client, 'multifarm_chat', webhookId).edit(messageId, { content: refreshIntrvlTxt, embeds: [ new client.embed().setColor(client.config.embedColor).setTitle(`Savegame Settings - ${csg?.settings?.mapTitle}`).addFields(fields).setFooter({text: 'Last updated'}).setTimestamp() ]