diff --git a/packages/discord.js/src/structures/ClientUser.js b/packages/discord.js/src/structures/ClientUser.js index 040e732910c2..3e1a2b10ef92 100644 --- a/packages/discord.js/src/structures/ClientUser.js +++ b/packages/discord.js/src/structures/ClientUser.js @@ -98,7 +98,7 @@ class ClientUser extends User { /** * Options for setting activities * @typedef {Object} ActivitiesOptions - * @property {string} [name] Name of the activity + * @property {string} name Name of the activity * @property {ActivityType} [type] Type of the activity * @property {string} [url] Twitch / YouTube stream URL */ @@ -149,7 +149,7 @@ class ClientUser extends User { /** * Options for setting an activity. * @typedef {Object} ActivityOptions - * @property {string} [name] Name of the activity + * @property {string} name Name of the activity * @property {string} [url] Twitch / YouTube stream URL * @property {ActivityType} [type] Type of the activity * @property {number|number[]} [shardId] Shard Id(s) to have the activity set on @@ -157,7 +157,7 @@ class ClientUser extends User { /** * Sets the activity the client user is playing. - * @param {string|ActivityOptions} [name] Activity being played, or options for setting the activity + * @param {string|ActivityOptions} name Activity being played, or options for setting the activity * @param {ActivityOptions} [options] Options for setting the activity * @returns {ClientPresence} * @example diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 2504625c7f14..9b13c11eb558 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1044,7 +1044,7 @@ export class ClientUser extends User { public verified: boolean; public edit(options: ClientUserEditOptions): Promise; public setActivity(options?: ActivityOptions): ClientPresence; - public setActivity(name: string, options?: ActivityOptions): ClientPresence; + public setActivity(name: string, options?: Omit): ClientPresence; public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence; public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise; public setPresence(data: PresenceData): ClientPresence; @@ -4322,7 +4322,7 @@ export interface WebhookFields extends PartialWebhookFields { export type ActivitiesOptions = Omit; export interface ActivityOptions { - name?: string; + name: string; url?: string; type?: Exclude; shardId?: number | readonly number[];