feat(Guild): allow description and features in edit (#5505)

This commit is contained in:
Souji
2021-04-27 09:36:48 +02:00
committed by GitHub
parent 2c54f72670
commit 8a059cccb8
2 changed files with 10 additions and 0 deletions

View File

@@ -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)

2
typings/index.d.ts vendored
View File

@@ -2722,6 +2722,8 @@ declare module 'discord.js' {
rulesChannel?: ChannelResolvable;
publicUpdatesChannel?: ChannelResolvable;
preferredLocale?: string;
description?: string | null;
features?: GuildFeatures[];
}
interface GuildEmojiCreateOptions {