parralellllll start
This commit is contained in:
parent
8988bbd180
commit
f8ec903a2c
11
src/main.rs
11
src/main.rs
|
@ -10,13 +10,10 @@ const MAX_FPS: f32 = 30.0;
|
|||
fn main() {
|
||||
println!("hello there");
|
||||
|
||||
// Create a separate Tokio runtime for the bot
|
||||
let bot_runtime = Runtime::new().unwrap();
|
||||
let bot_handle = bot_runtime.handle().clone();
|
||||
|
||||
// Spawn the bot task onto the separate runtime
|
||||
bot_handle.spawn(async move {
|
||||
bot::start_discord_bot().await;
|
||||
let handle = thread::spawn(|| {
|
||||
println!("general kenobi");
|
||||
let mut rt = Runtime::new().unwrap();
|
||||
rt.block_on(bot::start_discord_bot());
|
||||
});
|
||||
|
||||
// Run the GUI on the main thread
|
||||
|
|
Loading…
Reference in a new issue