Skip to content

Commit 63efa07

Browse files
authored
Merge branch 'master' into fix/client-run
2 parents bddf256 + d5d162a commit 63efa07

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ These changes are available on the `master` branch, but have not yet been releas
4545
([#2916](https://github.com/Pycord-Development/pycord/pull/2916))
4646
- Fixed a crash when processing message edit events while message cache was disabled.
4747
([#2924](https://github.com/Pycord-Development/pycord/pull/2924))
48+
- Fixed OPUS Decode Error when recording audio.
49+
([#2925](https://github.com/Pycord-Development/pycord/pull/2925))
4850

4951
### Removed
5052

discord/role.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def _update(self, data: RolePayload):
402402
self._permissions: int = int(data.get("permissions", 0))
403403
self.position: int = data.get("position", 0)
404404
self._colour: int = data.get("color", 0)
405-
self.colours: RoleColours | None = RoleColours._from_payload(data["colors"])
405+
self.colours: RoleColours = RoleColours._from_payload(data["colors"])
406406
self.hoist: bool = data.get("hoist", False)
407407
self.managed: bool = data.get("managed", False)
408408
self.mentionable: bool = data.get("mentionable", False)
@@ -574,8 +574,8 @@ async def edit(
574574
permissions: Permissions = MISSING,
575575
colour: Colour | int = MISSING,
576576
color: Colour | int = MISSING,
577-
colours: RoleColours | None = MISSING,
578-
colors: RoleColours | None = MISSING,
577+
colours: RoleColours = MISSING,
578+
colors: RoleColours = MISSING,
579579
holographic: bool = MISSING,
580580
hoist: bool = MISSING,
581581
mentionable: bool = MISSING,

discord/voice_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,10 @@ def _decrypt_aead_xchacha20_poly1305_rtpsize(self, header, data):
652652
nonce[:4] = data[-4:]
653653
data = data[:-4]
654654

655-
return self.strip_header_ext(
656-
box.decrypt(bytes(data), bytes(header), bytes(nonce))
657-
)
655+
r = box.decrypt(bytes(data), bytes(header), bytes(nonce))
656+
# Discord adds 8 bytes of data before the opus data.
657+
# This can be removed, and at this time, discarded as it is unclear what they are for.
658+
return r[8:]
658659

659660
@staticmethod
660661
def strip_header_ext(data):
@@ -774,7 +775,7 @@ def unpack_audio(self, data):
774775
data: :class:`bytes`
775776
Bytes received by Discord via the UDP connection used for sending and receiving voice data.
776777
"""
777-
if data[1] != 0x78:
778+
if data[1] & 0x78 != 0x78:
778779
# We Should Ignore Any Payload Types We Do Not Understand
779780
# Ref RFC 3550 5.1 payload type
780781
# At Some Point We Noted That We Should Ignore Only Types 200 - 204 inclusive.

renovate.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
":dependencyDashboard"
77
],
88
"assigneesFromCodeOwners": true,
9-
"packageRules": [
10-
{
11-
"matchManagers": ["pip_requirements"],
12-
"matchFileNames": ["requirements/*.txt"]
13-
}
14-
]
9+
"pip_requirements": {
10+
"managerFilePatterns": ["requirements/*.txt"]
11+
}
1512
}

requirements/dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pylint~=3.3.8
33
pytest~=8.4.1
44
pytest-asyncio~=1.1.0
55
# pytest-order~=1.0.1
6-
mypy~=1.17.1
6+
mypy~=1.18.1
77
coverage~=7.10
88
pre-commit==4.3.0
99
codespell==2.4.1

requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sphinx==8.0.2
22
sphinxcontrib_trio==1.1.2
33
sphinxcontrib-websupport==2.0.0
4-
myst-parser[linkify]==4.0.0
4+
myst-parser[linkify]==4.0.1
55
sphinxext-opengraph==0.12.0
66
sphinx-copybutton==0.5.2
77
furo==2024.8.6

0 commit comments

Comments
 (0)