Skip to content

Conversation

noplanman
Copy link
Member

This PR passes all methods called from a Command to the current Update object.

Just like $this->getMessage() worked as before, now all other types work too:
from within a Command's example() method

  • $this->getMessage()
  • $this->getEditedMessage()
  • $this->getChannelPost()
  • $this->getEditedChannelPost()
  • $this->getInlineQuery()
  • $this->getChosenInlineResult()
  • $this->getCallbackQuery()

@noplanman noplanman requested a review from jacklul July 5, 2017 22:07
…he command class.

This makes accessing the required Entity objects much easier.
@noplanman noplanman force-pushed the command_update_method_shortcuts branch from 9b3b6bc to 59fe4b2 Compare July 5, 2017 22:13
@noplanman noplanman merged commit e50dc96 into php-telegram-bot:develop Jul 9, 2017
@noplanman noplanman deleted the command_update_method_shortcuts branch July 9, 2017 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants