Skip to content

Commit cba053d

Browse files
authored
Merge branch 'master' into forwarding
Signed-off-by: UK <41271523+NeloBlivion@users.noreply.github.com>
2 parents 6e50f4e + 8fdf18e commit cba053d

File tree

9 files changed

+28
-19
lines changed

9 files changed

+28
-19
lines changed

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

+1-1
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/github-action@v2.6.0
43+
uses: crowdin/github-action@v2.6.1
4444
with:
4545
upload_sources: false
4646
upload_translations: false

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

+1-1
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/github-action@v2.6.0
47+
uses: crowdin/github-action@v2.6.1
4848
with:
4949
upload_sources: true
5050
upload_translations: false

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ 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 related attributes.
5353
([#2598](https://github.com/Pycord-Development/pycord/pull/2598))
54+
- Added ability to change the API's base URL with `Route.API_BASE_URL`.
55+
([#2714](https://github.com/Pycord-Development/pycord/pull/2714))
5456

5557
### Fixed
5658

discord/ext/pages/pagination.py

+1-1
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

+3-1
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

+1-1
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

docs/_static/css/custom.css

+15-10
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
font-display: swap;
99
src: url(https://fonts.gstatic.com/s/saira/v8/memWYa2wxmKQyPMrZX79wwYZQMhsyuShhKMjjbU9uXuA773FksAxljYm.woff2)
1010
format("woff2");
11-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
12-
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
11+
unicode-range:
12+
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
13+
U+1EA0-1EF9, U+20AB;
1314
}
1415
/* latin-ext */
1516
@font-face {
@@ -20,8 +21,9 @@
2021
font-display: swap;
2122
src: url(https://fonts.gstatic.com/s/saira/v8/memWYa2wxmKQyPMrZX79wwYZQMhsyuShhKMjjbU9uXuA773FksExljYm.woff2)
2223
format("woff2");
23-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
24-
U+2113, U+2C60-2C7F, U+A720-A7FF;
24+
unicode-range:
25+
U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
26+
U+2C60-2C7F, U+A720-A7FF;
2527
}
2628
/* latin */
2729
@font-face {
@@ -32,8 +34,9 @@
3234
font-display: swap;
3335
src: url(https://fonts.gstatic.com/s/saira/v8/memWYa2wxmKQyPMrZX79wwYZQMhsyuShhKMjjbU9uXuA773Fks8xlg.woff2)
3436
format("woff2");
35-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
36-
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
37+
unicode-range:
38+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
39+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
3740
}
3841
/* latin */
3942
@font-face {
@@ -43,8 +46,9 @@
4346
font-display: swap;
4447
src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4W61O4a0Ew.woff2)
4548
format("woff2");
46-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
47-
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
49+
unicode-range:
50+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
51+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
4852
}
4953
/* latin */
5054
@font-face {
@@ -54,8 +58,9 @@
5458
font-display: swap;
5559
src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4deyO4a0Ew.woff2)
5660
format("woff2");
57-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
58-
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
61+
unicode-range:
62+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
63+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
5964
}
6065

6166
/* attribute tables */

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
3-
"setuptools>=62.6,<=75.8.0",
4-
"setuptools-scm>=6.2,<=8.1.0",
3+
"setuptools>=62.6,<=75.8.2",
4+
"setuptools-scm>=6.2,<=8.2.0",
55
]
66
build-backend = "setuptools.build_meta"
77

requirements/dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ mypy~=1.15.0
77
coverage~=7.6
88
pre-commit==4.1.0
99
codespell==2.4.1
10-
bandit==1.8.2
11-
flake8==7.1.1
10+
bandit==1.8.3
11+
flake8==7.1.2

0 commit comments

Comments
 (0)