function createWebhook(string $name, ?string $avatar = null, string $reason = '') {
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) use ($name, $avatar, $reason) {
            if(!empty($avatar)) {
                $file = \CharlotteDunois\Yasmin\Utils\FileHelpers::resolveFileResolvable($avatar)->then(function ($avatar) {
                    return \CharlotteDunois\Yasmin\Utils\DataHelpers::makeBase64URI($avatar);
                });
            } else {
                $file = \React\Promise\resolve(null);
            }
            
            $file->done(function ($avatar = null) use ($name, $reason, $resolve, $reject) {
                $this->client->apimanager()->endpoints->webhook->createWebhook($this->id, $name, $avatar, $reason)->done(function ($data) use ($resolve) {
                    $hook = new \CharlotteDunois\Yasmin\Models\Webhook($this->client, $data);
                    $resolve($hook);
                }, $reject);
            }, $reject);
        }));
    }