AkaruiDevelopment / Zeneth

A Nodejs based Library for discord Api
https://akaruidevelopment.github.io/Zeneth/
Apache License 2.0
12 stars 0 forks source link

More like future coding advice #3

Closed YuzuTheNeko closed 8 months ago

YuzuTheNeko commented 1 year ago

The client handler is completely messy and overwhelmed as if it was all obfuscated into one file from multiple The classes... copying discord.js but even worse. The typings... really? Do deps really hurt that much that you prefer to write 500 types over just using discord-api-types I won't speak for the request handler, it already speaks for itself. As for the rest, I'd rather not look honestly. Hope you can take some feedback and improve this bul- "thing"

USERSATOSHI commented 1 year ago

The client handler is completely messy and overwhelmed as if it was all obfuscated into one file from multiple The classes... copying discord.js but even worse.

Client class has all the discord endpoints because classes are just helpers which can be opt in/out. by opting out, only client class will have to methods as the data received from other methods and events are basically Objects. If I was making classes have the methods of their route then at that point i would have used djs

The typings... really? Do deps really hurt that much that you prefer to write 500 types over just using discord-api-types

Well it covers all the documented properties/payloads but is missing the ones that aren't documented like for example in APIUser, banner_color, display_name , avatar_decoration (this one can be ignored as it was for 8th annversary) are missing same for other objects and if i have to extend them to add the undocumented props, then at point i am extending most of the typings anyway

I won't speak for the request handler, it already speaks for itself.

well it looks simpler and smaller to me, prob needs some comments but in nutshell it just checks if global quota or route quota exceeded then add to setTimeout else request the endpoint.

Hope you can take some feedback and improve this bul- "thing"

I am open for more feedback, if you are interested in sharing.