mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build for branch 11.1-dev: c33b78da23
This commit is contained in:
parent
88c83c9148
commit
965c5b87ee
2 changed files with 35 additions and 1 deletions
|
|
@ -8181,6 +8181,12 @@ class Guild {
|
|||
*/
|
||||
this.afkChannelID = data.afk_channel_id;
|
||||
|
||||
/**
|
||||
* The ID of the system channel
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.systemChannelID = data.system_channel_id;
|
||||
|
||||
/**
|
||||
* Whether embedded images are enabled on this guild
|
||||
* @type {boolean}
|
||||
|
|
@ -8338,6 +8344,24 @@ class Guild {
|
|||
return this.members.get(this.ownerID);
|
||||
}
|
||||
|
||||
/**
|
||||
* AFK voice channel for this guild
|
||||
* @type {?VoiceChannel}
|
||||
* @readonly
|
||||
*/
|
||||
get afkChannel() {
|
||||
return this.client.channels.get(this.afkChannelID);
|
||||
}
|
||||
|
||||
/**
|
||||
* System channel for this guild
|
||||
* @type {?GuildChannel}
|
||||
* @readonly
|
||||
*/
|
||||
get systemChannel() {
|
||||
return this.client.channels.get(this.systemChannelID);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection
|
||||
* @type {?VoiceConnection}
|
||||
|
|
@ -8572,6 +8596,7 @@ class Guild {
|
|||
if (data.region) _data.region = data.region;
|
||||
if (typeof data.verificationLevel !== 'undefined') _data.verification_level = Number(data.verificationLevel);
|
||||
if (data.afkChannel) _data.afk_channel_id = this.client.resolver.resolveChannel(data.afkChannel).id;
|
||||
if (data.systemChannel) _data.system_channel_id = this.client.resolver.resolveChannel(data.systemChannel).id;
|
||||
if (data.afkTimeout) _data.afk_timeout = Number(data.afkTimeout);
|
||||
if (data.icon) _data.icon = this.client.resolver.resolveBase64(data.icon);
|
||||
if (data.owner) _data.owner_id = this.client.resolver.resolveUser(data.owner).id;
|
||||
|
|
@ -8647,6 +8672,15 @@ class Guild {
|
|||
return this.edit({ afkChannel });
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit the system channel of the guild.
|
||||
* @param {ChannelResolvable} systemChannel The new system channel
|
||||
* @returns {Promise<Guild>}
|
||||
*/
|
||||
setSystemChannel(systemChannel) {
|
||||
return this.edit({ systemChannel });
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit the AFK timeout of the guild.
|
||||
* @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK
|
||||
|
|
|
|||
2
discord.11.1-dev.min.js
vendored
2
discord.11.1-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue