feat: improve gateway services and auto-reply commands
This commit is contained in:
@@ -602,7 +602,7 @@ export async function handleCommands(params: {
|
||||
);
|
||||
return { shouldContinue: false };
|
||||
}
|
||||
return { shouldContinue: false, reply: { text: buildHelpMessage() } };
|
||||
return { shouldContinue: false, reply: { text: buildHelpMessage(cfg) } };
|
||||
}
|
||||
|
||||
const commandsRequested = command.commandBodyNormalized === "/commands";
|
||||
@@ -613,7 +613,7 @@ export async function handleCommands(params: {
|
||||
);
|
||||
return { shouldContinue: false };
|
||||
}
|
||||
return { shouldContinue: false, reply: { text: buildCommandsMessage() } };
|
||||
return { shouldContinue: false, reply: { text: buildCommandsMessage(cfg) } };
|
||||
}
|
||||
|
||||
const statusRequested =
|
||||
@@ -650,6 +650,14 @@ export async function handleCommands(params: {
|
||||
);
|
||||
return { shouldContinue: false };
|
||||
}
|
||||
if (cfg.commands?.config !== true) {
|
||||
return {
|
||||
shouldContinue: false,
|
||||
reply: {
|
||||
text: "⚠️ /config is disabled. Set commands.config=true to enable.",
|
||||
},
|
||||
};
|
||||
}
|
||||
if (configCommand.action === "error") {
|
||||
return {
|
||||
shouldContinue: false,
|
||||
@@ -774,6 +782,14 @@ export async function handleCommands(params: {
|
||||
);
|
||||
return { shouldContinue: false };
|
||||
}
|
||||
if (cfg.commands?.debug !== true) {
|
||||
return {
|
||||
shouldContinue: false,
|
||||
reply: {
|
||||
text: "⚠️ /debug is disabled. Set commands.debug=true to enable.",
|
||||
},
|
||||
};
|
||||
}
|
||||
if (debugCommand.action === "error") {
|
||||
return {
|
||||
shouldContinue: false,
|
||||
|
||||
Reference in New Issue
Block a user