Closed Bogdaan closed 8 years ago
Thanks a lot for your input! This library is still very much a work in progress 😃
You're absolutely right, that certain coupling needs to be loosened and put into different classes/objects, separating the logic better.
Do One Thing and Do It Well
We're getting there 🙏
@noplanman First, thanks for responce.
And one more item:
Why "wether" and other predefined commands exist in each telegram bot? Why I can not disable it (without fork)?
Code: https://github.com/akalongman/php-telegram-bot/blob/master/src/Telegram.php#L380
Problem: https://github.com/akalongman/php-telegram-bot/tree/master/src/Commands/UserCommands
I could help "clean up" api.
As it is now, you can create dummy commands to disable the default ones. Look here.
You could also just delete all custom ones directly from the library, which you would have to redo when you update the library.
@Bogdaan thank you for constructive critic. I agree with your remarks. It means here is lot of work to do :) Your or any other's help will be very welcomed
@noplanman @akalongman thanks for reply, after several hours of coding, i found that this bot is great for "getUpdates" logic (not webhook).
So this bot:
So i close this issue.
i found that this bot is great for "getUpdates" logic (not webhook).
Please do elaborate on this, as I have had no issues with the Webhook so far. What defines "a good bot for Webhook" in your opinion?
not works as "lib" (you need fork && modify)
We're working on this, to make it easier to extend without needing to modify the core!
Hi all, after minimal inspection of the source code, i found two things:
Source files:
does not contain any "api-features". May be better put this logic in separate repository (as plugin).
Expected behaviour
Clear api. _Do One Thing and Do It Well_
Actual behaviour
Mixed api and application domain logic.