Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 276547cecb 1.5.10 2021-11-15 20:54:02 +01:00
ThePendulum fbd898d2ee Added message user object fallback. 2021-11-15 20:54:00 +01:00
4 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ module.exports = {
avatar: 'https://i.imgur.com/IZwrjjG.png',
},
operators: ['admin'],
uniqueUsername: true,
uniqueUsername: false,
socket: 'ws://127.0.0.1:3000/socket',
api: 'http://127.0.0.1:3000/api',
reconnectDelay: 10, // seconds

4
package-lock.json generated
View File

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

View File

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

View File

@ -136,7 +136,7 @@ function onLeave(data, bot) {
function onMessage(message, bot, games) {
const [, command, subcommand] = message.body?.match(new RegExp(`^${config.prefix}(\\w+)(?:\\:(\\w+))?`)) || [];
const user = bot.users[message.userId];
const user = bot.users[message.userId] || message.user;
const room = bot.rooms[message.roomId];
if (['leaderboard', 'lead', 'leader', 'leaders', 'scoreboard', 'best'].includes(subcommand) && games[command]) {