Compare commits
2 Commits
09d344b394
...
abc55e81a6
Author | SHA1 | Date |
---|---|---|
|
abc55e81a6 | |
|
bbe057eea2 |
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.7.5",
|
"version": "1.7.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.7.5",
|
"version": "1.7.6",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bhttp": "^1.2.8",
|
"bhttp": "^1.2.8",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "schat2-clive",
|
"name": "schat2-clive",
|
||||||
"version": "1.7.5",
|
"version": "1.7.6",
|
||||||
"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": {
|
||||||
|
|
|
@ -109,6 +109,7 @@ function onConnect(data, bot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRooms({ rooms, users }, bot) {
|
function onRooms({ rooms, users }, bot) {
|
||||||
|
console.log('rooms', rooms);
|
||||||
logger.info(`Joined ${rooms.map((room) => room.name).join(', ')}`);
|
logger.info(`Joined ${rooms.map((room) => room.name).join(', ')}`);
|
||||||
|
|
||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
const config = require('config');
|
const config = require('config');
|
||||||
|
|
||||||
function onCommand(args, context) {
|
function onCommand(args, context) {
|
||||||
|
console.log(context);
|
||||||
|
|
||||||
context.bot.socket.transmit('message', {
|
context.bot.socket.transmit('message', {
|
||||||
roomId: context.room.id,
|
roomId: context.room?.id,
|
||||||
|
recipient: context.message.user?.username,
|
||||||
body: 'Shutting down... :sleeping:',
|
body: 'Shutting down... :sleeping:',
|
||||||
style: config.style,
|
style: config.style,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue