Merge pull request 'Discord: several radio streams per voice channel; adding never overwrites (#213)' (#227) from fix/213-multi-stream-per-channel into main
This commit was merged in pull request #227.
This commit is contained in:
@@ -76,6 +76,9 @@ export const c2api = {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
/** Without stream_id: ADD a stream to the voice channel (a channel can carry
|
||||
* several, each its own bot + system; never replaces one). With stream_id:
|
||||
* restart / edit that stream. */
|
||||
startDiscordStream: (body: {
|
||||
guild_id: string;
|
||||
channel_id: string;
|
||||
@@ -83,6 +86,7 @@ export const c2api = {
|
||||
mode: "persistent" | "adhoc";
|
||||
channel_name?: string;
|
||||
preferred_token_id?: string;
|
||||
stream_id?: string;
|
||||
}) => request<DiscordStream>("/discord/streams", { method: "POST", body: JSON.stringify(body) }),
|
||||
/** Permanently remove a radio channel (stopped through desired state first). Admin only. */
|
||||
deleteDiscordStream: (streamId: string) =>
|
||||
@@ -99,10 +103,11 @@ export const c2api = {
|
||||
}>(`/discord/guilds/${encodeURIComponent(guildId)}?leave_radio_bots=${leaveRadioBots ? "true" : "false"}`, {
|
||||
method: "DELETE",
|
||||
}),
|
||||
stopDiscordStream: (guildId: string, channelId: string) =>
|
||||
/** Stop ONE stream (its voice channel may carry others, which keep playing). */
|
||||
stopDiscordStream: (guildId: string, streamId: string) =>
|
||||
request<{ stopped: string[] }>(`/discord/guilds/${encodeURIComponent(guildId)}/stop`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ channel_id: channelId, reason: "stopped from web admin" }),
|
||||
body: JSON.stringify({ stream_id: streamId, reason: "stopped from web admin" }),
|
||||
}),
|
||||
|
||||
// Node approval
|
||||
|
||||
Reference in New Issue
Block a user