Slack\RealTimeClient::getBotById PHP Méthode

getBotById() public méthode

Gets a bot by its ID.
public getBotById ( string $id ) : React\Promise\PromiseInterface
$id string A bot ID.
Résultat React\Promise\PromiseInterface A promise for a bot object.
    public function getBotById($id)
    {
        if (!$this->connected) {
            return Promise\reject(new ConnectionException('Client not connected. Did you forget to call `connect()`?'));
        }
        if (!isset($this->bots[$id])) {
            return Promise\reject(new ApiException("No bot exists for ID '{$id}'."));
        }
        return Promise\resolve($this->bots[$id]);
    }