classes/RPGRollerBot.php
/**
	 * Execute the commands
	 *
	 * @return array
	 * @throws Exception
	 */
Execute the commands
@return array
@throws Exception
Execute the commands @return array @throws Exception
public function execCommand(){
		if(preg_match(self::LAUNCH_PATTERN, $this->text)){
			$response = $this->launchCommand();
		}
		elseif(preg_match('/^\\' . self::START_COMMAND . '/', $this->text)){
			$response = self::START_MESSAGE;
		}
		else{
			$response = $this->notUnderstandCommand();
		}
		return array(
			'chat_id'      => $this->chatId,
			'text'         => $response,
			'parse_mode'   => self::PARSE_MODE,
			'method'       => 'sendMessage',
			'reply_markup' => $this->getKeyboard()
		);
	}
public function execCommand ( ) { if ( preg_match ( self :: LAUNCH_PATTERN , $ this -> text ) ) { $ response = $ this -> launchCommand ( ) ; } elseif ( preg_match ( '/^\\' . self :: START_COMMAND . '/' , $ this -> text ) ) { $ response = self :: START_MESSAGE ; } else { $ response = $ this -> notUnderstandCommand ( ) ; } return array ( 'chat_id' => $ this -> chatId , 'text' => $ response , 'parse_mode' => self :: PARSE_MODE , 'method' => 'sendMessage' , 'reply_markup' => $ this -> getKeyboard ( ) ) ; }
Execute the commands
 @return array
 @throws Exception
Execute the commands @return array @throws Exception