[docs]asyncdeffetch(self)->"Invite":""" Fetches the invite details Returns ------- `Invite` The invite object """r=awaitself._state.query("GET",f"/invites/{self.code}")returnInvite(state=self._state,data=r.response)
[docs]asyncdefdelete(self,*,reason:Optional[str]=None)->"Invite":""" Deletes the invite Parameters ---------- reason: `str` The reason for deleting the invite Returns ------- `Invite` The invite object """data=awaitself._state.query("DELETE",f"/invites/{self.code}",reason=reason)returnInvite(state=self._state,data=data.response)
@propertydefurl(self)->str:""" `str`: The URL of the invite """returnf"{self.BASE}/{self.code}"
[docs]defis_vanity(self)->bool:""" `bool`: Whether the invite is a vanity invite """ifnotself.guild:returnFalsereturnself.guild.vanity_url_code==self.code