Open Andre601 opened 4 years ago
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.
I'd probably just add lucko/LuckPerms as a submodule and use a package like this
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.