mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03: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 {GuildMemberResolvable} owner The new owner of the guild
|
||||||
* @param {string} [reason] Reason for setting the new owner
|
* @param {string} [reason] Reason for setting the new owner
|
||||||
* @returns {Promise<Guild>}
|
* @returns {Promise<Guild>}
|
||||||
* @example
|
* @deprecated API related to guild ownership may no longer be used.
|
||||||
* // 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);
|
|
||||||
*/
|
*/
|
||||||
setOwner(owner, reason) {
|
setOwner(owner, reason) {
|
||||||
return this.edit({ 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>;
|
): Promise<Guild>;
|
||||||
public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
||||||
public setName(name: string, 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 setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
|
||||||
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
|
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
|
||||||
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
|
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
|
||||||
|
|||||||
Reference in New Issue
Block a user