Open diamondburned opened 2 years ago
Would you be interested in implementing a Shard Manager for Disgo?
I don't use Disgo.
@switchupcb This is irrelevant to the issue so I'll try to keep it short, but do you have an intermediate format (like jsonschema) for your dasgo?
I'm been interested in generating the bulk of Arikawa's API structures, but a lot of it cannot be autogenerated using regular codegens, so I've been looking to write a custom solution that can generate code from some schema.
I am unfamiliar with jsonschema, but it provides metadata about the JSON object type. As a result, you are requesting a code generator that parses every dasgo
object and allows you to generate code based on the structs. copygen is a type-based code generator that allows you to specify types to parse, then create code generators for them accordingly.
If you need any more help, feel free to let me know.
As a result, you are requesting a code generator that parses every
dasgo
object and allows you to generate code based on the structs.
Ah well. I guess I have to parse the Go code, then. That's a bummer for me.
If you plan to use Dasgo let me know or add me on Discord. I will add your arikawa
maintainers to the maintainer list.
In v4, at the very least, shard.Manager should now be generic.
Since we already have an interface for it, we can do this:
It might also be worth to consider redesigning
Manager
to a single instance that exposes an event channel, then wrap it inside another instance that dispatches those events to each shard instance.We can then have state wrap the shard manager and provide its own states internally. This will avoid interfaces entirely.