diff --git a/README.md b/README.md index f6a9fe9..4eb141a 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,39 @@ The Artificer comes with a few supplemental commands to the main rolling command * Allows inline rolls in the guild. * `[[inline block` or `[[inline disable` or `[[inline delete` * Blocks inline rolls in the guild. +* `[[rollalias [subcommand]` or `[[ralias [subcommand]` or `[[alias [subcommand]` or `[[rolla [subcommand]` or `[[ra [subcommand]` + * Custom Roll Alias System + * Allows anyone to store a roll string as a shortcut/alias for later use/reuse. + * Supports full roll syntax, plus y variables that are set every time the alias is called. + * Every command has a matching "Guild Mode" command that modifies aliases linked to a guild instead of linked to a user account. + * Available subcommands: + * `[[ra help` + * `[[ra guild help` + * Provides a message similar to this subcommand description. + * `[[ra list` + * `[[ra guild list` + * Lists all aliases currently set for your account or the guild you are in. + * `[[ra add [aliasName] [rollString...]` + * `[[ra guild add [aliasName] [rollString...]` + * Creates the desired alias, saving the roll string to your account or the guild you are in. + * `[[ra update [aliasName] [rollString...]` + * `[[ra guild update [aliasName] [rollString...]` + * Updates the desired alias, replacing the old roll string in your account or the guild you are in with the newly provided roll string. + * `[[ra view [aliasName]` + * `[[ra guild view [aliasName]` + * View the saved roll string and how many yVars are needed for it. + * `[[ra delete [aliasName] [verificationCode?]` + * `[[ra guild delete [aliasName] [verificationCode?]` + * Deletes the desired alias from your account or the guild you are in. Can be run without a verification code to get the needed code for deletion. + * `[[ra delete-all [aliasName] [verificationCode?]` + * `[[ra guild delete-all [aliasName] [verificationCode?]` + * Deletes all aliases from your account or the guild you are in. Can be run without a verification code to get the needed code for deletion. + * `[[ra [aliasName] [yVars?...]` + * `[[ra run [aliasName] [yVars?...]` + * Runs the desired personal alias with the specified yVars (if any are needed). If the alias is not found on your account, it will check the guild aliases and use a match from there if one exists. + * `[[ra guild [aliasName] [yVars?...]` + * `[[ra guild run [aliasName] [yVars?...]` + * Runs the desired guild alias with the specified yVars (if any are needed). * `[[xdydzracsq!]]` * This is the command the bot was built specifically for. * It looks a little complicated at first, but if you are familiar with the [Roll20 formatting](https://artificer.eanm.dev/roll20), this will be no different. diff --git a/src/commands/help.ts b/src/commands/help.ts index 08df27a..ee60473 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -90,6 +90,11 @@ export const help = (message: DiscordenoMessage) => { value: `Controls whether or not inline rolls can be done in a guild, run \`${config.prefix}inline help\` for more details`, inline: true, }, + { + name: `\`${config.prefix}rollalias [subcommand]\` or \`${config.prefix}ra [subcommand]\``, + value: `Custom Roll Alias System, run \`${config.prefix}ra help\` for more details`, + inline: true, + }, { name: `\`${config.prefix}xdydzracsq!${config.postfix}\` ...`, value: diff --git a/src/commands/helpLibrary/generateHelpMessage.ts b/src/commands/helpLibrary/generateHelpMessage.ts index 3e3d4ae..f8736ec 100644 --- a/src/commands/helpLibrary/generateHelpMessage.ts +++ b/src/commands/helpLibrary/generateHelpMessage.ts @@ -37,7 +37,7 @@ const makeHelpEmbed = (helpDict: HelpContents | HelpPage, parentTitle?: string): name: `Roll Command Help${parentTitle ? ' - ' : ''}${parentTitle}`, }, title: helpDict.name, - description: helpDict.description, + description: helpDict.description.replaceAll('[[', config.prefix).replaceAll(']]', config.postfix), fields: !helpDict.isPage && helpDict.example ? [ { diff --git a/src/commands/helpLibrary/miscFeatures.ts b/src/commands/helpLibrary/miscFeatures.ts index ceaa930..52fcc52 100644 --- a/src/commands/helpLibrary/miscFeatures.ts +++ b/src/commands/helpLibrary/miscFeatures.ts @@ -99,6 +99,7 @@ When in Multi Sub-Roll mode, the group options are applied to the results of eac 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. Variables are numbered from \`x0\` to \`xN\`, where \`N\` equals two less than the total number of roll commands in the message. You can add the "Number Variables" flag (\`-nv\`) to your command to see what will be assigned to each roll command. +When using the Roll Alias System (\`[[ra help\` for details), \`y\` variables are available, numbered from \`y0\` to \`yN\`, where \`N\` is the max desired variable. These will be required when using a Roll Alias, and should be specified by the user like this: \`[[ra aliasName 0 1 2\`. **Notes about this example:** - The example below starts with \`[[0]]\` so that it is a valid roll command. See the \`Miscellaneous Features>User Formatting\` help page for more details.