1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00
Daggerbot-TS/.yarn/patches/discord.js-npm-14.15.3-0c74284e59.patch

14 lines
715 B
Diff
Raw Normal View History

diff --git a/src/structures/BaseInteraction.js b/src/structures/BaseInteraction.js
index 8a25f6f6ac324f2596cc1891aa4b0ef5146abbab..914a125b7ccb59e779607a12dc3678e77870eafc 100644
--- a/src/structures/BaseInteraction.js
+++ b/src/structures/BaseInteraction.js
@@ -103,7 +103,7 @@ class BaseInteraction extends Base {
* The entitlements for the invoking user, representing access to premium SKUs
* @type {Collection<Snowflake, Entitlement>}
*/
- this.entitlements = data.entitlements.reduce(
+ this.entitlements = (data.entitlements ?? []).reduce(
(coll, entitlement) => coll.set(entitlement.id, this.client.application.entitlements._add(entitlement)),
new Collection(),
);