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

fix: fix GUILD_SOUNDBOARD_SOUNDS_UPDATE event being parsed wrong #10

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions discord_http/gateway/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def guild_soundboard_sound_delete(self, data: dict) -> tuple[PartialSoundboardSo
),
)

def guild_soundboard_sounds_update(self, data: list[dict]) -> tuple[PartialGuild, list[SoundboardSound]]:
_guild = self._get_guild_or_partial(int(data[0]["guild_id"]))
def guild_soundboard_sounds_update(self, data: dict) -> tuple[PartialGuild, list[SoundboardSound]]:
_guild = self._get_guild_or_partial(int(data["guild_id"]))

return (
_guild,
Expand All @@ -258,7 +258,7 @@ def guild_soundboard_sounds_update(self, data: list[dict]) -> tuple[PartialGuild
guild=_guild,
data=e
)
for e in data
for e in data["soundboard_sounds"]
]
)

Expand Down
Loading