You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the problem you are having in as much detail as possible:
I'm working on a Discord bot, and of course my IDE uses index.d.ts to autocomplete a lot of things. The problem is that the available TypeScript types are lacking the actual functionality of the library.
Example:
/* in index.d.ts */interfaceActivityOptions{name?: string;url?: string;type?: ActivityType|number;shardID?: number|number[];}
I'm sure some of these properties are not intended to set externally, but I can now figure out how to set a custom status from neither the documentation nor the TypeScript declarations.
Further details:
discord.js version: v12.2.0
Node.js version: v14.x
Operating system: Windows / Ubuntu
Priority this issue should have: high
I have also tested the issue on latest master, commit hash:
The text was updated successfully, but these errors were encountered:
That's because you cannot set a custom status for bots, which is why those properties are not part of the ActivityOptions type definition for setting activities.
You can, however, read the custom status of Users, which is why those properties are part of the definition of an Activity. These are constructed from PRESENCE_UPDATE events received from the gateway.
No functionality or typings here are incorrect, and the functionality you describe isn't documented because it doesn't exist.
Please describe the problem you are having in as much detail as possible:
I'm working on a Discord bot, and of course my IDE uses
index.d.ts
to autocomplete a lot of things. The problem is that the available TypeScript types are lacking the actual functionality of the library.Example:
vs
I'm sure some of these properties are not intended to set externally, but I can now figure out how to set a custom status from neither the documentation nor the TypeScript declarations.
Further details:
The text was updated successfully, but these errors were encountered: