|
|
|
|
@ -6,7 +6,7 @@ import { GroupSyncService } from './group-sync';
|
|
|
|
|
import { ContactsService } from './contacts';
|
|
|
|
|
import { ICONS } from '../utils/icons';
|
|
|
|
|
import { padTaskId, codeId, formatDDMM, bold, italic, code, section } from '../utils/formatting';
|
|
|
|
|
import { getQuickHelp } from './messages/help';
|
|
|
|
|
import { getQuickHelp, getFullHelp } from './messages/help';
|
|
|
|
|
import { IdentityService } from './identity';
|
|
|
|
|
import { AllowedGroups } from './allowed-groups';
|
|
|
|
|
import { Metrics } from './metrics';
|
|
|
|
|
@ -209,41 +209,16 @@ export class CommandService {
|
|
|
|
|
if (!action || action === 'ayuda') {
|
|
|
|
|
const isAdvanced = (tokens[2] || '').toLowerCase() === 'avanzada';
|
|
|
|
|
if (isAdvanced) {
|
|
|
|
|
const adv = [
|
|
|
|
|
'*Ayuda avanzada:*',
|
|
|
|
|
'Comandos y alias:',
|
|
|
|
|
' · Crear: `n`, `nueva`, `crear`, `+`',
|
|
|
|
|
' · Ver: `ver`, `mostrar`, `listar`, `ls` (opciones: `grupo` | `mis` | `todos` | `sin`)',
|
|
|
|
|
' · Completar: `x`, `hecho`, `completar`, `done` (acepta varios IDs: "`/t x 14 19 24`" o "`/t x 14,19,24`"; máximo 10)',
|
|
|
|
|
' · Tomar: `tomar`, `claim` (acepta varios IDs: "`/t tomar 12 19 50`" o "`/t tomar 12,19,50`"; máximo 10)',
|
|
|
|
|
' · Soltar: `soltar`, `unassign`',
|
|
|
|
|
'Preferencias:',
|
|
|
|
|
' · `/t configurar daily|l-v|weekly|off [HH:MM]` (por defecto _08:30_; semanal: _lunes_; l-v: lunes a viernes)',
|
|
|
|
|
'Notas:',
|
|
|
|
|
' · En grupos, el bot responde por DM (no publica en el grupo).',
|
|
|
|
|
' · Si creas una tarea en un grupo y no mencionas a nadie → “sin responsable”; en DM → se asigna a quien la cree.',
|
|
|
|
|
' · Fechas dd/MM con ⚠️ si está vencida.',
|
|
|
|
|
' · Mostramos los IDs de las tareas con 4 dígitos, pero puedes escribirlos sin ceros (p. ej., 26).',
|
|
|
|
|
].join('\n');
|
|
|
|
|
return [{
|
|
|
|
|
recipient: context.sender,
|
|
|
|
|
message: adv
|
|
|
|
|
message: getFullHelp()
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
const help = [
|
|
|
|
|
'Guía rápida:',
|
|
|
|
|
'- Crear: `/t n Descripción 2028-11-26 @Ana`',
|
|
|
|
|
'- Ver grupo: `/t ver` (en el grupo)',
|
|
|
|
|
'- Ver mis tareas: `/t ver mis` (por DM)',
|
|
|
|
|
'- Ver todas: `/t ver todas` (por DM)',
|
|
|
|
|
'- Completar: `/t x 123` (máx. 10)',
|
|
|
|
|
'- Tomar: `/t tomar 12` (máx. 10)',
|
|
|
|
|
'- Configurar recordatorios: `/t configurar diario|l-v|semanal|off [HH:MM]`',
|
|
|
|
|
'- Ayuda avanzada: `/t ayuda avanzada`'
|
|
|
|
|
].join('\n');
|
|
|
|
|
const quick = getQuickHelp();
|
|
|
|
|
const msg = [quick, '', `Ayuda avanzada: ${code('/t ayuda avanzada')}`].join('\n');
|
|
|
|
|
return [{
|
|
|
|
|
recipient: context.sender,
|
|
|
|
|
message: help
|
|
|
|
|
message: msg
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|