Auto-reply: drop native command flag
This commit is contained in:
@@ -6,7 +6,6 @@ export type ChatCommandDefinition = {
|
|||||||
description: string;
|
description: string;
|
||||||
textAliases: string[];
|
textAliases: string[];
|
||||||
acceptsArgs?: boolean;
|
acceptsArgs?: boolean;
|
||||||
supportsNative?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NativeCommandSpec = {
|
export type NativeCommandSpec = {
|
||||||
@@ -141,9 +140,7 @@ export function listChatCommands(): ChatCommandDefinition[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function listNativeCommandSpecs(): NativeCommandSpec[] {
|
export function listNativeCommandSpecs(): NativeCommandSpec[] {
|
||||||
return CHAT_COMMANDS.filter(
|
return CHAT_COMMANDS.map((command) => ({
|
||||||
(command) => command.supportsNative !== false,
|
|
||||||
).map((command) => ({
|
|
||||||
name: command.nativeName,
|
name: command.nativeName,
|
||||||
description: command.description,
|
description: command.description,
|
||||||
acceptsArgs: Boolean(command.acceptsArgs),
|
acceptsArgs: Boolean(command.acceptsArgs),
|
||||||
|
|||||||
@@ -375,8 +375,7 @@ export function buildCommandsMessage(): string {
|
|||||||
const aliasLabel = aliases.length
|
const aliasLabel = aliases.length
|
||||||
? ` (aliases: ${aliases.join(", ")})`
|
? ` (aliases: ${aliases.join(", ")})`
|
||||||
: "";
|
: "";
|
||||||
const scopeLabel = command.supportsNative === false ? " (text-only)" : "";
|
lines.push(`${primary}${aliasLabel} - ${command.description}`);
|
||||||
lines.push(`${primary}${aliasLabel}${scopeLabel} - ${command.description}`);
|
|
||||||
}
|
}
|
||||||
return lines.join("\n");
|
return lines.join("\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user