fix(Guild)!: Remove setting owner (#11068)

BREAKING CHANGE: Setting the owner of a guild is removed.
This commit is contained in:
Jiralite
2025-08-29 14:12:14 +04:00
committed by GitHub
parent 50018979ed
commit d548a5911e
2 changed files with 0 additions and 22 deletions

View File

@@ -895,7 +895,6 @@ class Guild extends AnonymousGuild {
* @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild
* @property {number} [afkTimeout] The AFK timeout of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon of the guild
* @property {UserResolvable} [owner] The owner of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild
@@ -947,7 +946,6 @@ class Guild extends AnonymousGuild {
afkChannel,
afkTimeout,
icon,
owner,
splash,
discoverySplash,
banner,
@@ -969,7 +967,6 @@ class Guild extends AnonymousGuild {
afk_channel_id: afkChannel && this.client.channels.resolveId(afkChannel),
afk_timeout: afkTimeout,
icon: icon && (await resolveImage(icon)),
owner_id: owner && this.client.users.resolveId(owner),
splash: splash && (await resolveImage(splash)),
discovery_splash: discoverySplash && (await resolveImage(discoverySplash)),
banner: banner && (await resolveImage(banner)),
@@ -1277,23 +1274,6 @@ class Guild extends AnonymousGuild {
return this.edit({ icon, reason });
}
/**
* Sets a new owner of the guild.
*
* @param {UserResolvable} 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);
*/
async setOwner(owner, reason) {
return this.edit({ owner, reason });
}
/**
* Sets a new guild invite splash image.
*

View File

@@ -1477,7 +1477,6 @@ export class Guild extends AnonymousGuild {
): Promise<Guild>;
public setIcon(icon: Base64Resolvable | BufferResolvable | null, reason?: string): Promise<Guild>;
public setName(name: string, reason?: string): Promise<Guild>;
public setOwner(owner: UserResolvable, reason?: string): Promise<Guild>;
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
@@ -6123,7 +6122,6 @@ export interface GuildEditOptions {
features?: readonly `${GuildFeature}`[];
icon?: Base64Resolvable | BufferResolvable | null;
name?: string;
owner?: UserResolvable;
preferredLocale?: Locale | null;
premiumProgressBarEnabled?: boolean;
publicUpdatesChannel?: TextChannelResolvable | null;