Closed Forbidden-A closed 3 years ago
Hello, and thanks for opening an issue! As this is the first time you've created an issue on this repository, we'd just like to offer you a warm welcome to the project, and the following pointers:
Please provide as much information as possible when asking a question, reporting a problem, or submitting a feature request. This will help us to address your issue quickly and efficiently. If you forgot to add some information, no worries - feel free to edit the issue and add anything you missed!
Thanks for contacting us! If you have any further questions, please feel free to join us on Discord in the #dev-kotdis
channel (or #kordex-discussion
for Kord Extensions projects), or to contact a staff member directly.
This is a little trickier to solve than it first appears, as the bot's help is provided by the bundled HelpExtension
, which is intended to be entirely replaceable if it doesn't suit one's needs.
As I feel that it would be for the best if functionality like this didn't rely on a specific implementation of the help extension being present, the best approach may be to separate the help extension out from its logic - some sort of replaceable HelpProvider
, perhaps, and a help extension that can be extended somehow.
Does that sound like a good approach to you?
Actually, I just thought of an idea that may have more use-cases aside from this one - searching for a loaded extension (or a set of loaded extensions) based on type-checking. If a help extension uses a provided interface, then we can just search the loaded extensions for one that implements it.
It would be trivial for us to add an API wrapping this for extensions to send their own formatted help.
A HelpProvider
interface has been added, which needs to be implemented by all help extensions (the bundled one does this already). Additionally, the help extension has been refactored to provide a much more usable API.
This adds a sendHelp
function to the MessageCommandContext
objects that are bound to this
in message command action { }
blocks. Please try out the latest snapshot and let me know if this works how you'd like it to!
Have you had a chance to try this out yet? I'd love some feedback if so.
As the issue author has failed to respond in the last two weeks, I'm closing this issue under the assumption that the feature as implemented is sufficient.
If this isn't the case, open another issue.
As the issue author has failed to respond in the last two weeks, I'm closing this issue under the assumption that the feature as implemented is sufficient.
If this isn't the case, open another issue.
Yeah seems good, sorry I've been busy with family
Current Behaviour
There is no easy way to send help from a command action