From 4ba8110675d002e7f7633d11a33f7664aafb9f22 Mon Sep 17 00:00:00 2001 From: owocado <24418520+owocado@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:21:08 +0530 Subject: [PATCH 1/2] add `mention` property to `SoundBoard` --- discord/soundboard.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/discord/soundboard.py b/discord/soundboard.py index 3351aacb7..4fe2eb94d 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -148,6 +148,14 @@ class SoundboardDefaultSound(BaseSoundboardSound): inner = ' '.join('%s=%r' % t for t in attrs) return f"<{self.__class__.__name__} {inner}>" + @property + def mention(self) -> str: + """:class:`str`: Returns a string that allows you to mention this default sound. + + .. versionadded:: 2.5 + """ + return f'' + class SoundboardSound(BaseSoundboardSound): """Represents a Discord soundboard sound. @@ -232,6 +240,14 @@ class SoundboardSound(BaseSoundboardSound): return self._state.get_user(self._user_id) return User(state=self._state, data=self._user) + @property + def mention(self) -> str: + """:class:`str`: Returns a string that allows you to mention this sound. + + .. versionadded:: 2.5 + """ + return f'' + async def edit( self, *, From dcd23bc48dd50a9e744d496c6231489f4e415f1e Mon Sep 17 00:00:00 2001 From: owocado <24418520+owocado@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:29:08 +0530 Subject: [PATCH 2/2] silly --- discord/soundboard.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/discord/soundboard.py b/discord/soundboard.py index 4fe2eb94d..94d725724 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -150,10 +150,7 @@ class SoundboardDefaultSound(BaseSoundboardSound): @property def mention(self) -> str: - """:class:`str`: Returns a string that allows you to mention this default sound. - - .. versionadded:: 2.5 - """ + """:class:`str`: Returns a string that allows you to mention this default sound.""" return f'' @@ -242,10 +239,7 @@ class SoundboardSound(BaseSoundboardSound): @property def mention(self) -> str: - """:class:`str`: Returns a string that allows you to mention this sound. - - .. versionadded:: 2.5 - """ + """:class:`str`: Returns a string that allows you to mention this sound.""" return f'' async def edit(