Skip to content

Commit

Permalink
feat(Guild): allow description and features in edit (#5505)
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Apr 27, 2021
1 parent 2c54f72 commit 8a059cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/structures/Guild.js
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions typings/index.d.ts
Expand Up @@ -2722,6 +2722,8 @@ declare module 'discord.js' {
rulesChannel?: ChannelResolvable;
publicUpdatesChannel?: ChannelResolvable;
preferredLocale?: string;
description?: string | null;
features?: GuildFeatures[];
}

interface GuildEmojiCreateOptions {
Expand Down

0 comments on commit 8a059cc

Please sign in to comment.