Skip to content

Commit

Permalink
remove fetch voice state from member object
Browse files Browse the repository at this point in the history
  • Loading branch information
Snipy7374 committed Nov 26, 2024
1 parent 39c8997 commit a719e02
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions disnake/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,33 +1023,6 @@ async def edit(
data = await http.edit_member(guild_id, self.id, reason=reason, **payload)
return Member(data=data, guild=self.guild, state=self._state)

async def fetch_voice_state(self) -> VoiceState:
"""|coro|
Fetches the :class:`VoiceState` of the member.
.. versionadded:: 2.10
Raises
------
NotFound
The member for which you tried to fetch a voice state is not
connected to a channel in this guild.
Forbidden
You do not have permission to fetch the member's voice state.
HTTPException
Fetching the voice state failed.
Returns
-------
:class:`VoiceState`
The voice state of the member.
"""
data = await self._state.http.get_voice_state(self.guild.id, self.id)
channel_id = utils._get_as_snowflake(data, "channel_id")
channel: Optional[VocalGuildChannel] = self.guild.get_channel(channel_id) # type: ignore
return VoiceState(data=data, channel=channel)

async def request_to_speak(self) -> None:
"""|coro|
Expand Down

0 comments on commit a719e02

Please sign in to comment.