From 947d4d64c478b16f1e79971ca29b54b1addab9ef Mon Sep 17 00:00:00 2001 From: "DavidCrompton1192@gmail.com" Date: Sat, 11 Mar 2023 20:21:27 -0500 Subject: [PATCH] References bb --- src/main.rs | 2 +- src/utils/guild_popin.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fe43dcd..d576ee7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ async fn main() { // TODO: do checks when getting data in add guild etc. println!("Initialize guild voice popin state"); - utils::guild_popin::init(client); + utils::guild_popin::init(&client).await; if let Err(why) = client.start().await { println!("Client error: {:?}", why); diff --git a/src/utils/guild_popin.rs b/src/utils/guild_popin.rs index eb94b9a..ea327fb 100644 --- a/src/utils/guild_popin.rs +++ b/src/utils/guild_popin.rs @@ -86,7 +86,7 @@ async fn popin_soon(ctx: Context, guild: Guild) { tokio::spawn(popin(ctx.clone(),guild)); } -pub async fn init(client: Client) { +pub async fn init(client: &Client) { let mut data = client.data.write().await; data.insert::(Arc::new(RwLock::new(HashMap::default()))) }