Rename Funky-Function

This commit is contained in:
2023-03-11 18:24:04 -05:00
parent a4e3fa7282
commit cf2ecc45d6
2 changed files with 3 additions and 4 deletions

View File

@@ -26,7 +26,6 @@ impl EventHandler for Handler {
async fn guild_create(&self, ctx: Context, guild: Guild, _new: bool) {
println!("Guild joined: {}", guild.name);
guild_popin::addGuild(ctx, guild).await;
guild_popin::add_guild(ctx, guild).await;
}
}

View File

@@ -30,12 +30,12 @@ pub async fn init(ctx: Context) {
data.insert::<GuildPopIn>(Arc::new(RwLock::new(HashMap::default())))
}
pub async fn addGuild(ctx: Context, guild: Guild) {
pub async fn add_guild(ctx: Context, guild: Guild) {
let data = ctx.data.write().await;
let pops = data.get::<GuildPopIn>().expect("Guild Popin States Not Initialized");
{
let mut pops = pops.write().await;
let popin = pops.insert(guild.id, init_pop_state());
pops.insert(guild.id, init_pop_state());
println!("GuildsPopIns: {:?}", pops);
}
}