Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/structures/Guild.js
Expand Up @@ -944,6 +944,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 @@ -1003,6 +1005,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 @@ -2786,6 +2786,8 @@ declare module 'discord.js' {
rulesChannel?: ChannelResolvable;
publicUpdatesChannel?: ChannelResolvable;
preferredLocale?: string;
description?: string | null;
features?: GuildFeatures[];
}

interface GuildEmojiCreateOptions {
Expand Down