Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Gateway interface / FixedShardGateway class? #445

Open
auguwu opened this issue Nov 16, 2021 · 2 comments
Open

Custom Gateway interface / FixedShardGateway class? #445

auguwu opened this issue Nov 16, 2021 · 2 comments

Comments

@auguwu
Copy link

auguwu commented Nov 16, 2021

At the moment, Kord only implements the MasterGateway:
https://github.com/kordlib/kord/blob/0.8.x/core/src/main/kotlin/builder/kord/KordBuilder.kt#L229-L240

But, could there be a option for a DSL block to implement its own way to get the gateway, i.e:

val kord = Kord {
   gateway {
      SomeCustomGateway()
   }
}

In which, SomeCustomGateway inherits from the Gateway interface.

Also, could there be a new Gateway class for a fixed amount of shards, probably named FixedShardGateway? Or a better name if suggested, in which, you can link it to the gateway DSL block. This can probably be linked with the multi-process issue (#7).

If you don't plan to let users create a custom gateway for Kord, that's completely fine and it can be closed if there is any issues with it.

@HopeBaron
Copy link
Member

Thanks for opening the issue.
Yes, we do plan to change how gateways work in general. So we will have time to look at your request from a better perspective by then.

@auguwu
Copy link
Author

auguwu commented Nov 16, 2021

Thanks for the comment and can't wait for the gateway rework! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants