diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index f22205df..e3f3a9cf 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -1,5 +1,10 @@
## Changelog
+
+Update _ November 2024
+
+- fix: TS v5.5 breaks build (09/11/2024)
+
Update _ October 2024
- fix: Changing A32NX Releases to Aircraft Releases in Role assignment (30/10/2024)
diff --git a/package-lock.json b/package-lock.json
index 28533493..a10096ac 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,7 +16,7 @@
"bad-words": "^3.0.4",
"cache-manager": "^5.7.6",
"config": "^3.3.9",
- "discord.js": "^14.11.0",
+ "discord.js": "^14.16.1",
"jsdom": "^23.2.0",
"moment": "^2.29.4",
"mongoose": "^8.0.3",
@@ -36,7 +36,7 @@
"eslint": "^7.29.0",
"nodemon": "^3.0.2",
"ts-node": "^10.4.0",
- "typescript": "~5.4.5"
+ "typescript": "^5.5.4"
},
"engines": {
"node": "18.x"
@@ -1614,25 +1614,32 @@
}
},
"node_modules/@discordjs/builders": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.8.2.tgz",
- "integrity": "sha512-6wvG3QaCjtMu0xnle4SoOIeFB4y6fKMN6WZfy3BMKJdQQtPLik8KGzDwBVL/+wTtcE/ZlFjgEk74GublyEVZ7g==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.9.0.tgz",
+ "integrity": "sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==",
+ "license": "Apache-2.0",
"dependencies": {
- "@discordjs/formatters": "^0.4.0",
- "@discordjs/util": "^1.1.0",
- "@sapphire/shapeshift": "^3.9.7",
- "discord-api-types": "0.37.83",
+ "@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.6.2"
+ "tslib": "^2.6.3"
},
"engines": {
- "node": ">=16.11.0"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
+ "node_modules/@discordjs/builders/node_modules/discord-api-types": {
+ "version": "0.37.97",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz",
+ "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==",
+ "license": "MIT"
+ },
"node_modules/@discordjs/collection": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
@@ -1642,45 +1649,54 @@
}
},
"node_modules/@discordjs/formatters": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.4.0.tgz",
- "integrity": "sha512-fJ06TLC1NiruF35470q3Nr1bi95BdvKFAF+T5bNfZJ4bNdqZ3VZ+Ttg6SThqTxm6qumSG3choxLBHMC69WXNXQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.5.0.tgz",
+ "integrity": "sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==",
+ "license": "Apache-2.0",
"dependencies": {
- "discord-api-types": "0.37.83"
+ "discord-api-types": "0.37.97"
},
"engines": {
- "node": ">=16.11.0"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
+ "node_modules/@discordjs/formatters/node_modules/discord-api-types": {
+ "version": "0.37.97",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz",
+ "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==",
+ "license": "MIT"
+ },
"node_modules/@discordjs/rest": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.3.0.tgz",
- "integrity": "sha512-C1kAJK8aSYRv3ZwMG8cvrrW4GN0g5eMdP8AuN8ODH5DyOCbHgJspze1my3xHOAgwLJdKUbWNVyAeJ9cEdduqIg==",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.0.tgz",
+ "integrity": "sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==",
+ "license": "Apache-2.0",
"dependencies": {
- "@discordjs/collection": "^2.1.0",
- "@discordjs/util": "^1.1.0",
- "@sapphire/async-queue": "^1.5.2",
+ "@discordjs/collection": "^2.1.1",
+ "@discordjs/util": "^1.1.1",
+ "@sapphire/async-queue": "^1.5.3",
"@sapphire/snowflake": "^3.5.3",
- "@vladfrangu/async_event_emitter": "^2.2.4",
- "discord-api-types": "0.37.83",
+ "@vladfrangu/async_event_emitter": "^2.4.6",
+ "discord-api-types": "0.37.97",
"magic-bytes.js": "^1.10.0",
- "tslib": "^2.6.2",
- "undici": "6.13.0"
+ "tslib": "^2.6.3",
+ "undici": "6.19.8"
},
"engines": {
- "node": ">=16.11.0"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
"node_modules/@discordjs/rest/node_modules/@discordjs/collection": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.0.tgz",
- "integrity": "sha512-mLcTACtXUuVgutoznkh6hS3UFqYirDYAg5Dc1m8xn6OvPjetnUlf/xjtqnnc47OwWdaoCQnHmHh9KofhD6uRqw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz",
+ "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==",
+ "license": "Apache-2.0",
"engines": {
"node": ">=18"
},
@@ -1688,12 +1704,19 @@
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
+ "node_modules/@discordjs/rest/node_modules/discord-api-types": {
+ "version": "0.37.97",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz",
+ "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==",
+ "license": "MIT"
+ },
"node_modules/@discordjs/util": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.0.tgz",
- "integrity": "sha512-IndcI5hzlNZ7GS96RV3Xw1R2kaDuXEp7tRIy/KlhidpN/BQ1qh1NZt3377dMLTa44xDUNKT7hnXkA/oUAzD/lg==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz",
+ "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==",
+ "license": "Apache-2.0",
"engines": {
- "node": ">=16.11.0"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/discordjs/discord.js?sponsor"
@@ -2001,18 +2024,20 @@
}
},
"node_modules/@sapphire/async-queue": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.2.tgz",
- "integrity": "sha512-7X7FFAA4DngXUl95+hYbUF19bp1LGiffjJtu7ygrZrbdCSsdDDBaSjB7Akw0ZbOu6k0xpXyljnJ6/RZUvLfRdg==",
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.3.tgz",
+ "integrity": "sha512-x7zadcfJGxFka1Q3f8gCts1F0xMwCKbZweM85xECGI0hBTeIZJGGCrHgLggihBoprlQ/hBmDR5LKfIPqnmHM3w==",
+ "license": "MIT",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@sapphire/shapeshift": {
- "version": "3.9.7",
- "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.7.tgz",
- "integrity": "sha512-4It2mxPSr4OGn4HSQWGmhFMsNFGfFVhWeRPCRwbH972Ek2pzfGRZtb0pJ4Ze6oIzcyh2jw7nUDa6qGlWofgd9g==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz",
+ "integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==",
+ "license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"lodash": "^4.17.21"
@@ -2974,9 +2999,10 @@
}
},
"node_modules/@vladfrangu/async_event_emitter": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.3.0.tgz",
- "integrity": "sha512-pmkbRGAqTM3N7R4KCObOAqqoZzeURR6oC11amaXmY4ZLShu4MdLymm1/F0fZssYKAsSE79TibRbdXwfvYMIt0Q==",
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz",
+ "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==",
+ "license": "MIT",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
@@ -3826,30 +3852,37 @@
"integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA=="
},
"node_modules/discord.js": {
- "version": "14.15.3",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.15.3.tgz",
- "integrity": "sha512-/UJDQO10VuU6wQPglA4kz2bw2ngeeSbogiIPx/TsnctfzV/tNf+q+i1HlgtX1OGpeOBpJH9erZQNO5oRM2uAtQ==",
+ "version": "14.16.1",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.16.1.tgz",
+ "integrity": "sha512-/diX4shp3q1F3EySGQbQl10el+KIpffLSOJdtM35gGV7zw2ED7rKbASKJT7UIR9L/lTd0KtNenZ/h739TN7diA==",
+ "license": "Apache-2.0",
"dependencies": {
- "@discordjs/builders": "^1.8.2",
+ "@discordjs/builders": "^1.9.0",
"@discordjs/collection": "1.5.3",
- "@discordjs/formatters": "^0.4.0",
- "@discordjs/rest": "^2.3.0",
- "@discordjs/util": "^1.1.0",
- "@discordjs/ws": "^1.1.1",
+ "@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.83",
+ "discord-api-types": "0.37.97",
"fast-deep-equal": "3.1.3",
"lodash.snakecase": "4.1.1",
- "tslib": "2.6.2",
- "undici": "6.13.0"
+ "tslib": "^2.6.3",
+ "undici": "6.19.8"
},
"engines": {
- "node": ">=16.11.0"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/discordjs/discord.js?sponsor"
}
},
+ "node_modules/discord.js/node_modules/discord-api-types": {
+ "version": "0.37.97",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz",
+ "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==",
+ "license": "MIT"
+ },
"node_modules/doctrine": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -5757,7 +5790,8 @@
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "license": "MIT"
},
"node_modules/lodash.clonedeep": {
"version": "4.5.0",
@@ -7224,7 +7258,8 @@
"node_modules/ts-mixer": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz",
- "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="
+ "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==",
+ "license": "MIT"
},
"node_modules/ts-node": {
"version": "10.9.2",
@@ -7306,9 +7341,10 @@
}
},
"node_modules/tslib": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
- "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
+ "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
+ "license": "0BSD"
},
"node_modules/type-check": {
"version": "0.4.0",
@@ -7400,9 +7436,9 @@
}
},
"node_modules/typescript": {
- "version": "5.4.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
- "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
+ "version": "5.5.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
+ "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -7435,11 +7471,12 @@
"dev": true
},
"node_modules/undici": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.13.0.tgz",
- "integrity": "sha512-Q2rtqmZWrbP8nePMq7mOJIN98M0fYvSgV89vwl/BQRT4mDOeY2GXZngfGpcBBhtky3woM7G24wZV3Q304Bv6cw==",
+ "version": "6.19.8",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz",
+ "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==",
+ "license": "MIT",
"engines": {
- "node": ">=18.0"
+ "node": ">=18.17"
}
},
"node_modules/undici-types": {
diff --git a/package.json b/package.json
index 8c34b285..ec58a2b3 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"bad-words": "^3.0.4",
"cache-manager": "^5.7.6",
"config": "^3.3.9",
- "discord.js": "^14.11.0",
+ "discord.js": "^14.16.1",
"jsdom": "^23.2.0",
"moment": "^2.29.4",
"mongoose": "^8.0.3",
@@ -42,7 +42,7 @@
"eslint": "^7.29.0",
"nodemon": "^3.0.2",
"ts-node": "^10.4.0",
- "typescript": "~5.4.5"
+ "typescript": "^5.5.4"
},
"engines": {
"node": "18.x"
diff --git a/src/events/buttonHandlers/buttonHandler.ts b/src/events/buttonHandlers/buttonHandler.ts
index c2cdac81..6b820339 100644
--- a/src/events/buttonHandlers/buttonHandler.ts
+++ b/src/events/buttonHandlers/buttonHandler.ts
@@ -1,3 +1,4 @@
+import { ButtonComponent } from 'discord.js';
import { event, Events } from '../../lib';
import { handleRoleAssignment } from './functions/handleRoleAssignment';
@@ -6,9 +7,11 @@ export default event(Events.InteractionCreate, async ({ log }, interaction) => {
log('Button Handler: Button pressed');
- const { customId, component, user } = interaction;
+ // needed as TS cannot infer the type of component from the destructure assignment
+ const component = interaction.component as ButtonComponent;
+ const { customId, user } = interaction;
- const buttonLabel = component?.label;
+ const buttonLabel = component.label;
try {
const [prefix, ...params] = interaction.customId.split('_');