Skip to content

Commit 2e1c15a

Browse files
authored
Merge branch 'master' into forwarding
Signed-off-by: UK <[email protected]>
2 parents 7bbfd96 + 968a586 commit 2e1c15a

34 files changed

+715
-199
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
# - --remove-duplicate-keys
2222
# - --remove-unused-variables
2323
- repo: https://github.com/asottile/pyupgrade
24-
rev: v3.17.0
24+
rev: v3.19.0
2525
hooks:
2626
- id: pyupgrade
2727
exclude: \.(po|pot|yml|yaml)$
@@ -31,7 +31,7 @@ repos:
3131
- id: isort
3232
exclude: \.(po|pot|yml|yaml)$
3333
- repo: https://github.com/psf/black
34-
rev: 24.8.0
34+
rev: 24.10.0
3535
hooks:
3636
- id: black
3737
args: [--safe, --quiet]

CHANGELOG.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,20 @@ These changes are available on the `master` branch, but have not yet been releas
2222
`tags`. ([#2520](https://github.com/Pycord-Development/pycord/pull/2520))
2323
- Added `Member.guild_banner` and `Member.display_banner` properties.
2424
([#2556](https://github.com/Pycord-Development/pycord/pull/2556))
25+
- Added support for Application Emojis.
26+
([#2501](https://github.com/Pycord-Development/pycord/pull/2501))
27+
- Added `cache_app_emojis` parameter to `Client`.
28+
([#2501](https://github.com/Pycord-Development/pycord/pull/2501))
2529
- Added `elapsed` method to `VoiceClient`.
2630
([#2587](https://github.com/Pycord-Development/pycord/pull/2587/))
2731
- Added optional `filter` parameter to `utils.basic_autocomplete()`.
2832
([#2590](https://github.com/Pycord-Development/pycord/pull/2590))
33+
- Added missing `with_counts` parameter to `fetch_guilds` method.
34+
([#2615](https://github.com/Pycord-Development/pycord/pull/2615))
35+
- Added missing permissions: `Permissions.use_soundboard`,
36+
`Permissions.use_external_sounds` and
37+
`Permissions.view_creator_monetization_analytics`.
38+
([#2620](https://github.com/Pycord-Development/pycord/pull/2620))
2939

3040
### Fixed
3141

@@ -42,8 +52,12 @@ These changes are available on the `master` branch, but have not yet been releas
4252
- Fixed `Guild.create_test_entitlement()` and `User.create_test_entitlement()` using the
4353
guild/user ID instead of the application ID.
4454
([#2595](https://github.com/Pycord-Development/pycord/pull/2595))
45-
- Fixed commands with `BucketType.cagegory` cooldown causing issues in private channels.
46-
([#2603](https://github.com/Pycord-Development/pycord/pull/2603))
55+
- Fixed `BucketType.category` cooldown commands not functioning correctly in private
56+
channels. ([#2603](https://github.com/Pycord-Development/pycord/pull/2603))
57+
- Fixed `SlashCommand`'s `ctx` parameter couldn't be `Union` type.
58+
([#2611](https://github.com/Pycord-Development/pycord/pull/2611))
59+
- Fixed `TypeError` when passing `skus` parameter in `Client.entitlements()`.
60+
([#2627](https://github.com/Pycord-Development/pycord/issues/2627))
4761

4862
### Changed
4963

@@ -52,11 +66,18 @@ These changes are available on the `master` branch, but have not yet been releas
5266
([#2496](https://github.com/Pycord-Development/pycord/pull/2496))
5367
- ⚠️ **Removed support for Python 3.8.**
5468
([#2521](https://github.com/Pycord-Development/pycord/pull/2521))
69+
- `Emoji` has been renamed to `GuildEmoji`.
70+
([#2501](https://github.com/Pycord-Development/pycord/pull/2501))
71+
- Replaced audioop (deprecated module) implementation of `PCMVolumeTransformer.read`
72+
method with a pure Python equivalent.
73+
([#2176](https://github.com/Pycord-Development/pycord/pull/2176))
5574

5675
### Deprecated
5776

5877
- Deprecated `AppInfo.summary` in favor of `AppInfo.description`.
5978
([#2520](https://github.com/Pycord-Development/pycord/pull/2520))
79+
- Deprecated `Emoji` in favor of `GuildEmoji`.
80+
([#2501](https://github.com/Pycord-Development/pycord/pull/2501))
6081

6182
## [2.6.1] - 2024-09-15
6283

@@ -78,9 +99,9 @@ These changes are available on the `master` branch, but have not yet been releas
7899
`SortOrder`. ([#2500](https://github.com/Pycord-Development/pycord/pull/2500))
79100
- Fixed `PartialMessage` causing errors when created from `PartialMessageable`.
80101
([#2568](https://github.com/Pycord-Development/pycord/pull/2500))
81-
- Fixed the `guild` attribute of `Member`s recieved from a `UserCommand` being `None`.
102+
- Fixed the `guild` attribute of `Member`s received from a `UserCommand` being `None`.
82103
([#2573](https://github.com/Pycord-Development/pycord/pull/2573))
83-
- Fixed `Webhook.send` not including attachment data.
104+
- Fixed `Webhook.send`, which did not include attachment data.
84105
([#2513](https://github.com/Pycord-Development/pycord/pull/2513))
85106
- Fixed inverted type hints in `CheckAnyFailure`.
86107
([#2502](https://github.com/Pycord-Development/pycord/pull/2502))
@@ -137,7 +158,7 @@ These changes are available on the `master` branch, but have not yet been releas
137158
([#2407](https://github.com/Pycord-Development/pycord/pull/2407))
138159
- Fixed invalid data being passed to `Interaction._guild` in certain cases.
139160
([#2411](https://github.com/Pycord-Development/pycord/pull/2411))
140-
- Fixed option typehints being ignored when using `parameter_name`.
161+
- Fixed option type hints being ignored when using `parameter_name`.
141162
([#2417](https://github.com/Pycord-Development/pycord/pull/2417))
142163
- Fixed parameter `embed=None` causing `AttributeError` on `PartialMessage.edit`.
143164
([#2446](https://github.com/Pycord-Development/pycord/pull/2446))
@@ -162,7 +183,7 @@ These changes are available on the `master` branch, but have not yet been releas
162183

163184
- Changed the type of `Guild.bitrate_limit` to `int`.
164185
([#2387](https://github.com/Pycord-Development/pycord/pull/2387))
165-
- HTTP requests that fail with a 503 status are now re-tried.
186+
- HTTP requests that fail with a 503 status are now retried.
166187
([#2395](https://github.com/Pycord-Development/pycord/pull/2395))
167188
- `option` decorator now accepts `input_type`.
168189
([#2417](https://github.com/Pycord-Development/pycord/pull/2417))
@@ -371,7 +392,7 @@ These changes are available on the `master` branch, but have not yet been releas
371392
([#2145](https://github.com/Pycord-Development/pycord/pull/2145))
372393
- Fixed `Thread.applied_tags` not being updated.
373394
([#2146](https://github.com/Pycord-Development/pycord/pull/2146))
374-
- Fixed type hinting of `author` property of `ApplicationContext` to include
395+
- Fixed type-hinting of `author` property of `ApplicationContext` to include
375396
type-hinting of `User` or `Member`.
376397
([#2148](https://github.com/Pycord-Development/pycord/pull/2148))
377398
- Fixed missing `delete_after` parameter in overload type-hinting for `Webhook.send()`.

discord/abc.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,9 @@ async def _edit(
513513
except KeyError:
514514
pass
515515
else:
516-
if isinstance(default_reaction_emoji, _EmojiTag): # Emoji, PartialEmoji
516+
if isinstance(
517+
default_reaction_emoji, _EmojiTag
518+
): # GuildEmoji, PartialEmoji
517519
default_reaction_emoji = default_reaction_emoji._to_partial()
518520
elif isinstance(default_reaction_emoji, int):
519521
default_reaction_emoji = PartialEmoji(
@@ -523,7 +525,7 @@ async def _edit(
523525
default_reaction_emoji = PartialEmoji.from_str(default_reaction_emoji)
524526
else:
525527
raise InvalidArgument(
526-
"default_reaction_emoji must be of type: Emoji | int | str"
528+
"default_reaction_emoji must be of type: GuildEmoji | int | str"
527529
)
528530

529531
options["default_reaction_emoji"] = (
@@ -1802,7 +1804,7 @@ def can_send(self, *objects) -> bool:
18021804
"Message": "send_messages",
18031805
"Embed": "embed_links",
18041806
"File": "attach_files",
1805-
"Emoji": "use_external_emojis",
1807+
"GuildEmoji": "use_external_emojis",
18061808
"GuildSticker": "use_external_stickers",
18071809
}
18081810
# Can't use channel = await self._get_channel() since its async
@@ -1827,7 +1829,7 @@ def can_send(self, *objects) -> bool:
18271829
mapping.get(type(obj).__name__) or mapping[obj.__name__]
18281830
)
18291831

1830-
if type(obj).__name__ == "Emoji":
1832+
if type(obj).__name__ == "GuildEmoji":
18311833
if (
18321834
obj._to_partial().is_unicode_emoji
18331835
or obj.guild_id == channel.guild.id

discord/audit_logs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import datetime
4848

4949
from . import abc
50-
from .emoji import Emoji
50+
from .emoji import GuildEmoji
5151
from .guild import Guild
5252
from .member import Member
5353
from .role import Role
@@ -617,7 +617,7 @@ def target(
617617
| User
618618
| Role
619619
| Invite
620-
| Emoji
620+
| GuildEmoji
621621
| StageInstance
622622
| GuildSticker
623623
| Thread
@@ -689,7 +689,7 @@ def _convert_target_invite(self, target_id: int) -> Invite:
689689
pass
690690
return obj
691691

692-
def _convert_target_emoji(self, target_id: int) -> Emoji | Object:
692+
def _convert_target_emoji(self, target_id: int) -> GuildEmoji | Object:
693693
return self._state.get_emoji(target_id) or Object(id=target_id)
694694

695695
def _convert_target_message(self, target_id: int) -> Member | User | None:

discord/channel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
from . import utils
3434
from .asset import Asset
35-
from .emoji import Emoji
35+
from .emoji import GuildEmoji
3636
from .enums import (
3737
ChannelType,
3838
EmbeddedActivity,
@@ -143,7 +143,7 @@ def __init__(
143143
self.emoji = PartialEmoji.from_str(emoji)
144144
else:
145145
raise TypeError(
146-
"emoji must be a Emoji, PartialEmoji, or str and not"
146+
"emoji must be a GuildEmoji, PartialEmoji, or str and not"
147147
f" {emoji.__class__!r}"
148148
)
149149

@@ -1018,7 +1018,7 @@ class ForumChannel(_TextChannel):
10181018
The initial slowmode delay to set on newly created threads in this channel.
10191019
10201020
.. versionadded:: 2.3
1021-
default_reaction_emoji: Optional[:class:`str` | :class:`discord.Emoji`]
1021+
default_reaction_emoji: Optional[:class:`str` | :class:`discord.GuildEmoji`]
10221022
The default forum reaction emoji.
10231023
10241024
.. versionadded:: 2.5
@@ -1087,7 +1087,7 @@ async def edit(
10871087
default_auto_archive_duration: ThreadArchiveDuration = ...,
10881088
default_thread_slowmode_delay: int = ...,
10891089
default_sort_order: SortOrder = ...,
1090-
default_reaction_emoji: Emoji | int | str | None = ...,
1090+
default_reaction_emoji: GuildEmoji | int | str | None = ...,
10911091
available_tags: list[ForumTag] = ...,
10921092
require_tag: bool = ...,
10931093
overwrites: Mapping[Role | Member | Snowflake, PermissionOverwrite] = ...,
@@ -1138,10 +1138,10 @@ async def edit(self, *, reason=None, **options):
11381138
The default sort order type to use to order posts in this channel.
11391139
11401140
.. versionadded:: 2.3
1141-
default_reaction_emoji: Optional[:class:`discord.Emoji` | :class:`int` | :class:`str`]
1141+
default_reaction_emoji: Optional[:class:`discord.GuildEmoji` | :class:`int` | :class:`str`]
11421142
The default reaction emoji.
11431143
Can be a unicode emoji or a custom emoji in the forms:
1144-
:class:`Emoji`, snowflake ID, string representation (eg. '<a:emoji_name:emoji_id>').
1144+
:class:`GuildEmoji`, snowflake ID, string representation (eg. '<a:emoji_name:emoji_id>').
11451145
11461146
.. versionadded:: 2.5
11471147
available_tags: List[:class:`ForumTag`]

0 commit comments

Comments
 (0)