getMessage(); $user_id = $message->getFrom()->getId(); $command = $message->getCommand(); // To enable proper use of the /whois command. // If the user is an admin and the command is in the format "/whoisXYZ", call the /whois command if (stripos($command, 'whois') === 0 && $this->telegram->isAdmin($user_id)) { return $this->telegram->executeCommand('whois'); } return $this->replyToChat("Command /{$command} not found.. :("); } }