public function transferOwnership($member)
    {
        $deferred = new Deferred();

        if ($member instanceof Member) {
            $member = $member->id;
        }

        $this->http->patch(
            $this->replaceWithVariables('guilds/:id'),
            [
                'owner_id' => $member,
            ]
        )->then(
            function ($response) use ($member, $deferred) {
                if ($response->owner_id != $member) {
                    $deferred->reject(new \Exception('Ownership was not transferred correctly.'));
                    $this->fill((array) $response);
                } else {
                    $deferred->resolve();
                }
            },
            \React\Partial\bind_right($this->reject, $deferred)
        );

        return $deferred->promise();
    }