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

+3 -3
View File
@@ -5,9 +5,9 @@
"main": "src/index.ts",
"type": "module",
"scripts": {
"build:bot": "node scripts/build --build=bot",
"build:server": "node scripts/build --build=server",
"build": "yarn lint && yarn build:bot",
"build:bot": "yarn lint && node scripts/build --build=bot",
"build:server": "yarn lint && node scripts/build --build=server",
"build": "yarn lint && node scripts/build --build=all",
"dev:bot": "yarn build:bot --dev && yarn start:bot --dev",
"dev:server": "yarn build:server --dev && yarn start:server --dev",
"start:bot": "node --enable-source-maps --trace-warnings dist/bot.cjs",
+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 =