Skip to content

Commit 7357716

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/role-tags-rewrite
2 parents 304d70b + fca91f7 commit 7357716

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
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

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
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 `RoleType` enum accessible via `Role.type` and `RoleTags.type`.
5353
([#2708](https://github.com/Pycord-Development/pycord/pull/2708))
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/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:

docs/_static/css/custom.css

Lines changed: 15 additions & 10 deletions
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 */

requirements/dev.txt

Lines changed: 2 additions & 2 deletions
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)