From 05ddddf1457f8807cd4d5149851b15aa746b4e8d Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Fri, 13 Sep 2024 04:38:09 -0400 Subject: [PATCH] add shorthand option to search for a nickname of something, add debug flag to get internal id of things --- README.md | 2 +- config.example.ts | 2 +- mod.ts | 31 ++++++++++------ src/data.ts | 71 ++++++++++++++++++++++++++++++++----- src/generateActionEmbeds.ts | 7 ++-- src/types.d.ts | 1 + 6 files changed, 92 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3b7a52f..042147a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Logogram Discord Bot - A FFXIV Eureka Utility Bot | V1.1.1 - 2025/09/13 +# Logogram Discord Bot - A FFXIV Eureka Utility Bot | V1.1.2 - 2025/09/13 A Discord bot for Eureka Logos Actions and their recipes. ## Commands diff --git a/config.example.ts b/config.example.ts index c170496..0ccd490 100755 --- a/config.example.ts +++ b/config.example.ts @@ -1,6 +1,6 @@ export const config = { 'name': 'Logogram Bot', // Name of the bot - 'version': '1.1.1', // Version of the bot + 'version': '1.1.2', // Version of the bot 'token': 'the_bot_token', // Discord API Token for this bot 'localToken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token" 'prefix': 'l!', // Prefix for all commands diff --git a/mod.ts b/mod.ts index 1b035cd..a614cc5 100755 --- a/mod.ts +++ b/mod.ts @@ -107,39 +107,50 @@ startBot({ rawClass: '', isNin: false, page: 1, + debug: false, }; const classPrefixes = ['-class=', 'class=', '-c=', 'c=']; const pagePrefixes = ['-page=', 'page=', '-p=', 'p=']; + const debugPrefixes = ['-debug=', 'debug=', '-d=', 'd=']; + const allPrefixes = classPrefixes.concat(pagePrefixes).concat(debugPrefixes); args.forEach((arg) => { - if (classPrefixes.some(pfx => arg.toLowerCase().startsWith(pfx))) { // + if (classPrefixes.some((pfx) => arg.toLowerCase().startsWith(pfx))) { // params.rawClass = arg.split('=')[1]; params.class = classToType(params.rawClass); params.isNin = params.rawClass.toLowerCase() === 'nin'; - } else if (pagePrefixes.some(pfx => arg.toLowerCase().startsWith(pfx))) { + } else if (pagePrefixes.some((pfx) => arg.toLowerCase().startsWith(pfx))) { params.page = parseInt(arg.split('=')[1]); + } else if (debugPrefixes.some((pfx) => arg.toLowerCase().startsWith(pfx))) { + params.debug = true; } }); - const cleanArgs = args.filter((arg) => !(classPrefixes.concat(pagePrefixes).some(pfx => arg.toLowerCase().startsWith(pfx)))); + const cleanArgs = args.filter((arg) => !(allPrefixes.some((pfx) => arg.toLowerCase().startsWith(pfx)))); const rawQuery = cleanArgs.join(' '); const query = rawQuery.toLowerCase(); if (data.ActionNames.includes(query)) { const singleAction: Array = [data.ActionNames.indexOf(query)]; message.send({ - content: `Showing single action:`, - embeds: generateEmbeds(singleAction), + content: 'Showing single action:', + embeds: generateEmbeds(singleAction, params.debug), + }).catch((e) => { + log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); + }); + } else if (data.ActionShortNames.includes(query)) { + const searchResults: Array = data.Actions.filter((action) => action.shorthand === query).map((action) => data.ActionNames.indexOf(action.name.toLowerCase())); + message.send({ + content: searchResults.length > 1 ? `Showing ${searchResults.length} actions:` : 'Showing single action:', + embeds: generateEmbeds(searchResults, params.debug), }).catch((e) => { log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); }); } else { const initialSearchResults: Array = data.ActionNames.filter((action) => action.includes(query)).map((action) => data.ActionNames.indexOf(action)); const searchResults: Array = initialSearchResults.filter((actionIdx) => - params.class - ? (data.Actions[actionIdx].jobs.includes('all-nin') && !params.isNin) || data.Actions[actionIdx].jobs.includes('all') || data.Actions[actionIdx].jobs.includes(params.class) - : true + params.class ? (data.Actions[actionIdx].jobs.includes('all-nin') && !params.isNin) || data.Actions[actionIdx].jobs.includes('all') || data.Actions[actionIdx].jobs.includes(params.class) : true ); if (searchResults.length) { @@ -154,7 +165,7 @@ startBot({ : ''; message.send({ content: `${searchResults.length} result${searchResults.length > 1 ? 's' : ''} matching query: \`${userQuery}\`${paginationMessage}`, - embeds: generateEmbeds(searchResults.slice((params.page - 1) * config.resultsPerPage, config.resultsPerPage * params.page)), + embeds: generateEmbeds(searchResults.slice((params.page - 1) * config.resultsPerPage, config.resultsPerPage * params.page), params.debug), }).catch((e) => { log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); }); @@ -177,7 +188,7 @@ startBot({ const preset: Array = data.Presets.get(query) ?? []; message.send({ content: `Showing ${rawQuery} Preset:`, - embeds: generateEmbeds(preset), + embeds: generateEmbeds(preset, false), }).catch((e) => { log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); }); diff --git a/src/data.ts b/src/data.ts index eb2dc25..bfd601d 100644 --- a/src/data.ts +++ b/src/data.ts @@ -36,6 +36,7 @@ const Actions: Array = [ name: 'Wisdom of the Aetherweaver', description: 'Increases magic damage dealt by 60%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 1, + shorthand: 'wota', type: 'Spell', uses: 3, cast: 0, @@ -47,6 +48,7 @@ const Actions: Array = [ name: 'Wisdom of the Martialist', description: 'Increases damage dealt by 40%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 2, + shorthand: 'wotm', type: 'Spell', uses: 3, cast: 0, @@ -58,6 +60,7 @@ const Actions: Array = [ name: 'Wisdom of the Platebearer', description: 'Increases defense by 3,000 and maximum HP by 50%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 3, + shorthand: 'wotp', type: 'Spell', uses: 3, cast: 0, @@ -69,6 +72,7 @@ const Actions: Array = [ name: 'Wisdom of the Guardian', description: 'Increases defense by 1,800 and maximum HP by 10%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 4, + shorthand: 'wotg', type: 'Spell', uses: 3, cast: 0, @@ -80,6 +84,7 @@ const Actions: Array = [ name: 'Wisdom of the Ordained', description: 'Increases maximum MP by 50% and healing magic potency by 25%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 5, + shorthand: 'woto', type: 'Spell', uses: 3, cast: 0, @@ -91,6 +96,7 @@ const Actions: Array = [ name: 'Wisdom of the Skirmisher', description: 'Increases damage dealt by 20%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 6, + shorthand: 'wots', type: 'Spell', uses: 3, cast: 0, @@ -102,6 +108,7 @@ const Actions: Array = [ name: 'Wisdom of the Watcher', description: 'Increases evasion by 25% while reducing damage dealt by 5%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 7, + shorthand: 'wotw', type: 'Spell', uses: 3, cast: 0, @@ -111,9 +118,9 @@ const Actions: Array = [ }, { name: 'Wisdom of the Templar', - description: - 'Increases healing magic potency by 50% and maximum HP by 30%, while reducing damage dealt by 5%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', + description: 'Increases healing magic potency by 50% and maximum HP by 30%, while reducing damage dealt by 5%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 8, + shorthand: 'wott', type: 'Spell', uses: 3, cast: 0, @@ -129,6 +136,7 @@ const Actions: Array = [ name: 'Wisdom of the Irregular', description: 'Increases damage dealt by 30% while reducing magic defense by 60%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 9, + shorthand: 'woti', type: 'Spell', uses: 3, cast: 0, @@ -141,9 +149,9 @@ const Actions: Array = [ }, { name: 'Wisdom of the Breathtaker', - description: - 'Increases poison resistance and movement speed, including mount speed, and increases evasion by 10%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', + description: 'Increases poison resistance and movement speed, including mount speed, and increases evasion by 10%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 10, + shorthand: 'wotb', type: 'Spell', uses: 3, cast: 0, @@ -155,6 +163,7 @@ const Actions: Array = [ name: 'Spirit of the Remembered', description: 'Increases maximum HP by 10% and accuracy by 30%.\nAdditional Effect: Grants a 70% chance of automatic revival upon KO.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 11, + shorthand: 'sotr', type: 'Ability', uses: 1, duration: 10800, @@ -167,6 +176,7 @@ const Actions: Array = [ name: 'Protect L', description: 'Increases the physical defense of the target by 1,000.', imageId: 12, + shorthand: '', type: 'Spell', uses: Infinity, duration: 1800, @@ -179,6 +189,7 @@ const Actions: Array = [ name: 'Shell L', description: 'Increases the magic defense of the target by 1,000.', imageId: 13, + shorthand: '', type: 'Spell', uses: Infinity, duration: 1800, @@ -191,6 +202,7 @@ const Actions: Array = [ name: 'Death L', description: "KOs target. The less the target's HP, the greater the chance of success.", imageId: 14, + shorthand: '', type: 'Spell', uses: 30, cast: 5, @@ -207,6 +219,7 @@ const Actions: Array = [ name: 'Focus L', description: 'Grants a stack of Boost, up to a maximum of 16.\nBoost Bonus: Increases potency of next weaponskill by 30% per stack.\nShares a recast timer with all weaponskills.', imageId: 15, + shorthand: '', type: 'Ability', uses: 99, duration: 30, @@ -222,6 +235,7 @@ const Actions: Array = [ name: 'Paralyze L', description: 'Afflicts target with Paralysis.', imageId: 16, + shorthand: '', type: 'Spell', uses: 99, duration: 60, @@ -234,6 +248,7 @@ const Actions: Array = [ name: 'Paralyze L III', description: 'Afflicts target and all nearby enemies with Paralysis.', imageId: 17, + shorthand: 'paralyze 3', type: 'Spell', uses: 99, duration: 60, @@ -250,6 +265,7 @@ const Actions: Array = [ name: 'Swift L', description: 'Greatly increases movement speed.', imageId: 18, + shorthand: '', type: 'Ability', uses: 20, duration: 10, @@ -265,6 +281,7 @@ const Actions: Array = [ name: 'Featherfoot L', description: 'Increases evasion by 15%.', imageId: 19, + shorthand: '', type: 'Ability', uses: 50, duration: 45, @@ -277,6 +294,7 @@ const Actions: Array = [ name: 'Spirit Dart L', description: 'Delivers a ranged attack with a potency of 100.\nAdditional Effect: Afflicts target with Spirit Dart L, increasing damage taken by 8%.', imageId: 20, + shorthand: 'sd', type: 'Weaponskill', uses: 50, duration: 60, @@ -289,6 +307,7 @@ const Actions: Array = [ name: 'Catastrophe L', description: 'Deals unaspected damage to all nearby enemies with a potency of 4,000, while dealing damage with a potency of 999,999 to self.', imageId: 21, + shorthand: '', type: 'Ability', uses: 3, cast: 0, @@ -304,6 +323,7 @@ const Actions: Array = [ name: 'Dispel L', description: 'Removes one beneficial status from target.', imageId: 22, + shorthand: '', type: 'Spell', uses: Infinity, cast: 2.5, @@ -315,6 +335,7 @@ const Actions: Array = [ name: 'Feint L', description: "Delivers an attack with a potency of 100.\nAdditional Effect: Reduces target's evasion.", imageId: 23, + shorthand: '', type: 'Weaponskill', uses: Infinity, duration: 60, @@ -328,6 +349,7 @@ const Actions: Array = [ description: 'Blend in with your surroundings, making it impossible for most enemies to detect you, but reducing movement speed by 50%.\nHas no effect on certain enemies with special sight.\nCannot be executed while in combat.\nEffect ends upon use of any action other than Sprint, or upon reuse.', imageId: 24, + shorthand: '', type: 'Ability', uses: 50, cast: 0, @@ -339,6 +361,7 @@ const Actions: Array = [ name: 'Aetherial Manipulation L', description: "Rush to a target's side.\nUnable to cast if bound.", imageId: 25, + shorthand: 'am', type: 'Ability', uses: 99, cast: 0, @@ -353,6 +376,7 @@ const Actions: Array = [ name: 'Backstep L', description: 'Jump 10 yalms back from current position.\nCannot be executed while bound.', imageId: 26, + shorthand: '', type: 'Ability', uses: 99, cast: 0, @@ -364,6 +388,7 @@ const Actions: Array = [ name: 'Tranquilizer L', description: 'Stuns target.', imageId: 27, + shorthand: '', type: 'Ability', uses: 50, duration: 8, @@ -376,6 +401,7 @@ const Actions: Array = [ name: 'Bloodbath L', description: 'Converts a portion of damage dealt into HP.', imageId: 28, + shorthand: '', type: 'Ability', uses: 30, duration: 45, @@ -388,6 +414,7 @@ const Actions: Array = [ name: 'Rejuvenate L', description: 'Instantly restores 50% of maximum HP and MP.', imageId: 29, + shorthand: '', type: 'Ability', uses: 50, cast: 0, @@ -403,6 +430,7 @@ const Actions: Array = [ name: 'Haymaker L', description: 'Delivers an attack with a potency of 300.\nCan only be executed immediately after evading an attack.\nAdditional Effect: Slow +20%.', imageId: 30, + shorthand: '', type: 'Ability', uses: 50, duration: 30, @@ -418,6 +446,7 @@ const Actions: Array = [ name: 'Rapid Recast L', description: 'Shortens recast time for next ability used by 50%.', imageId: 31, + shorthand: 'rr', type: 'Ability', uses: 50, duration: 15, @@ -433,6 +462,7 @@ const Actions: Array = [ name: 'Cure L', description: "Restores target's HP.\nCure Potency: 9,000.", imageId: 32, + shorthand: '', type: 'Spell', uses: Infinity, cast: 2, @@ -444,6 +474,7 @@ const Actions: Array = [ name: 'Cure L II', description: "Restores target's HP.\nCure Potency: 12,000.", imageId: 33, + shorthand: 'cure 2', type: 'Ability', uses: 50, cast: 0, @@ -455,6 +486,7 @@ const Actions: Array = [ name: 'Stoneskin L', description: "Creates a barrier around target that absorbs damage totaling 10% of target's maximum HP.", imageId: 34, + shorthand: '', type: 'Spell', uses: 99, duration: 30, @@ -467,6 +499,7 @@ const Actions: Array = [ name: 'Cure L III', description: 'Restores HP of target and all party members nearby target.\nCure Potency: 9,000.', imageId: 35, + shorthand: 'cure 3', type: 'Spell', uses: 50, cast: 2, @@ -482,6 +515,7 @@ const Actions: Array = [ name: 'Regen L', description: 'Grants healing over time effect to target.\nCure Potency: 2,500.', imageId: 36, + shorthand: '', type: 'Spell', uses: 99, duration: 21, @@ -498,6 +532,7 @@ const Actions: Array = [ name: 'Esuna L', description: 'Removes a single detrimental effect from target.', imageId: 37, + shorthand: '', type: 'Spell', uses: Infinity, cast: 1, @@ -509,6 +544,7 @@ const Actions: Array = [ name: 'Incense L', description: "Gesture threateningly, placing yourself at the top of the target's enmity list and increasing enmity generation.", imageId: 38, + shorthand: '', type: 'Ability', uses: Infinity, cast: 0, @@ -521,6 +557,7 @@ const Actions: Array = [ name: 'Raise L', description: 'Resurrects target to a weakened state.', imageId: 39, + shorthand: '', type: 'Spell', uses: 99, cast: 3, @@ -532,6 +569,7 @@ const Actions: Array = [ name: 'Bravery L', description: "Increases target's damage dealt by 10%.", imageId: 40, + shorthand: '', type: 'Spell', uses: 99, duration: 300, @@ -544,6 +582,7 @@ const Actions: Array = [ name: 'Solid Shield L', description: 'Reduces physical damage taken by 99%.', imageId: 41, + shorthand: '', type: 'Ability', uses: 30, duration: 8, @@ -556,6 +595,7 @@ const Actions: Array = [ name: 'Spell Shield L', description: 'Reduces magic damage taken by 99%.', imageId: 42, + shorthand: '', type: 'Ability', uses: 30, duration: 8, @@ -568,6 +608,7 @@ const Actions: Array = [ name: 'Reflect L', description: 'Creates a magic-reflecting barrier around self or party member.', imageId: 43, + shorthand: '', type: 'Spell', uses: 99, duration: 10, @@ -580,6 +621,7 @@ const Actions: Array = [ name: 'Smite L', description: 'Delivers an attack with a potency of 1,000.\nCan only be executed when your HP is below 50%.\nAdditional Effect: Restores an amount of own HP proportional to damage dealt.', imageId: 44, + shorthand: '', type: 'Ability', uses: 30, cast: 0, @@ -591,6 +633,7 @@ const Actions: Array = [ name: 'Refresh L', description: 'Increases the amount of magia aether regenerated over time by self and nearby party members.', imageId: 45, + shorthand: '', type: 'Spell', uses: 99, duration: 30, @@ -603,6 +646,7 @@ const Actions: Array = [ name: 'Banish L', description: 'Deals unaspected damage with a potency of 200.\nAdditional Effect: Afflicts undead targets with Banish L, increasing damage taken by 25%.', imageId: 46, + shorthand: '', type: 'Spell', uses: 99, duration: 60, @@ -615,6 +659,7 @@ const Actions: Array = [ name: 'Banish L III', description: 'Deals unaspected damage with a potency of 150 to target and all enemies nearby it.\nAdditional Effect: Afflicts undead targets with Banish L, increasing damage taken by 25%.', imageId: 47, + shorthand: 'banish 3', type: 'Spell', uses: 50, duration: 60, @@ -627,6 +672,7 @@ const Actions: Array = [ name: 'Magic Burst L', description: 'Increases spell damage by 100% while increasing MP cost.', imageId: 48, + shorthand: 'mb', type: 'Ability', uses: 10, duration: 20, @@ -640,6 +686,7 @@ const Actions: Array = [ description: 'Increases physical damage dealt while dealing damage to self over time.\nStacks increase every 3 seconds, up to a maximum of 16.\nFor each stack, physical damage dealt is increased by 15%, and potency of damage dealt to self increases by 1,200.', imageId: 49, + shorthand: 'de', type: 'Ability', uses: 10, duration: 48, @@ -652,6 +699,7 @@ const Actions: Array = [ name: 'Eagle Eye Shot L', description: "Delivers a ranged attack with a potency of 80.\nPotency increases up to 1,000% the lower the target's HP.\nGenerates significant enmity upon use.", imageId: 50, + shorthand: 'ees', type: 'Weaponskill', uses: 30, cast: 0, @@ -663,6 +711,7 @@ const Actions: Array = [ name: 'Perception L', description: 'Reveals all traps within a 15-yalm radius.\nIf no traps exist within 15 yalms, detects whether any traps are present within a 36-yalm radius.\nOnly effective within dungeons.', imageId: 51, + shorthand: '', type: 'Ability', uses: 99, cast: 0, @@ -675,9 +724,9 @@ const Actions: Array = [ }, { name: 'Wisdom of the Elder', - description: - 'Increases magic damage dealt by 35% and magic defense by 1,000, while decreasing spell MP cost.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', + description: 'Increases magic damage dealt by 35% and magic defense by 1,000, while decreasing spell MP cost.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 52, + shorthand: 'wote', type: 'Spell', uses: 3, cast: 0, @@ -692,6 +741,7 @@ const Actions: Array = [ name: 'Wisdom of the Duelist', description: 'Increases physical damage dealt by 40% and maximum HP by 15%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 53, + shorthand: 'wotd', type: 'Spell', uses: 3, cast: 0, @@ -706,6 +756,7 @@ const Actions: Array = [ name: 'Wisdom of the Fiendhunter', description: 'Increases physical damage dealt by 25% and evasion by 25%.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 54, + shorthand: 'wotf', type: 'Spell', uses: 3, cast: 0, @@ -721,6 +772,7 @@ const Actions: Array = [ description: 'Increases defense by 2,000.\nGrants one stack of HP Boost each time damage equal to or greater than half of maximum HP is taken from a single-target attack.\nCannot be used with other Wisdom abilities.\nEffect ends upon reuse or upon replacement of duty action.', imageId: 55, + shorthand: 'woti', type: 'Spell', uses: 3, cast: 0, @@ -735,6 +787,7 @@ const Actions: Array = [ name: 'Sacrifice L', description: "Restores 100% of target's HP, even if target is KO'd.\nCannot be executed if currently afflicted with Doom.\nAdditional Effect: Inflicts Doom on self.", imageId: 56, + shorthand: '', type: 'Spell', uses: 10, duration: 10, @@ -745,14 +798,15 @@ const Actions: Array = [ }, ]; -// add dps flag at runtime -Actions.forEach(action => { +// add dps flag at runtime and shorthand name +Actions.forEach((action) => { if (action.jobs.includes('melee') || action.jobs.includes('ranged') || action.jobs.includes('magic')) { action.jobs.push('dps'); } }); const ActionNames = Actions.map((action) => action.name.toLowerCase()); +const ActionShortNames = Actions.map((action) => action.shorthand); const Presets: Map> = new Map([ ['dps', [9, 10, 52, 14, 48]], @@ -763,5 +817,6 @@ export default { Mnemes, Actions, ActionNames, + ActionShortNames, Presets, }; diff --git a/src/generateActionEmbeds.ts b/src/generateActionEmbeds.ts index 6bbdd79..0fc3af8 100644 --- a/src/generateActionEmbeds.ts +++ b/src/generateActionEmbeds.ts @@ -69,7 +69,7 @@ const getJobs = (jobs: Array): string => { return jobIcons; }; -const generateActionEmbed = (action: LogosAction): Embed => ({ +const generateActionEmbed = (action: LogosAction, debug: boolean): Embed => ({ title: action.name, description: `**${action.type}** | ${action.duration ? `**Duration:** ${getHumanDuration(action.duration)} | ` : ''}**Uses:** ${getActionUses(action.uses)} | **Cast:** ${getActionCast(action.cast)} | **Recast:** ${action.recast}s ${getJobs(action.jobs)} @@ -82,6 +82,9 @@ ${action.description}`, value: combo.map((mneme) => `${getMnemeEmoji(mneme)} ${data.Mnemes.get(mneme)}`).join('\n'), inline: true, })), + footer: { + text: debug ? `Internal ID: ${action.imageId - 1}` : '', + }, }); -export const generateEmbeds = (actions: Array): Array => actions.map((actionIdx) => generateActionEmbed(data.Actions[actionIdx])); +export const generateEmbeds = (actions: Array, debug: boolean): Array => actions.map((actionIdx) => generateActionEmbed(data.Actions[actionIdx], debug)); diff --git a/src/types.d.ts b/src/types.d.ts index c2e48ef..ebef978 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -2,6 +2,7 @@ export type LogosAction = { name: string; description: string; imageId: number; + shorthand: string; type: string; uses: number; duration?: number;