From 4516f17949524a3fd42e08240bb333a1069a5fca Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Thu, 26 Jun 2025 03:28:35 -0400 Subject: [PATCH] deno fmt --- src/commands/helpLibrary/diceOptions.ts | 3 ++- src/commands/helpLibrary/formatting.ts | 3 +-- .../helpLibrary/generateHelpMessage.ts | 19 +++++++++---------- src/commands/helpLibrary/miscFeatures.ts | 3 ++- src/events/interactionCreate.ts | 10 +--------- 5 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/commands/helpLibrary/diceOptions.ts b/src/commands/helpLibrary/diceOptions.ts index e1620a2..c3dc340 100644 --- a/src/commands/helpLibrary/diceOptions.ts +++ b/src/commands/helpLibrary/diceOptions.ts @@ -3,7 +3,8 @@ import config from '~config'; import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts'; const name = 'Roll20 Dice Options'; -const description = `\`${config.prefix}xdydzracsq!${config.postfix}\` Rolls all configs requested, you may repeat the command multiple times in the same message (just ensure you close each roll with \`${config.postfix}\`).`; +const description = + `\`${config.prefix}xdydzracsq!${config.postfix}\` Rolls all configs requested, you may repeat the command multiple times in the same message (just ensure you close each roll with \`${config.postfix}\`).`; const dict = new Map([ [ 'dice', diff --git a/src/commands/helpLibrary/formatting.ts b/src/commands/helpLibrary/formatting.ts index 5e027c1..73ffa2c 100644 --- a/src/commands/helpLibrary/formatting.ts +++ b/src/commands/helpLibrary/formatting.ts @@ -1,8 +1,7 @@ import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts'; const name = 'Results Formatting'; -const description = - 'The results have some formatting applied on them to provide details on what happened during this roll. These options can be stacked on each other to show complicated results.'; +const description = 'The results have some formatting applied on them to provide details on what happened during this roll. These options can be stacked on each other to show complicated results.'; const dict = new Map([ [ 'bold', diff --git a/src/commands/helpLibrary/generateHelpMessage.ts b/src/commands/helpLibrary/generateHelpMessage.ts index c6f9cdd..3e3d4ae 100644 --- a/src/commands/helpLibrary/generateHelpMessage.ts +++ b/src/commands/helpLibrary/generateHelpMessage.ts @@ -25,7 +25,7 @@ const generateActionRowWithSelectMenu = (selected: string, helpDict: HelpDict, p label: page[1].name, value: parent ? `${parent}${InteractionValueSeparator}${page[0]}` : page[0], default: page[0] === selected, - }) + }), ), }, ], @@ -38,15 +38,14 @@ const makeHelpEmbed = (helpDict: HelpContents | HelpPage, parentTitle?: string): }, title: helpDict.name, description: helpDict.description, - fields: - !helpDict.isPage && helpDict.example - ? [ - { - name: `Example${helpDict.example.length > 1 ? 's' : ''}:`, - value: helpDict.example.join('\n').replaceAll('@$', `<@${botId}>`).replaceAll('[[', config.prefix).replaceAll(']]', config.postfix), - }, - ] - : [], + fields: !helpDict.isPage && helpDict.example + ? [ + { + name: `Example${helpDict.example.length > 1 ? 's' : ''}:`, + value: helpDict.example.join('\n').replaceAll('@$', `<@${botId}>`).replaceAll('[[', config.prefix).replaceAll(']]', config.postfix), + }, + ] + : [], }); const defaultHelpMessage = (showError = ''): CreateMessage => ({ diff --git a/src/commands/helpLibrary/miscFeatures.ts b/src/commands/helpLibrary/miscFeatures.ts index 2634b47..b710235 100644 --- a/src/commands/helpLibrary/miscFeatures.ts +++ b/src/commands/helpLibrary/miscFeatures.ts @@ -41,7 +41,8 @@ Damage: 14`, 'variable', { name: 'Variables', - description: `${config.name}'s variable system allows reusing results as a value inside one message. This is useful when you want to use a result as a part of the final message, but also want to use that result in a follow-up roll. + description: + `${config.name}'s variable system allows reusing results as a value inside one message. This is useful when you want to use a result as a part of the final message, but also want to use that result in a follow-up roll. This message must contain multiple roll commands in it (such as \`[[d4]] [[d8]]\`). Nested dice rolls are not able to be used as a variable, but can use variables inside them. diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 9f0c588..1500d02 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -1,12 +1,4 @@ -import { - ButtonData, - DiscordMessageComponentTypes, - editMessage, - Interaction, - InteractionResponseTypes, - SelectMenuData, - sendInteractionResponse, -} from '@discordeno'; +import { ButtonData, DiscordMessageComponentTypes, editMessage, Interaction, InteractionResponseTypes, SelectMenuData, sendInteractionResponse } from '@discordeno'; import { log, LogTypes as LT } from '@Log4Deno'; import { generateHelpMessage, helpCustomId } from 'commands/helpLibrary/generateHelpMessage.ts';