pycord icon indicating copy to clipboard operation
pycord copied to clipboard

feat: :sparkles: Soundboard

Open Paillat-dev opened this issue 1 year ago • 16 comments
trafficstars

Summary

Soundboard

Follows up on #2321 Fixes #2216

Information

  • [x] This PR fixes an issue.
  • [x] This PR adds something new (e.g. new method or parameters).
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • [ ] This PR is not a code change (e.g. documentation, README, typehinting, examples, ...).

Checklist

  • [x] I have searched the open pull requests for duplicates.
  • [x] If code changes were made then they have been tested.
    • [x] I have updated the documentation to reflect the changes.
  • [ ] If type: ignore comments were used, a comment is also left explaining why.
  • [x] I have updated the changelog to include these changes.

Paillat-dev avatar Oct 24 '24 19:10 Paillat-dev

To be implemented

  • [x] MORE_SOUNDBOARD guild feature flag in Guild.soundboard_limit and Guild.features
  • [x] SOUNDBOARD guild feature flag in Guild.features
  • [x] GET /soundboard-default-sounds in Client.fetch_default_sounds
  • [x] GET /guilds/{guild.id}/soundboard-sounds in Guild.fetch_sounds
  • [x] GET /guilds/{guild.id}/soundboard-sounds/{sound.id} in Guild.fetch_sound
  • [x] POST /channels/{channel.id}/send-soundboard-sound in VoiceChannel.send_soundboard_sound
  • [x] POST /guilds/{guild.id}/soundboard-sounds in Guild.create_sound
  • [x] PATCH /guilds/{guild.id}/soundboard-sounds/{sound.id} in SoundboardSound.edit
  • [x] DELETE /guilds/{guild.id}/soundboard-sounds/{sound.id} in SoundboardSound.delete
  • [x] GUILD_SOUNDBOARD_SOUND_CREATE (Guild soundboard sound was created)
  • [x] GUILD_SOUNDBOARD_SOUND_UPDATE (Guild soundboard sound was updated)
  • [x] GUILD_SOUNDBOARD_SOUND_DELETE (Guild soundboard sound was deleted)
  • [x] GUILD_SOUNDBOARD_SOUNDS_UPDATE (Guild soundboard sounds were updated)
  • [x] VOICE_CHANNEL_EFFECT_SEND (Someone sent an effect in a voice channel the current user is connected to) in on_voice_channel_effect_send

Todo

  • [x] Docstrings
  • [x] Example &/ guide
  • [x] Cleanup and triple check the old code
  • [x] __repr__

Paillat-dev avatar Oct 24 '24 19:10 Paillat-dev

@Lulalaby You mentioned in #2216

Note: soundboard sounds can not be dispatched by bots. Only managed.

It's curious that they documented /channels/{channel.id}/send-soundboard-sound (https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound) then... Did that change in the mean time ?

Paillat-dev avatar Oct 24 '24 23:10 Paillat-dev

yeah, advaith changed it

Lulalaby avatar Oct 24 '24 23:10 Lulalaby

There.

Paillat-dev avatar Oct 28 '24 09:10 Paillat-dev

Also this pr might depend on #2621 as I used typing_extensions in some places

Paillat-dev avatar Oct 28 '24 09:10 Paillat-dev

Is there a reason soundboard gateway events weren't included?

plun1331 avatar Nov 03 '24 17:11 plun1331

I preferred work on it after and felt like soundboard had waited long enough before being implemented - and would for make a followup pr to add them

Paillat-dev avatar Nov 03 '24 17:11 Paillat-dev

I preferred work on it after and felt like soundboard had waited long enough before being implemented - and would for make a followup pr to add them

gateway events aren't that difficult to implement, would take a few minutes

plun1331 avatar Nov 03 '24 19:11 plun1331

~~Also, reiterating that this pr depends on #2621 or else it would break as this pr uses typing_extensions directly.~~ Added it to requirements

Paillat-dev avatar Nov 07 '24 09:11 Paillat-dev

k

Paillat-dev avatar Jan 27 '25 12:01 Paillat-dev

for reference https://github.com/discord/discord-api-docs/pull/7357

Paillat-dev avatar Jan 28 '25 08:01 Paillat-dev

Still waiting to get soundmoji access...

Paillat-dev avatar Mar 03 '25 22:03 Paillat-dev

forget soundmoji, it got rolled back to 0

Lulalaby avatar Mar 03 '25 23:03 Lulalaby

tested send_soundboard_sound, fetch_default_sounds, get_sound, guild.sounds and everything works fine

Lumabots avatar May 10 '25 10:05 Lumabots

Please someone take a look at this, imagine not having soundboard in 2,7

Paillat-dev avatar May 27 '25 19:05 Paillat-dev

@Lulalaby

JustaSqu1d avatar May 27 '25 19:05 JustaSqu1d

could this pls review and merged ? it been almost a year

Lumabots avatar Jun 26 '25 14:06 Lumabots

Merge conflicts

Lulalaby avatar Aug 02 '25 03:08 Lulalaby

@Lulalaby should be good

Paillat-dev avatar Aug 02 '25 15:08 Paillat-dev

This pull request is in the In review step of the Pycord workflow.

Waiting for review from these teams:

  • All Contributors (1 of 2 required)
    • Pending reviewers: @Paillat-dev, @plun1331, @Dorukyum, @JustaSqu1d, @Lulalaby, @Lumabots
  • Maintainers (0 of 1 required)
    • Pending reviewers: @plun1331, @Dorukyum, @Lulalaby, @BobDotCom

It is @Paillat-dev's turn to determine what is required to move this PR forward.

pullapprove4[bot] avatar Aug 28 '25 21:08 pullapprove4[bot]

It is required for this PR to move forward to get some reviews

Paillat-dev avatar Aug 28 '25 21:08 Paillat-dev

@Lumabots do u have time to test it rq

Lulalaby avatar Aug 30 '25 14:08 Lulalaby

@Lumabots do u have time to test it rq

Give me 5min and I'll test it

Lumabots avatar Aug 30 '25 14:08 Lumabots

tested send_soundboard_sound, fetch_default_sounds, get_sound, guild.sounds and everything works fine

Lumabots avatar Aug 30 '25 14:08 Lumabots

then approve

Lulalaby avatar Aug 30 '25 14:08 Lulalaby