Skip to content
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

[do we need it?] particular button events ? #207

Open
ArnavK-09 opened this issue Mar 8, 2024 · 4 comments
Open

[do we need it?] particular button events ? #207

ArnavK-09 opened this issue Mar 8, 2024 · 4 comments

Comments

@ArnavK-09
Copy link
Contributor

ArnavK-09 commented Mar 8, 2024

instead of validating buttons with id and event type in events file
image

instead we can add buttons in following files with proper events!!

src/buttons/unban.ts

or

src/events/unban.button.ts

@Pkmmte
Copy link
Member

Pkmmte commented Mar 21, 2024

@ArnavK-09 Mmm, I'm not quite sure what you mean. Are you suggesting we place these button files inside the /src/buttons directory?

I'm not against it, but the reason we place these button callbacks in /src/events/interactionCreate is because they're all subsets of the interactionCreate Discord event. We'd still need to forward them somehow, preferably in a decentralized fashion.

@OfficialCRUGG
Copy link

OfficialCRUGG commented Apr 14, 2024

@Pkmmte Well, isn't that the same thing you do with slash commands already? They're also triggered by interactionCreate, but forwarded to the individual files in src/commands. A src/buttons is my number 1 feature request.

@Pkmmte
Copy link
Member

Pkmmte commented Apr 14, 2024

@OfficialCRUGG Ah, I understand what you both mean now. Yes, I think that'd be an excellent feature, especially if there's an automatic way to pass the state to those.

We'll definitely look into supporting this!

@ArnavK-09
Copy link
Contributor Author

Yup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants