Why is ActivityType.Custom excluded from the presence ActivityOptions[]?

See code here in index.d.ts:
export interface ActivityOptions {
name?: string;
url?: string;
type?: Exclude<ActivityType, ActivityType.Custom>;
shardId?: number | readonly number[];
}
export interface ActivityOptions {
name?: string;
url?: string;
type?: Exclude<ActivityType, ActivityType.Custom>;
shardId?: number | readonly number[];
}
Solution:
Update: the exclusion has been removed and typescript is no longer mad at me. ```ts export interface ActivityOptions { name: string; state?: string;...
Jump to solution
3 Replies
Favna
Favna7mo ago
This is not sapphire related. These types come from DiscordJS. Bots cannot have custom statuses.
moosee
mooseeOP7mo ago
That must've changed recently as all of my bots have had custom statuses for the last 8 or so months
Solution
moosee
moosee7mo ago
Update: the exclusion has been removed and typescript is no longer mad at me.
export interface ActivityOptions {
name: string;
state?: string;
url?: string;
type?: ActivityType;
shardId?: number | readonly number[];
}
export interface ActivityOptions {
name: string;
state?: string;
url?: string;
type?: ActivityType;
shardId?: number | readonly number[];
}
Very confusing what that was all about! The bots worked fine either way but I never like seeing red in my IDE

Did you find this page helpful?