1
1
mirror of https://github.com/Burn-E99/TheArtificer.git synced 2026-06-04 09:03:50 -04:00

Change artigen to take rollRequest to use originalCommand as the raw text, then use remaining args after getModifiers eats mods

This commit is contained in:
Ean Milligan
2025-05-05 18:19:39 -04:00
parent 2fe2c5f296
commit b169ee8632
5 changed files with 65 additions and 53 deletions

View File

@@ -45,7 +45,7 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
const m = await message.reply(rollingEmbed);
// Get modifiers from command
const modifiers = getModifiers(args);
const [modifiers, remainingArgs] = getModifiers(args);
// Return early if the modifiers were invalid
if (!modifiers.valid) {
@@ -60,7 +60,7 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
return;
}
let rollCmd = message.content.startsWith(`${config.prefix}r`) ? args.join(' ') : message.content;
let rollCmd = message.content.startsWith(`${config.prefix}r`) ? remainingArgs.join(' ') : `${config.prefix}${command} ${remainingArgs.join(' ')}`;
// Try to ensure the roll is wrapped
if (!rollCmd.includes(config.prefix)) {