typings: Make activity name required (#9765)

* fix: activity name is required

* chore: add suggested changes

Co-authored-by: Aura Román <kyradiscord@gmail.com>

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
This commit is contained in:
Jaw0r3k 2023-08-12 13:12:33 +02:00 committed by GitHub
parent 346fa57f95
commit 0a9a3ede29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -1044,7 +1044,7 @@ export class ClientUser extends User {
public verified: boolean;
public edit(options: ClientUserEditOptions): Promise<this>;
public setActivity(options?: ActivityOptions): ClientPresence;
public setActivity(name: string, options?: ActivityOptions): ClientPresence;
public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
public setPresence(data: PresenceData): ClientPresence;
@ -4322,7 +4322,7 @@ export interface WebhookFields extends PartialWebhookFields {
export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
export interface ActivityOptions {
name?: string;
name: string;
url?: string;
type?: Exclude<ActivityType, ActivityType.Custom>;
shardId?: number | readonly number[];