function fetchWebhooks() {
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) {
            $this->client->apimanager()->endpoints->webhook->getChannelWebhooks($this->id)->done(function ($data) use ($resolve) {
                $collect = new \CharlotteDunois\Collect\Collection();
                
                foreach($data as $web) {
                    $hook = new \CharlotteDunois\Yasmin\Models\Webhook($this->client, $web);
                    $collect->set($hook->id, $hook);
                }
                
                $resolve($collect);
            }, $reject);
        }));
    }
function fetchWebhooks() {
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) {
            $this->client->apimanager()->endpoints->webhook->getChannelWebhooks($this->id)->done(function ($data) use ($resolve) {
                $collect = new \CharlotteDunois\Collect\Collection();
                
                foreach($data as $web) {
                    $hook = new \CharlotteDunois\Yasmin\Models\Webhook($this->client, $web);
                    $collect->set($hook->id, $hook);
                }
                
                $resolve($collect);
            }, $reject);
        }));
    }
function fetchWebhooks ( ) { return ( new \ React \ Promise \ Promise ( function ( callable $ resolve , callable $ reject ) { $ this -> client -> apimanager ( ) -> endpoints -> webhook -> getChannelWebhooks ( $ this -> id ) -> done ( function ( $ data ) use ( $ resolve ) { $ collect = new \ CharlotteDunois \ Collect \ Collection ( ) ; foreach ( $ data as $ web ) { $ hook = new \ CharlotteDunois \ Yasmin \ Models \ Webhook ( $ this -> client , $ web ) ; $ collect -> set ( $ hook -> id , $ hook ) ; } $ resolve ( $ collect ) ; } , $ reject ) ; } ) ) ; }
Fetches the channel's webhooks. Resolves with a Collection of Webhook instances, mapped by their ID.
@return \React\Promise\ExtendedPromiseInterface
@see \CharlotteDunois\Yasmin\Models\Webhook
Fetches the channel s webhooks . Resolves with a Collection of Webhook instances mapped by their ID .