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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user