src/Channel.php
public function inviteUser(User $user)
    {
        return $this->client->apiCall('channels.invite', [
            'channel' => $this->getId(),
            'user' => $user->getId(),
        ])->then(function () use ($user) {
            $this->data['members'][] = $user->getId();
        });
    }
public function inviteUser(User $user)
    {
        return $this->client->apiCall('channels.invite', [
            'channel' => $this->getId(),
            'user' => $user->getId(),
        ])->then(function () use ($user) {
            $this->data['members'][] = $user->getId();
        });
    }
public function inviteUser ( User $ user ) { return $ this -> client -> apiCall ( 'channels.invite' , [ 'channel' => $ this -> getId ( ) , 'user' => $ user -> getId ( ) , ] ) -> then ( function ( ) use ( $ user ) { $ this -> data [ 'members' ] [ ] = $ user -> getId ( ) ; } ) ; }
Invites a user to the channel.

@param User The user to invite.

@return \React\Promise\PromiseInterface
Invites a user to the channel .