forked from discord/hal-9000
Fix up formatting of randommk responses
This commit is contained in:
parent
1b7f12ca47
commit
450aca74c2
|
|
@ -42,14 +42,28 @@ async fn randommk(context: ManifoldContext<'_>, count: u32, balance: bool, insid
|
||||||
|
|
||||||
for combo in combos {
|
for combo in combos {
|
||||||
context.send(|c| {
|
context.send(|c| {
|
||||||
c.embed(|embed| {
|
c
|
||||||
embed
|
.content(format!("{combo_number}. {0}, {1}, {2}, {3}", combo.character, combo.body, combo.tires, combo.glider))
|
||||||
.title(format!("{combo_number}. {0}, {1}, {2}, {3}", combo.character, combo.body, combo.tires, combo.glider))
|
.embed(|embed| {
|
||||||
.image(format!("https://mkrandomizer.awsxdr.com/images/characters/{0}.png", combo.character))
|
embed
|
||||||
.image(format!("https://mkrandomizer.awsxdr.com/images/bodies/{0}.png", combo.body))
|
.url("https://mkrandomizer.awsxdr.com/")
|
||||||
.image(format!("https://mkrandomizer.awsxdr.com/images/tires/{0}.png", combo.tires))
|
.image(format!("https://mkrandomizer.awsxdr.com/images/characters/{0}.png", combo.character))
|
||||||
.image(format!("https://mkrandomizer.awsxdr.com/images/gliders/{0}.png", combo.glider))
|
})
|
||||||
})
|
.embed(|embed| {
|
||||||
|
embed
|
||||||
|
.url("https://mkrandomizer.awsxdr.com/")
|
||||||
|
.image(format!("https://mkrandomizer.awsxdr.com/images/bodies/{0}.png", combo.body))
|
||||||
|
})
|
||||||
|
.embed(|embed| {
|
||||||
|
embed
|
||||||
|
.url("https://mkrandomizer.awsxdr.com/")
|
||||||
|
.image(format!("https://mkrandomizer.awsxdr.com/images/tires/{0}.png", combo.tires))
|
||||||
|
})
|
||||||
|
.embed(|embed| {
|
||||||
|
embed
|
||||||
|
.url("https://mkrandomizer.awsxdr.com/")
|
||||||
|
.image(format!("https://mkrandomizer.awsxdr.com/images/gliders/{0}.png", combo.glider))
|
||||||
|
})
|
||||||
}).await?;
|
}).await?;
|
||||||
|
|
||||||
combo_number += 1;
|
combo_number += 1;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ impl MarioKartRandomizer {
|
||||||
|
|
||||||
let selection_slice = &scored_combinations[min as usize..max as usize];
|
let selection_slice = &scored_combinations[min as usize..max as usize];
|
||||||
|
|
||||||
for _ in 1..count {
|
for _ in 0..count {
|
||||||
let combo = selection_slice.choose(&mut random).unwrap();
|
let combo = selection_slice.choose(&mut random).unwrap();
|
||||||
result.push(combo.combination.clone());
|
result.push(combo.combination.clone());
|
||||||
}
|
}
|
||||||
|
|
@ -71,7 +71,7 @@ impl MarioKartRandomizer {
|
||||||
get_kart_combinations()
|
get_kart_combinations()
|
||||||
} else {
|
} else {
|
||||||
let stats = get_item_stats();
|
let stats = get_item_stats();
|
||||||
get_kart_combinations().iter().filter(|k| { stats.bodies[&k.body].inside_drift }).cloned().collect()
|
get_kart_combinations().iter().filter(|k| { !stats.bodies[&k.body].inside_drift }).cloned().collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue