Discord: add native exec options

This commit is contained in:
Shadow
2026-02-16 14:17:41 -06:00
parent e5eb5b3e43
commit fc60336c18
3 changed files with 44 additions and 2 deletions

View File

@@ -90,8 +90,30 @@ const formatQueueArgs: CommandArgsFormatter = (values) => {
return parts.length > 0 ? parts.join(" ") : undefined;
};
const formatExecArgs: CommandArgsFormatter = (values) => {
const host = normalizeArgValue(values.host);
const security = normalizeArgValue(values.security);
const ask = normalizeArgValue(values.ask);
const node = normalizeArgValue(values.node);
const parts: string[] = [];
if (host) {
parts.push(`host=${host}`);
}
if (security) {
parts.push(`security=${security}`);
}
if (ask) {
parts.push(`ask=${ask}`);
}
if (node) {
parts.push(`node=${node}`);
}
return parts.length > 0 ? parts.join(" ") : undefined;
};
export const COMMAND_ARG_FORMATTERS: Record<string, CommandArgsFormatter> = {
config: formatConfigArgs,
debug: formatDebugArgs,
queue: formatQueueArgs,
exec: formatExecArgs,
};