Compare commits
2 Commits
1ca03c3faa
...
ab06712497
Author | SHA1 | Date |
---|---|---|
|
ab06712497 | |
|
0a1512e639 |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.6",
|
||||
"version": "1.4.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.6",
|
||||
"version": "1.4.7",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bhttp": "^1.2.8",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.4.6",
|
||||
"version": "1.4.7",
|
||||
"description": "Game host for SChat 2-powered chat sites",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -148,6 +148,14 @@ function onCommand(args, context) {
|
|||
if (context.subcommand === 'stop' && !game) {
|
||||
context.sendMessage(`There is no game going on at the moment. Start one with ${config.prefix}trivia!`, context.room.id);
|
||||
}
|
||||
|
||||
const subcommand = context.subcommand?.toLowerCase();
|
||||
|
||||
if (subcommand) {
|
||||
settings[subcommand] = typeof settings[subcommand] === 'number' ? (Number(args[0]) || settings[subcommand]) : args[0];
|
||||
|
||||
context.sendMessage(`${subcommand} set to ${settings[subcommand]}`, context.room.id);
|
||||
}
|
||||
}
|
||||
|
||||
async function onMessage(message, context) {
|
||||
|
|
Loading…
Reference in New Issue