mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build for branch master: 3f8c0a4d11
This commit is contained in:
parent
f315990f91
commit
0a80be9ac7
2 changed files with 33 additions and 33 deletions
|
|
@ -8141,6 +8141,38 @@ class Guild {
|
|||
return this.edit({ splash });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} position Absolute or relative position
|
||||
* @param {boolean} [relative=false] Whether to position relatively or absolutely
|
||||
* @returns {Promise<Guild>}
|
||||
*/
|
||||
setPosition(position, relative) {
|
||||
if (this.client.user.bot) {
|
||||
return Promise.reject(new Error('Setting guild position is only available for user accounts'));
|
||||
}
|
||||
return this.client.user.settings.setGuildPosition(this, position, relative);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all messages in this guild as read
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @returns {Promise<Guild>} this guild
|
||||
*/
|
||||
acknowledge() {
|
||||
return this.client.rest.methods.ackGuild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow direct messages from guild members
|
||||
* @param {boolean} allow Whether to allow direct messages
|
||||
* @returns {Promise<Guild>}
|
||||
*/
|
||||
allowDMs(allow) {
|
||||
const settings = this.client.user.settings;
|
||||
if (allow) return settings.removeRestrictedGuild(this);
|
||||
else return settings.addRestrictedGuild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bans a user from the guild.
|
||||
* @param {UserResolvable} user The user to ban
|
||||
|
|
@ -8332,38 +8364,6 @@ class Guild {
|
|||
return this.client.rest.methods.deleteGuild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all messages in this guild as read
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @returns {Promise<Guild>} this guild
|
||||
*/
|
||||
acknowledge() {
|
||||
return this.client.rest.methods.ackGuild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} position Absolute or relative position
|
||||
* @param {boolean} [relative=false] Whether to position relatively or absolutely
|
||||
* @returns {Promise<Guild>}
|
||||
*/
|
||||
setPosition(position, relative) {
|
||||
if (this.client.user.bot) {
|
||||
return Promise.reject(new Error('Setting guild position is only available for user accounts'));
|
||||
}
|
||||
return this.client.user.settings.setGuildPosition(this, position, relative);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow direct messages from guild members
|
||||
* @param {boolean} allow Whether to allow direct messages
|
||||
* @returns {Promise<Guild>}
|
||||
*/
|
||||
allowDMs(allow) {
|
||||
const settings = this.client.user.settings;
|
||||
if (allow) return settings.removeRestrictedGuild(this);
|
||||
else return settings.addRestrictedGuild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this Guild equals another Guild. It compares all properties, so for most operations
|
||||
* it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often
|
||||
|
|
|
|||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue