Some debugs, remove bad break
This commit is contained in:
@@ -30,6 +30,7 @@ fn init_pop_state() -> GuildPopIn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn popin(ctx: Context, guild: Guild) {
|
async fn popin(ctx: Context, guild: Guild) {
|
||||||
|
println!("Gonna join, I'll do it");
|
||||||
let mut most = None;
|
let mut most = None;
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
for (id,chan) in guild.channels {
|
for (id,chan) in guild.channels {
|
||||||
@@ -47,7 +48,6 @@ async fn popin(ctx: Context, guild: Guild) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
@@ -61,7 +61,9 @@ async fn popin(ctx: Context, guild: Guild) {
|
|||||||
.expect("Songbird: intialization");
|
.expect("Songbird: intialization");
|
||||||
let (_,_status) = manager.join(guild.id, chan).await;
|
let (_,_status) = manager.join(guild.id, chan).await;
|
||||||
},
|
},
|
||||||
None => {}
|
None => {
|
||||||
|
println!("No good channel to join")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
@@ -78,6 +80,7 @@ async fn popin_soon(ctx: Context, guild: Guild) {
|
|||||||
start: popwhen.min,
|
start: popwhen.min,
|
||||||
end: popwhen.max
|
end: popwhen.max
|
||||||
});
|
});
|
||||||
|
println!("Joining in: {}", join_in);
|
||||||
sleep(Duration::from_millis(join_in));
|
sleep(Duration::from_millis(join_in));
|
||||||
tokio::spawn(popin(ctx.clone(),guild));
|
tokio::spawn(popin(ctx.clone(),guild));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user