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 documentation "items" #16

Open
Arteneko opened this issue Aug 29, 2019 · 4 comments
Open

Custom documentation "items" #16

Arteneko opened this issue Aug 29, 2019 · 4 comments

Comments

@Arteneko
Copy link

I have a custom handler that handles a set of "formats".

I'd like to document them.

In bot.clj I found about register-extension-docs!, which seems to be for this exact purpose, but... How do one actually use it?

I tried a primitive code with typings as (register-extension-docs! "" "") (with actual values), but I get a HTTP 400 error, with the following body:

:body "{\"embed\": [\"fields\"]}"
@gizmo385
Copy link
Owner

gizmo385 commented Sep 2, 2019

The current use register-extension-docs! is inside of the defextension macro. It takes the keyword of the extension name as the argument and a string for documentation as the second argument.

If you're trying to add documentation to one of your extensions, that is something that is supported by the defextension macro and you could add the documentation for the formats there. See the admin extension as an example where both the extension and the subcommands within the extension are documented.

@Arteneko
Copy link
Author

Arteneko commented Sep 2, 2019

I'm building a raw message handler, and not an extension, is that still applicable?

@gizmo385
Copy link
Owner

gizmo385 commented Sep 3, 2019

Ahhhh I see. Raw message handlers aren't integrated into the documentation system in the same way that extensions and commands are. Changes could be made to include those in the documentation, but since they aren't invoked in the same way that extensions/commands are, it might be prudent do separate them from the standard documentation in the output.

@Arteneko
Copy link
Author

Arteneko commented Sep 3, 2019

Having a way to add some content to embed to the help embed would be nice, especially if it's a custom "command" filter, which would just add some "commands" or keywords.

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