feat: enhance media handling and audio processing logic

This commit is contained in:
MythEclipse
2026-05-15 22:23:29 +07:00
parent 6ac4a5c11a
commit e32e092596
10 changed files with 63 additions and 148 deletions

View File

@@ -1,15 +1,12 @@
import type { Router } from "express";
import express from "express";
import { AppError } from "../errors";
import { createChildLogger } from "../logger";
import {
getAnalysisQueueStatus,
queueMessageAnalysis,
} from "../moderation/aiAnalyzer";
import { getMessageById } from "../moderation/messageStore";
const logger = createChildLogger("analysis-routes");
export function createAnalysisRoutes(): Router {
const router = express.Router();
@@ -41,8 +38,6 @@ export function createAnalysisRoutes(): Router {
// Queue for analysis
await queueMessageAnalysis(id);
logger.info({ messageId: id }, "Message queued for re-analysis");
res.json({
success: true,
messageId: id,

View File

@@ -45,7 +45,6 @@ export function createSyncRoutes(client: Client): Router {
}
if (shouldSkipRecentBacklogSync(guildId, channelId)) {
logger.debug({ guildId, channelId }, "Skipping recent backlog sync");
res.json({
success: true,
channelId,
@@ -56,15 +55,8 @@ export function createSyncRoutes(client: Client): Router {
return;
}
logger.info({ guildId, channelId }, "Queueing backlog sync");
syncSelectedChannelBacklog(client, guildId, channelId)
.then((count) => {
logger.info(
{ guildId, channelId, messagesSync: count },
"Backlog sync complete",
);
})
.then(() => {})
.catch((error) => {
logger.warn(
{