Changed to deno suport
This commit is contained in:
parent
f69802edc9
commit
785afbdec5
28 changed files with 531 additions and 88 deletions
23
Dockerfile
23
Dockerfile
|
@ -1,17 +1,10 @@
|
|||
FROM node:20.11.1
|
||||
|
||||
FROM denoland/deno:alpine
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN apk add build-base \
|
||||
cairo-dev \
|
||||
pango-dev \
|
||||
jpeg-dev \
|
||||
librsvg-dev
|
||||
CMD ["deno", "run", "start"]
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
libcairo2-dev \
|
||||
libpango1.0-dev \
|
||||
libjpeg-dev \
|
||||
libgif-dev \
|
||||
librsvg2-dev
|
||||
|
||||
RUN npm i -g typescript && npm i && npm run build
|
||||
|
||||
CMD npm start
|
||||
|
|
13
deno.json
Normal file
13
deno.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"tasks": {
|
||||
"dev": "deno run --allow-ffi --allow-env --allow-read --allow-net --allow-ffi --watch src/main.ts",
|
||||
"start": "deno run --allow-ffi --allow-env --allow-read --allow-net src/main.ts"
|
||||
},
|
||||
"imports": {
|
||||
"@std/assert": "jsr:@std/assert@1",
|
||||
"discord.js": "npm:discord.js@^14.16.3",
|
||||
"dotenv": "npm:dotenv@^16.4.7",
|
||||
"mysql": "npm:mysql@^2.18.1"
|
||||
},
|
||||
"nodeModulesDir": "auto"
|
||||
}
|
441
deno.lock
generated
Normal file
441
deno.lock
generated
Normal file
|
@ -0,0 +1,441 @@
|
|||
{
|
||||
"version": "4",
|
||||
"specifiers": {
|
||||
"jsr:@std/assert@1": "1.0.10",
|
||||
"jsr:@std/internal@^1.0.5": "1.0.5",
|
||||
"npm:@mistralai/mistralai@*": "1.3.5_react@19.0.0_react-dom@19.0.0__react@19.0.0_zod@3.24.1",
|
||||
"npm:canvas@*": "3.0.0",
|
||||
"npm:discord.js@*": "14.16.3",
|
||||
"npm:discord.js@^14.16.3": "14.16.3",
|
||||
"npm:dotenv@^16.4.7": "16.4.7",
|
||||
"npm:mysql@*": "2.18.1",
|
||||
"npm:mysql@^2.18.1": "2.18.1"
|
||||
},
|
||||
"jsr": {
|
||||
"@std/assert@1.0.10": {
|
||||
"integrity": "59b5cbac5bd55459a19045d95cc7c2ff787b4f8527c0dd195078ff6f9481fbb3",
|
||||
"dependencies": [
|
||||
"jsr:@std/internal"
|
||||
]
|
||||
},
|
||||
"@std/internal@1.0.5": {
|
||||
"integrity": "54a546004f769c1ac9e025abd15a76b6671ddc9687e2313b67376125650dc7ba"
|
||||
}
|
||||
},
|
||||
"npm": {
|
||||
"@discordjs/builders@1.9.0": {
|
||||
"integrity": "sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==",
|
||||
"dependencies": [
|
||||
"@discordjs/formatters",
|
||||
"@discordjs/util",
|
||||
"@sapphire/shapeshift",
|
||||
"discord-api-types@0.37.97",
|
||||
"fast-deep-equal",
|
||||
"ts-mixer",
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@discordjs/collection@1.5.3": {
|
||||
"integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ=="
|
||||
},
|
||||
"@discordjs/collection@2.1.1": {
|
||||
"integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="
|
||||
},
|
||||
"@discordjs/formatters@0.5.0": {
|
||||
"integrity": "sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==",
|
||||
"dependencies": [
|
||||
"discord-api-types@0.37.97"
|
||||
]
|
||||
},
|
||||
"@discordjs/rest@2.4.0": {
|
||||
"integrity": "sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==",
|
||||
"dependencies": [
|
||||
"@discordjs/collection@2.1.1",
|
||||
"@discordjs/util",
|
||||
"@sapphire/async-queue",
|
||||
"@sapphire/snowflake",
|
||||
"@vladfrangu/async_event_emitter",
|
||||
"discord-api-types@0.37.97",
|
||||
"magic-bytes.js",
|
||||
"tslib",
|
||||
"undici"
|
||||
]
|
||||
},
|
||||
"@discordjs/util@1.1.1": {
|
||||
"integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g=="
|
||||
},
|
||||
"@discordjs/ws@1.1.1": {
|
||||
"integrity": "sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==",
|
||||
"dependencies": [
|
||||
"@discordjs/collection@2.1.1",
|
||||
"@discordjs/rest",
|
||||
"@discordjs/util",
|
||||
"@sapphire/async-queue",
|
||||
"@types/ws",
|
||||
"@vladfrangu/async_event_emitter",
|
||||
"discord-api-types@0.37.83",
|
||||
"tslib",
|
||||
"ws"
|
||||
]
|
||||
},
|
||||
"@mistralai/mistralai@1.3.5_react@19.0.0_react-dom@19.0.0__react@19.0.0_zod@3.24.1": {
|
||||
"integrity": "sha512-yC91oJ5ScEPqbXmv3mJTwTFgu/ZtsYoOPOhaVXSsy6x4zXTqTI57yEC1flC9uiA8GpG/yhpn2BBUXF95+U9Blw==",
|
||||
"dependencies": [
|
||||
"react",
|
||||
"react-dom",
|
||||
"zod"
|
||||
]
|
||||
},
|
||||
"@sapphire/async-queue@1.5.5": {
|
||||
"integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg=="
|
||||
},
|
||||
"@sapphire/shapeshift@4.0.0": {
|
||||
"integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==",
|
||||
"dependencies": [
|
||||
"fast-deep-equal",
|
||||
"lodash"
|
||||
]
|
||||
},
|
||||
"@sapphire/snowflake@3.5.3": {
|
||||
"integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ=="
|
||||
},
|
||||
"@types/node@22.5.4": {
|
||||
"integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
|
||||
"dependencies": [
|
||||
"undici-types"
|
||||
]
|
||||
},
|
||||
"@types/ws@8.5.13": {
|
||||
"integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==",
|
||||
"dependencies": [
|
||||
"@types/node"
|
||||
]
|
||||
},
|
||||
"@vladfrangu/async_event_emitter@2.4.6": {
|
||||
"integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA=="
|
||||
},
|
||||
"base64-js@1.5.1": {
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||
},
|
||||
"bignumber.js@9.0.0": {
|
||||
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A=="
|
||||
},
|
||||
"bl@4.1.0": {
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"dependencies": [
|
||||
"buffer",
|
||||
"inherits",
|
||||
"readable-stream@3.6.2"
|
||||
]
|
||||
},
|
||||
"buffer@5.7.1": {
|
||||
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
||||
"dependencies": [
|
||||
"base64-js",
|
||||
"ieee754"
|
||||
]
|
||||
},
|
||||
"canvas@3.0.0": {
|
||||
"integrity": "sha512-NtcIBY88FjymQy+g2g5qnuP5IslrbWCQ3A6rSr1PeuYxVRapRZ3BZCrDyAakvI6CuDYidgZaf55ygulFVwROdg==",
|
||||
"dependencies": [
|
||||
"node-addon-api",
|
||||
"prebuild-install",
|
||||
"simple-get@3.1.1"
|
||||
]
|
||||
},
|
||||
"chownr@1.1.4": {
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
||||
},
|
||||
"core-util-is@1.0.3": {
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"decompress-response@4.2.1": {
|
||||
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
||||
"dependencies": [
|
||||
"mimic-response@2.1.0"
|
||||
]
|
||||
},
|
||||
"decompress-response@6.0.0": {
|
||||
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
||||
"dependencies": [
|
||||
"mimic-response@3.1.0"
|
||||
]
|
||||
},
|
||||
"deep-extend@0.6.0": {
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
||||
},
|
||||
"detect-libc@2.0.3": {
|
||||
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw=="
|
||||
},
|
||||
"discord-api-types@0.37.100": {
|
||||
"integrity": "sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA=="
|
||||
},
|
||||
"discord-api-types@0.37.83": {
|
||||
"integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA=="
|
||||
},
|
||||
"discord-api-types@0.37.97": {
|
||||
"integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA=="
|
||||
},
|
||||
"discord.js@14.16.3": {
|
||||
"integrity": "sha512-EPCWE9OkA9DnFFNrO7Kl1WHHDYFXu3CNVFJg63bfU7hVtjZGyhShwZtSBImINQRWxWP2tgo2XI+QhdXx28r0aA==",
|
||||
"dependencies": [
|
||||
"@discordjs/builders",
|
||||
"@discordjs/collection@1.5.3",
|
||||
"@discordjs/formatters",
|
||||
"@discordjs/rest",
|
||||
"@discordjs/util",
|
||||
"@discordjs/ws",
|
||||
"@sapphire/snowflake",
|
||||
"discord-api-types@0.37.100",
|
||||
"fast-deep-equal",
|
||||
"lodash.snakecase",
|
||||
"tslib",
|
||||
"undici"
|
||||
]
|
||||
},
|
||||
"dotenv@16.4.7": {
|
||||
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ=="
|
||||
},
|
||||
"end-of-stream@1.4.4": {
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dependencies": [
|
||||
"once"
|
||||
]
|
||||
},
|
||||
"expand-template@2.0.3": {
|
||||
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="
|
||||
},
|
||||
"fast-deep-equal@3.1.3": {
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"fs-constants@1.0.0": {
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"github-from-package@0.0.0": {
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
||||
},
|
||||
"ieee754@1.2.1": {
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
||||
},
|
||||
"inherits@2.0.4": {
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"ini@1.3.8": {
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"isarray@1.0.0": {
|
||||
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||
},
|
||||
"lodash.snakecase@4.1.1": {
|
||||
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
|
||||
},
|
||||
"lodash@4.17.21": {
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"magic-bytes.js@1.10.0": {
|
||||
"integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ=="
|
||||
},
|
||||
"mimic-response@2.1.0": {
|
||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
||||
},
|
||||
"mimic-response@3.1.0": {
|
||||
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
|
||||
},
|
||||
"minimist@1.2.8": {
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
||||
},
|
||||
"mkdirp-classic@0.5.3": {
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
||||
},
|
||||
"mysql@2.18.1": {
|
||||
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
||||
"dependencies": [
|
||||
"bignumber.js",
|
||||
"readable-stream@2.3.7",
|
||||
"safe-buffer",
|
||||
"sqlstring"
|
||||
]
|
||||
},
|
||||
"napi-build-utils@1.0.2": {
|
||||
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
||||
},
|
||||
"node-abi@3.71.0": {
|
||||
"integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==",
|
||||
"dependencies": [
|
||||
"semver"
|
||||
]
|
||||
},
|
||||
"node-addon-api@7.1.1": {
|
||||
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="
|
||||
},
|
||||
"once@1.4.0": {
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"dependencies": [
|
||||
"wrappy"
|
||||
]
|
||||
},
|
||||
"prebuild-install@7.1.2": {
|
||||
"integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==",
|
||||
"dependencies": [
|
||||
"detect-libc",
|
||||
"expand-template",
|
||||
"github-from-package",
|
||||
"minimist",
|
||||
"mkdirp-classic",
|
||||
"napi-build-utils",
|
||||
"node-abi",
|
||||
"pump",
|
||||
"rc",
|
||||
"simple-get@4.0.1",
|
||||
"tar-fs",
|
||||
"tunnel-agent"
|
||||
]
|
||||
},
|
||||
"process-nextick-args@2.0.1": {
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"pump@3.0.2": {
|
||||
"integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
|
||||
"dependencies": [
|
||||
"end-of-stream",
|
||||
"once"
|
||||
]
|
||||
},
|
||||
"rc@1.2.8": {
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"dependencies": [
|
||||
"deep-extend",
|
||||
"ini",
|
||||
"minimist",
|
||||
"strip-json-comments"
|
||||
]
|
||||
},
|
||||
"react-dom@19.0.0_react@19.0.0": {
|
||||
"integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==",
|
||||
"dependencies": [
|
||||
"react",
|
||||
"scheduler"
|
||||
]
|
||||
},
|
||||
"react@19.0.0": {
|
||||
"integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="
|
||||
},
|
||||
"readable-stream@2.3.7": {
|
||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||
"dependencies": [
|
||||
"core-util-is",
|
||||
"inherits",
|
||||
"isarray",
|
||||
"process-nextick-args",
|
||||
"safe-buffer",
|
||||
"string_decoder",
|
||||
"util-deprecate"
|
||||
]
|
||||
},
|
||||
"readable-stream@3.6.2": {
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"dependencies": [
|
||||
"inherits",
|
||||
"string_decoder",
|
||||
"util-deprecate"
|
||||
]
|
||||
},
|
||||
"safe-buffer@5.1.2": {
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"scheduler@0.25.0": {
|
||||
"integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="
|
||||
},
|
||||
"semver@7.6.3": {
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="
|
||||
},
|
||||
"simple-concat@1.0.1": {
|
||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
||||
},
|
||||
"simple-get@3.1.1": {
|
||||
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||
"dependencies": [
|
||||
"decompress-response@4.2.1",
|
||||
"once",
|
||||
"simple-concat"
|
||||
]
|
||||
},
|
||||
"simple-get@4.0.1": {
|
||||
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
||||
"dependencies": [
|
||||
"decompress-response@6.0.0",
|
||||
"once",
|
||||
"simple-concat"
|
||||
]
|
||||
},
|
||||
"sqlstring@2.3.1": {
|
||||
"integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ=="
|
||||
},
|
||||
"string_decoder@1.1.1": {
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dependencies": [
|
||||
"safe-buffer"
|
||||
]
|
||||
},
|
||||
"strip-json-comments@2.0.1": {
|
||||
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="
|
||||
},
|
||||
"tar-fs@2.1.1": {
|
||||
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
|
||||
"dependencies": [
|
||||
"chownr",
|
||||
"mkdirp-classic",
|
||||
"pump",
|
||||
"tar-stream"
|
||||
]
|
||||
},
|
||||
"tar-stream@2.2.0": {
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"dependencies": [
|
||||
"bl",
|
||||
"end-of-stream",
|
||||
"fs-constants",
|
||||
"inherits",
|
||||
"readable-stream@3.6.2"
|
||||
]
|
||||
},
|
||||
"ts-mixer@6.0.4": {
|
||||
"integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="
|
||||
},
|
||||
"tslib@2.8.1": {
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
|
||||
},
|
||||
"tunnel-agent@0.6.0": {
|
||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||
"dependencies": [
|
||||
"safe-buffer"
|
||||
]
|
||||
},
|
||||
"undici-types@6.19.8": {
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
|
||||
},
|
||||
"undici@6.19.8": {
|
||||
"integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g=="
|
||||
},
|
||||
"util-deprecate@1.0.2": {
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"wrappy@1.0.2": {
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
},
|
||||
"ws@8.18.0": {
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="
|
||||
},
|
||||
"zod@3.24.1": {
|
||||
"integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A=="
|
||||
}
|
||||
},
|
||||
"workspace": {
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@1",
|
||||
"npm:discord.js@^14.16.3",
|
||||
"npm:dotenv@^16.4.7",
|
||||
"npm:mysql@^2.18.1"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
services:
|
||||
chaisebot:
|
||||
odin:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: DOCKERFILE
|
||||
network: host
|
||||
image: chaisebot
|
||||
dockerfile: Dockerfile
|
||||
network: host
|
||||
restart: always
|
||||
container_name: chaisebot
|
||||
container_name: odin
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, ChatInputCommandInteraction, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
|
||||
import { getQotd, MistralMessage, Models, ReturnedValue, Prompts } from "../../libs/mistralai.js";
|
||||
import { qotdEmbed, qotdconfirm, confirmedQotd, canceledQotd, errorEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "npm:discord.js";
|
||||
import { getQotd, MistralMessage, Models, ReturnedValue, Prompts } from "../../libs/mistralai.ts";
|
||||
import { qotdEmbed, qotdconfirm, confirmedQotd, canceledQotd, errorEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "npm:discord.js";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SlashCommandBuilder, CommandInteraction } from "discord.js";
|
||||
import { helpEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction } from "npm:discord.js";
|
||||
import { helpEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SlashCommandBuilder, CommandInteraction } from "discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction } from "npm:discord.js";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, CommandInteraction } from "discord.js";
|
||||
import { connectToDb, getUser } from "../../libs/mysql.js";
|
||||
import { errorEmbed, quotaEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction } from "npm:discord.js";
|
||||
import { connectToDb, getUser } from "../../libs/mysql.ts";
|
||||
import { errorEmbed, quotaEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction, EmbedBuilder } from "npm:discord.js";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionFlagsBits } from "discord.js";
|
||||
import { connectToDb, getGuild, setFeature } from "../../libs/mysql.js";
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionFlagsBits } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, setFeature } from "../../libs/mysql.ts";
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, CommandInteraction, PermissionsBitField } from "discord.js";
|
||||
import { connectToDb, getGuild, addGuild } from "../../libs/mysql.js"
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, CommandInteraction, PermissionsBitField } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, addGuild } from "../../libs/mysql.ts"
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionsBitField } from "discord.js";
|
||||
import { connectToDb, getGuild, setAdminRole } from "../../libs/mysql.js"
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionsBitField } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, setAdminRole } from "../../libs/mysql.ts"
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.ts";
|
||||
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionFlagsBits } from "discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig, addWelcomeConfig, setWelcomePropertiy } from "../../libs/mysql.js";
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.js";
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionFlagsBits } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig, addWelcomeConfig, setWelcomePropertiy } from "../../libs/mysql.ts";
|
||||
import { errorEmbed, successEmbed } from "../../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { SlashCommandBuilder, CommandInteraction, PermissionFlagsBits, EmbedBuilder, AttachmentBuilder } from "discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig } from "../../libs/mysql.js";
|
||||
import { errorEmbed } from "../../libs/discord.js";
|
||||
import { createWelcomeImage } from "../../libs/imageGeneration.js"
|
||||
import { SlashCommandBuilder, CommandInteraction, PermissionFlagsBits, EmbedBuilder, AttachmentBuilder } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig } from "../../libs/mysql.ts";
|
||||
import { errorEmbed } from "../../libs/discord.ts";
|
||||
import { createWelcomeImage } from "../../libs/imageGeneration.ts"
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue, Prompts } from "../../libs/mistralai.js";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../../libs/mysql.js";
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from "npm:discord.js";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue, Prompts } from "../../libs/mistralai.ts";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../../libs/mysql.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Events, Guild } from "discord.js";
|
||||
import { connectToDb, getGuild, addGuild } from "../libs/mysql.js";
|
||||
import { Events, Guild } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, addGuild } from "../libs/mysql.ts";
|
||||
|
||||
export default {
|
||||
name: Events.GuildCreate,
|
||||
|
@ -15,4 +15,4 @@ export default {
|
|||
|
||||
addGuild(connection, guild.id);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Events, GuildMember, EmbedBuilder, AttachmentBuilder } from "discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig } from "../libs/mysql.js";
|
||||
import { createWelcomeImage } from "../libs/imageGeneration.js"
|
||||
import { Events, GuildMember, EmbedBuilder, AttachmentBuilder } from "npm:discord.js";
|
||||
import { connectToDb, getGuild, getWelcomeConfig } from "../libs/mysql.ts";
|
||||
import { createWelcomeImage } from "../libs/imageGeneration.ts"
|
||||
|
||||
export default {
|
||||
name: Events.GuildMemberAdd,
|
||||
|
@ -44,4 +44,4 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Events, Interaction } from "discord.js";
|
||||
import { Events, Interaction } from "npm:discord.js";
|
||||
|
||||
export default {
|
||||
name: Events.InteractionCreate,
|
||||
|
@ -18,4 +18,4 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Events, Message } from "discord.js";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue } from "../libs/mistralai.js";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql.js";
|
||||
import { getMessages } from "../libs/discord.js";
|
||||
import { Events, Message } from "npm:discord.js";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue } from "../libs/mistralai.ts";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql.ts";
|
||||
import { getMessages } from "../libs/discord.ts";
|
||||
|
||||
export default {
|
||||
name: Events.MessageCreate,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Events, Client } from "discord.js";
|
||||
import { checkReset } from "../libs/quotaReset.js";
|
||||
import { Events, Client } from "npm:discord.js";
|
||||
import { checkReset } from "../libs/quotaReset.ts";
|
||||
|
||||
export default {
|
||||
name: Events.ClientReady,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Message, EmbedBuilder, WebhookClient } from "discord.js";
|
||||
import { MistralMessage, Prompts } from "../libs/mistralai.js";
|
||||
import { Message, EmbedBuilder, WebhookClient } from "npm:discord.js";
|
||||
import { MistralMessage, Prompts } from "../libs/mistralai.ts";
|
||||
|
||||
export function helpEmbed(iconURL: string) {
|
||||
return new EmbedBuilder()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createCanvas, loadImage } from 'canvas';
|
||||
import { BufferResolvable } from 'discord.js';
|
||||
import { createCanvas, loadImage } from 'npm:canvas';
|
||||
import { BufferResolvable } from 'npm:discord.js';
|
||||
import * as fs from "node:fs";
|
||||
|
||||
export async function createWelcomeImage(background_url: string, icon_url: string, user_id: string) : Promise<Buffer | undefined> {
|
||||
|
@ -46,4 +46,4 @@ export async function createWelcomeImage(background_url: string, icon_url: strin
|
|||
|
||||
const buffer = canvas.toBuffer("image/png");
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import MistralClient from '@mistralai/mistralai';
|
||||
import "dotenv/config";
|
||||
import { Mistral } from 'npm:@mistralai/mistralai';
|
||||
|
||||
export interface MistralMessage {
|
||||
role: string,
|
||||
|
@ -51,7 +50,7 @@ export enum Prompts {
|
|||
|
||||
const apiKey = process.env.MISTRAL_API_KEY;
|
||||
|
||||
const client = new MistralClient(apiKey);
|
||||
const client = new Mistral(apiKey);
|
||||
|
||||
export async function getChatResponse(messages: MistralMessage[], model: Models): Promise<ReturnedValue> {
|
||||
const chatResponse = await client.chat({
|
||||
|
@ -80,4 +79,4 @@ export async function getQotd(messages: MistralMessage[], model: Models): Promis
|
|||
promptUsage: chatResponse.usage.prompt_tokens,
|
||||
responseUsage: chatResponse.usage.completion_tokens,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as mysql from "mysql";
|
||||
import * as mysql from "npm:mysql";
|
||||
import { rejects } from "node:assert";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { connectToDb, resetQuota, getLastReset, addReset } from "./mysql.js";
|
||||
import { connectToDb, resetQuota, getLastReset, addReset } from "./mysql.ts";
|
||||
|
||||
export async function checkReset() {
|
||||
const connection = await connectToDb();
|
||||
|
@ -18,4 +18,4 @@ export async function checkReset() {
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import "dotenv/config";
|
||||
import { Client, Collection, REST, Routes, RESTPutAPIApplicationCommandsResult, GatewayIntentBits, Partials } from 'discord.js';
|
||||
import { sendLog } from './libs/discord.js';
|
||||
import { Client, Collection, REST, Routes, RESTPutAPIApplicationCommandsResult, GatewayIntentBits, Partials } from 'npm:discord.js';
|
||||
import { sendLog } from './libs/discord.ts';
|
||||
|
||||
const client: Client = new Client({
|
||||
intents: [
|
||||
|
@ -29,11 +29,11 @@ async function loadCommands() {
|
|||
const commandsPath = `./src/commands/${folder}`;
|
||||
const commandFiles = fs
|
||||
.readdirSync(commandsPath)
|
||||
.filter((file) => file.endsWith(".ts") || file.endsWith(".js"));
|
||||
.filter((file) => file.endsWith(".ts"));
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const filePath = `./commands/${folder}/${file}`;
|
||||
const command = await import(filePath.replace(".ts", ".js"));
|
||||
const command = await import(filePath);
|
||||
if ("data" in command.default && "execute" in command.default) {
|
||||
client.commands.set(command.default.data.name, command.default);
|
||||
commands.push(command.default.data.toJSON());
|
||||
|
@ -49,11 +49,11 @@ async function loadEvents() {
|
|||
const eventsPath = "./src/events";
|
||||
const eventFiles = fs
|
||||
.readdirSync(eventsPath)
|
||||
.filter((file) => file.endsWith(".ts") || file.endsWith(".js"));
|
||||
.filter((file) => file.endsWith(".ts"));
|
||||
|
||||
for (const file of eventFiles) {
|
||||
const filePath = `./events/${file}`;
|
||||
const event = await import(filePath.replace(".ts", ".js"));
|
||||
const event = await import(filePath);
|
||||
|
||||
if (event.default.once) {
|
||||
client.once(event.default.name, (...args) => event.default.execute(...args));
|
||||
|
@ -85,6 +85,3 @@ const rest = new REST().setToken(process.env.DISCORD_TOKEN ? process.env.DISCORD
|
|||
|
||||
client.login(process.env.DISCORD_TOKEN);
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
sendLog(err.toString());
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue