original_string: public function acceptInvite($invite)
      {
          if (preg_match('/https:\/\/discord.gg\/(.+)/', $invite, $matches)) {
              $invite = $matches[1];
          }
  
          $response = $this->discord->request(
              'POST',
              $this->discord->getInviteEndpoint($invite),
              $this->token
          );
  
          return $this->discord->buildPart(Invite::class, $this->token, $response);
      }
code: public function acceptInvite($invite)
      {
          if (preg_match('/https:\/\/discord.gg\/(.+)/', $invite, $matches)) {
              $invite = $matches[1];
          }
  
          $response = $this->discord->request(
              'POST',
              $this->discord->getInviteEndpoint($invite),
              $this->token
          );
  
          return $this->discord->buildPart(Invite::class, $this->token, $response);
      }
code_tokens: public function acceptInvite ( $ invite ) { if ( preg_match ( '/https:\/\/discord.gg\/(.+)/' , $ invite , $ matches ) ) { $ invite = $ matches [ 1 ] ; } $ response = $ this -> discord -> request ( 'POST' , $ this -> discord -> getInviteEndpoint ( $ invite ) , $ this -> token ) ; return $ this -> discord -> buildPart ( Invite :: class , $ this -> token , $ response ) ; }
docstring: Accepts an invite.
  
  @param string $invite The invite code or URL.
  
  @return Invite Accepted invite.
docstring_tokens: Accepts an invite .