Compare commits
2 Commits
64673055fc
...
77a94d17ec
Author | SHA1 | Date |
---|---|---|
|
77a94d17ec | |
|
231898fe98 |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.14.1",
|
||||
"version": "1.14.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "schat2-clive",
|
||||
"version": "1.14.1",
|
||||
"version": "1.14.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bhttp": "^1.2.8",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.14.1",
|
||||
"version": "1.14.2",
|
||||
"description": "Game host for SChat 2-powered chat sites",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -5,9 +5,10 @@ const { version } = require('../../package.json');
|
|||
|
||||
function onCommand(args, context) {
|
||||
const commandsByGame = Object.entries(context.games).reduce((acc, [command, game]) => ({ ...acc, [game.name]: [...(acc[game.name] || []), command] }), {});
|
||||
const commands = Object.entries(commandsByGame).map(([gameName, gameCommands]) => `${gameCommands.length > 1 ? `${gameName}: ` : ''}${gameCommands.map((command) => `${config.prefix}${command}`).join(', ')}`).join(' | ');
|
||||
const commands = Object.entries(commandsByGame).map(([gameName, gameCommands]) => `${gameName.slice(0, 1).toUpperCase()}${gameName.slice(1)}: ${gameCommands.map((command) => `${config.prefix}${command}`).join(', ')}`).join(' | ');
|
||||
|
||||
context.sendMessage(`${config.user.username} v${version} | ${commands} | try ${config.prefix}game:help for more info, ${config.prefix}game:score [username] and ${config.prefix}game:lead for scores.`, context.room.id, { styleCommands: true });
|
||||
context.sendMessage(`${commands}`, context.room.id, { styleCommands: true });
|
||||
context.sendMessage(`Try ${config.prefix}game:help for more info, ${config.prefix}game:score [username] and ${config.prefix}game:lead for scores. | ${config.user.username} v${version} `, context.room.id, { styleCommands: true });
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -20,7 +20,6 @@ function onCommand(args, context) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'Kill',
|
||||
commands: ['kill', 'restart', 'shutdown'],
|
||||
help: `Am I getting a little confused? Try to ${config.prefix}restart me.`,
|
||||
onCommand,
|
||||
|
|
Loading…
Reference in New Issue