mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs: deprecate setting owner
This commit is contained in:
@@ -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 });
|
||||
|
||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user