function createInvite(array $options = array()) {
        $data = array(
            'max_uses' => ($options['maxUses'] ?? 0),
            'temporary' => ($options['temporary'] ?? false),
            'unique' => ($options['unique'] ?? false)
        );
        
        if(isset($options['maxAge'])) {
            $data['max_age'] = $options['maxAge'];
        }
        
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) use ($data) {
            $this->client->apimanager()->endpoints->channel->createChannelInvite($this->id, $data)->done(function ($data) use ($resolve) {
                $invite = new \CharlotteDunois\Yasmin\Models\Invite($this->client, $data);
                $resolve($invite);
            }, $reject);
        }));
    }
function createInvite(array $options = array()) {
        $data = array(
            'max_uses' => ($options['maxUses'] ?? 0),
            'temporary' => ($options['temporary'] ?? false),
            'unique' => ($options['unique'] ?? false)
        );
        
        if(isset($options['maxAge'])) {
            $data['max_age'] = $options['maxAge'];
        }
        
        return (new \React\Promise\Promise(function (callable $resolve, callable $reject) use ($data) {
            $this->client->apimanager()->endpoints->channel->createChannelInvite($this->id, $data)->done(function ($data) use ($resolve) {
                $invite = new \CharlotteDunois\Yasmin\Models\Invite($this->client, $data);
                $resolve($invite);
            }, $reject);
        }));
    }
function createInvite ( array $ options = array ( ) ) { $ data = array ( 'max_uses' => ( $ options [ 'maxUses' ] ?? 0 ) , 'temporary' => ( $ options [ 'temporary' ] ?? false ) , 'unique' => ( $ options [ 'unique' ] ?? false ) ) ; if ( isset ( $ options [ 'maxAge' ] ) ) { $ data [ 'max_age' ] = $ options [ 'maxAge' ] ; } return ( new \ React \ Promise \ Promise ( function ( callable $ resolve , callable $ reject ) use ( $ data ) { $ this -> client -> apimanager ( ) -> endpoints -> channel -> createChannelInvite ( $ this -> id , $ data ) -> done ( function ( $ data ) use ( $ resolve ) { $ invite = new \ CharlotteDunois \ Yasmin \ Models \ Invite ( $ this -> client , $ data ) ; $ resolve ( $ invite ) ; } , $ reject ) ; } ) ) ; }
Creates an invite. Resolves with an instance of Invite.

Options are as following (all are optional).

```
array(
'maxAge' => int,
'maxUses' => int, (0 = unlimited)
'temporary' => bool,
'unique' => bool
)
```

@param array $options
@return \React\Promise\ExtendedPromiseInterface
@see \CharlotteDunois\Yasmin\Models\Invite
Creates an invite . Resolves with an instance of Invite .