Chew / JDA-Chewtils

Chew's fork of JDA-Applications/JDA-Utilities, with support for modern features such as Slash Commands, Context Menus, and more.
https://chew.pro/JDA-Chewtils
Apache License 2.0
73 stars 24 forks source link

Add a method to override in SlashCommand for auto-completion handling #92

Closed Andre601 closed 2 months ago

Andre601 commented 2 months ago

Issue Checklist

Affected Modules

Command

Description

The SlashCommand class should receive a method that the dev can override to handle a CommandAutoCompleteInteractionEvent (Quite a mouth full).

The reason for this is to cut down on extra checks the dev would need to do, to know what stuff they can or cannot return here.

Effectively, JDA-Chewtil can/should do the following:

From my thinking should this be possible technically... Just the child/sub-command (group) checking could be a bit more tricky here? Either way, I hope this can be considered, as checking X commands and command options yourself can become a tedious task in the end...

Chew commented 2 months ago

I'm confused, this isn't https://github.com/Chew/JDA-Chewtils/blob/master/command/src/main/java/com/jagrosh/jdautilities/command/SlashCommand.java#L155-L162 ? Or is it like that for more events?

Andre601 commented 2 months ago

Guess I didn't look close enough. My bad.