Skip to content

Commit d548a59

Browse files
authored
fix(Guild)!: Remove setting owner (#11068)
BREAKING CHANGE: Setting the owner of a guild is removed.
1 parent 5001897 commit d548a59

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

packages/discord.js/src/structures/Guild.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,6 @@ class Guild extends AnonymousGuild {
895895
* @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild
896896
* @property {number} [afkTimeout] The AFK timeout of the guild
897897
* @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon of the guild
898-
* @property {UserResolvable} [owner] The owner of the guild
899898
* @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild
900899
* @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild
901900
* @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild
@@ -947,7 +946,6 @@ class Guild extends AnonymousGuild {
947946
afkChannel,
948947
afkTimeout,
949948
icon,
950-
owner,
951949
splash,
952950
discoverySplash,
953951
banner,
@@ -969,7 +967,6 @@ class Guild extends AnonymousGuild {
969967
afk_channel_id: afkChannel && this.client.channels.resolveId(afkChannel),
970968
afk_timeout: afkTimeout,
971969
icon: icon && (await resolveImage(icon)),
972-
owner_id: owner && this.client.users.resolveId(owner),
973970
splash: splash && (await resolveImage(splash)),
974971
discovery_splash: discoverySplash && (await resolveImage(discoverySplash)),
975972
banner: banner && (await resolveImage(banner)),
@@ -1277,23 +1274,6 @@ class Guild extends AnonymousGuild {
12771274
return this.edit({ icon, reason });
12781275
}
12791276

1280-
/**
1281-
* Sets a new owner of the guild.
1282-
*
1283-
* @param {UserResolvable} owner The new owner of the guild
1284-
* @param {string} [reason] Reason for setting the new owner
1285-
* @returns {Promise<Guild>}
1286-
* @example
1287-
* // Edit the guild owner
1288-
* guild.setOwner(guild.members.cache.first())
1289-
* .then(guild => guild.fetchOwner())
1290-
* .then(owner => console.log(`Updated the guild owner to ${owner.displayName}`))
1291-
* .catch(console.error);
1292-
*/
1293-
async setOwner(owner, reason) {
1294-
return this.edit({ owner, reason });
1295-
}
1296-
12971277
/**
12981278
* Sets a new guild invite splash image.
12991279
*

packages/discord.js/typings/index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,6 @@ export class Guild extends AnonymousGuild {
14771477
): Promise<Guild>;
14781478
public setIcon(icon: Base64Resolvable | BufferResolvable | null, reason?: string): Promise<Guild>;
14791479
public setName(name: string, reason?: string): Promise<Guild>;
1480-
public setOwner(owner: UserResolvable, reason?: string): Promise<Guild>;
14811480
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
14821481
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
14831482
public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
@@ -6123,7 +6122,6 @@ export interface GuildEditOptions {
61236122
features?: readonly `${GuildFeature}`[];
61246123
icon?: Base64Resolvable | BufferResolvable | null;
61256124
name?: string;
6126-
owner?: UserResolvable;
61276125
preferredLocale?: Locale | null;
61286126
premiumProgressBarEnabled?: boolean;
61296127
publicUpdatesChannel?: TextChannelResolvable | null;

0 commit comments

Comments
 (0)