src/ApiClient.php
public function getDMById($id)
    {
        return $this->getDMs()->then(function (array $dms) use ($id) {
            foreach ($dms as $dm) {
                if ($dm->getId() === $id) {
                    return $dm;
                }
            }

            throw new ApiException('DM ' . $id . ' not found.');
        });
    }
public function getDMById($id)
    {
        return $this->getDMs()->then(function (array $dms) use ($id) {
            foreach ($dms as $dm) {
                if ($dm->getId() === $id) {
                    return $dm;
                }
            }

            throw new ApiException('DM ' . $id . ' not found.');
        });
    }
public function getDMById ( $ id ) { return $ this -> getDMs ( ) -> then ( function ( array $ dms ) use ( $ id ) { foreach ( $ dms as $ dm ) { if ( $ dm -> getId ( ) === $ id ) { return $ dm ; } } throw new ApiException ( 'DM ' . $ id . ' not found.' ) ; } ) ; }
Gets a direct message channel by its ID.

@param string $id A DM channel ID.

@return \React\Promise\PromiseInterface A promise for a DM object.
Gets a direct message channel by its ID .