You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command system, as of now, only supports SlashCommands. However, we slowly get more and more commands with a need to listen for any sort of events.
While we do favor offering specific solutions (SlashCommands, MessageListener, ...), we should also offer a catch-them-all solution where commands can just listen to all incoming JDA events. It should be well integrated with existing solutions, i.e. it should be possible to create a slash command that also receives all other events (for example if using the interfaces).
There is no need to put a lot of effort into the arbitrary event support, since it is only meant as backup solution in case we do not offer more concrete and specific support. Commands that need this are for example the mod audit system (#225 )
You mean addition of a class that extends both the SlashCommand thing and ListenerAdapter, and adding a class which contains a list of all EventListeners? This way it stays optional, and works with SlashCommand's
You mean addition of a class that extends both the SlashCommand thing and ListenerAdapter, and adding a class which contains a list of all EventListeners? This way it stays optional, and works with SlashCommand's
No, I would seperate it from SlashCommand. 2 separate interfaces and 2 separate adapters with 2 separate flows in the command system.
And if someone really needs, they can still create a class that implements both interfaces (and for example forwards to both adapters) but that will be custom then.
Basically, the command system should offer a way to register a EventListener and manage it accordingly (could be as simple as just jda.addEventListener(listener) in the command system). In parallel to the existing slash command setup.
Issue with this is that you'll get bad UX, you can't both use ListenerAdapter and the SlashCommand adapter
I do not think we will have a lot of people who need that both. But still, the crucial part is not that the adapter allow combination but that the interfaces do - and they do.
Our design is based on the interfaces; we are not forced to use the adapters.
Putting event-capabilities into slash commands would mean you overload the class/interface with more and more stuff that regular users, such as /ping or similar just never asked for, which is equally not good.
Activity
github-actions commentedon Dec 17, 2021
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Zabuzard commentedon Dec 17, 2021
This is actually still relevant, we need it at some point.
github-actions commentedon Jan 17, 2022
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Tais993 commentedon Jan 17, 2022
How would you see it exactly implemented then?
You mean addition of a class that extends both the SlashCommand thing and ListenerAdapter, and adding a class which contains a list of all EventListeners? This way it stays optional, and works with SlashCommand's
Zabuzard commentedon Jan 17, 2022
No, I would seperate it from
SlashCommand. 2 separate interfaces and 2 separate adapters with 2 separate flows in the command system.And if someone really needs, they can still create a class that implements both interfaces (and for example forwards to both adapters) but that will be custom then.
Zabuzard commentedon Jan 17, 2022
Basically, the command system should offer a way to register a
EventListenerand manage it accordingly (could be as simple as justjda.addEventListener(listener)in the command system). In parallel to the existing slash command setup.Tais993 commentedon Jan 17, 2022
Issue with this is that you'll get bad UX, you can't both use ListenerAdapter and the SlashCommand adapter
Zabuzard commentedon Jan 17, 2022
I do not think we will have a lot of people who need that both. But still, the crucial part is not that the adapter allow combination but that the interfaces do - and they do.
Our design is based on the interfaces; we are not forced to use the adapters.
Putting event-capabilities into slash commands would mean you overload the class/interface with more and more stuff that regular users, such as
/pingor similar just never asked for, which is equally not good.