mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(Guild): allow description and features in edit (#5505)
This commit is contained in:
@@ -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
2
typings/index.d.ts
vendored
@@ -2722,6 +2722,8 @@ declare module 'discord.js' {
|
||||
rulesChannel?: ChannelResolvable;
|
||||
publicUpdatesChannel?: ChannelResolvable;
|
||||
preferredLocale?: string;
|
||||
description?: string | null;
|
||||
features?: GuildFeatures[];
|
||||
}
|
||||
|
||||
interface GuildEmojiCreateOptions {
|
||||
|
||||
Reference in New Issue
Block a user