feat: cleaned up build proccess

This commit is contained in:
TresAbhi committed 2023-06-26 17:36:43 +00:00
1 parent 8dd0ca9d10
commit 79343438f0
2 files changed
+13 -3

No files matched your search

+10
View File
@@ -43,6 +43,16 @@ export default function resolvePeriod(
let evolutionName: string;
let start: number;
let end: number;
let url: URL;
let period: Period;
if (interaction instanceof ChatInputCommandInteraction) {
period = interaction.options.getSubcommand() as Period;
} else {
url = new URL(`${CYCLIC_API}/${interaction.customId}`);
const path = url.pathname.split('/').filter(Boolean);
period = path[path.length - 1] as Period;
}
if (period === 'custom') {
const startRaw =