defstudio / telegraph

Telegraph is a Laravel package for fluently interacting with Telegram Bots
MIT License
697 stars 118 forks source link

Request for Guidance on Achieving a Suitable Structure #637

Closed Amirhossein256 closed 2 months ago

Amirhossein256 commented 2 months ago

I'm in the process of developing a bot with a relatively large number of features, and I'm in need of a better and more organized structure to handle all the requests. I want to ensure that operations are separated, so I don't have to write everything in a single file.

I have attempted to implement architectures like the Command Pattern to manage the separation of concerns, but I encountered issues with dependency injection and sharing common methods across all classes. It seems that I might not be using the most suitable pattern for this case.

Could anyone suggest an appropriate structure or pattern that would help manage these operations more effectively?