-
-
Notifications
You must be signed in to change notification settings - Fork 963
New command structure alpha #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MBoretto
merged 30 commits into
php-telegram-bot:develop
from
noplanman:new_command_structure_alpha
Feb 24, 2016
Merged
New command structure alpha #103
MBoretto
merged 30 commits into
php-telegram-bot:develop
from
noplanman:new_command_structure_alpha
Feb 24, 2016
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commands are split up into 3 categories: System, Admin and User. They can be overridden individually by custom command directories. STILL ALPHA STAGE!
Move start command to the system commands.
fix use command
Fix some documentation and error outputs.
Correct and complete a few docblocks.
Rewrite custom JSON input for debugging. Remove custom JSON input in handle() method. Fix issue that disabled or invalid commands died silently. Always output some "Command not found" message.
Remove $command from commands, not needed. Minor docblock corrections.
…ecuted command response. Fix getUpdate handler to incorporate new Update processing. execute() method for ALL commands must now return a ServerResponse object, not a bool!! handle() now returns a bool, handleGetUpdates() still returns a ServerResponse object.
…e loop. Set default log verbosity on object creation to prevent potentially overwriting the value when calling setLogRequests().
Fix missing namespace use.
Rename test Helpers class to TestHelpers.
@@ -10,16 +10,16 @@ | |||
* Written by Marco Boretto <[email protected]> | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command return ->isOk() insetad of serverResponse
Right you are, I missed that one, thanks! 😊 |
I also checked custom commands extension and everything works! well done man! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial PR to continue discussion started in #87
This PR needs a thorough code review first before being merged!
Summary of main changes
ServerResponse
object to offer more control after the command has executed (also used for testing commands).(For a more detailed list of changes, follow the thread in #87, especially this comment)