kord icon indicating copy to clipboard operation
kord copied to clipboard

Custom Gateway interface / FixedShardGateway class?

Open auguwu opened this issue 2 years ago • 2 comments

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.

auguwu avatar Nov 16 '21 02:11 auguwu

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.

HopeBaron avatar Nov 16 '21 03:11 HopeBaron

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

auguwu avatar Nov 16 '21 04:11 auguwu