Fixed the /dr command

This commit is contained in:
WBHarry 2025-08-01 19:43:41 +02:00
parent e1d8f8784a
commit b8921614ac

View file

@ -187,7 +187,8 @@ Hooks.on('renderHandlebarsApplication', (_, element) => {
Hooks.on('chatMessage', (_, message) => {
if (message.startsWith('/dr')) {
const result = rollCommandToJSON(message.replace(/\/dr\s?/, ''));
const result =
message.trim().toLowerCase() === '/dr' ? { result: {} } : rollCommandToJSON(message.replace(/\/dr\s?/, ''));
if (!result) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.dualityParsing'));
return false;