fix incorrect ordering and increase time interval for lobby approval
This commit is contained in:
@@ -401,7 +401,7 @@ impl LobbyCommand {
|
||||
let msg = interaction.get_interaction_response(ctx).await.unwrap();
|
||||
let collector = msg
|
||||
.await_component_interactions(ctx)
|
||||
.timeout(Duration::from_secs(2 * 60))
|
||||
.timeout(Duration::from_secs(10 * 60))
|
||||
.guild_id(interaction.guild_id.unwrap())
|
||||
.channel_id(interaction.channel_id)
|
||||
.author_id(interaction.user.id)
|
||||
|
||||
@@ -31,7 +31,7 @@ impl TypeMapKey for CreatorContainer {
|
||||
#[shuttle_runtime::main]
|
||||
async fn serenity(
|
||||
#[shuttle_shared_db::Postgres(
|
||||
local_uri = "postgres://postgres:{secrets.PASSWORD}@localhost:5432/postgres"
|
||||
// local_uri = "postgres://postgres:{secrets.PASSWORD}@localhost:5432/postgres"
|
||||
)]
|
||||
pool: PgPool,
|
||||
#[shuttle_secrets::Secrets] secret_store: SecretStore,
|
||||
|
||||
@@ -41,7 +41,7 @@ fn get_combinations(entries: &[PlayerRoleEntry], count: usize) -> Vec<Vec<&Playe
|
||||
.sorted_by(|a, b| {
|
||||
let a = a.iter().map(|e| e.priority).sum::<f32>();
|
||||
let b = b.iter().map(|e| e.priority).sum::<f32>();
|
||||
a.partial_cmp(&b).unwrap_or(Ordering::Equal)
|
||||
b.partial_cmp(&a).unwrap_or(Ordering::Equal)
|
||||
})
|
||||
.collect_vec()
|
||||
}
|
||||
@@ -64,7 +64,7 @@ pub fn mix_players(players: &[Player], slots: Vec<Role>) -> Option<(Team, Team)>
|
||||
let mut best_team2 = None;
|
||||
let mut best_diff = None;
|
||||
|
||||
let threshold = 100.0;
|
||||
let threshold = 300.0;
|
||||
|
||||
// this is awful, but it works
|
||||
for tank1_combo in &tank_combos {
|
||||
|
||||
Reference in New Issue
Block a user