Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Soundboard #2623

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Paillat-dev
Copy link
Contributor

@Paillat-dev Paillat-dev commented Oct 24, 2024

Summary

Soundboard

Follows up on #2321
Fixes #2216

Information

  • This PR fixes an issue.
  • 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

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

@Paillat-dev Paillat-dev changed the title Soundboard feat: Soundboard Oct 24, 2024
@Paillat-dev
Copy link
Contributor Author

Paillat-dev commented Oct 24, 2024

To be implemented

  • MORE_SOUNDBOARD guild feature flag in Guild.soundboard_limit and Guild.features
  • SOUNDBOARD guild feature flag in Guild.features
  • GET /soundboard-default-sounds in Client.fetch_default_sounds
  • GET /guilds/{guild.id}/soundboard-sounds in Guild.fetch_sounds
  • GET /guilds/{guild.id}/soundboard-sounds/{sound.id} in Guild.fetch_sound
  • POST /channels/{channel.id}/send-soundboard-sound in VoiceChannel.send_soundboard_sound
  • POST /guilds/{guild.id}/soundboard-sounds in Guild.create_sound
  • PATCH /guilds/{guild.id}/soundboard-sounds/{sound.id} in SoundboardSound.edit
  • DELETE /guilds/{guild.id}/soundboard-sounds/{sound.id} in SoundboardSound.delete
  • GUILD_SOUNDBOARD_SOUND_CREATE (Guild soundboard sound was created)
  • GUILD_SOUNDBOARD_SOUND_UPDATE (Guild soundboard sound was updated)
  • GUILD_SOUNDBOARD_SOUND_DELETE (Guild soundboard sound was deleted)
  • GUILD_SOUNDBOARD_SOUNDS_UPDATE (Guild soundboard sounds were updated)
  • 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

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

@Paillat-dev Paillat-dev force-pushed the soundboard branch 2 times, most recently from 0547338 to 8811e76 Compare October 24, 2024 22:20
@Paillat-dev
Copy link
Contributor Author

Paillat-dev commented Oct 24, 2024

@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 ?

discord/soundboard.py Outdated Show resolved Hide resolved
@Lulalaby
Copy link
Member

yeah, advaith changed it

Copy link
Member

@plun1331 plun1331 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Objects need to be added to docs

@Paillat-dev
Copy link
Contributor Author

There.

discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
discord/http.py Outdated Show resolved Hide resolved
discord/http.py Outdated Show resolved Hide resolved
discord/http.py Outdated Show resolved Hide resolved
discord/state.py Outdated Show resolved Hide resolved
discord/state.py Outdated Show resolved Hide resolved
discord/state.py Outdated Show resolved Hide resolved
@plun1331
Copy link
Member

plun1331 commented Nov 3, 2024

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

@Paillat-dev
Copy link
Contributor Author

Paillat-dev commented Nov 3, 2024

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

@plun1331
Copy link
Member

plun1331 commented Nov 3, 2024

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

@Paillat-dev
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Soundboard
5 participants