/**
* @param Message $message
* @return string
*/
public function execute(Message $message)
{
$commandName = explode(' ', $message->getText())[0];
if ($this->isCommandNative($commandName)) {
return $this->processNativeCommands($commandName);
}
if ($this->isCommandExists($commandName)) {
$command = $this->commandList[$commandName];
return $command->execute($message);
} else {
return sprintf("Command '%s' is not exists.", $commandName);
}
}