removed [[r shorthand from report command, add [[r and [[roll as aliases to the roll command
This commit is contained in:
parent
fafaee67b3
commit
0b864b0f21
8
mod.ts
8
mod.ts
|
@ -276,8 +276,8 @@ startBot({
|
|||
commands.version(message);
|
||||
break;
|
||||
case 'report':
|
||||
case 'r':
|
||||
// [[report or [[r (command that failed)
|
||||
case 're':
|
||||
// [[report or [[re (command that failed)
|
||||
// Manually report a failed roll
|
||||
commands.report(message, args);
|
||||
break;
|
||||
|
@ -303,6 +303,10 @@ startBot({
|
|||
// Audit sub commands
|
||||
commands.heatmap(message);
|
||||
break;
|
||||
case 'roll':
|
||||
case 'r':
|
||||
commands.roll(message, args, args.join(''));
|
||||
break;
|
||||
default:
|
||||
// Non-standard commands
|
||||
if (command?.startsWith('xdy')) {
|
||||
|
|
|
@ -59,10 +59,18 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
|
|||
return;
|
||||
}
|
||||
|
||||
let rollCmd = message.content.startsWith(`${config.prefix}r`) ? args.join(' ') : message.content;
|
||||
if (!rollCmd.includes(config.prefix)) {
|
||||
rollCmd = `${config.prefix}${rollCmd}`;
|
||||
}
|
||||
if (!rollCmd.includes(config.postfix)) {
|
||||
rollCmd = `${rollCmd}${config.postfix}`;
|
||||
}
|
||||
|
||||
sendRollRequest({
|
||||
apiRoll: false,
|
||||
dd: { myResponse: m, originalMessage: message },
|
||||
rollCmd: message.content,
|
||||
rollCmd,
|
||||
modifiers,
|
||||
originalCommand,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue