diff --git a/.gitignore b/.gitignore index bbc2ccd..7664d9f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ dist # Yarn files .yarn/install-state.gz .yarn/build-state.yml -pnpm-lock.yaml \ No newline at end of file +package-lock.json \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index b82acf2..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -shamefully-hoist=true -public-hoist-pattern[]=@sapphire/* \ No newline at end of file diff --git a/package.json b/package.json index 649a0b8..7af64a6 100644 --- a/package.json +++ b/package.json @@ -14,17 +14,11 @@ }, "author": "nicklvh", "license": "GPL-3.0-or-later", - "eslintConfig": { - "extends": "@sapphire/eslint-config" - }, "dependencies": { "@prisma/client": "^6.0.0", "@sapphire/decorators": "^6.1.1", "@sapphire/discord.js-utilities": "^7.3.1", - "@sapphire/fetch": "^3.0.5", "@sapphire/framework": "^5.3.1", - "@sapphire/plugin-logger": "^4.0.2", - "@sapphire/time-utilities": "^1.7.14", "@sapphire/utilities": "^3.18.1", "discord.js": "^14.16.3", "dotenv": "^16.4.5" @@ -34,6 +28,5 @@ "@types/node": "^22.10.1", "prisma": "^6.0.0", "typescript": "~5.4.5" - }, - "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 61b85fa..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,499 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - '@prisma/client': - specifier: ^6.0.0 - version: 6.0.0(prisma@6.0.0) - '@sapphire/decorators': - specifier: ^6.1.1 - version: 6.1.1 - '@sapphire/discord.js-utilities': - specifier: ^7.3.1 - version: 7.3.1 - '@sapphire/fetch': - specifier: ^3.0.5 - version: 3.0.5 - '@sapphire/framework': - specifier: ^5.3.1 - version: 5.3.1 - '@sapphire/plugin-logger': - specifier: ^4.0.2 - version: 4.0.2 - '@sapphire/time-utilities': - specifier: ^1.7.14 - version: 1.7.14 - '@sapphire/utilities': - specifier: ^3.18.1 - version: 3.18.1 - discord.js: - specifier: ^14.16.3 - version: 14.16.3 - dotenv: - specifier: ^16.4.5 - version: 16.4.5 - devDependencies: - '@sapphire/ts-config': - specifier: ^5.0.1 - version: 5.0.1 - '@types/node': - specifier: ^22.10.1 - version: 22.10.1 - prisma: - specifier: ^6.0.0 - version: 6.0.0 - typescript: - specifier: ~5.4.5 - version: 5.4.5 - -packages: - - '@discordjs/builders@1.9.0': - resolution: {integrity: sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==} - engines: {node: '>=18'} - - '@discordjs/collection@1.5.3': - resolution: {integrity: sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==} - engines: {node: '>=16.11.0'} - - '@discordjs/collection@2.1.1': - resolution: {integrity: sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==} - engines: {node: '>=18'} - - '@discordjs/formatters@0.5.0': - resolution: {integrity: sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==} - engines: {node: '>=18'} - - '@discordjs/rest@2.4.0': - resolution: {integrity: sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==} - engines: {node: '>=18'} - - '@discordjs/util@1.1.1': - resolution: {integrity: sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==} - engines: {node: '>=18'} - - '@discordjs/ws@1.1.1': - resolution: {integrity: sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==} - engines: {node: '>=16.11.0'} - - '@prisma/client@6.0.0': - resolution: {integrity: sha512-tOBhG35ozqZ/5Y6B0TNOa6cwULUW8ijXqBXcgb12bfozqf6eGMyGs+jphywCsj6uojv5lAZZnxVSoLMVebIP+g==} - engines: {node: '>=18.18'} - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - - '@prisma/debug@6.0.0': - resolution: {integrity: sha512-eUjoNThlDXdyJ1iQ2d7U6aTVwm59EwvODb5zFVNJEokNoSiQmiYWNzZIwZyDmZ+j51j42/0iTaHIJ4/aZPKFRg==} - - '@prisma/engines-version@5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e': - resolution: {integrity: sha512-JmIds0Q2/vsOmnuTJYxY4LE+sajqjYKhLtdOT6y4imojqv5d/aeVEfbBGC74t8Be1uSp0OP8lxIj2OqoKbLsfQ==} - - '@prisma/engines@6.0.0': - resolution: {integrity: sha512-ZZCVP3q22ifN6Ex6C8RIcTDBlRtMJS2H1ljV0knCiWNGArvvkEbE88W3uDdq/l4+UvyvHpGzdf9ZsCWSQR7ZQQ==} - - '@prisma/fetch-engine@6.0.0': - resolution: {integrity: sha512-j2m+iO5RDPRI7SUc7sHo8wX7SA4iTkJ+18Sxch8KinQM46YiCQD1iXKN6qU79C1Fliw5Bw/qDyTHaTsa3JMerA==} - - '@prisma/get-platform@6.0.0': - resolution: {integrity: sha512-PS6nYyIm9g8C03E4y7LknOfdCw/t2KyEJxntMPQHQZCOUgOpF82Ma60mdlOD08w90I3fjLiZZ0+MadenR3naDQ==} - - '@sapphire/async-queue@1.5.5': - resolution: {integrity: sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/cron@1.2.1': - resolution: {integrity: sha512-K96GX4UkzgC/Y2VHXVjhM2Bl4D04552nr/fDiOj9bOACW1+wqeFfLJ3eV6jleTSXmzPIwDvkPIUJLf8A5KSD+w==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/decorators@6.1.1': - resolution: {integrity: sha512-slUP6KauUC1wRcBcT0Ke7Fva2AGVAmX9/ZgE0K15Jzd0S3v2ggleECayFTWOjql5sZDS5x6mYtpIAxmuRkqE8Q==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/discord-utilities@3.4.3': - resolution: {integrity: sha512-QVh0KN+UYKnOZBhjMCe7IS2Wr0Ug3IT4evyygIDXZz2fRpfup7peHW2w1QplwLfEbpBTW9Uzr/9aONOYIobpxg==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/discord.js-utilities@7.3.1': - resolution: {integrity: sha512-TTgJUvhw6EWjJUv45AVPVStN34LYvATHz/vsAoUw2KFJTrzIaC45P8c65x83AESzfe9G5x1/gi7lT0o3MR1m8Q==} - engines: {node: '>=16.6.0', npm: '>=7.0.0'} - - '@sapphire/duration@1.1.4': - resolution: {integrity: sha512-hxtuE8HvmWcRok2A10lJ+ic8qY0oYGTTn44XmESUYJYYSVJWmqlCH1LnNYi6Ul+LRjxNUfFQEL/TJS0GJ+8kew==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/fetch@3.0.5': - resolution: {integrity: sha512-YfH5iFFL+n21dEWfdNpSlN1Q4RH+84I9ZFLxtdlbqyWljkh1IwMU6UmHjnroiRJx9TwdFSQ0krHm4v0fV/VqiA==} - engines: {node: '>=v18'} - - '@sapphire/framework@5.3.1': - resolution: {integrity: sha512-WWPgWVeJX6Pt/vuH0PYTzgNmRgP5VVdbbZdFDXMEaloI6C7GyOGmelGvR3pvtRiMM+qfyPVHxsDpaQr+Po9juw==} - engines: {node: '>=v18', npm: '>=7'} - - '@sapphire/lexure@1.1.10': - resolution: {integrity: sha512-odE4FD0SkCxkwEOhzAOqEnCJ/oJlPUuyFEw2KJacIuGiwY86WRTPIHLg1rt6XmfSYLxGXiqRf74req43+wRV9g==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/pieces@4.3.1': - resolution: {integrity: sha512-t42o6i8gPQ3QISIsMl463hj057yfyHsaSrs4FssdiGLmnvL9cuLGLTsjGEPn904wHUhPzS8W5aAPr788RK2/jQ==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/plugin-logger@4.0.2': - resolution: {integrity: sha512-5Nr++u+fA3/jZwj1aL9Z16RgyJZRE1gyUftfWjrzdndE5FkcbnLiVCKvnI8WzSupVhdn6kMaCWAteOSgAaq3lQ==} - engines: {node: '>=v18', npm: '>=7'} - - '@sapphire/ratelimits@2.4.11': - resolution: {integrity: sha512-O6FNA/P0wxU4Ve9gxL948CoZw7+sSpujyUR2CLyLLCNuNvuFGFxPCJVl5crFVLXMIyBIrc2qk+/H9bsqsyQK1Q==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/result@2.7.2': - resolution: {integrity: sha512-DJbCGmvi8UZAu/hh85auQL8bODFlpcS3cWjRJZ5/cXTLekmGvs/CrRxrIzwbA6+poyYojo5rK4qu8trmjfneog==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/shapeshift@4.0.0': - resolution: {integrity: sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==} - engines: {node: '>=v16'} - - '@sapphire/snowflake@3.5.3': - resolution: {integrity: sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/stopwatch@1.5.4': - resolution: {integrity: sha512-IVI48D2yAz411bSttXyTkBH0p2vhrXoqWLn5loDDSAAEUGkM1r5KNCX2027ifQ8svdoMkUfIGjFueR+satLeWw==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/time-utilities@1.7.14': - resolution: {integrity: sha512-UVJQ9oyzXcmJVVf9Y9ucGzRmKoPxe6SehpQlBNTX7CTVu0aj1lrEGL+bBa0Mu7hxF5DYXYjDYeO1e5BR0eg90Q==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/timer-manager@1.0.4': - resolution: {integrity: sha512-gc1JW8oui86f2l0T/1Iwd7hZTgus8b46slitTR2y0+wiMAEYxdp6vVTHvMAEHOqX8drkxK70aGfZmQKbAcgFqQ==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/timestamp@1.0.5': - resolution: {integrity: sha512-oNwWyNdbt5wm4aYZvlHl1+64U3g0xrFmRIHsnER7RgMxNnp/wmAE4yTK2oUHeadg3t4V9iYctPAQCF+aINke4g==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - '@sapphire/ts-config@5.0.1': - resolution: {integrity: sha512-86YBYNBDNs6/bCrTsv274553v43Bz8YljfrrIQ4N8ll2npUxbf6cpC0gjfJY+FMa1HwKUgoMF4lvhzY0Ph0smw==} - engines: {node: '>=v16.0.0', npm: '>=8.0.0'} - - '@sapphire/utilities@3.18.1': - resolution: {integrity: sha512-zyEyQOQb2/t2mKRmu8T+M4r1Ulb+54BjwDS5pfzf6abGzTAcUg4VDWjHeKX7p3IgiZTcpN4Ij77b9k+K1KV4Lg==} - engines: {node: '>=v14.0.0'} - - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} - - '@types/ws@8.5.13': - resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} - - '@vladfrangu/async_event_emitter@2.4.6': - resolution: {integrity: sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==} - engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - - colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - discord-api-types@0.37.100: - resolution: {integrity: sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA==} - - discord-api-types@0.37.83: - resolution: {integrity: sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==} - - discord-api-types@0.37.97: - resolution: {integrity: sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==} - - discord.js@14.16.3: - resolution: {integrity: sha512-EPCWE9OkA9DnFFNrO7Kl1WHHDYFXu3CNVFJg63bfU7hVtjZGyhShwZtSBImINQRWxWP2tgo2XI+QhdXx28r0aA==} - engines: {node: '>=18'} - - dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} - engines: {node: '>=12'} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - lodash.snakecase@4.1.1: - resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} - - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - magic-bytes.js@1.10.0: - resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==} - - prisma@6.0.0: - resolution: {integrity: sha512-RX7KtbW7IoEByf7MR32JK1PkVYLVYFqeODTtiIX3cqekq1aKdsF3Eud4zp2sUShMLjvdb5Jow0LbUjRq5LVxPw==} - engines: {node: '>=18.18'} - hasBin: true - - ts-mixer@6.0.4: - resolution: {integrity: sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==} - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true - - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - - undici@6.19.8: - resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} - engines: {node: '>=18.17'} - - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - -snapshots: - - '@discordjs/builders@1.9.0': - dependencies: - '@discordjs/formatters': 0.5.0 - '@discordjs/util': 1.1.1 - '@sapphire/shapeshift': 4.0.0 - discord-api-types: 0.37.97 - fast-deep-equal: 3.1.3 - ts-mixer: 6.0.4 - tslib: 2.8.1 - - '@discordjs/collection@1.5.3': {} - - '@discordjs/collection@2.1.1': {} - - '@discordjs/formatters@0.5.0': - dependencies: - discord-api-types: 0.37.97 - - '@discordjs/rest@2.4.0': - dependencies: - '@discordjs/collection': 2.1.1 - '@discordjs/util': 1.1.1 - '@sapphire/async-queue': 1.5.5 - '@sapphire/snowflake': 3.5.3 - '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.97 - magic-bytes.js: 1.10.0 - tslib: 2.8.1 - undici: 6.19.8 - - '@discordjs/util@1.1.1': {} - - '@discordjs/ws@1.1.1': - dependencies: - '@discordjs/collection': 2.1.1 - '@discordjs/rest': 2.4.0 - '@discordjs/util': 1.1.1 - '@sapphire/async-queue': 1.5.5 - '@types/ws': 8.5.13 - '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.83 - tslib: 2.8.1 - ws: 8.18.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@prisma/client@6.0.0(prisma@6.0.0)': - optionalDependencies: - prisma: 6.0.0 - - '@prisma/debug@6.0.0': {} - - '@prisma/engines-version@5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e': {} - - '@prisma/engines@6.0.0': - dependencies: - '@prisma/debug': 6.0.0 - '@prisma/engines-version': 5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e - '@prisma/fetch-engine': 6.0.0 - '@prisma/get-platform': 6.0.0 - - '@prisma/fetch-engine@6.0.0': - dependencies: - '@prisma/debug': 6.0.0 - '@prisma/engines-version': 5.23.0-27.5dbef10bdbfb579e07d35cc85fb1518d357cb99e - '@prisma/get-platform': 6.0.0 - - '@prisma/get-platform@6.0.0': - dependencies: - '@prisma/debug': 6.0.0 - - '@sapphire/async-queue@1.5.5': {} - - '@sapphire/cron@1.2.1': - dependencies: - '@sapphire/utilities': 3.18.1 - - '@sapphire/decorators@6.1.1': - dependencies: - tslib: 2.8.1 - - '@sapphire/discord-utilities@3.4.3': - dependencies: - discord-api-types: 0.37.100 - - '@sapphire/discord.js-utilities@7.3.1': - dependencies: - '@sapphire/discord-utilities': 3.4.3 - '@sapphire/duration': 1.1.4 - '@sapphire/utilities': 3.18.1 - tslib: 2.8.1 - - '@sapphire/duration@1.1.4': {} - - '@sapphire/fetch@3.0.5': {} - - '@sapphire/framework@5.3.1': - dependencies: - '@discordjs/builders': 1.9.0 - '@sapphire/discord-utilities': 3.4.3 - '@sapphire/discord.js-utilities': 7.3.1 - '@sapphire/lexure': 1.1.10 - '@sapphire/pieces': 4.3.1 - '@sapphire/ratelimits': 2.4.11 - '@sapphire/result': 2.7.2 - '@sapphire/stopwatch': 1.5.4 - '@sapphire/utilities': 3.18.1 - - '@sapphire/lexure@1.1.10': - dependencies: - '@sapphire/result': 2.7.2 - - '@sapphire/pieces@4.3.1': - dependencies: - '@discordjs/collection': 1.5.3 - '@sapphire/utilities': 3.18.1 - tslib: 2.8.1 - - '@sapphire/plugin-logger@4.0.2': - dependencies: - '@sapphire/timestamp': 1.0.5 - colorette: 2.0.20 - - '@sapphire/ratelimits@2.4.11': {} - - '@sapphire/result@2.7.2': {} - - '@sapphire/shapeshift@4.0.0': - dependencies: - fast-deep-equal: 3.1.3 - lodash: 4.17.21 - - '@sapphire/snowflake@3.5.3': {} - - '@sapphire/stopwatch@1.5.4': - dependencies: - tslib: 2.8.1 - - '@sapphire/time-utilities@1.7.14': - dependencies: - '@sapphire/cron': 1.2.1 - '@sapphire/duration': 1.1.4 - '@sapphire/timer-manager': 1.0.4 - '@sapphire/timestamp': 1.0.5 - - '@sapphire/timer-manager@1.0.4': {} - - '@sapphire/timestamp@1.0.5': {} - - '@sapphire/ts-config@5.0.1': - dependencies: - tslib: 2.8.1 - typescript: 5.4.5 - - '@sapphire/utilities@3.18.1': {} - - '@types/node@22.10.1': - dependencies: - undici-types: 6.20.0 - - '@types/ws@8.5.13': - dependencies: - '@types/node': 22.10.1 - - '@vladfrangu/async_event_emitter@2.4.6': {} - - colorette@2.0.20: {} - - discord-api-types@0.37.100: {} - - discord-api-types@0.37.83: {} - - discord-api-types@0.37.97: {} - - discord.js@14.16.3: - dependencies: - '@discordjs/builders': 1.9.0 - '@discordjs/collection': 1.5.3 - '@discordjs/formatters': 0.5.0 - '@discordjs/rest': 2.4.0 - '@discordjs/util': 1.1.1 - '@discordjs/ws': 1.1.1 - '@sapphire/snowflake': 3.5.3 - discord-api-types: 0.37.100 - fast-deep-equal: 3.1.3 - lodash.snakecase: 4.1.1 - tslib: 2.8.1 - undici: 6.19.8 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - dotenv@16.4.5: {} - - fast-deep-equal@3.1.3: {} - - fsevents@2.3.3: - optional: true - - lodash.snakecase@4.1.1: {} - - lodash@4.17.21: {} - - magic-bytes.js@1.10.0: {} - - prisma@6.0.0: - dependencies: - '@prisma/engines': 6.0.0 - optionalDependencies: - fsevents: 2.3.3 - - ts-mixer@6.0.4: {} - - tslib@2.8.1: {} - - typescript@5.4.5: {} - - undici-types@6.20.0: {} - - undici@6.19.8: {} - - ws@8.18.0: {} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 6a5adb5..0000000 --- a/renovate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["config:recommended"] -} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 813a183..ccb8e80 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,7 @@ -import "@sapphire/plugin-logger/register"; import { config } from "dotenv"; import { PrismaClient } from "@prisma/client"; import { BucketScope, container, LogLevel, SapphireClient, } from "@sapphire/framework"; import { GatewayIntentBits } from "discord.js"; -import { Time } from "@sapphire/time-utilities"; config(); @@ -12,29 +10,35 @@ const client = new SapphireClient({ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessageReactions, - GatewayIntentBits.GuildEmojisAndStickers, + GatewayIntentBits.GuildMessages, + GatewayIntentBits.GuildModeration, + GatewayIntentBits.MessageContent, ], defaultCooldown: { - delay: Time.Second * 3, + delay: 3000, // 3 seconds limit: 2, scope: BucketScope.User, }, logger: { - level: LogLevel.Debug, - }, + level: LogLevel.Trace, + } }); -void client.login(process.env.TOKEN); +client.login(process.env.TOKEN).catch((error) => { + container.logger.error(error); +}); const prisma = new PrismaClient(); container.prisma = prisma; prisma.$connect().then(() => { container.logger.info("Connected to the database successfully!"); +}).catch((error) => { + container.logger.error(error); }); declare module "@sapphire/pieces" { interface Container { prisma: PrismaClient; } -} +} \ No newline at end of file diff --git a/src/listeners/guild/messageReactionAdd.ts b/src/listeners/guild/messageReactionAdd.ts index 90d99ce..ca2ae36 100644 --- a/src/listeners/guild/messageReactionAdd.ts +++ b/src/listeners/guild/messageReactionAdd.ts @@ -1,13 +1,16 @@ import { Events, Listener } from "@sapphire/framework"; import { ApplyOptions } from "@sapphire/decorators"; -import { MessageReaction } from "discord.js"; +import { EmbedBuilder, MessageReaction, User } from "discord.js"; @ApplyOptions({ event: Events.MessageReactionAdd, }) export class MessageReactionAddListener extends Listener { - public async run(messageReaction: MessageReaction) { - if (!messageReaction.message.guild) return; + public async run(messageReaction: MessageReaction, user: User) { + this.container.logger.info("hello"); + if (!messageReaction.message.guild || user.bot) return; + + this.container.logger.info(messageReaction.emoji.name); if (messageReaction.emoji.name === "⭐️") { const starboard = await this.container.prisma.starboard.findUnique({ @@ -21,9 +24,29 @@ export class MessageReactionAddListener extends Listener { const starboardChannel = await messageReaction.message.guild.channels.fetch(starboard.channelId); if (!starboardChannel) return; + this.container.logger.info("hello"); + + if (messageReaction.count >= starboard.starsRequired && !starboard.starredMessages.includes((messageReaction.message.id))) { + if (!starboardChannel.isSendable()) return; + + this.container.logger.info("hello"); - if (messageReaction.count >= starboard.starsRequired) { + await starboardChannel.send({ + embeds: [ + new EmbedBuilder().setTitle("⭐️").setDescription(messageReaction.message.content).setColor("Gold").setFooter({ text: `⭐️ ${messageReaction.count}`}) + ] + }); + await this.container.prisma.starboard.update({ + where: { + guildId: messageReaction.message.guild.id, + }, + data: { + starredMessages: { + push: messageReaction.message.id, + }, + }, + }); } } }