Skip to content

Commit

Permalink
Fix mods not being handled in calculate command
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed Mar 1, 2024
1 parent efa1ef1 commit 847eb0c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import { MessageCreator } from "@alice-utils/creators/MessageCreator";
import { BeatmapManager } from "@alice-utils/managers/BeatmapManager";
import { NumberHelper } from "@alice-utils/helpers/NumberHelper";
import { PerformanceCalculationParameters } from "@alice-utils/dpp/PerformanceCalculationParameters";
import { Accuracy, MapInfo, Modes, MathUtils } from "@rian8337/osu-base";
import {
Accuracy,
MapInfo,
Modes,
MathUtils,
ModUtil,
} from "@rian8337/osu-base";
import {
DroidDifficultyAttributes,
OsuDifficultyAttributes,
Expand Down Expand Up @@ -79,6 +85,9 @@ export const run: SlashCommand["run"] = async (_, interaction) => {
interaction.options.getNumber("overalldifficulty") ?? undefined;

const calcParams = new PerformanceCalculationParameters({
mods: ModUtil.pcStringToMods(
interaction.options.getString("mods") ?? "",
),
accuracy: new Accuracy({
n100: Math.max(0, interaction.options.getInteger("x100") ?? 0),
n50: Math.max(0, interaction.options.getInteger("x50") ?? 0),
Expand Down

0 comments on commit 847eb0c

Please sign in to comment.