feat: create a BotDataManager abstraction by copying and pasting then editing UserDataManager
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use clap::Parser;
|
||||
use fomo_reducer::{
|
||||
CommandRouter, GuildVoiceChannelToTextChannel, State, Storage, UserDataManager, all_commands,
|
||||
command, initialize_vcs, update_vcs,
|
||||
BotDataManager, CommandRouter, GuildVoiceChannelToTextChannel, State, Storage, UserDataManager,
|
||||
all_commands, command, initialize_vcs, update_vcs,
|
||||
};
|
||||
use secrecy::{ExposeSecret, SecretString};
|
||||
use snafu::{OptionExt, ResultExt, Snafu};
|
||||
@@ -322,6 +322,7 @@ async fn main() -> Result<(), MainError> {
|
||||
let recording_data = recording_data.into_inner();
|
||||
let user_data = user_data.into_inner();
|
||||
|
||||
let bot_data_manager = BotDataManager::new(bot_data);
|
||||
let user_data_manager = UserDataManager::new(user_data);
|
||||
|
||||
let discord_voice_channel_corresponding_text_channel = {
|
||||
@@ -343,7 +344,7 @@ async fn main() -> Result<(), MainError> {
|
||||
let state = State {
|
||||
audio_channels,
|
||||
audio_sample_rate,
|
||||
bot_data,
|
||||
bot_data_manager,
|
||||
cancellation_token: cancellation_token.clone(),
|
||||
discord_application_id,
|
||||
discord_bot_owner_user_id,
|
||||
|
||||
Reference in New Issue
Block a user