Open not-so-smart opened 3 years ago
Some properties on the Client object (Client.user) rely on asynchronous operations (fetching /users/me).
Client
Client.user
/users/me
Perhaps making the constructor private and providing an async function that returns a new Client object would be a better idea?
This way, all properties on the Client object can be definitely assigned in the constructor. (no more unnecessary ? types)
?
Some properties on the
Client
object (Client.user
) rely on asynchronous operations (fetching/users/me
).Perhaps making the constructor private and providing an async function that returns a new Client object would be a better idea?
This way, all properties on the
Client
object can be definitely assigned in the constructor. (no more unnecessary?
types)