Hello everyone,
I'm exploring ways to implement different callbacks for the same button functionality. Let me elaborate.
I've developed a view class to generate custom embeds, which I intend to use across multiple cogs for various purposes such as creating welcome messages, leave messages, and more. However, instead of duplicating the entire class just to modify the finish button behavior, I'm seeking a more efficient approach.
My current plan involves passing the callback function as an argument. Then, within the finish_callback method, I'll execute this function to dynamically change the view based on the provided functionality. Specifically, I'll pass the callback function as an argument, and then invoke it within the finish_callback method using await func(interaction).
I'm open to suggestions for better approaches or improvements. Any insights would be greatly appreciated!