Why is ButtonInteraction#constructor private? #7870
-
Hey, I'm domain typing my application and it so happens that whenever an interaction of type button and a given id occurs, the message acted upon will always have the same structure. I consider the embeds and their many different components a domain view that I present to my users: they are structured in classes that I serialize to at the controller level to easily operate. These days I have been trying to type my ButtonInteractions, and I cannot as the constructor is private and I need a runtime reference for my DI. Are there any specific reasons why this is an exception over the other type of interactions? The SlashCommands' one is public as an example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You shouldn't instantiate a ButtonInteraction yourself, that's why the constructor is private. |
Beta Was this translation helpful? Give feedback.
You shouldn't instantiate a ButtonInteraction yourself, that's why the constructor is private.