robo.js icon indicating copy to clipboard operation
robo.js copied to clipboard

[do we need it?] particular button events ?

Open ArnavK-09 opened this issue 1 year ago • 4 comments

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

ArnavK-09 avatar Mar 08 '24 14:03 ArnavK-09

@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.

Pkmmte avatar Mar 21 '24 07:03 Pkmmte

@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.

OfficialCRUGG avatar Apr 14 '24 21:04 OfficialCRUGG

@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!

Pkmmte avatar Apr 14 '24 21:04 Pkmmte

Yup

ArnavK-09 avatar Apr 15 '24 08:04 ArnavK-09

Discussed in discord

Also just realised there is template to reach similiar results

https://github.com/Wave-Play/robo.js/tree/main/templates%2Fdiscord-bots%2Fmrjawesome-dev-toolkit-js

ArnavK-09 avatar Oct 27 '24 19:10 ArnavK-09