mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 00:10:58 -05:00
Add server identifier to MPModule webhook
This commit is contained in:
parent
0eba82789d
commit
4950eca51e
@ -113,7 +113,7 @@ async function multifarmWebhook(client:TClient, server:IServer, webhookId:string
|
||||
};
|
||||
const getMappedValue =<T>(map:Record<string, T>, key:string, fallback:T):T=>map[key] ?? fallback;
|
||||
const data = await requestServerData(client, server);
|
||||
if (!data) return Logger.console('log', loggingPrefix, 'Couldn\'t get data for webhook');
|
||||
if (!data) return Logger.console('log', loggingPrefix, `Couldn't get data for webhook (${server.serverName})`);
|
||||
const {csg} = data;// :tutelBRUH: (https://cdn.discordapp.com/emojis/1155276126176956486.webp)
|
||||
const fields:Discord.APIEmbedField[] = [
|
||||
{name: 'Seasonal Growth', value: getMappedValue(txtMapping.growthMode, csg?.settings.growthMode, dataUnavailable), inline: true},
|
||||
|
Loading…
Reference in New Issue
Block a user