Files
Papo/public/ts-build/components/modules/dynamicVoice.js
Pascal Prießnitz 22caa79b54
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 37s
[deploy]
2025-12-04 16:43:38 +01:00

27 lines
1.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderDynamicVoiceModule = renderDynamicVoiceModule;
const api_js_1 = require("../../services/api.js");
const toast_js_1 = require("../../ui/toast.js");
async function renderDynamicVoiceModule(guildId) {
const container = document.getElementById('module-dynamicvoice');
if (!container)
return;
container.innerHTML = '<p class="muted">Lade Dynamic Voice...</p>';
try {
const data = await api_js_1.api.dynamicVoice(guildId);
const cfg = data?.config || data?.dynamicVoiceConfig || {};
container.innerHTML = `
<h3 class="label">Dynamic Voice</h3>
<p class="muted">Lobby: ${cfg.lobbyChannelId || '-'}</p>
<p class="muted">Template: ${cfg.template || '-'}</p>
<p class="muted">User-Limit: ${cfg.userLimit ?? '-'}</p>
`;
}
catch (err) {
console.error(err);
container.innerHTML = '<div class="empty-state">Dynamic Voice konnte nicht geladen werden.</div>';
(0, toast_js_1.showToast)('Fehler beim Laden von Dynamic Voice', true);
}
}