feat: support configuring audio channels and sample rates of recordings; audio recordings now work!

This commit is contained in:
2026-04-15 01:22:38 -04:00
parent b457375e69
commit 33a7b15720
5 changed files with 127 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ use std::{fmt::Debug, sync::Arc};
use futures::future::BoxFuture;
use opendal::Operator;
use patricia_tree::StringPatriciaMap;
use songbird::Songbird;
use songbird::{Songbird, driver::{Channels, SampleRate}};
use tokio_util::sync::CancellationToken;
use twilight_model::{
application::{command::Command, interaction::Interaction},
@@ -23,6 +23,8 @@ mod opt_out;
#[derive(Debug, Clone)]
pub struct State {
pub audio_channels: Channels,
pub audio_sample_rate: SampleRate,
pub bot_data: Operator,
pub cancellation_token: CancellationToken,
pub discord_application_id: Id<ApplicationMarker>,