-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[STABLE] Adds the remaining final touches to stable version. #17
Conversation
Native interceptors are interceptors baked into the framework itself that are auto-prepended by the dispatcher, this helps us reduce a lot of duplicate handling especially for deferring, etc.
This feature doesn't support updating at the moment as the latest non-snapshot version of Javacord doesn't contain the update method, it's under the next release though.
This adds additional support for non-Nexus application commands to be bulk-overwritten, as the bulk overwrite methods tend to overwrite everything, which includes non-slash, this becomes a problem that needs some solution.
This commit adds a new reflection engine that is agnostic, allowing us to be able to use it for other future classes such as user and message context menus, etc. that are not just `NexusCommand`. The new reflection engine is also written in Kotlin, but uses the same Java Reflection, enabling more readability and cleanliness. This also adds a new `@Uuid` annotation that is used to figure out which field is the origin Uuid field of the reference class.
|
After some little work, I've noticed that By overidding the |
Nexus now natively supports user and message context menus. To get started, simply create a new class or object that inherits the object TestUserContextMenu: NexusUserContextMenu() {
val name = "test"
override fun onEvent(event: NexusContextMenuEvent<UserContextMenuCommandEvent, UserContextMenuInteraction>) {
event.respondNowEphemerallyWith("Hello")
}
}
object TestMessageContextMenu: NexusMessageContextMenu() {
val name = "test"
override fun onEvent(event: NexusContextMenuEvent<MessageContextMenuCommandEvent, MessageContextMenuInteraction>) {
event.respondNowEphemerallyWith("Hello")
}
} To register them, simply use the Nexus.contextMenus(TestUserContextMenu, TestMessageContextMenu) We do not have support for afterwares and middlewares for context menus as we have no simpler middle between the two events. Additionally, to prevent something crazy, context menus are not included in the |
…en inheritance system
It's almost time for Nexus 1.0, the following additional changes have been made:
And some more stability and maintainability changes. Note that this change will introduce quite a lot of breaking changes that will need a lot of work, but it is for the sake of keeping the API more consistent. |
|
Nexus 1.0 has been long overdue, and we need to make the final touches, which includes making sure everything is performant, stable, and complete, we need to simplify things a lot, such as:
Currently, this pull request includes multiple breaking changes and will involve massive changes, which need to be tested in-depth, therefore, it is separate from
1.0.0-beta
to allow the branch to be updated in case of major required fixes.