From 8a059cccb8ecbd0bf60d2ed395a8de0806b3395a Mon Sep 17 00:00:00 2001 From: Souji Date: Tue, 27 Apr 2021 09:36:48 +0200 Subject: [PATCH] feat(Guild): allow description and features in edit (#5505) --- src/structures/Guild.js | 8 ++++++++ typings/index.d.ts | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 6672a8b187b9..fcdde7746c76 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -957,6 +957,8 @@ class Guild extends Base { * @property {ChannelResolvable} [rulesChannel] The rules channel of the guild * @property {ChannelResolvable} [publicUpdatesChannel] The community updates channel of the guild * @property {string} [preferredLocale] The preferred locale of the guild + * @property {string} [description] The discovery description of the guild + * @property {Features[]} [features] The features of the guild */ /** @@ -1016,6 +1018,12 @@ class Guild extends Base { if (typeof data.publicUpdatesChannel !== 'undefined') { _data.public_updates_channel_id = this.client.channels.resolveID(data.publicUpdatesChannel); } + if (typeof data.features !== 'undefined') { + _data.features = data.features; + } + if (typeof data.description !== 'undefined') { + _data.description = data.description; + } if (data.preferredLocale) _data.preferred_locale = data.preferredLocale; return this.client.api .guilds(this.id) diff --git a/typings/index.d.ts b/typings/index.d.ts index 4d0bf98001ae..84b249657d38 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2722,6 +2722,8 @@ declare module 'discord.js' { rulesChannel?: ChannelResolvable; publicUpdatesChannel?: ChannelResolvable; preferredLocale?: string; + description?: string | null; + features?: GuildFeatures[]; } interface GuildEmojiCreateOptions {