Skip to content

Commit 52a069b

Browse files
VincentRPSLulalabypre-commit-ci[bot]DorukyumNeloBlivion
authored
chore: Merge upstream (#62)
* chore: 📝 update license format in pyproject.toml (Pycord-Development#2824) * 📝 update license format in pyproject.toml * chore: reference license file Signed-off-by: Lala Sabathil <[email protected]> * fix: classifer is invalid now Signed-off-by: Lala Sabathil <[email protected]> --------- Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> (cherry picked from commit 1c65fc8) * docs: 📝 Fix malformed hyperlink in CHANGELOG.md number 2 (Pycord-Development#2806) * 📝 Fix hyperlink in CHANGELOG.md * Update CHANGELOG.md Signed-off-by: Lala Sabathil <[email protected]> * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]> (cherry picked from commit 1214a70) * feat: components v2 & `View` improvements (Pycord-Development#2707) Signed-off-by: UK <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Signed-off-by: plun1331 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Paillat <[email protected]> Co-authored-by: Ice Wolfy <[email protected]> Co-authored-by: plun1331 <[email protected]> Co-authored-by: JustaSqu1d <[email protected]> (cherry picked from commit a5aa21f) * fix: 4006 voice crashes and upgrade to voice v8 (Pycord-Development#2812) Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]> (cherry picked from commit 2ae01b7) * fix: 🐛 Fix missing self. attribution in File component (Pycord-Development#2843) * 🐛 Fix missing self. attribution in File * 📝 CHANGELOG.md (cherry picked from commit 0102b7d) * fix: 🐛 Fix issue in cv2 example (Pycord-Development#2842) :bug: Fix error in on_timeout, should use .parent not .message (cherry picked from commit 9bef192) * docs: 📝 update docstrings for Asset and Attachment classes to clarify hash return values (Pycord-Development#2832) :memo: update docstrings for Asset and Attachment classes to clarify hash return values (cherry picked from commit 35c7dc1) * fix: 🐛 Issue in `@option` where some annotations could not be used along with `channel_types` (Pycord-Development#2835) * 🐛 Option: Always set `input_type` to `SlashCommandOptionType.channel` when `channel_types` is set * 📝 CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Paillat <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]> (cherry picked from commit 213b639) * feat: allow conversion to Member in MentionableConverter (Pycord-Development#2775) * Update CHANGELOG.md Signed-off-by: Lumouille <[email protected]> * fix member not being converted Signed-off-by: Lumouille <[email protected]> * fix member not being converted Signed-off-by: Lumouille <[email protected]> * style(pre-commit): auto fixes from pre-commit.com hooks * Update CHANGELOG.md Signed-off-by: Lumouille <[email protected]> * Update CHANGELOG.md Signed-off-by: Lumouille <[email protected]> * Update CHANGELOG.md Co-authored-by: plun1331 <[email protected]> Signed-off-by: Lumouille <[email protected]> * refactor(bridge): remove redundant constructor in BridgeOption * feat(bridge): enhance BridgeOption initialization with converter support * Update discord/ext/bridge/core.py Co-authored-by: Dorukyum <[email protected]> Signed-off-by: Lumouille <[email protected]> * improved code quality --------- Signed-off-by: Lumouille <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: plun1331 <[email protected]> Co-authored-by: Dorukyum <[email protected]> (cherry picked from commit a82f562) * feat: ✨ Add missing feature flags to `Guild.edit` (Pycord-Development#2672) * ✨ Add missing `Guild` feature flags * ✨ Add `Guild.activity_feed_enabled` to know whether the activity feed is enabled for the guild. * 📝 Docs * 📝 CHANGELOG.md * chore: 👽 Update base max filesize to `10` Mb (Pycord-Development#2671) * 👽 Update base max filesize to `10` Mb * 📝 CHANGELOG.md * 📝 Requested changes * ⚡ Compute `features` only once * Remove variable * ♻️ change `raid_alerts` to `enable_raid_alerts` * 🚑 Forgot to rename `enable_raid_alerts` * ♻️ change `enable_raid_alerts` to `disable_raid_alerts` Signed-off-by: Dorukyum <[email protected]> * fix docstring Signed-off-by: Dorukyum <[email protected]> --------- Signed-off-by: Paillat <[email protected]> Signed-off-by: Dorukyum <[email protected]> Co-authored-by: Dorukyum <[email protected]> (cherry picked from commit 3bb7163) # Conflicts: # discord/guild.py # discord/types/guild.py * feat(translations): add turkish Signed-off-by: Lala Sabathil <[email protected]> (cherry picked from commit a990e74) * docs: Update localizations from Crowdin (Pycord-Development#2846) Co-authored-by: Crowdin Bot <[email protected]> (cherry picked from commit dd7d5a6) * feat(commands): add support for typing.Literal[...] as command choices (Pycord-Development#2782) * fix: add support for Literal type in typing annotations for Discord choices * Update CHANGELOG.md * Update CHANGELOG.md Signed-off-by: Lumouille <[email protected]> * Update CHANGELOG.md Co-authored-by: JustaSqu1d <[email protected]> Signed-off-by: Lumouille <[email protected]> * refactor: move condition to method * docs: update changelog * fix: ensure all literal values are of the same type in SlashCommand options * Update discord/commands/core.py Co-authored-by: Paillat <[email protected]> Signed-off-by: Lumouille <[email protected]> * Update discord/commands/core.py Co-authored-by: Paillat <[email protected]> Signed-off-by: Lumouille <[email protected]> * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Lumouille <[email protected]> Co-authored-by: JustaSqu1d <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Paillat <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 4392105) * fix: retain original File item urls for editing (Pycord-Development#2847) * fix file component patching * style(pre-commit): auto fixes from pre-commit.com hooks * component typing --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit bda1dfe) * feat: ✨ Add support for role gradient colors in Role (Pycord-Development#2818) * ✨ Add support for enhanced role colors in `Role` * ✨ add RoleColours support to `Role.edit` * ✨ add RoleColours support to role creation in `Guild` and define default colors in `RoleColours` * ✨ add support for RoleColours in role creation and editing * ✨ update role attributes to use RoleColours and enhance color properties * 📝 CHANGELOG.md * 📝 add documentation for RoleColours and its attributes * ✏️ fix version annotation for primary color method in role.py * ✨ add holographic role support in RoleColours * 📝 update tertiary color documentation to specify allowed value * ✨ Finish implementing holographic support * 🗑️ Add deprecation warnings for singular colour properties in Role and Guild (cherry picked from commit 975a0d9) * feat: ✨ add Nameplate class and integration (Pycord-Development#2817) * ✨ add Nameplate class and integration in user model * 🏷️ feat: add nameplate attribute to User class * ✨ add NameplatePalette enum and enhance Nameplate class with asset retrieval * 📝 add nameplate attribute to User class documentation * 📝 CHANGELOG.md * 📝 add versionadded directive for Nameplate class and NameplatePalette enum * 📝 update Nameplate class documentation to include undocumented members * ✏️ Fix typo in NameplatePalette * 📝 standardize nameplate color attributes to lowercase and document each color in enums * 📝 refine Nameplate class docstring for clarity * Update discord/collectibles.py Signed-off-by: Paillat <[email protected]> * ♻️ remove NameplatePalette enum and change palette type to str --------- Signed-off-by: Paillat <[email protected]> Signed-off-by: Paillat <[email protected]> (cherry picked from commit 58c0dfc) * feat: Added support for emoji aliases like `:smile:` in PartialEmoji.from_str (redo) (Pycord-Development#2815) * Revert "Revert "fix: support emoji aliases like `:smile:` in PartialEmoji.fro…" This reverts commit 8619b69. * Update discord/partial_emoji.py Co-authored-by: Paillat <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> * Update CHANGELOG.md Signed-off-by: Lala Sabathil <[email protected]> * Update CHANGELOG.md Signed-off-by: Lala Sabathil <[email protected]> * Update MANIFEST.in Signed-off-by: Lala Sabathil <[email protected]> * feat: allow usage of unicode emoji in PartialEmojiConverter (Pycord-Development#2819) * Update converter.py * fix: enhance PartialEmojiConverter to support direct emoji names * update doc * Revert 2814 revert 2774 emoji (Pycord-Development#2820) * Add Unicode emoji support to PartialEmojiConverter PartialEmojiConverter now recognizes standard Unicode emojis using a new UNICODE_EMOJIS set loaded from emojis.json. The emoji mapping and set are moved to discord.utils for reuse, and references in partial_emoji.py are updated accordingly. * style(pre-commit): auto fixes from pre-commit.com hooks * Update converter.py Signed-off-by: Lumouille <[email protected]> * Update converter.py * fix(utils): update UNICODE_EMOJIS to use values from EMOJIS_MAP --------- Signed-off-by: Lumouille <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * added back support of smile and `:smile:` (Pycord-Development#2822) * Add Unicode emoji support to PartialEmojiConverter PartialEmojiConverter now recognizes standard Unicode emojis using a new UNICODE_EMOJIS set loaded from emojis.json. The emoji mapping and set are moved to discord.utils for reuse, and references in partial_emoji.py are updated accordingly. * style(pre-commit): auto fixes from pre-commit.com hooks * Update converter.py Signed-off-by: Lumouille <[email protected]> * Update converter.py * fix(utils): update UNICODE_EMOJIS to use values from EMOJIS_MAP * fix(partial_emoji): simplify emoji name extraction by using removeprefix and removesuffix * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Lumouille <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Update discord/partial_emoji.py Signed-off-by: Lala Sabathil <[email protected]> * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/partial_emoji.py Co-authored-by: Paillat <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> * Update CHANGELOG.md Co-authored-by: Lumouille <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/utils.py Co-authored-by: Lumouille <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> --------- Signed-off-by: Lala Sabathil <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Signed-off-by: Lumouille <[email protected]> Co-authored-by: Paillat <[email protected]> Co-authored-by: Lumouille <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <[email protected]> (cherry picked from commit 4ccb0c0) * Update readthedocs.yml Signed-off-by: Lala Sabathil <[email protected]> (cherry picked from commit bf26465) * chore(ci): update execute-whitelist-action Signed-off-by: Lala Sabathil <[email protected]> (cherry picked from commit 7c598bc) * feat: added Interaction.attachment_size_limit (Pycord-Development#2854) Signed-off-by: hich4t <[email protected]> Co-authored-by: Paillat <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> (cherry picked from commit b43969a) * feat: Replaced useless `cached_property` with `property` and moved to `functools.cached_property` (Pycord-Development#2769) * feat: Replaced useless `cached_property` with `property` and moved to `functools.cached_property` * style(pre-commit): auto fixes from pre-commit.com hooks * chore: switch to `functools.cached_property` for intensive code * style(pre-commit): auto fixes from pre-commit.com hooks * Update context.py Signed-off-by: Paillat <[email protected]> --------- Signed-off-by: Paillat <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <[email protected]> (cherry picked from commit 7ab3af9) * fix: support new voice encryption modes (Pycord-Development#2651) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ice Wolfy <[email protected]> Co-authored-by: Paillat <[email protected]> (cherry picked from commit 8e2185c) * ⬆️ Upgrade deps * 🚨 Fix ruff warnings and format code * 🩹 Fix import --------- Signed-off-by: Lala Sabathil <[email protected]> Signed-off-by: Paillat <[email protected]> Signed-off-by: Lala Sabathil <[email protected]> Signed-off-by: Lumouille <[email protected]> Signed-off-by: Paillat <[email protected]> Signed-off-by: Paillat <[email protected]> Signed-off-by: hich4t <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: UK <[email protected]> Co-authored-by: DA344 <[email protected]> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: Lumouille <[email protected]> Co-authored-by: plun1331 <[email protected]> Co-authored-by: Nyuw~ <[email protected]> Co-authored-by: Crowdin Bot <[email protected]> Co-authored-by: JustaSqu1d <[email protected]> Co-authored-by: hich4t <[email protected]> Co-authored-by: Riccardo Vaccari <[email protected]>
2 parents f9f3f33 + 366c547 commit 52a069b

File tree

558 files changed

+55547
-13951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+55547
-13951
lines changed

.github/workflows/readthedocs.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,11 @@ jobs:
1818
environment: documentation
1919
strategy:
2020
matrix:
21-
rdt_projects: [
22-
"pycord-spanish",
23-
"pycord-japanese",
24-
"pycord-brazilian",
25-
"pycord-russian",
26-
"pycord-german",
27-
"pycord-hindi",
28-
"pycord-korean",
29-
"pycord-italian",
30-
"pycord-chinese",
31-
"pycord-french"
32-
]
21+
rdt_projects: ["pycord-spanish", "pycord-japanese", "pycord-brazilian", "pycord-russian", "pycord-german", "pycord-hindi", "pycord-korean", "pycord-italian", "pycord-chinese", "pycord-french", "pyord-turkish"]
3322
steps:
3423
- name: "Trigger RDT ${{ matrix.rdt_projects }}"
3524
run: |
3625
PROJECT=${{ matrix.rdt_projects }}
3726
curl --location --request POST "https://readthedocs.org/api/v3/projects/$PROJECT/versions/master/builds/" \
3827
--header 'Content-Type: application/json' \
39-
--header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}"
28+
--header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ ci:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v5.0.0
6+
rev: v6.0.0
77
hooks:
88
- id: trailing-whitespace
99
exclude: \.(po|pot|yml|yaml)$
1010
- id: end-of-file-fixer
1111
exclude: \.(po|pot|yml|yaml)$
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.11.9
13+
rev: v0.12.9
1414
hooks:
1515
- id: ruff
1616
args: [ --fix ]

CHANGELOG.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,24 @@ These changes are available on the `master` branch, but have not yet been releas
5151
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
5252
- Added `Message.forward_to`, `Message.snapshots`, and other related attributes.
5353
([#2598](https://github.com/Pycord-Development/pycord/pull/2598))
54+
- Add missing `Guild` feature flags and `Guild.edit` parameters.
55+
([#2672](https://github.com/Pycord-Development/pycord/pull/2672))
5456
- Added the ability to change the API's base URL with `Route.API_BASE_URL`.
5557
([#2714](https://github.com/Pycord-Development/pycord/pull/2714))
5658
- Added the ability to pass a `datetime.time` object to `format_dt`.
5759
([#2747](https://github.com/Pycord-Development/pycord/pull/2747))
60+
- Added support for type hinting slash command options with `typing.Annotated`.
61+
([#2782](https://github.com/Pycord-Development/pycord/pull/2782))
62+
- Added conversion to `Member` in `MentionableConverter`.
63+
([#2775](https://github.com/Pycord-Development/pycord/pull/2775))
5864
- Added `discord.Interaction.created_at`.
5965
([#2801](https://github.com/Pycord-Development/pycord/pull/2801))
66+
- Added `User.nameplate` property.
67+
([#2817](https://github.com/Pycord-Development/pycord/pull/2817))
68+
- Added role gradients support with `Role.colours` and the `RoleColours` class.
69+
([#2818](https://github.com/Pycord-Development/pycord/pull/2818))
70+
- Added `Interaction.attachment_size_limit`.
71+
([#2854](https://github.com/Pycord-Development/pycord/pull/2854))
6072

6173
### Fixed
6274

@@ -113,12 +125,21 @@ These changes are available on the `master` branch, but have not yet been releas
113125
([#2761](https://github.com/Pycord-Development/pycord/pull/2761))
114126
- Updated `valid_locales` to support `in` and `es-419`.
115127
([#2767](https://github.com/Pycord-Development/pycord/pull/2767))
128+
- Added support for emoji aliases like `:smile:` in PartialEmoji.from_str. Also applied
129+
the same logic in PartialEmojiConverter.
130+
([#2815](https://github.com/Pycord-Development/pycord/pull/2815))
116131
- Fixed `Webhook.edit` not working with `attachments=[]`.
117132
([#2779](https://github.com/Pycord-Development/pycord/pull/2779))
118133
- Fixed GIF-based `Sticker` returning the wrong `url`.
119134
([#2781](https://github.com/Pycord-Development/pycord/pull/2781))
120135
- Fixed `VoiceClient` crashing randomly while receiving audio
121136
([#2800](https://github.com/Pycord-Development/pycord/pull/2800))
137+
- Fixed `VoiceClient.connect` failing to do initial connection.
138+
([#2812](https://github.com/Pycord-Development/pycord/pull/2812))
139+
- Fixed `AttributeError` when printing a File component's `__repr__`.
140+
([#2843](https://github.com/Pycord-Development/pycord/pull/2843))
141+
- Fixed `TypeError` when using `@option` with certain annotations and along with
142+
`channel_types`. ([#2835](https://github.com/Pycord-Development/pycord/pull/2835))
122143

123144
### Changed
124145

@@ -138,6 +159,8 @@ These changes are available on the `master` branch, but have not yet been releas
138159
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
139160
- Changed the default value of `ApplicationCommand.nsfw` to `False`.
140161
([#2797](https://github.com/Pycord-Development/pycord/pull/2797))
162+
- Upgraded voice websocket version to v8.
163+
([#2812](https://github.com/Pycord-Development/pycord/pull/2812))
141164

142165
### Deprecated
143166

@@ -150,8 +173,8 @@ These changes are available on the `master` branch, but have not yet been releas
150173

151174
### Removed
152175

153-
- Removed deprecated support for `Option` in `BridgeCommand`. Use `BridgeOption`
154-
instead. ([#2731])(https://github.com/Pycord-Development/pycord/pull/2731))
176+
- Removed deprecated support for `Option` in `BridgeCommand`, use `BridgeOption`
177+
instead. ([#2731](https://github.com/Pycord-Development/pycord/pull/2731))
155178

156179
## [2.6.1] - 2024-09-15
157180

crowdin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ preserve_hierarchy: true
55

66
commit_message: "docs: Update translations"
77

8-
export_languages: ["de", "ja", "fr", "it", "hi", "ko", "pt-BR", "es-ES", "zh-CN"]
8+
export_languages: ["de", "ja", "fr", "it", "hi", "ko", "pt-BR", "es-ES", "zh-CN", "tr"]
99

1010
bundles:
1111
- 1

discord/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from .channel import *
3636
from .client import *
3737
from .cog import *
38+
from .collectibles import *
3839
from .colour import *
3940
from .commands import *
4041
from .components import *

discord/abc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,10 @@ async def send(
15451545
raise InvalidArgument(f"view parameter must be View not {view.__class__!r}")
15461546

15471547
components = view.to_components()
1548+
if view.is_components_v2():
1549+
if embeds or content:
1550+
raise TypeError("cannot send embeds or content with a view using v2 component logic")
1551+
flags.is_components_v2 = True
15481552
else:
15491553
components = None
15501554

@@ -1605,8 +1609,10 @@ async def send(
16051609

16061610
ret = state.create_message(channel=channel, data=data)
16071611
if view:
1608-
state.store_view(view, ret.id)
1612+
if view.is_dispatchable():
1613+
state.store_view(view, ret.id)
16091614
view.message = ret
1615+
view.refresh(ret.components)
16101616

16111617
if delete_after is not None:
16121618
await ret.delete(delay=delete_after)

discord/asset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ class Asset(AssetMixin):
144144
145145
.. describe:: hash(x)
146146
147-
Returns the hash of the asset.
147+
Returns the asset's url's hash.
148+
149+
This is equivalent to hash(:attr:`url`).
148150
"""
149151

150152
__slots__: tuple[str, ...] = (

discord/audit_logs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,12 +568,12 @@ def _get_member(self, user_id: int) -> Member | User | None:
568568
def __repr__(self) -> str:
569569
return f"<AuditLogEntry id={self.id} action={self.action} user={self.user!r}>"
570570

571-
@utils.cached_property
571+
@property
572572
def created_at(self) -> datetime.datetime:
573573
"""Returns the entry's creation time in UTC."""
574574
return utils.snowflake_time(self.id)
575575

576-
@utils.cached_property
576+
@property
577577
def target(
578578
self,
579579
) -> (
@@ -597,24 +597,24 @@ def target(
597597
else:
598598
return converter(self._target_id)
599599

600-
@utils.cached_property
600+
@property
601601
def category(self) -> enums.AuditLogActionCategory:
602602
"""The category of the action, if applicable."""
603603
return self.action.category
604604

605-
@utils.cached_property
605+
@property
606606
def changes(self) -> AuditLogChanges:
607607
"""The list of changes this entry has."""
608608
obj = AuditLogChanges(self, self._changes, state=self._state)
609609
del self._changes
610610
return obj
611611

612-
@utils.cached_property
612+
@property
613613
def before(self) -> AuditLogDiff:
614614
"""The target's prior state."""
615615
return self.changes.before
616616

617-
@utils.cached_property
617+
@property
618618
def after(self) -> AuditLogDiff:
619619
"""The target's subsequent state."""
620620
return self.changes.after

discord/automod.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ def __repr__(self) -> str:
406406
def __str__(self) -> str:
407407
return self.name
408408

409-
@cached_property
409+
@property
410410
def guild(self) -> Guild | None:
411411
"""The guild this rule belongs to."""
412412
return self._state._get_guild(self.guild_id)
413413

414-
@cached_property
414+
@property
415415
def creator(self) -> Member | None:
416416
"""The member who created this rule."""
417417
if self.guild is None:

discord/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,13 +803,13 @@ async def process_application_commands(self, interaction: Interaction, auto_sync
803803

804804
ctx = await self.get_application_context(interaction)
805805
if command:
806-
ctx.command = command
806+
interaction.command = command
807807
await self.invoke_application_command(ctx)
808808

809809
async def on_application_command_auto_complete(self, interaction: Interaction, command: ApplicationCommand) -> None:
810810
async def callback() -> None:
811811
ctx = await self.get_autocomplete_context(interaction)
812-
ctx.command = command
812+
interaction.command = command
813813
return await command.invoke_autocomplete_callback(ctx)
814814

815815
autocomplete_task = self._bot.loop.create_task(callback())

0 commit comments

Comments
 (0)