Improved Dice layout.
This commit is contained in:
parent
4d5503115e
commit
0beb429c09
|
@ -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'],
|
||||
};
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue