Skip to content

Commit 6546270

Browse files
authored
Merge branch 'master' into overlap
Signed-off-by: Lumouille <[email protected]>
2 parents af62dc5 + 27ece86 commit 6546270

29 files changed

+1609
-58
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ These changes are available on the `master` branch, but have not yet been releas
4747
([#2659](https://github.com/Pycord-Development/pycord/pull/2659))
4848
- Added `VoiceMessage` subclass of `File` to allow voice messages to be sent.
4949
([#2579](https://github.com/Pycord-Development/pycord/pull/2579))
50+
- Added the following soundboard-related features:
51+
- Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`,
52+
`SoundboardSound.edit()`, and `SoundboardSound.delete()`.
53+
- Access Discord default sounds with `Client.fetch_default_sounds()`.
54+
- Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`.
55+
- New `on_voice_channel_effect_send` event for sound and emoji effects.
56+
- Soundboard limits based on guild premium tier (8-48 slots) in
57+
`Guild.soundboard_limit`.
58+
([#2623](https://github.com/Pycord-Development/pycord/pull/2623))
5059
- Added new `Subscription` object and related methods/events.
5160
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
5261
- Added `Message.forward_to`, `Message.snapshots`, and other related attributes.
@@ -60,6 +69,8 @@ These changes are available on the `master` branch, but have not yet been releas
6069
- Added the ability to pass an `overlap` parameter to the `loop` decorator and `Loop`
6170
class, allowing concurrent iterations if enabled.
6271
([#2765](https://github.com/Pycord-Development/pycord/pull/2765))
72+
- Added various missing channel parameters and allow `default_reaction_emoji` to be
73+
`None`. ([#2772](https://github.com/Pycord-Development/pycord/pull/2772))
6374
- Added support for type hinting slash command options with `typing.Annotated`.
6475
([#2782](https://github.com/Pycord-Development/pycord/pull/2782))
6576
- Added conversion to `Member` in `MentionableConverter`.
@@ -70,6 +81,8 @@ These changes are available on the `master` branch, but have not yet been releas
7081
([#2817](https://github.com/Pycord-Development/pycord/pull/2817))
7182
- Added role gradients support with `Role.colours` and the `RoleColours` class.
7283
([#2818](https://github.com/Pycord-Development/pycord/pull/2818))
84+
- Added `ThreadArchiveDuration` enum to improve clarity of thread archive durations.
85+
([#2826](https://github.com/Pycord-Development/pycord/pull/2826))
7386
- Added `Interaction.attachment_size_limit`.
7487
([#2854](https://github.com/Pycord-Development/pycord/pull/2854))
7588
- Added support for selects and text displays in modals.
@@ -78,6 +91,8 @@ These changes are available on the `master` branch, but have not yet been releas
7891
([#2883](https://github.com/Pycord-Development/pycord/pull/2883))
7992
- Added `discord.User.primary_guild` and the `PrimaryGuild` class.
8093
([#2876](https://github.com/Pycord-Development/pycord/pull/2876))
94+
- Added `get_component` to `Message`, `Section`, `Container` and `ActionRow`.
95+
([#2849](https://github.com/Pycord-Development/pycord/pull/2849))
8196

8297
### Fixed
8398

@@ -149,6 +164,10 @@ These changes are available on the `master` branch, but have not yet been releas
149164
([#2843](https://github.com/Pycord-Development/pycord/pull/2843))
150165
- Fixed `TypeError` when using `@option` with certain annotations and along with
151166
`channel_types`. ([#2835](https://github.com/Pycord-Development/pycord/pull/2835))
167+
- Fixed `TypeError` when using `Optional[...]` or `... | None` in command option type.
168+
([#2852](https://github.com/Pycord-Development/pycord/pull/2852))
169+
- Fixed type-hinting for `PermissionOverwrite.update`.
170+
([#2878](https://github.com/Pycord-Development/pycord/pull/2878))
152171
- Fixed `AttributeError` when accessing `AuditLogEntry.changes` more than once.
153172
([#2882])(https://github.com/Pycord-Development/pycord/pull/2882))
154173

@@ -183,6 +202,8 @@ These changes are available on the `master` branch, but have not yet been releas
183202
([#2501](https://github.com/Pycord-Development/pycord/pull/2501))
184203
- Deprecated `Interaction.cached_channel` in favor of `Interaction.channel`.
185204
([#2658](https://github.com/Pycord-Development/pycord/pull/2658))
205+
- Deprecated `is_nsfw` for categories since it was never supported by the API.
206+
([#2772](https://github.com/Pycord-Development/pycord/pull/2772))
186207
- Deprecated `Messageable.pins()` returning a list of `Message`; it should be used as an
187208
iterator of `MessagePin` instead.
188209
([#2872](https://github.com/Pycord-Development/pycord/pull/2872))

discord/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
from .role import *
6666
from .scheduled_events import *
6767
from .shard import *
68+
from .soundboard import *
6869
from .stage_instance import *
6970
from .sticker import *
7071
from .team import *

discord/asset.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,18 @@ def _from_cover_image(cls, state, object_id: int, cover_image_hash: str) -> Asse
274274
animated=False,
275275
)
276276

277+
@classmethod
278+
def _from_collectible(
279+
cls, state: ConnectionState, asset: str, animated: bool = False
280+
) -> Asset:
281+
name = "static.png" if not animated else "asset.webm"
282+
return cls(
283+
state,
284+
url=f"{cls.BASE}/assets/collectibles/{asset}{name}",
285+
key=asset,
286+
animated=animated,
287+
)
288+
277289
@classmethod
278290
def _from_guild_image(cls, state, guild_id: int, image: str, path: str) -> Asset:
279291
animated = False
@@ -331,6 +343,14 @@ def _from_scheduled_event_image(
331343
animated=False,
332344
)
333345

346+
@classmethod
347+
def _from_soundboard_sound(cls, state, sound_id: int) -> Asset:
348+
return cls(
349+
state,
350+
url=f"{cls.BASE}/soundboard-sounds/{sound_id}",
351+
key=str(sound_id),
352+
)
353+
334354
def __str__(self) -> str:
335355
return self._url
336356

0 commit comments

Comments
 (0)