docs: deprecate setting owner

This commit is contained in:
Jiralite
2025-08-29 10:51:13 +01:00
parent 6fb0b1cef6
commit 740da4ce5e
2 changed files with 2 additions and 6 deletions

View File

@@ -1197,12 +1197,7 @@ class Guild extends AnonymousGuild {
* @param {GuildMemberResolvable} owner The new owner of the guild
* @param {string} [reason] Reason for setting the new owner
* @returns {Promise<Guild>}
* @example
* // Edit the guild owner
* guild.setOwner(guild.members.cache.first())
* .then(guild => guild.fetchOwner())
* .then(owner => console.log(`Updated the guild owner to ${owner.displayName}`))
* .catch(console.error);
* @deprecated API related to guild ownership may no longer be used.
*/
setOwner(owner, reason) {
return this.edit({ owner, reason });

View File

@@ -1671,6 +1671,7 @@ export class Guild extends AnonymousGuild {
): Promise<Guild>;
public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
public setName(name: string, reason?: string): Promise<Guild>;
/** @deprecated API related to guild ownership may no longer be used. */
public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;