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

Add a !docs command #13

Open
Andre601 opened this issue Jan 7, 2020 · 2 comments
Open

Add a !docs command #13

Andre601 opened this issue Jan 7, 2020 · 2 comments

Comments

@Andre601
Copy link
Contributor

Andre601 commented Jan 7, 2020

The Discord could really benefit from Clippy having a !docs command

This command would essentially search the LuckPerms Javadoc for the provided info and returns whatever it can find for it.


Example

Running !docs NodeAddEvent#getNode() would give the below output (as Embed)

@NonNull NodeAddEvent#getNode() : Node
Gets the node that was added

Returns:
The node that was added


Issues/Downsides

The Javadocs are built agains Java 8.
This comes with the issue, that the URL won't reflect the current class/method being selected.
For example, would the above example still display the URL as https://javadoc.io/doc/net.luckperms/api/latest/index.html while it should preferably display as https://javadoc.io/doc/net.luckperms/api/latest/net/luckperms/api/event/node/NodeAddEvent.html#getNode() since this is a more reliable and shareable link.

@Andre601
Copy link
Contributor Author

From what I understand could the bot download the latest LuckPerms API jar from jenkins and extract the required information from it.

This is what JDAButler does (afaik) in the JDA Discord:
https://github.com/Almighty-Alpaca/JDA-Butler

This still won't solve the issue that the Javadocs are build against Java 8, meaning that the URL won't update based on what class/method was selected.
This should really be improved.

@Turbotailz
Copy link
Member

I'd probably just add lucko/LuckPerms as a submodule and use a package like this

https://www.npmjs.com/package/javadoc

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