Skip to content

Commit

Permalink
Merge branch 'master' into refactor/tls
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfies committed Jan 1, 2024
2 parents 77bc225 + adcd6fd commit 48050b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1953,15 +1953,14 @@ async def leave_guild(self, guild: Snowflake, /, lurking: bool = MISSING) -> Non
HTTPException
Leaving the guild failed.
"""
lurking = lurking if lurking is not MISSING else MISSING
if lurking is MISSING:
attr = getattr(guild, 'joined', lurking)
if attr is not MISSING:
lurking = not attr
elif (new_guild := self._connection._get_guild(guild.id)) is not None:
lurking = not new_guild.is_joined()

await self.http.leave_guild(guild.id, lurking=lurking)
await self.http.leave_guild(guild.id, lurking=lurking or False)

async def fetch_stage_instance(self, channel_id: int, /) -> StageInstance:
"""|coro|
Expand Down

0 comments on commit 48050b3

Please sign in to comment.