First of all, here's the link in case you don't care about the rest: https://github.com/Admicos/thatcord
So, I needed a Discord API library that worked with Futures 0.3 and Tokio 0.2 for another project I'm working on, so I decided to make my own.
Initially, this was going to be somewhat integrated to my project, but I realized I could extract it as a library, so it can be useful for more than just me.
Now, I am not the best at Rust, and in fact, I won't have any idea what I'm doing if the code involves more than just single-threaded, mixed procedural and OOP stuff. And now I am writing an async library with an event system based on a lot of hacks, with some macros to make it more straightforward, trying to shoehorn parts of OOP into Rust Traits.
I am 99% sure there is no substantial part in this library that can be considered idiomatic. So I require help.
How can I clean up this pile of spaghetti? What patterns/best practices can be applied to what parts? I have no clue.
Any feedback, as long as it's constructive, is appreciated.
tldr: code bad, how fix? thx