Improved Dice layout.

This commit is contained in:
ThePendulum 2022-10-24 00:33:20 +02:00
parent 4d5503115e
commit 0beb429c09
2 changed files with 3 additions and 3 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 `${dieFaces[result - 1] ? `${style.grey(dieFaces[result - 1])} ` : ''}${style.bold(result)}`; // eslint-disable-line no-irregular-whitespace
});
context.sendMessage(results.join(' | '), context.room.id);
@ -33,5 +33,5 @@ function onCommand(args, context) {
module.exports = {
onCommand,
commands: ['dice', 'roll'],
commands: ['dice', 'die', 'roll'],
};

View File

@ -97,7 +97,7 @@ function curateMessageBody(rawBody, game, key, options) {
return body;
}
return `${style.grey(`[${game.name || key}]`)} ${body}`;
return `${style.grey(`[${game.name || `${key.slice(0, 1).toUpperCase()}${key.slice(1)}`}]`)} ${body}`;
}
async function getGames(bot, identifier) {