function fetchInvites() {
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) {
            $this->client->apimanager()->endpoints->channel->getChannelInvites($this->id)->done(function ($data) use ($resolve) {
                $collection = new \CharlotteDunois\Collect\Collection();
                
                foreach($data as $invite) {
                    $inv = new \CharlotteDunois\Yasmin\Models\Invite($this->client, $invite);
                    $collection->set($inv->code, $inv);
                }
                
                $resolve($collection);
            }, $reject);
        }));
    }
function fetchInvites() {
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) {
            $this->client->apimanager()->endpoints->channel->getChannelInvites($this->id)->done(function ($data) use ($resolve) {
                $collection = new \CharlotteDunois\Collect\Collection();
                
                foreach($data as $invite) {
                    $inv = new \CharlotteDunois\Yasmin\Models\Invite($this->client, $invite);
                    $collection->set($inv->code, $inv);
                }
                
                $resolve($collection);
            }, $reject);
        }));
    }
function fetchInvites ( ) { return ( new \ React \ Promise \ Promise ( function ( callable $ resolve , callable $ reject ) { $ this -> client -> apimanager ( ) -> endpoints -> channel -> getChannelInvites ( $ this -> id ) -> done ( function ( $ data ) use ( $ resolve ) { $ collection = new \ CharlotteDunois \ Collect \ Collection ( ) ; foreach ( $ data as $ invite ) { $ inv = new \ CharlotteDunois \ Yasmin \ Models \ Invite ( $ this -> client , $ invite ) ; $ collection -> set ( $ inv -> code , $ inv ) ; } $ resolve ( $ collection ) ; } , $ reject ) ; } ) ) ; }
Fetches all invites of this channel. Resolves with a Collection of Invite instances, mapped by their code.
@return \React\Promise\ExtendedPromiseInterface
@see \CharlotteDunois\Yasmin\Models\Invite
Fetches all invites of this channel . Resolves with a Collection of Invite instances mapped by their code .