Compare commits

..

6 commits

Author SHA1 Message Date
3d0fe87717
connect bot to discord using discord.js 2022-07-03 17:38:34 +02:00
c8ea429968
update dependencies 2022-07-03 17:38:23 +02:00
4601565b60
add example env file 2022-07-03 17:38:16 +02:00
565da6aa5e
useless files 2022-07-03 17:38:07 +02:00
9d0fbfff76
remove token.......... 2022-07-03 17:37:57 +02:00
9b894afd7b
fix ESLint 2022-07-03 17:37:45 +02:00
9 changed files with 124 additions and 266 deletions

View file

@ -9,7 +9,7 @@
}, },
"rules": { "rules": {
"arrow-spacing": ["warn", { "before": true, "after": true }], "arrow-spacing": ["warn", { "before": true, "after": true }],
"brace-style": ["error", { "allowSingleLine": true }], "brace-style": ["error"],
"comma-dangle": ["error", "always-multiline"], "comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error", "comma-spacing": "error",
"comma-style": "error", "comma-style": "error",

View file

@ -1,3 +0,0 @@
{
"token": "OTY1NTk4ODUyNDA3MjMwNDk0.Yl1iAg.TiE_d1FEp8jL_Y_W79Zsb9RTr7Q"
}

1
config/example.env Normal file
View file

@ -0,0 +1 @@
TOKEN_DISCORD=""

296
package-lock.json generated
View file

@ -9,64 +9,30 @@
"version": "0.0.1", "version": "0.0.1",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@discordjs/rest": "^0.5.0", "discord.js": "^13.8.1"
"discord-api-types": "^0.34.0",
"discord.js": "^13.6.0"
}, },
"devDependencies": { "devDependencies": {
"dotenv": "^16.0.1",
"eslint": "^8.13.0" "eslint": "^8.13.0"
} }
}, },
"node_modules/@discordjs/builders": { "node_modules/@discordjs/builders": {
"version": "0.11.0", "version": "0.14.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
"integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
"dependencies": { "dependencies": {
"@sindresorhus/is": "^4.2.0", "@sapphire/shapeshift": "^3.1.0",
"discord-api-types": "^0.26.0", "@sindresorhus/is": "^4.6.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1",
"zod": "^3.11.6"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
"engines": {
"node": ">=12"
}
},
"node_modules/@discordjs/collection": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
"integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==",
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/rest": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-0.5.0.tgz",
"integrity": "sha512-S4E1YNz1UxgUfMPpMeqzPPkCfXE877zOsvKM5WEmwIhcpz1PQV7lzqlEOuz194UuwOJLLjQFBgQELnQfCX9UfA==",
"dependencies": {
"@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1",
"@sapphire/snowflake": "^3.2.2",
"discord-api-types": "^0.33.3", "discord-api-types": "^0.33.3",
"tslib": "^2.4.0", "fast-deep-equal": "^3.1.3",
"undici": "^5.4.0" "ts-mixer": "^6.0.1",
"tslib": "^2.4.0"
}, },
"engines": { "engines": {
"node": ">=16.9.0" "node": ">=16.9.0"
} }
}, },
"node_modules/@discordjs/rest/node_modules/@discordjs/collection": { "node_modules/@discordjs/collection": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
"integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==",
@ -74,11 +40,6 @@
"node": ">=16.9.0" "node": ">=16.9.0"
} }
}, },
"node_modules/@discordjs/rest/node_modules/discord-api-types": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
"integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
},
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
@ -128,10 +89,10 @@
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/@sapphire/snowflake": { "node_modules/@sapphire/shapeshift": {
"version": "3.2.2", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.4.0.tgz",
"integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==", "integrity": "sha512-uV+vErdfbxCgnjgcwkPDADlyS40I20L57YPy254LKbRNfLCg4/ymy510aNSGhLhq/dpNU0s1fQnTbI2YAetzsA==",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -149,14 +110,14 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "17.0.24", "version": "18.0.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.1.tgz",
"integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==" "integrity": "sha512-CmR8+Tsy95hhwtZBKJBs0/FFq4XX7sDZHlGGf+0q+BRZfMbOTkzkj0AFAuTyXbObDIoanaBBW0+KEW+m3N16Wg=="
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
"version": "2.6.1", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"dependencies": { "dependencies": {
"@types/node": "*", "@types/node": "*",
"form-data": "^3.0.0" "form-data": "^3.0.0"
@ -253,7 +214,7 @@
"node_modules/asynckit": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/balanced-match": { "node_modules/balanced-match": {
"version": "1.0.2", "version": "1.0.2",
@ -371,44 +332,36 @@
"node_modules/delayed-stream": { "node_modules/delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": { "engines": {
"node": ">=0.4.0" "node": ">=0.4.0"
} }
}, },
"node_modules/discord-api-types": { "node_modules/discord-api-types": {
"version": "0.34.0", "version": "0.33.5",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.34.0.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
"integrity": "sha512-xwlhwiLZ11+8+ou1JlPOLJkwpu8qklm+aUm9JF06YC59fSo4CD7gQqsbUBxqevqheLx+WhRgJOHjDbjI0Q+Ecw==" "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "13.6.0", "version": "13.8.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
"integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
"dependencies": { "dependencies": {
"@discordjs/builders": "^0.11.0", "@discordjs/builders": "^0.14.0",
"@discordjs/collection": "^0.4.0", "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.1.9", "@sapphire/async-queue": "^1.3.1",
"@types/node-fetch": "^2.5.12", "@types/node-fetch": "^2.6.1",
"@types/ws": "^8.2.2", "@types/ws": "^8.5.3",
"discord-api-types": "^0.26.0", "discord-api-types": "^0.33.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"ws": "^8.4.0" "ws": "^8.7.0"
}, },
"engines": { "engines": {
"node": ">=16.6.0", "node": ">=16.6.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/discord.js/node_modules/discord-api-types": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
"engines": {
"node": ">=12"
}
},
"node_modules/doctrine": { "node_modules/doctrine": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@ -421,6 +374,15 @@
"node": ">=6.0.0" "node": ">=6.0.0"
} }
}, },
"node_modules/dotenv": {
"version": "16.0.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
"integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/escape-string-regexp": { "node_modules/escape-string-regexp": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@ -593,8 +555,7 @@
"node_modules/fast-deep-equal": { "node_modules/fast-deep-equal": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
"dev": true
}, },
"node_modules/fast-json-stable-stringify": { "node_modules/fast-json-stable-stringify": {
"version": "2.1.0", "version": "2.1.0",
@ -1078,7 +1039,7 @@
"node_modules/tr46": { "node_modules/tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
}, },
"node_modules/ts-mixer": { "node_modules/ts-mixer": {
"version": "6.0.1", "version": "6.0.1",
@ -1114,14 +1075,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/undici": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.5.1.tgz",
"integrity": "sha512-MEvryPLf18HvlCbLSzCW0U00IMftKGI5udnjrQbC5D4P0Hodwffhv+iGfWuJwg16Y/TK11ZFK8i+BPVW2z/eAw==",
"engines": {
"node": ">=12.18"
}
},
"node_modules/uri-js": { "node_modules/uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@ -1140,12 +1093,12 @@
"node_modules/webidl-conversions": { "node_modules/webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
}, },
"node_modules/whatwg-url": { "node_modules/whatwg-url": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": { "dependencies": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"
@ -1182,9 +1135,9 @@
"dev": true "dev": true
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "8.5.0", "version": "8.8.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz",
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==",
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
}, },
@ -1200,66 +1153,27 @@
"optional": true "optional": true
} }
} }
},
"node_modules/zod": {
"version": "3.14.4",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
"integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
} }
}, },
"dependencies": { "dependencies": {
"@discordjs/builders": { "@discordjs/builders": {
"version": "0.11.0", "version": "0.14.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz",
"integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==",
"requires": { "requires": {
"@sindresorhus/is": "^4.2.0", "@sapphire/shapeshift": "^3.1.0",
"discord-api-types": "^0.26.0", "@sindresorhus/is": "^4.6.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1",
"zod": "^3.11.6"
},
"dependencies": {
"discord-api-types": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
}
}
},
"@discordjs/collection": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
"integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw=="
},
"@discordjs/rest": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-0.5.0.tgz",
"integrity": "sha512-S4E1YNz1UxgUfMPpMeqzPPkCfXE877zOsvKM5WEmwIhcpz1PQV7lzqlEOuz194UuwOJLLjQFBgQELnQfCX9UfA==",
"requires": {
"@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.3.1",
"@sapphire/snowflake": "^3.2.2",
"discord-api-types": "^0.33.3", "discord-api-types": "^0.33.3",
"tslib": "^2.4.0", "fast-deep-equal": "^3.1.3",
"undici": "^5.4.0" "ts-mixer": "^6.0.1",
"tslib": "^2.4.0"
}
}, },
"dependencies": {
"@discordjs/collection": { "@discordjs/collection": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
"integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==" "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA=="
}, },
"discord-api-types": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
"integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
}
}
},
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
@ -1299,10 +1213,10 @@
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.1.tgz",
"integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g==" "integrity": "sha512-FFTlPOWZX1kDj9xCAsRzH5xEJfawg1lNoYAA+ecOWJMHOfiZYb1uXOI3ne9U4UILSEPwfE68p3T9wUHwIQfR0g=="
}, },
"@sapphire/snowflake": { "@sapphire/shapeshift": {
"version": "3.2.2", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.4.0.tgz",
"integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==" "integrity": "sha512-uV+vErdfbxCgnjgcwkPDADlyS40I20L57YPy254LKbRNfLCg4/ymy510aNSGhLhq/dpNU0s1fQnTbI2YAetzsA=="
}, },
"@sindresorhus/is": { "@sindresorhus/is": {
"version": "4.6.0", "version": "4.6.0",
@ -1310,14 +1224,14 @@
"integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="
}, },
"@types/node": { "@types/node": {
"version": "17.0.24", "version": "18.0.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.1.tgz",
"integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==" "integrity": "sha512-CmR8+Tsy95hhwtZBKJBs0/FFq4XX7sDZHlGGf+0q+BRZfMbOTkzkj0AFAuTyXbObDIoanaBBW0+KEW+m3N16Wg=="
}, },
"@types/node-fetch": { "@types/node-fetch": {
"version": "2.6.1", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"form-data": "^3.0.0" "form-data": "^3.0.0"
@ -1392,7 +1306,7 @@
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"balanced-match": { "balanced-match": {
"version": "1.0.2", "version": "1.0.2",
@ -1484,34 +1398,27 @@
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
}, },
"discord-api-types": { "discord-api-types": {
"version": "0.34.0", "version": "0.33.5",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.34.0.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
"integrity": "sha512-xwlhwiLZ11+8+ou1JlPOLJkwpu8qklm+aUm9JF06YC59fSo4CD7gQqsbUBxqevqheLx+WhRgJOHjDbjI0Q+Ecw==" "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
}, },
"discord.js": { "discord.js": {
"version": "13.6.0", "version": "13.8.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz",
"integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==",
"requires": { "requires": {
"@discordjs/builders": "^0.11.0", "@discordjs/builders": "^0.14.0",
"@discordjs/collection": "^0.4.0", "@discordjs/collection": "^0.7.0",
"@sapphire/async-queue": "^1.1.9", "@sapphire/async-queue": "^1.3.1",
"@types/node-fetch": "^2.5.12", "@types/node-fetch": "^2.6.1",
"@types/ws": "^8.2.2", "@types/ws": "^8.5.3",
"discord-api-types": "^0.26.0", "discord-api-types": "^0.33.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"ws": "^8.4.0" "ws": "^8.7.0"
},
"dependencies": {
"discord-api-types": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
}
} }
}, },
"doctrine": { "doctrine": {
@ -1523,6 +1430,12 @@
"esutils": "^2.0.2" "esutils": "^2.0.2"
} }
}, },
"dotenv": {
"version": "16.0.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
"integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==",
"dev": true
},
"escape-string-regexp": { "escape-string-regexp": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@ -1649,8 +1562,7 @@
"fast-deep-equal": { "fast-deep-equal": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
"dev": true
}, },
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.1.0", "version": "2.1.0",
@ -2012,7 +1924,7 @@
"tr46": { "tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
}, },
"ts-mixer": { "ts-mixer": {
"version": "6.0.1", "version": "6.0.1",
@ -2039,11 +1951,6 @@
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true "dev": true
}, },
"undici": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.5.1.tgz",
"integrity": "sha512-MEvryPLf18HvlCbLSzCW0U00IMftKGI5udnjrQbC5D4P0Hodwffhv+iGfWuJwg16Y/TK11ZFK8i+BPVW2z/eAw=="
},
"uri-js": { "uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@ -2062,12 +1969,12 @@
"webidl-conversions": { "webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
}, },
"whatwg-url": { "whatwg-url": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": { "requires": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"
@ -2095,15 +2002,10 @@
"dev": true "dev": true
}, },
"ws": { "ws": {
"version": "8.5.0", "version": "8.8.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz",
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==",
"requires": {} "requires": {}
},
"zod": {
"version": "3.14.4",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.14.4.tgz",
"integrity": "sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw=="
} }
} }
} }

View file

@ -13,11 +13,10 @@
"author": "La confrérie du Kassoulait", "author": "La confrérie du Kassoulait",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@discordjs/rest": "^0.5.0", "discord.js": "^13.8.1"
"discord-api-types": "^0.34.0",
"discord.js": "^13.6.0"
}, },
"devDependencies": { "devDependencies": {
"dotenv": "^16.0.1",
"eslint": "^8.13.0" "eslint": "^8.13.0"
} }
} }

View file

@ -1,10 +0,0 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
return interaction.reply('Pong!');
}
};

View file

@ -1,17 +0,0 @@
module.exports = {
name: 'interactionCreate',
async execute(interaction) {
if (!interaction.isCommand()) return;
const command = client.commands.get(interaction.commandName);
if (!command) return;
try {
await command.execute(interaction);
} catch (error) {
console.error(error);
await interaction.reply({ content: 'Impossible de lancer cette commande.', ephemeral: true });
}
},
};

View file

@ -1,7 +0,0 @@
module.exports = {
name: 'ready',
once: true,
execute() {
console.log('Prêt !');
}
};

View file

@ -1,31 +1,24 @@
const fs = require('node:fs'); const { Client, Intents } = require('discord.js');
const path = require('node:path');
const { Client, Collection, Intents } = require('discord.js');
const { token } = require('../config/config.json');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); const run = async () => {
console.log('Starting Botanique...');
/* EVENT */ // Load .env if not in prod
const eventsPath = path.join(__dirname, 'events'); if (process.env.NODE_ENV !== 'production') {
const eventFiles = fs.readdirSync(eventsPath).filter(file => file.endsWith('.js')); const dotenv = await import('dotenv');
dotenv.config({ path: './config/.env' });
for (const file of eventFiles) {
const event = require(path.join(eventsPath, file));
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, async (...args) => event.execute(...args));
} }
}
/* COMMANDS */ // Client Discord.JS
client.commands = new Collection(); const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const commandsPath = path.join(__dirname, 'commands'); client.config = { token_discord: process.env.TOKEN_DISCORD };
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); if (client) {
console.log('Client ✅');
} else {
throw 'Client ❌';
}
for (const file of commandFiles) { await client.login(client.config.token_discord);
const command = require(path.join(commandsPath, file)); };
client.commands.set(command.data.name, command);
}
client.login(token); run().catch(error => console.error(error));