forked from discord/hal-9000
Fix up formatting of randommk responses
This commit is contained in:
parent
1b7f12ca47
commit
450aca74c2
|
|
@ -42,12 +42,26 @@ async fn randommk(context: ManifoldContext<'_>, count: u32, balance: bool, insid
|
|||
|
||||
for combo in combos {
|
||||
context.send(|c| {
|
||||
c.embed(|embed| {
|
||||
c
|
||||
.content(format!("{combo_number}. {0}, {1}, {2}, {3}", combo.character, combo.body, combo.tires, combo.glider))
|
||||
.embed(|embed| {
|
||||
embed
|
||||
.title(format!("{combo_number}. {0}, {1}, {2}, {3}", combo.character, combo.body, combo.tires, combo.glider))
|
||||
.url("https://mkrandomizer.awsxdr.com/")
|
||||
.image(format!("https://mkrandomizer.awsxdr.com/images/characters/{0}.png", combo.character))
|
||||
})
|
||||
.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?;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ impl MarioKartRandomizer {
|
|||
|
||||
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();
|
||||
result.push(combo.combination.clone());
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ impl MarioKartRandomizer {
|
|||
get_kart_combinations()
|
||||
} else {
|
||||
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