chore: Miscellaneous fixes
#9271 djs > Backports the following pull requests to version 13: > > * docs: describe private properties #8879 > * fix(snowflake): snowflakes length #9144 > * fix(Message): `bulkDeletable` permissions should be retrieved later for DMs #9146 > * fix(Message#editable): update editable check in threads locked #9216 > * fix: add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` #9219 > * fix(AutocompleteInteraction): Send `name_localizations` correctly #9238 > * fix(ThreadManager): Respect `cache` and `force` in fetching #9239 > * docs(FetchArchivedThreadOptions): `before` respects `archive_timestamp`, not creation timestamp #9240 > * refactor(FetchThreadsOptions): Remove `active` #9241 > * docs: differ `User#send` #9251 > * docs: add more examples #9252 > * fix(ClientUser): No mutation on edit #9259 > * fix: resolving string bitfield #9262 > * refactor: call `GuildBanManager#create()` directly #9263 > * docs(Role): Fix example for `comparePositionTo()` #9270 > * docs: fix compare position example #9272 > * fix: Keep symbols in actions manager #9293
This commit is contained in:
@@ -769,9 +769,6 @@ class Guild extends AnonymousGuild {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
async fetchVanityData() {
|
||||
if (!this.features.includes('VANITY_URL')) {
|
||||
throw new Error('VANITY_URL');
|
||||
}
|
||||
const data = await this.client.api.guilds(this.id, 'vanity-url').get();
|
||||
this.vanityURLCode = data.code;
|
||||
this.vanityURLUses = data.uses;
|
||||
@@ -1462,7 +1459,7 @@ class Guild extends AnonymousGuild {
|
||||
* @example
|
||||
* // Leave a guild
|
||||
* guild.leave()
|
||||
* .then(g => console.log(`Left the guild ${g}`))
|
||||
* .then(guild => console.log(`Left the guild ${guild.name}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
async leave() {
|
||||
@@ -1488,7 +1485,7 @@ class Guild extends AnonymousGuild {
|
||||
* @example
|
||||
* // Delete a guild
|
||||
* guild.delete()
|
||||
* .then(g => console.log(`Deleted the guild ${g}`))
|
||||
* .then(guild => console.log(`Deleted the guild ${guild.name}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
async delete() {
|
||||
@@ -1634,9 +1631,6 @@ class Guild extends AnonymousGuild {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
async setVanityCode(code = '') {
|
||||
if (!this.features.includes('VANITY_URL')) {
|
||||
throw new Error('VANITY_URL');
|
||||
}
|
||||
if (typeof code !== 'string') throw new TypeError('INVALID_VANITY_URL_CODE');
|
||||
const data = await this.client.api.guilds(this.id, 'vanity-url').patch({
|
||||
data: { code },
|
||||
|
||||
Reference in New Issue
Block a user