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

        if ($this->getChannelType() != self::TYPE_VOICE) {
            $deferred->reject(new \Exception('You cannot move a member in a text channel.'));

            return $deferred->promise();
        }

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

        $this->http->patch(
            "guilds/{$this->guild_id}/members/{$member}",
            [
                'channel_id' => $this->id,
            ]
        )->then(
            \React\Partial\bind_right($this->resolve, $deferred),
            \React\Partial\bind_right($this->reject, $deferred)
        );

        // At the moment we are unable to check if the member
        // was moved successfully.

        return $deferred->promise();
    }
public function moveMember($member)
    {
        $deferred = new Deferred();

        if ($this->getChannelType() != self::TYPE_VOICE) {
            $deferred->reject(new \Exception('You cannot move a member in a text channel.'));

            return $deferred->promise();
        }

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

        $this->http->patch(
            "guilds/{$this->guild_id}/members/{$member}",
            [
                'channel_id' => $this->id,
            ]
        )->then(
            \React\Partial\bind_right($this->resolve, $deferred),
            \React\Partial\bind_right($this->reject, $deferred)
        );

        // At the moment we are unable to check if the member
        // was moved successfully.

        return $deferred->promise();
    }
public function moveMember ( $ member ) { $ deferred = new Deferred ( ) ; if ( $ this -> getChannelType ( ) != self :: TYPE_VOICE ) { $ deferred -> reject ( new \ Exception ( 'You cannot move a member in a text channel.' ) ) ; return $ deferred -> promise ( ) ; } if ( $ member instanceof Member ) { $ member = $ member -> id ; } $ this -> http -> patch ( "guilds/{$this->guild_id}/members/{$member}" , [ 'channel_id' => $ this -> id , ] ) -> then ( \ React \ Partial \ bind_right ( $ this -> resolve , $ deferred ) , \ React \ Partial \ bind_right ( $ this -> reject , $ deferred ) ) ; // At the moment we are unable to check if the member // was moved successfully. return $ deferred -> promise ( ) ; }
Moves a member to another voice channel.

@param Member|int The member to move. (either a Member part or the member ID)

@return \React\Promise\Promise
Moves a member to another voice channel .