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);
|
commands.version(message);
|
||||||
break;
|
break;
|
||||||
case 'report':
|
case 'report':
|
||||||
case 'r':
|
case 're':
|
||||||
// [[report or [[r (command that failed)
|
// [[report or [[re (command that failed)
|
||||||
// Manually report a failed roll
|
// Manually report a failed roll
|
||||||
commands.report(message, args);
|
commands.report(message, args);
|
||||||
break;
|
break;
|
||||||
|
@ -303,6 +303,10 @@ startBot({
|
||||||
// Audit sub commands
|
// Audit sub commands
|
||||||
commands.heatmap(message);
|
commands.heatmap(message);
|
||||||
break;
|
break;
|
||||||
|
case 'roll':
|
||||||
|
case 'r':
|
||||||
|
commands.roll(message, args, args.join(''));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Non-standard commands
|
// Non-standard commands
|
||||||
if (command?.startsWith('xdy')) {
|
if (command?.startsWith('xdy')) {
|
||||||
|
|
|
@ -59,10 +59,18 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
|
||||||
return;
|
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({
|
sendRollRequest({
|
||||||
apiRoll: false,
|
apiRoll: false,
|
||||||
dd: { myResponse: m, originalMessage: message },
|
dd: { myResponse: m, originalMessage: message },
|
||||||
rollCmd: message.content,
|
rollCmd,
|
||||||
modifiers,
|
modifiers,
|
||||||
originalCommand,
|
originalCommand,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue