|
|
|
@ -37,6 +37,7 @@ export type CommandOutcome = {
|
|
|
|
|
|
|
|
|
|
|
|
export class CommandService {
|
|
|
|
export class CommandService {
|
|
|
|
static dbInstance: Database = db;
|
|
|
|
static dbInstance: Database = db;
|
|
|
|
|
|
|
|
private static readonly CTA_HELP: string = 'ℹ️ Tus tareas: /t mias · Todas: /t todas · Info: /t info · Web: /t web';
|
|
|
|
|
|
|
|
|
|
|
|
private static parseNueva(message: string, mentionsNormalized: string[]): {
|
|
|
|
private static parseNueva(message: string, mentionsNormalized: string[]): {
|
|
|
|
action: string;
|
|
|
|
action: string;
|
|
|
|
@ -1190,7 +1191,7 @@ export class CommandService {
|
|
|
|
].filter(Boolean);
|
|
|
|
].filter(Boolean);
|
|
|
|
responses.push({
|
|
|
|
responses.push({
|
|
|
|
recipient: createdBy,
|
|
|
|
recipient: createdBy,
|
|
|
|
message: ackLines.join('\n'),
|
|
|
|
message: [ackLines.join('\n'), '', CommandService.CTA_HELP].join('\n'),
|
|
|
|
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
|
|
|
|
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
@ -1206,7 +1207,7 @@ export class CommandService {
|
|
|
|
groupName ? `Grupo: ${groupName}` : null,
|
|
|
|
groupName ? `Grupo: ${groupName}` : null,
|
|
|
|
`- Completar: \`/t x ${createdTask?.display_code}\``,
|
|
|
|
`- Completar: \`/t x ${createdTask?.display_code}\``,
|
|
|
|
`- Soltar: \`/t soltar ${createdTask?.display_code}\``
|
|
|
|
`- Soltar: \`/t soltar ${createdTask?.display_code}\``
|
|
|
|
].filter(Boolean).join('\n'),
|
|
|
|
].filter(Boolean).join('\n') + '\n\n' + CommandService.CTA_HELP,
|
|
|
|
mentions: [creatorJid]
|
|
|
|
mentions: [creatorJid]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|