Skip to content

Commit

Permalink
add fixed vercel configs
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Best-Codes committed Jan 13, 2025
1 parent ba50b36 commit 9d5a7e8
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 78 deletions.
34 changes: 17 additions & 17 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@

"@eslint/config-array": ["@eslint/[email protected]", "", { "dependencies": { "@eslint/object-schema": "^2.1.5", "debug": "^4.3.1", "minimatch": "^3.1.2" } }, "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA=="],

"@eslint/core": ["@eslint/core@0.9.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q=="],
"@eslint/core": ["@eslint/core@0.10.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw=="],

"@eslint/eslintrc": ["@eslint/[email protected]", "", { "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w=="],

"@eslint/js": ["@eslint/js@9.17.0", "", {}, "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w=="],
"@eslint/js": ["@eslint/js@9.18.0", "", {}, "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA=="],

"@eslint/object-schema": ["@eslint/[email protected]", "", {}, "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ=="],

"@eslint/plugin-kit": ["@eslint/[email protected].4", "", { "dependencies": { "levn": "^0.4.1" } }, "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg=="],
"@eslint/plugin-kit": ["@eslint/[email protected].5", "", { "dependencies": { "@eslint/core": "^0.10.0", "levn": "^0.4.1" } }, "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A=="],

"@humanfs/core": ["@humanfs/[email protected]", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],

Expand All @@ -104,31 +104,31 @@

"@humanwhocodes/retry": ["@humanwhocodes/[email protected]", "", {}, "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA=="],

"@inquirer/checkbox": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-fYAKCAcGNMdfjL6hZTRUwkIByQ8EIZCXKrIQZH7XjADnN/xvRUhj8UdBbpC4zoUzvChhkSC/zRKaP/tDs3dZpg=="],
"@inquirer/checkbox": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-H//QP3E8Vy0oYX5lw6WSFnOTiRUNm4+LYRby1/1r6y3doRurnqekAj4pJoUbdL5ESEgLqJFJ5HhNDWTp5Qyz5A=="],

"@inquirer/confirm": ["@inquirer/[email protected].1", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-vVLSbGci+IKQvDOtzpPTCOiEJCNidHcAq9JYVoWTW0svb5FiwSLotkM+JXNXejfjnzVYV9n0DTBythl9+XgTxg=="],
"@inquirer/confirm": ["@inquirer/[email protected].2", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-VKgaKxw2I3cu2smedeMFyxuYyI+HABlFY1Px4j8NueA7xDskKAo9hxEQemTpp1Fu4OiTtOCgU4eK91BVuBKH3g=="],

"@inquirer/core": ["@inquirer/[email protected].2", "", { "dependencies": { "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.2" } }, "sha512-bHd96F3ezHg1mf/J0Rb4CV8ndCN0v28kUlrHqP7+ECm1C/A+paB7Xh2lbMk6x+kweQC+rZOxM/YeKikzxco8bQ=="],
"@inquirer/core": ["@inquirer/[email protected].3", "", { "dependencies": { "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.2" } }, "sha512-+7/dCYwDku2xfcWJWX6Urxb8aRz6d0K+4lRgIBM08ktE84dm++RPROgnVfWq4hLK5FVu/O4rbO9HnJtaz3pt2w=="],

"@inquirer/editor": ["@inquirer/[email protected].1", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2", "external-editor": "^3.1.0" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-xn9aDaiP6nFa432i68JCaL302FyL6y/6EG97nAtfIPnWZ+mWPgCMLGc4XZ2QQMsZtu9q3Jd5AzBPjXh10aX9kA=="],
"@inquirer/editor": ["@inquirer/[email protected].2", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2", "external-editor": "^3.1.0" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-BPLJsWxLO6r47wU2qtGG+akQuoSCotDlOu8GTIkJVxJpNNVYnA60xKHkSGbEAALO+D3DFeRXE0JFvFJ53sVbjA=="],

"@inquirer/expand": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-GYocr+BPyxKPxQ4UZyNMqZFSGKScSUc0Vk17II3J+0bDcgGsQm0KYQNooN1Q5iBfXsy3x/VWmHGh20QnzsaHwg=="],
"@inquirer/expand": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-Ff3CqHmc8MuUu9A0LKgftzIdp+D5k/kTYHGmjY7iouO37OuP6Np4UqL0clkjQ2UHph7ORwvi0RMfSNnH3PF0PQ=="],

"@inquirer/figures": ["@inquirer/[email protected]", "", {}, "sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ=="],

"@inquirer/input": ["@inquirer/[email protected].1", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-nAXAHQndZcXB+7CyjIW3XuQZZHbQQ0q8LX6miY6bqAWwDzNa9JUioDBYrFmOUNIsuF08o1WT/m2gbBXvBhYVxg=="],
"@inquirer/input": ["@inquirer/[email protected].2", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-YnnskI/AX92KVU6gjNxdeLNqdJPBEOkL3I6EzZjfByKskjZtJuAX1CBev8AAHJsLaB3X9JCQoB/ag2dyzRPdSg=="],

"@inquirer/number": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-DX7a6IXRPU0j8kr2ovf+QaaDiIf+zEKaZVzCWdLOTk7XigqSXvoh4cul7x68xp54WTQrgSnW7P1WBJDbyY3GhA=="],
"@inquirer/number": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-O/gcUwhS0TzBdBszYues3B4PTwyOLo51RctvXPRGtDfwIftuTTdPnm3K7oiK2OC2CDc7eG4UNa+QtdLlaJxIOA=="],

"@inquirer/password": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-wiliQOWdjM8FnBmdIHtQV2Ca3S1+tMBUerhyjkRCv1g+4jSvEweGu9GCcvVEgKDhTBT15nrxvk5/bVrGUqSs1w=="],
"@inquirer/password": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-/Undb8fTDSo6LX79OtAsdaaW08x6Xx9zr4z9Xd1VV/N4kDnJ9fWyUHJ287V0XTqMYgH/5SnZBU2e8VzgpGWO8g=="],

"@inquirer/prompts": ["@inquirer/[email protected].1", "", { "dependencies": { "@inquirer/checkbox": "^4.0.4", "@inquirer/confirm": "^5.1.1", "@inquirer/editor": "^4.2.1", "@inquirer/expand": "^4.0.4", "@inquirer/input": "^4.1.1", "@inquirer/number": "^3.0.4", "@inquirer/password": "^4.0.4", "@inquirer/rawlist": "^4.0.4", "@inquirer/search": "^3.0.4", "@inquirer/select": "^4.0.4" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-v2JSGri6/HXSfoGIwuKEn8sNCQK6nsB2BNpy2lSX6QH9bsECrMv93QHnj5+f+1ZWpF/VNioIV2B/PDox8EvGuQ=="],
"@inquirer/prompts": ["@inquirer/[email protected].2", "", { "dependencies": { "@inquirer/checkbox": "^4.0.5", "@inquirer/confirm": "^5.1.2", "@inquirer/editor": "^4.2.2", "@inquirer/expand": "^4.0.5", "@inquirer/input": "^4.1.2", "@inquirer/number": "^3.0.5", "@inquirer/password": "^4.0.5", "@inquirer/rawlist": "^4.0.5", "@inquirer/search": "^3.0.5", "@inquirer/select": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-kUd4L1S8huk+2FbIl0UbBqZ6g8mYFtag9Pb8IqzeefIYgRXyS4Oc29ikuSlhfSkEYjG+gBAA5Ip0JvuvSqtfWA=="],

"@inquirer/rawlist": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-IsVN2EZdNHsmFdKWx9HaXb8T/s3FlR/U1QPt9dwbSyPtjFbMTlW9CRFvnn0bm/QIsrMRD2oMZqrQpSWPQVbXXg=="],
"@inquirer/rawlist": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-38g3v5/cX3NUv+jcr4sU6phKAthQKv36NYRgahsZIGNIVy8ewtSnolCJ1N64nGwi/sTUz5AE6PV1ZF+NaIThxg=="],

"@inquirer/search": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-tSkJk2SDmC2MEdTIjknXWmCnmPr5owTs9/xjfa14ol1Oh95n6xW7SYn5fiPk4/vrJPys0ggSWiISdPze4LTa7A=="],
"@inquirer/search": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-INqlGeK85gOmlVY8aosAdOMWgOmpcA7+eDlq5WBdbh8aZbAXX0HItf1GIdDj8zQnh+8Pv0DXU7OvdaLVcV4bWA=="],

"@inquirer/select": ["@inquirer/[email protected].4", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-ZzYLuLoUzTIW9EJm++jBpRiTshGqS3Q1o5qOEQqgzaBlmdsjQr6pA4TUNkwu6OBYgM2mIRbCz6mUhFDfl/GF+w=="],
"@inquirer/select": ["@inquirer/[email protected].5", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/figures": "^1.0.9", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-5UAnpWqs0G316MwJdSdgaRcWPIuUPllHa8pdHVi/w9KE/Ff/GzWhPwUn9ETtq/n8GEiWDUrP/LdJN8FJxf7JbA=="],

"@inquirer/type": ["@inquirer/[email protected]", "", { "peerDependencies": { "@types/node": ">=18" } }, "sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g=="],

Expand Down Expand Up @@ -252,7 +252,7 @@

"escape-string-regexp": ["[email protected]", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],

"eslint": ["[email protected]", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", "@eslint/js": "9.17.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA=="],
"eslint": ["[email protected]", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.10.0", "@eslint/eslintrc": "^3.2.0", "@eslint/js": "9.18.0", "@eslint/plugin-kit": "^0.2.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA=="],

"eslint-scope": ["[email protected]", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A=="],

Expand Down Expand Up @@ -314,7 +314,7 @@

"imurmurhash": ["[email protected]", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],

"inquirer": ["[email protected].0", "", { "dependencies": { "@inquirer/core": "^10.1.2", "@inquirer/prompts": "^7.2.1", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "mute-stream": "^2.0.0", "run-async": "^3.0.0", "rxjs": "^7.8.1" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-3NixUXq+hM8ezj2wc7wC37b32/rHq1MwNZDYdvx+d6jokOD+r+i8Q4Pkylh9tISYP114A128LCX8RKhopC5RfQ=="],
"inquirer": ["[email protected].1", "", { "dependencies": { "@inquirer/core": "^10.1.3", "@inquirer/prompts": "^7.2.2", "@inquirer/type": "^3.0.2", "ansi-escapes": "^4.3.2", "mute-stream": "^2.0.0", "run-async": "^3.0.0", "rxjs": "^7.8.1" }, "peerDependencies": { "@types/node": ">=18" } }, "sha512-EEJuhXDogMeu3opiLncf4fvkf25vGxl0cBYv1WIdqV3bvdZraDn0B31zoNqFHe7WndBMctZuYkZ/H/IO1yw8yw=="],

"is-extglob": ["[email protected]", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discraft",
"version": "1.6.5-beta.2",
"version": "1.6.5-beta.3",
"description": "Ultimate Discord bot framework",
"type": "module",
"packageManager": "[email protected]",
Expand Down Expand Up @@ -47,28 +47,28 @@
},
"homepage": "https://github.com/The-Best-Codes/discraft-js#readme",
"devDependencies": {
"@eslint/js": "^9.17.0",
"@eslint/js": "^9.18.0",
"@types/bun": "^1.1.16",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.10.5",
"bun": "^1.1.43",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"globals": "^15.14.0",
"typescript-eslint": "^8.19.1"
},
"peerDependencies": {
"typescript": "^5.7.3"
},
"dependencies": {
"@inquirer/core": "^10.1.2",
"@inquirer/core": "^10.1.3",
"chokidar": "^4.0.3",
"commander": "^13.0.0",
"consola": "^3.3.3",
"esbuild": "^0.24.2",
"esbuild-node-externals": "^1.16.0",
"fs-extra": "^11.2.0",
"glob": "^11.0.1",
"inquirer": "^12.3.0",
"inquirer": "^12.3.1",
"kleur": "^4.1.5"
}
}
4 changes: 4 additions & 0 deletions templates/vercel-ts-ai/.vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.env
.discraft
.vercel
86 changes: 49 additions & 37 deletions templates/vercel-ts-ai/commands/chat.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
import { GoogleGenerativeAI } from "@google/generative-ai";
import {
ChatInputCommandInteraction,
MessageFlags,
SlashCommandBuilder,
} from "discord.js";
import { type SimplifiedInteraction } from "../utils/types";

export default {
data: new SlashCommandBuilder()
.setName("chat")
.setDescription("Chat with Gemini AI")
.addStringOption((option) =>
option
.setName("prompt")
.setDescription("The prompt for the AI")
.setRequired(true),
)
.addAttachmentOption((option) =>
option
.setName("image")
.setDescription("Optional image to include in the prompt")
.setRequired(false),
),
data: {
name: "chat",
description: "Chat with Gemini AI",
options: [
{
name: "prompt",
description: "The prompt for the AI",
type: 3,
required: true,
},
{
name: "image",
description: "Optional image to include in the prompt",
type: 11,
required: false,
},
],
},

async execute(data: { interaction: ChatInputCommandInteraction }) {
async execute(data: { interaction: SimplifiedInteraction }) {
const genAI = new GoogleGenerativeAI(process.env.GOOGLE_AI_API_KEY || "");
const model = genAI.getGenerativeModel({
model: process.env.GOOGLE_AI_MODEL || "gemini-1.5-flash",
});
const interaction = data.interaction;
const prompt = interaction.options.getString("prompt", true);
const imageAttachment = interaction.options.getAttachment("image");
const promptOption = interaction.data.options?.find(
(option) => option.name === "prompt",
);
const imageOption = interaction.data.options?.find(
(option) => option.name === "image",
);
const prompt = promptOption?.value || "";
const imageAttachment =
interaction.data.resolved?.attachments?.[imageOption?.value || ""];

if (prompt.length > 2000) {
await interaction.reply({
content: "Prompt must be less than 2000 characters.",
flags: MessageFlags.Ephemeral,
});
return;
return {
type: 4,
data: {
content: "Prompt must be less than 2000 characters.",
flags: 64,
},
};
}

try {
await interaction.deferReply();

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let parts: any[] = [prompt];
if (imageAttachment) {
Expand All @@ -52,7 +58,7 @@ export default {
const image = {
inlineData: {
data: imageBase64,
mimeType: imageAttachment.contentType,
mimeType: imageAttachment.content_type,
},
};
parts = [prompt, image];
Expand All @@ -61,14 +67,20 @@ export default {
const result = await model.generateContent(parts);
const response = result.response.text();

await interaction.editReply({
content: response,
});
return {
type: 4,
data: {
content: response,
},
};
} catch (error) {
console.error("Error during AI chat:", error);
await interaction.editReply({
content: "An error occurred while processing your request.",
});
return {
type: 4,
data: {
content: "An error occurred while processing your request.",
},
};
}
},
};
Loading

0 comments on commit 9d5a7e8

Please sign in to comment.