src/ApiClient.php
public function getChannelGroupOrDMByID($id)
    {
        if ($id[0] === 'D') {
            return $this->getDMById($id);
        }

        if ($id[0] === 'G') {
            return $this->getGroupById($id);
        }

        return $this->getChannelById($id);
    }
public function getChannelGroupOrDMByID($id)
    {
        if ($id[0] === 'D') {
            return $this->getDMById($id);
        }

        if ($id[0] === 'G') {
            return $this->getGroupById($id);
        }

        return $this->getChannelById($id);
    }
public function getChannelGroupOrDMByID ( $ id ) { if ( $ id [ 0 ] === 'D' ) { return $ this -> getDMById ( $ id ) ; } if ( $ id [ 0 ] === 'G' ) { return $ this -> getGroupById ( $ id ) ; } return $ this -> getChannelById ( $ id ) ; }
Gets a channel, group, or DM channel by ID.

@param string $id The channel ID.

@return \React\Promise\PromiseInterface A promise for a channel interface.
Gets a channel group or DM channel by ID .