Skip to content

Commit 8a9ec19

Browse files
committed
♻️ Cleanup
1 parent ae4983d commit 8a9ec19

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

discord/channel.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
"PartialMessageable",
7878
"ForumChannel",
7979
"ForumTag",
80-
# "VoiceChannelEffect",
8180
"VoiceChannelEffectSendEvent",
8281
)
8382

@@ -3254,6 +3253,11 @@ def get_partial_message(self, message_id: int, /) -> PartialMessage:
32543253

32553254

32563255
class VoiceChannelEffectAnimation(NamedTuple):
3256+
"""Represents an animation that can be sent to a voice channel.
3257+
3258+
.. versionadded:: 2.7
3259+
"""
3260+
32573261
id: int
32583262
type: VoiceChannelEffectAnimationType
32593263

@@ -3264,10 +3268,7 @@ class VoiceChannelSoundEffect(PartialSoundboardSound): ...
32643268
class VoiceChannelEffectSendEvent:
32653269
"""Represents the payload for an :func:`on_voice_channel_effect_send`
32663270
3267-
.. versionadded:: 2.4
3268-
3269-
.. versionchanged:: 2.7
3270-
Added the `sound` attribute.
3271+
.. versionadded:: 2.7
32713272
32723273
Attributes
32733274
----------

discord/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2275,7 +2275,7 @@ async def delete_emoji(self, emoji: Snowflake) -> None:
22752275
def get_sound(self, sound_id: int) -> SoundboardSound | None:
22762276
"""Gets a :class:`.Sound` from the bot's sound cache.
22772277
2278-
.. versionadded:: 2.4
2278+
.. versionadded:: 2.7
22792279
22802280
Parameters
22812281
----------

discord/enums.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,10 @@ class PollLayoutType(Enum):
10551055

10561056

10571057
class VoiceChannelEffectAnimationType(Enum):
1058-
"""Voice channel effect animation type"""
1058+
"""Voice channel effect animation type
1059+
1060+
.. versionadded:: 2.7
1061+
"""
10591062

10601063
premium = 0
10611064
basic = 1

discord/guild.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def categories(self) -> list[CategoryChannel]:
821821
def sounds(self) -> list[SoundboardSound]:
822822
"""A list of soundboard sounds that belong to this guild.
823823
824-
.. versionadded:: 2.5
824+
.. versionadded:: 2.7
825825
826826
This is sorted by the position and are in UI order from top to bottom.
827827
"""
@@ -4316,6 +4316,8 @@ def entitlements(
43164316
def get_sound(self, sound_id: int):
43174317
"""Returns a sound with the given ID.
43184318
4319+
.. versionadded :: 2.7
4320+
43194321
Parameters
43204322
----------
43214323
sound_id: :class:`int`

discord/http.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3230,7 +3230,7 @@ def get_guild_sound(
32303230
)
32313231

32323232
def edit_guild_sound(
3233-
self, guild_id: Snowflake, sound_Id: Snowflake, *, reason: str | None, **payload
3233+
self, guild_id: Snowflake, sound_id: Snowflake, *, reason: str | None, **payload
32343234
):
32353235
keys = (
32363236
"name",
@@ -3246,14 +3246,14 @@ def edit_guild_sound(
32463246
"PATCH",
32473247
"/guilds/{guild_id}/soundboard-sounds/{sound_id}",
32483248
guild_id=guild_id,
3249-
sound_id=sound_Id,
3249+
sound_id=sound_id,
32503250
),
32513251
json=payload,
32523252
reason=reason,
32533253
)
32543254

32553255
def send_soundboard_sound(
3256-
self, chanel_id: int, sound: PartialSoundboardSound
3256+
self, channel_id: int, sound: PartialSoundboardSound
32573257
) -> None:
32583258
payload = {
32593259
"sound_id": sound.id,
@@ -3265,7 +3265,7 @@ def send_soundboard_sound(
32653265
Route(
32663266
"POST",
32673267
"/channels/{channel_id}/send-soundboard-sound",
3268-
channel_id=chanel_id,
3268+
channel_id=channel_id,
32693269
),
32703270
json=payload,
32713271
)

discord/state.py

-1
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,6 @@ def create_message(
20042004
return Message(state=self, channel=channel, data=data)
20052005

20062006
def parse_voice_channel_effect_send(self, data) -> None:
2007-
__import__("json")
20082007
if sound_id := int(data.get("sound_id", 0)):
20092008
sound = self._get_sound(sound_id)
20102009
if sound is None:

0 commit comments

Comments
 (0)