Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Updated Message Object Phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasss93 committed Jan 24, 2017
1 parent 8a6c0d7 commit 0c7f021
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Framework for Telegram Bot API",
"license": "MIT",
"type": "project",
"version": "1.0.0",
"version": "1.0.1",
"authors": [
{
"name": "Luca Patera",
Expand Down
12 changes: 12 additions & 0 deletions src/Types/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ class Message
public $pinned_message;


/**
* Returns only the command string without @BotUsername
* Example:
* IN: /hello@MyDearBot
* OUT: /hello
* @return string
*/
public function getCommand()
{
if($this->text!==null)
Expand All @@ -120,6 +127,11 @@ public function getCommand()
return null;
}

/**
* Returns the args as array or as string
* @param bool $asString
* @return array|string
*/
public function getArgs($asString=false)
{
if($this->text!==null)
Expand Down

0 comments on commit 0c7f021

Please sign in to comment.