feature/98-timeout-command-2 #306

Merged
Vylpes merged 4 commits from feature/98-timeout-command-2 into develop 2023-06-30 17:33:04 +01:00
3 changed files with 8 additions and 1 deletions
Showing only changes of commit b0407db9bb - Show all commits

View file

@ -35,4 +35,8 @@ export default class StringTools {
return result; return result;
} }
public static ReplaceAll(str: string, find: string, replace: string) {
return str.replace(new RegExp(find, 'g'), replace);
}
} }

View file

@ -1,8 +1,10 @@
import StringTools from "./StringTools";
export default class TimeLengthInput { export default class TimeLengthInput {
public readonly value: string; public readonly value: string;
constructor(input: string) { constructor(input: string) {
this.value = input; this.value = StringTools.ReplaceAll(input, ',', '');
} }
public GetDays(): number { public GetDays(): number {

View file

@ -2,6 +2,7 @@ import { CoreClient } from "./client/client";
import * as dotenv from "dotenv"; import * as dotenv from "dotenv";
import registry from "./registry"; import registry from "./registry";
import { IntentsBitField } from "discord.js"; import { IntentsBitField } from "discord.js";
import StringTools from "./helpers/StringTools";
dotenv.config(); dotenv.config();