This commit is contained in:
Ean Milligan 2025-06-26 03:28:35 -04:00
parent 414bab3a0d
commit 4516f17949
5 changed files with 15 additions and 23 deletions

View File

@ -3,7 +3,8 @@ import config from '~config';
import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts'; import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts';
const name = 'Roll20 Dice Options'; 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<string, HelpContents>([ const dict = new Map<string, HelpContents>([
[ [
'dice', 'dice',

View File

@ -1,8 +1,7 @@
import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts'; import { HelpContents, HelpPage } from 'commands/helpLibrary/helpLibrary.d.ts';
const name = 'Results Formatting'; const name = 'Results Formatting';
const description = 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.';
'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<string, HelpContents>([ const dict = new Map<string, HelpContents>([
[ [
'bold', 'bold',

View File

@ -25,7 +25,7 @@ const generateActionRowWithSelectMenu = (selected: string, helpDict: HelpDict, p
label: page[1].name, label: page[1].name,
value: parent ? `${parent}${InteractionValueSeparator}${page[0]}` : page[0], value: parent ? `${parent}${InteractionValueSeparator}${page[0]}` : page[0],
default: page[0] === selected, default: page[0] === selected,
}) }),
), ),
}, },
], ],
@ -38,15 +38,14 @@ const makeHelpEmbed = (helpDict: HelpContents | HelpPage, parentTitle?: string):
}, },
title: helpDict.name, title: helpDict.name,
description: helpDict.description, description: helpDict.description,
fields: fields: !helpDict.isPage && helpDict.example
!helpDict.isPage && helpDict.example ? [
? [ {
{ name: `Example${helpDict.example.length > 1 ? 's' : ''}:`,
name: `Example${helpDict.example.length > 1 ? 's' : ''}:`, value: helpDict.example.join('\n').replaceAll('@$', `<@${botId}>`).replaceAll('[[', config.prefix).replaceAll(']]', config.postfix),
value: helpDict.example.join('\n').replaceAll('@$', `<@${botId}>`).replaceAll('[[', config.prefix).replaceAll(']]', config.postfix), },
}, ]
] : [],
: [],
}); });
const defaultHelpMessage = (showError = ''): CreateMessage => ({ const defaultHelpMessage = (showError = ''): CreateMessage => ({

View File

@ -41,7 +41,8 @@ Damage: 14`,
'variable', 'variable',
{ {
name: 'Variables', 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. 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.

View File

@ -1,12 +1,4 @@
import { import { ButtonData, DiscordMessageComponentTypes, editMessage, Interaction, InteractionResponseTypes, SelectMenuData, sendInteractionResponse } from '@discordeno';
ButtonData,
DiscordMessageComponentTypes,
editMessage,
Interaction,
InteractionResponseTypes,
SelectMenuData,
sendInteractionResponse,
} from '@discordeno';
import { log, LogTypes as LT } from '@Log4Deno'; import { log, LogTypes as LT } from '@Log4Deno';
import { generateHelpMessage, helpCustomId } from 'commands/helpLibrary/generateHelpMessage.ts'; import { generateHelpMessage, helpCustomId } from 'commands/helpLibrary/generateHelpMessage.ts';