feat: create a BotDataManager abstraction by copying and pasting then editing UserDataManager

This commit is contained in:
2026-04-25 20:56:41 -04:00
parent 2c0d5c8479
commit 733e8f73ea
5 changed files with 205 additions and 64 deletions

View File

@@ -16,9 +16,9 @@ use twilight_model::{
},
};
use crate::{GuildVoiceChannelToTextChannel, UserDataManager, VCs};
use crate::{BotDataManager, GuildVoiceChannelToTextChannel, UserDataManager, VCs};
pub mod debug;
pub mod info;
pub mod join;
pub mod leave;
pub mod opt_in;
@@ -28,7 +28,7 @@ pub mod opt_out;
pub struct State {
pub audio_channels: Channels,
pub audio_sample_rate: SampleRate,
pub bot_data: Operator,
pub bot_data_manager: BotDataManager,
pub cancellation_token: CancellationToken,
pub discord_application_id: Id<ApplicationMarker>,
pub discord_bot_owner_user_id: Id<UserMarker>,
@@ -58,7 +58,7 @@ where
pub fn all() -> Vec<(&'static Command, BoxedHandler)> {
vec![
(&debug::COMMAND, box_handler(debug::handle)),
(&info::COMMAND, box_handler(info::handle)),
(&join::COMMAND, box_handler(join::handle)),
(&leave::COMMAND, box_handler(leave::handle)),
(&opt_in::COMMAND, box_handler(opt_in::handle)),