From ee6ab1804c76c59ee6b5da9d20f5c0aeef1f1aaa Mon Sep 17 00:00:00 2001 From: Carter <45381083+Fyk0@users.noreply.github.com> Date: Wed, 21 Aug 2019 08:23:36 -0600 Subject: [PATCH 1/4] feat: Guild#partnered --- src/structures/Guild.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 21be50d140c8..c0f66dc1e956 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -403,6 +403,15 @@ class Guild extends Base { get joinedAt() { return new Date(this.joinedTimestamp); } + + /** + * If this guild is partnered + * @type {boolean} + * @readonly + */ + get partnered() { + return this.features.includes('PARTNERED'); + } /** * If this guild is verified From 6fdab00a7883e00c9d310a54c03c443994676746 Mon Sep 17 00:00:00 2001 From: Carter <45381083+Fyk0@users.noreply.github.com> Date: Wed, 21 Aug 2019 08:26:57 -0600 Subject: [PATCH 2/4] typings: added Guild#features --- typings/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/typings/index.d.ts b/typings/index.d.ts index 43a607ab6b03..06fe22efb8a6 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -709,6 +709,7 @@ declare module 'discord.js' { public readonly nameAcronym: string; public readonly owner: GuildMember | null; public ownerID: Snowflake; + public partnered: boolean; public premiumSubscriptionCount: number | null; public premiumTier: PremiumTier; public presences: PresenceStore; From d1cd39809c172ecfe3675978072b110d82fd3385 Mon Sep 17 00:00:00 2001 From: Carter <45381083+Fyk0@users.noreply.github.com> Date: Wed, 21 Aug 2019 08:35:51 -0600 Subject: [PATCH 3/4] fix: removed trailing space --- src/structures/Guild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index c0f66dc1e956..5bdeda88ae7d 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -403,7 +403,7 @@ class Guild extends Base { get joinedAt() { return new Date(this.joinedTimestamp); } - + /** * If this guild is partnered * @type {boolean} From 8a6b4748ca4c7a28e5381a9135c3d25b4e5b3c6a Mon Sep 17 00:00:00 2001 From: Carter <45381083+Fyk0@users.noreply.github.com> Date: Wed, 21 Aug 2019 08:42:00 -0600 Subject: [PATCH 4/4] typings: made Guild#partnered readonly --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 06fe22efb8a6..55abd4de0e26 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -709,7 +709,7 @@ declare module 'discord.js' { public readonly nameAcronym: string; public readonly owner: GuildMember | null; public ownerID: Snowflake; - public partnered: boolean; + public readonly partnered: boolean; public premiumSubscriptionCount: number | null; public premiumTier: PremiumTier; public presences: PresenceStore;