Nightly: Partymode serverseitig Start/Stop Endpunkte + Panic stoppt global; Frontend triggert Party-Start/Stop

This commit is contained in:
vibe-bot 2025-08-09 22:43:13 +02:00
parent 442c42ef23
commit 9bb402edd3
3 changed files with 107 additions and 2 deletions

View file

@ -90,6 +90,22 @@ export async function playSound(soundName: string, guildId: string, channelId: s
}
}
export async function partyStart(guildId: string, channelId: string) {
const res = await fetch(`${API_BASE}/party/start`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ guildId, channelId })
});
if (!res.ok) throw new Error('Partymode Start fehlgeschlagen');
}
export async function partyStop(guildId: string) {
const res = await fetch(`${API_BASE}/party/stop`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ guildId })
});
if (!res.ok) throw new Error('Partymode Stop fehlgeschlagen');
}
export async function setVolumeLive(guildId: string, volume: number): Promise<void> {
const res = await fetch(`${API_BASE}/volume`, {
method: 'POST',