Skip to content

Commit cb3748d

Browse files
authored
Merge branch 'master' into master
Signed-off-by: Dorukyum <[email protected]>
2 parents 4cb5c18 + 0e30448 commit cb3748d

File tree

475 files changed

+15450
-6877
lines changed

Some content is hidden

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

475 files changed

+15450
-6877
lines changed

.github/workflows/docs-localization-download.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
working-directory: ./docs
4141
- name: "Crowdin"
4242
id: crowdin
43-
uses: crowdin/[email protected].0
43+
uses: crowdin/[email protected].1
4444
with:
4545
upload_sources: false
4646
upload_translations: false

.github/workflows/docs-localization-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4545
working-directory: ./docs
4646
- name: "Crowdin"
47-
uses: crowdin/[email protected].0
47+
uses: crowdin/[email protected].1
4848
with:
4949
upload_sources: true
5050
upload_translations: false

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
- id: pyupgrade
2727
exclude: \.(po|pot|yml|yaml)$
2828
- repo: https://github.com/PyCQA/isort
29-
rev: 6.0.0
29+
rev: 6.0.1
3030
hooks:
3131
- id: isort
3232
exclude: \.(po|pot|yml|yaml)$

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ These changes are available on the `master` branch, but have not yet been releas
4949
([#2579](https://github.com/Pycord-Development/pycord/pull/2579))
5050
- Added new `Subscription` object and related methods/events.
5151
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
52+
- Added the ability to change the API's base URL with `Route.API_BASE_URL`.
53+
([#2714](https://github.com/Pycord-Development/pycord/pull/2714))
54+
- Added the ability to pass a `datetime.time` object to `format_dt`
55+
([#2747](https://github.com/Pycord-Development/pycord/pull/2747))
5256
- Added `positional` argument to `commands.Flag`.
5357
([#2443](https://github.com/Pycord-Development/pycord/pull/2443))
5458

@@ -97,6 +101,10 @@ These changes are available on the `master` branch, but have not yet been releas
97101
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
98102
- Fixed `Subscription.renewal_sku_ids` not accepting `None` from the received payload.
99103
([#2709](https://github.com/Pycord-Development/pycord/pull/2709))
104+
- Fixed `ForumChannel.edit` allowing `default_reaction_emoji` to be `None`
105+
([#2739](https://github.com/Pycord-Development/pycord/pull/2739))
106+
- Fixed missing `None` type hints in `Select.__init__`.
107+
([#2746])(https://github.com/Pycord-Development/pycord/pull/2746)
100108

101109
### Changed
102110

discord/abc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,17 @@ async def _edit(
521521
)
522522
elif isinstance(default_reaction_emoji, str):
523523
default_reaction_emoji = PartialEmoji.from_str(default_reaction_emoji)
524+
elif default_reaction_emoji is None:
525+
pass
524526
else:
525527
raise InvalidArgument(
526-
"default_reaction_emoji must be of type: GuildEmoji | int | str"
528+
"default_reaction_emoji must be of type: GuildEmoji | int | str | None"
527529
)
528530

529531
options["default_reaction_emoji"] = (
530532
default_reaction_emoji._to_forum_reaction_payload()
533+
if default_reaction_emoji
534+
else None
531535
)
532536

533537
if options:

discord/ext/bridge/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def __getattribute__(self, name):
232232
except AttributeError as e:
233233
# if it doesn't exist, check this list, if the name of
234234
# the parameter is here
235-
if name is self.__special_attrs__:
235+
if name in self.__special_attrs__:
236236
raise e
237237

238238
# looks up the result in the variants.

discord/ext/pages/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ async def respond(
11631163
if target is not None and not isinstance(target, discord.abc.Messageable):
11641164
raise TypeError(f"expected abc.Messageable not {target.__class__!r}")
11651165

1166-
if ephemeral and (self.timeout >= 900 or self.timeout is None):
1166+
if ephemeral and (self.timeout is None or self.timeout >= 900):
11671167
raise ValueError(
11681168
"paginator responses cannot be ephemeral if the paginator timeout is 15"
11691169
" minutes or greater"

discord/http.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ async def json_or_text(response: aiohttp.ClientResponse) -> dict[str, Any] | str
106106

107107

108108
class Route:
109+
API_BASE_URL: str = "https://discord.com/api/v{API_VERSION}"
110+
109111
def __init__(self, method: str, path: str, **parameters: Any) -> None:
110112
self.path: str = path
111113
self.method: str = method
@@ -127,7 +129,7 @@ def __init__(self, method: str, path: str, **parameters: Any) -> None:
127129

128130
@property
129131
def base(self) -> str:
130-
return f"https://discord.com/api/v{API_VERSION}"
132+
return self.API_BASE_URL.format(API_VERSION=API_VERSION)
131133

132134
@property
133135
def bucket(self) -> str:

discord/role.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class RoleTags:
6262
6363
Role tags are a fairly complex topic, since it's usually hard to determine which role tag combination represents which role type.
6464
We aim to improve the documentation / introduce new attributes in future.
65-
For the meantime read `this <https://lulalaby.notion.site/Special-Roles-Documentation-17411d3839e680abbb1eff63c51bd7a7?pvs=4>`_ if you need detailed information about how role tags work.
65+
For the meantime read `this <https://discord-lib-devs.notion.site/special-roles-role-tags>`_ if you need detailed information about how role tags work.
6666
6767
.. versionadded:: 1.6
6868

discord/ui/select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def __init__(
130130
placeholder: str | None = None,
131131
min_values: int = 1,
132132
max_values: int = 1,
133-
options: list[SelectOption] = None,
134-
channel_types: list[ChannelType] = None,
133+
options: list[SelectOption] | None = None,
134+
channel_types: list[ChannelType] | None = None,
135135
disabled: bool = False,
136136
row: int | None = None,
137137
) -> None:

0 commit comments

Comments
 (0)