Fixed the /dr command (#504)

This commit is contained in:
WBHarry 2025-08-01 20:08:15 +02:00 committed by GitHub
parent e1d8f8784a
commit b9a9b00bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;