2024.01.29 - Latest Compiles without issues

This commit is contained in:
ModulatingForce 2024-01-29 01:13:56 -05:00
commit 25b73c41cc
5 changed files with 229 additions and 85 deletions

View file

@ -145,10 +145,13 @@ impl Chat {
pub struct BotInstance<F>
where
// F: std::future::Future + ?Sized,
F: std::future::Future
// pub struct BotInstance<F>
// where
// // F: std::future::Future + ?Sized,
// // F: std::future::Future,
// //F: std::future::Future + Send,
// F: Send + ?Sized,
pub struct BotInstance
{
prefix : char,
bot_channel : ChType,
@ -157,7 +160,9 @@ where
// pub ratelimiters : HashMap<ChType,RateLimiter>, // used to limit messages sent per channel
pub chat : Chat,
// botmodules : HashMap<ModType,Vec<EnType>>,
pub botmodules : ModulesManager<F>,
// pub botmodules : ModulesManager<F>,
pub botmodules : ModulesManager,
//pub botmodules : &'static mut ModulesManager,
twitch_oauth : String,
pub bot_channels : Vec<ChType>,
/*bot_commands : Vec[BotCommand],
@ -169,16 +174,20 @@ where
impl<F> BotInstance<F>
where
F: std::future::Future + 'static,
//F: 'static,
// impl<F> BotInstance<F>
// where
// // F: std::future::Future + 'static,
// //F: 'static,
// //F: std::future::Future + Send + ?Sized 'static,
// F: Send + ?Sized + 'static,
impl BotInstance
{
pub fn init() -> BotInstance<F>
where
F: std::future::Future + 'static,
// pub fn init() -> BotInstance<F>
// where
// F: std::future::Future + 'static,
pub fn init() -> BotInstance
{
dotenv().ok();
@ -220,6 +229,8 @@ where
// let bm = &mut ModulesManager::init();
let b = BotInstance {
@ -234,6 +245,7 @@ where
// ratelimiters : ratelimiters, // used to limit messages sent per channel
// botmodules : HashMap::new(),
botmodules : ModulesManager::init(),
//botmodules : bm,
twitch_oauth : oauth_token,
bot_channels : botchannels,
/*bot_commands : Vec[BotCommand],