Rename Funky-Function
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user