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
{{ message }}
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
I think it's could be nice to split this event in two like (feel free to change event's name)
client.on("interaction",(interaction)=>{//Switch statement with interaction.type or things like that});client.on("command",(interaction: CommandInteraction)=>{client.executeSlash(interaction);});client.on("button",(interaction: ButtonInteraction)=>{client.executeButton(interaction);});
Proposal 2 - Create a decorator @Button('customID')
Like @slash, it could be nice to create a decorator to handle ButtonInterraction
@Discord()abstractclassButtonExample{//param is customID, see https://discord.js.org/#/docs/main/master/class/ButtonInteraction?scrollTo=customID
@Button('buttonExample-1')//@Guard(...)privatebuttonExample1(interaction: ButtonInteraction){//...}}
The text was updated successfully, but these errors were encountered:
Hi, this is a proposal to use MessageComponents like Buttons easier like Slash commands are easier with decorators.
I'm not a English native, sorry if some explanation are weird or something like that.
Proposal 1 - Split
interaction
event in twoFor now interaction are handle like this
But
interaction
can be CommandInteraction or ButtonInteraction.I think it's could be nice to split this event in two like (feel free to change event's name)
Proposal 2 - Create a decorator
@Button('customID')
Like @slash, it could be nice to create a decorator to handle ButtonInterraction
The text was updated successfully, but these errors were encountered: