Skip to content

Commit

Permalink
Fix subtil bug with timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
5jiji committed Jul 23, 2024
1 parent 5d0d192 commit 694e865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interactions/Commands/moderation/timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Timeout extends Interaction {
const reason = interaction.options.getString('reason') || "No reason provided";
const lengthNUnit = interaction.options.getString('length', true);

const unitChar = lengthNUnit[lengthNUnit.length - 1];
const unitChar = lengthNUnit.split(" ")[0][lengthNUnit.length - 1];
const RealLen = parseInt(lengthNUnit.slice(0, -1));

if (!this.#isValidUnit(unitChar)) {
Expand Down

0 comments on commit 694e865

Please sign in to comment.