chore(auto): task completed - unknown

This commit is contained in:
MythEclipse
2026-06-13 14:10:34 +07:00
parent 277d982c51
commit 6822cb0bd3
5 changed files with 33 additions and 34 deletions
@@ -2,12 +2,7 @@ import { createChildLogger } from "@bete/shared/logger";
import type { Request, Response } from "express";
import { asyncHandler } from "../../shared/middlewares/index.js";
import { publishCommandNoReply } from "../../shared/redis/index.js";
import {
connectVoice,
disconnectVoice,
getVoiceChannels,
getVoiceStatus,
} from "./voice.service.js";
import { connectVoice, disconnectVoice, getVoiceStatus } from "./voice.service.js";
const logger = createChildLogger("voice.controller");
@@ -48,15 +43,6 @@ export const handleDisconnectVoice = asyncHandler(
},
);
export const handleGetVoiceChannels = asyncHandler(
async (req: Request, res: Response) => {
const guildId = asString(req.params.guildId);
logger.debug({ guildId }, "Fetching voice channels");
const channels = await getVoiceChannels(guildId);
res.json(channels);
},
);
export const handleVoiceCommand = asyncHandler(
async (req: Request, res: Response) => {
const command = asString(req.body.command);
@@ -10,14 +10,14 @@ import {
export function createVoiceRouter(): Router {
const router = express.Router();
// GET /api/status
router.get("/status", handleGetVoiceStatus);
// GET /api/voice/status
router.get("/voice/status", handleGetVoiceStatus);
// POST /api/connect
router.post("/connect", handleConnectVoice);
// POST /api/voice/connect
router.post("/voice/connect", handleConnectVoice);
// POST /api/disconnect
router.post("/disconnect", handleDisconnectVoice);
// POST /api/voice/disconnect
router.post("/voice/disconnect", handleDisconnectVoice);
// POST /api/voice/command — send arbitrary voice command (transmit start/stop)
router.post("/voice/command", handleVoiceCommand);