Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions packages/discord.js/src/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -947,7 +946,6 @@ class Guild extends AnonymousGuild {
afkChannel,
afkTimeout,
icon,
owner,
splash,
discoverySplash,
banner,
Expand All @@ -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)),
Expand Down Expand Up @@ -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.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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;
Expand Down