feat: create a BotDataManager abstraction by copying and pasting then editing UserDataManager
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user