Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 1872cc0c32 1.15.1 2022-10-24 00:33:22 +02:00
ThePendulum 0beb429c09 Improved Dice layout. 2022-10-24 00:33:20 +02:00
4 changed files with 6 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.15.0", "version": "1.15.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.15.0", "version": "1.15.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"bhttp": "^1.2.8", "bhttp": "^1.2.8",

View File

@ -1,6 +1,6 @@
{ {
"name": "schat2-clive", "name": "schat2-clive",
"version": "1.15.0", "version": "1.15.1",
"description": "Game host for SChat 2-powered chat sites", "description": "Game host for SChat 2-powered chat sites",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@ -25,7 +25,7 @@ function onCommand(args, context) {
const result = crypto.randomInt(1, faces); const result = crypto.randomInt(1, faces);
// using U+2003 Em Space after dice to create double space that doesn't get filtered in SChat // 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); context.sendMessage(results.join(' | '), context.room.id);
@ -33,5 +33,5 @@ function onCommand(args, context) {
module.exports = { module.exports = {
onCommand, onCommand,
commands: ['dice', 'roll'], commands: ['dice', 'die', 'roll'],
}; };

View File

@ -97,7 +97,7 @@ function curateMessageBody(rawBody, game, key, options) {
return body; 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) { async function getGames(bot, identifier) {