Skip to content

Commit c189447

Browse files
authored
fix: relax intergration (#999)
* Filter scores * Use the correct star rating (TODO: document the names) * fix: use Vec::retain to avoid allocations
1 parent 27bf487 commit c189447

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

bathbot/src/active/impls/relax/top.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl RelaxTopPagination {
141141
map_id = score.beatmap_id,
142142
mods = ModsFormatter::new(mods),
143143
pp = PpFormatter::new(score_pp, Some(max_pp)),
144-
stars = score.beatmap.star_rating.unwrap_or_default(),
144+
stars = score.beatmap.star_rating_normal,
145145
acc = round(score.accuracy),
146146
score = WithComma::new(score.total_score),
147147
combo = ComboFormatter::new(score.combo, Some(max_combo)),

bathbot/src/commands/osu/relax/top.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ pub async fn top(orig: CommandOrigin<'_>, args: RelaxTop<'_>) -> Result<()> {
7474
}
7575
};
7676

77+
scores.retain(|sc| sc.is_best);
78+
7779
let map_ids = scores
7880
.iter()
7981
.take(5)

0 commit comments

Comments
 (0)