diff --git a/discord/team.py b/discord/team.py index 0e70a6d06..3485af516 100644 --- a/discord/team.py +++ b/discord/team.py @@ -441,6 +441,25 @@ class Team(Hashable): for payout in data: yield TeamPayout(data=payout, team=self) + async def leave(self) -> None: + """|coro| + + Leaves the team. + + .. note:: + + You cannot leave a team that you own, you must delete it instead + via :meth:`delete`. + + Raises + ------- + Forbidden + You do not have permissions to leave the team. + HTTPException + Leaving the team failed. + """ + await self._state.http.remove_team_member(self.id, self._state.self_id) # type: ignore + async def delete(self) -> None: """|coro|