Added die for too many faces.

This commit is contained in:
ThePendulum 2022-10-24 00:47:02 +02:00
parent 1872cc0c32
commit e161767828
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ function onCommand(args, context) {
const result = crypto.randomInt(1, faces);
// using U+2003 Em Space after dice to create double space that doesn't get filtered in SChat
return `${dieFaces[result - 1] ? `${style.grey(dieFaces[result - 1])} ` : ''}${style.bold(result)}`; // eslint-disable-line no-irregular-whitespace
return `${style.grey(dieFaces[result - 1] || '▦')} ${style.bold(result)}`; // eslint-disable-line no-irregular-whitespace
});
context.sendMessage(results.join(' | '), context.room.id);