|
|
|
@ -1373,6 +1373,16 @@ Nota: nunca respondo en grupos; solo por privado.`;
|
|
|
|
return { responses: [], ok: true };
|
|
|
|
return { responses: [], ok: true };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Registrar interacción del usuario (last_command_at) para cualquier comando /t …
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const ensured = ensureUserExists(context.sender, this.dbInstance);
|
|
|
|
|
|
|
|
if (ensured) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
this.dbInstance.prepare(`UPDATE users SET last_command_at = strftime('%Y-%m-%d %H:%M:%f','now') WHERE id = ?`).run(ensured);
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
|
|
// Gating de grupos en modo 'enforce' (cuando CommandService se invoca directamente)
|
|
|
|
// Gating de grupos en modo 'enforce' (cuando CommandService se invoca directamente)
|
|
|
|
if (isGroupId(context.groupId)) {
|
|
|
|
if (isGroupId(context.groupId)) {
|
|
|
|
try { (AllowedGroups as any).dbInstance = this.dbInstance; } catch { }
|
|
|
|
try { (AllowedGroups as any).dbInstance = this.dbInstance; } catch { }
|
|
|
|
|