feat: move to typescript compiling

This commit is contained in:
2022-10-29 20:39:40 +02:00
parent 42da790f5f
commit b4d89f0e50
4 changed files with 7 additions and 8 deletions

View File

@@ -4,9 +4,7 @@ WORKDIR /app
COPY package.json ./
RUN npm install
RUN npm install -g ts-node typescript
RUN npm i
RUN apk update && apk add bash
@@ -14,4 +12,8 @@ EXPOSE 7272
COPY . .
RUN npm run build
COPY ./.env ./dist/.env
CMD bash start.sh

View File

@@ -115,7 +115,7 @@ export default commandModule({
} else {
if (times.times > 2) {
const msg = await ctx.reply({content: `El usuario ha excedido 3 avisos, ¿qué hacer?`, ephemeral: true, components: [buttons]})
const collector = await msg.createMessageComponentCollector({ time: 15000, max: 1 });
const collector = msg.createMessageComponentCollector({ time: 15000, max: 1, componentType: ComponentType });
collector.on('collect', async i => {
await i.deferReply({ephemeral: true})
if (i.customId === '1hour') {

View File

@@ -1,3 +0,0 @@
build:
docker:
worker: Dockerfile

View File

@@ -1,3 +1,3 @@
#!/bin/bash
ts-node --transpile-only index.ts
node ./dist/index.js