Compare commits
352 Commits
3.5.1
...
V3/develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b42bab4de9 | ||
|
|
e868872214 | ||
|
|
bee0ddbffc | ||
|
|
2de3d03cc9 | ||
|
|
056f2de557 | ||
|
|
34cbd15ba9 | ||
|
|
9a458fdd83 | ||
|
|
0e78051c5d | ||
|
|
53766173d0 | ||
|
|
36a5f752a2 | ||
|
|
b2007a718d | ||
|
|
015f5a00fd | ||
|
|
6e417419aa | ||
|
|
316f237397 | ||
|
|
75e37ca896 | ||
|
|
c701c79ed0 | ||
|
|
60323c99d1 | ||
|
|
b7c11c016e | ||
|
|
bdc66c3f56 | ||
|
|
e6c6b9874b | ||
|
|
40b01c7985 | ||
|
|
666e249413 | ||
|
|
1bfe2a78fa | ||
|
|
afe4e636b7 | ||
|
|
45c55418a4 | ||
|
|
29758fd104 | ||
|
|
8626aef36f | ||
|
|
18154465c3 | ||
|
|
07e6f1b264 | ||
|
|
effc390ddf | ||
|
|
9afbe363e5 | ||
|
|
5023f7f1b5 | ||
|
|
01a3c17f8e | ||
|
|
fe574189d6 | ||
|
|
fec1818e5a | ||
|
|
dd3b9a01d3 | ||
|
|
a809c3604a | ||
|
|
982f082cb0 | ||
|
|
6a4d777723 | ||
|
|
4dc18342d9 | ||
|
|
71311c446a | ||
|
|
d4a1ee38f0 | ||
|
|
8507b0165f | ||
|
|
c7651da2f9 | ||
|
|
4d24365d17 | ||
|
|
d2f0f8d5ed | ||
|
|
cc803579a0 | ||
|
|
0271dee092 | ||
|
|
1e5620935d | ||
|
|
031e57891c | ||
|
|
72f8952baf | ||
|
|
0e25534677 | ||
|
|
cfbf2fa401 | ||
|
|
a65509c67c | ||
|
|
936e17338c | ||
|
|
6c3c2e8fa7 | ||
|
|
8c3cdf20a6 | ||
|
|
f68580fab9 | ||
|
|
ec66666036 | ||
|
|
3fd23d4163 | ||
|
|
2dbbb51208 | ||
|
|
b177c80b4e | ||
|
|
029029e9a5 | ||
|
|
c6ff2191f3 | ||
|
|
6603cd1a86 | ||
|
|
1daf56f3d8 | ||
|
|
b3f0349ba2 | ||
|
|
bfc3561928 | ||
|
|
8d8918b3c6 | ||
|
|
550cf49bc8 | ||
|
|
313eeffc84 | ||
|
|
88e1f72467 | ||
|
|
3c6146d6ca | ||
|
|
bfab9cc5f8 | ||
|
|
07ee31a88f | ||
|
|
bd61c105e0 | ||
|
|
db0e831a2e | ||
|
|
d7a56f1518 | ||
|
|
5f2c6d19d1 | ||
|
|
7b3600ecb1 | ||
|
|
6f5f34c80a | ||
|
|
2e902b067e | ||
|
|
61695daded | ||
|
|
10889642ce | ||
|
|
a3b254fe8e | ||
|
|
71554c981d | ||
|
|
e1225029b0 | ||
|
|
85923d4c0f | ||
|
|
19b34c63b2 | ||
|
|
60e819159f | ||
|
|
0f4c7b0fe6 | ||
|
|
3bf7c64d01 | ||
|
|
4558b72082 | ||
|
|
73958d87f1 | ||
|
|
d6054412f4 | ||
|
|
5cf69bdc51 | ||
|
|
2fd6ea88d9 | ||
|
|
50ad59a6c8 | ||
|
|
dfc1e742f8 | ||
|
|
769c319ffd | ||
|
|
3c1f2cddfd | ||
|
|
1299db0f3a | ||
|
|
c58d208ca2 | ||
|
|
c308ea0184 | ||
|
|
8e0948d560 | ||
|
|
952a372652 | ||
|
|
a0c1713e78 | ||
|
|
8b1daf1ad0 | ||
|
|
dcdef9d798 | ||
|
|
f962aeb7b8 | ||
|
|
b13b1f8f16 | ||
|
|
6bf2a88995 | ||
|
|
22888f8014 | ||
|
|
ba44370020 | ||
|
|
cd0e8750c1 | ||
|
|
679289fd1c | ||
|
|
ce6489325e | ||
|
|
d64cbdf83e | ||
|
|
66d1c87b5a | ||
|
|
3888f09cfa | ||
|
|
8ad9c55d50 | ||
|
|
3aac07a4d7 | ||
|
|
bd26e7d5af | ||
|
|
9392077434 | ||
|
|
1f48919005 | ||
|
|
fdaa869130 | ||
|
|
18614b1604 | ||
|
|
016684bcce | ||
|
|
5cfb8edab8 | ||
|
|
150692538f | ||
|
|
f4ffc6bc80 | ||
|
|
9419f2642a | ||
|
|
f0a29e9815 | ||
|
|
d29ae723c1 | ||
|
|
9920628948 | ||
|
|
48b2fe77c0 | ||
|
|
33e0eac741 | ||
|
|
2871992772 | ||
|
|
30058c0f73 | ||
|
|
4134881fae | ||
|
|
4396323205 | ||
|
|
4e27059209 | ||
|
|
d3887b595f | ||
|
|
005b8af10a | ||
|
|
d304da7a16 | ||
|
|
f3c89ad8bd | ||
|
|
05cf9b7f39 | ||
|
|
907a3f7561 | ||
|
|
2595c9de10 | ||
|
|
8be7b0850c | ||
|
|
61ec913789 | ||
|
|
88b11f2b9c | ||
|
|
9ca0ced2d8 | ||
|
|
a5a178bfaf | ||
|
|
eeb90aaa45 | ||
|
|
b7a59b5e4c | ||
|
|
2769ea025f | ||
|
|
818420a641 | ||
|
|
3c49a77e34 | ||
|
|
90691ba2b9 | ||
|
|
68f2806204 | ||
|
|
903992f48a | ||
|
|
e4b75f5333 | ||
|
|
254d5a91d6 | ||
|
|
b979a7c4d1 | ||
|
|
54a29174ea | ||
|
|
5bbced5b0d | ||
|
|
5b21c89505 | ||
|
|
04d856cfb0 | ||
|
|
701339f8a1 | ||
|
|
3d04d696c1 | ||
|
|
0b8bcef86c | ||
|
|
2d47d75919 | ||
|
|
7eb26da647 | ||
|
|
699471f27a | ||
|
|
2c2080df12 | ||
|
|
fa7236af63 | ||
|
|
601816abc0 | ||
|
|
bf8c0d03b5 | ||
|
|
2e40ec4a1a | ||
|
|
9b9fdf555b | ||
|
|
7dee8d7963 | ||
|
|
0281d6c93e | ||
|
|
f4c8077268 | ||
|
|
7b8acd7ef6 | ||
|
|
6ee976c341 | ||
|
|
0b0b23b971 | ||
|
|
2b1e603124 | ||
|
|
dd61b669b0 | ||
|
|
57b76bc0d7 | ||
|
|
573e5c2b40 | ||
|
|
ad1e1aa2ba | ||
|
|
4242a7adf2 | ||
|
|
e03f97d1cd | ||
|
|
975c0007fe | ||
|
|
bef3aa5f69 | ||
|
|
cbf8247e6e | ||
|
|
23c86d7850 | ||
|
|
aa21091b84 | ||
|
|
72ec88aa3c | ||
|
|
b1f331e51f | ||
|
|
0c9c210dbb | ||
|
|
47d4675f52 | ||
|
|
80d0bab29a | ||
|
|
e61327a65c | ||
|
|
11ebd40dfa | ||
|
|
00e41d38f9 | ||
|
|
afb4f6079a | ||
|
|
97b467939c | ||
|
|
f54499eaba | ||
|
|
f8d6bbb0af | ||
|
|
24afd61a85 | ||
|
|
8e118733ea | ||
|
|
f01c0ec675 | ||
|
|
94d12cb45f | ||
|
|
e9ed52cf16 | ||
|
|
194dea545d | ||
|
|
59400204e8 | ||
|
|
1c863c7b3b | ||
|
|
ad9e00d1d9 | ||
|
|
463f0c5e6d | ||
|
|
e71312ede0 | ||
|
|
48d74712bc | ||
|
|
c3a493a500 | ||
|
|
4034ddd452 | ||
|
|
2ae1eb9ec9 | ||
|
|
0b390fe2f6 | ||
|
|
b2e7458353 | ||
|
|
6adb7e6de7 | ||
|
|
1756593785 | ||
|
|
c3b96b7a9e | ||
|
|
a26b9d6d3a | ||
|
|
76c2c75f2c | ||
|
|
afabc4769d | ||
|
|
b5e6231408 | ||
|
|
de1141af98 | ||
|
|
24cc3115fe | ||
|
|
a3e371e0ab | ||
|
|
bc76d53cd5 | ||
|
|
273ad147c8 | ||
|
|
3a81e8327f | ||
|
|
8c2976504a | ||
|
|
4c7a691ec9 | ||
|
|
f5011a90e1 | ||
|
|
0c83fcd495 | ||
|
|
293d8065ec | ||
|
|
a30f9ff7e6 | ||
|
|
edfb9ffe62 | ||
|
|
f5f684bad5 | ||
|
|
9dc7462d0f | ||
|
|
9345b691b3 | ||
|
|
185b607544 | ||
|
|
ff09713aad | ||
|
|
dbd71db6a8 | ||
|
|
409ece427f | ||
|
|
569840e9e6 | ||
|
|
a393a10ceb | ||
|
|
531b4fe357 | ||
|
|
47a267b38b | ||
|
|
d322d91a18 | ||
|
|
76abb7cab2 | ||
|
|
ecccea6781 | ||
|
|
da8cabaf50 | ||
|
|
3fd0afd87d | ||
|
|
fef3fc19ca | ||
|
|
8997bf6002 | ||
|
|
eb3267e332 | ||
|
|
ca84cc9c2a | ||
|
|
6c4a5e5407 | ||
|
|
7dfe24397e | ||
|
|
63359ce831 | ||
|
|
6b81d80588 | ||
|
|
97377a9f8d | ||
|
|
56377b0596 | ||
|
|
4d4cb14725 | ||
|
|
1132498f6c | ||
|
|
5069f464cc | ||
|
|
2157ed4f9b | ||
|
|
ef098c8d02 | ||
|
|
64deccff5f | ||
|
|
d844c6f1f8 | ||
|
|
9ef4271afa | ||
|
|
bb2e3687fc | ||
|
|
979a6aa9eb | ||
|
|
0747b92653 | ||
|
|
47cc879b80 | ||
|
|
b6471797cc | ||
|
|
742339a990 | ||
|
|
e8c89d4d08 | ||
|
|
483682dfb5 | ||
|
|
100de11ce6 | ||
|
|
dbb91dfce8 | ||
|
|
3ac2512c14 | ||
|
|
a06a704365 | ||
|
|
9e23c3a5b8 | ||
|
|
1248927fb6 | ||
|
|
93b51acf31 | ||
|
|
7e03756f06 | ||
|
|
d04cc36bc6 | ||
|
|
6fbcdfc74a | ||
|
|
7e05bec6a0 | ||
|
|
6f920daeed | ||
|
|
df7bbe5b55 | ||
|
|
8e1b906012 | ||
|
|
ba210bd08e | ||
|
|
d8e584b5e8 | ||
|
|
bad23a4a93 | ||
|
|
48cfde7b8c | ||
|
|
8ee3ac9352 | ||
|
|
9c85917dad | ||
|
|
fdcbe00143 | ||
|
|
7dff136937 | ||
|
|
49bf103891 | ||
|
|
41204ccf77 | ||
|
|
b1c3b37235 | ||
|
|
4dc7efab29 | ||
|
|
85cf0f52d9 | ||
|
|
8acc1c3e02 | ||
|
|
be5751a7ea | ||
|
|
30dc128c39 | ||
|
|
3b92c225ac | ||
|
|
9d04f17cd2 | ||
|
|
31700a226e | ||
|
|
dc94c96c9e | ||
|
|
10e09d6abc | ||
|
|
3abf4cac05 | ||
|
|
9b7aa17564 | ||
|
|
f47d1dffb3 | ||
|
|
edb3369169 | ||
|
|
e8ce3d8682 | ||
|
|
a59e73a605 | ||
|
|
69cf604e0e | ||
|
|
1ec95beb56 | ||
|
|
1262921b17 | ||
|
|
8dfa5c2a86 | ||
|
|
327f2fed50 | ||
|
|
6cd7a380f4 | ||
|
|
ecb60c0856 | ||
|
|
cbe50bf82e | ||
|
|
a2132ad0a5 | ||
|
|
2386b8363f | ||
|
|
7f820dab0c | ||
|
|
5893d590a7 | ||
|
|
59216e2632 | ||
|
|
31b975eecc | ||
|
|
2369017f6a | ||
|
|
91f19c7410 | ||
|
|
70ca8ff1f4 | ||
|
|
e7d7eba68f | ||
|
|
1d828c447c | ||
|
|
66fe981ea8 | ||
|
|
41d89c7b54 |
4
.gitattributes
vendored
@@ -5,3 +5,7 @@
|
||||
|
||||
# include commit/tag information in `.git_archive_info.txt` when packing with git-archive
|
||||
.git_archive_info.txt export-subst
|
||||
|
||||
# hide diffs for .po files by default
|
||||
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
|
||||
*.po linguist-generated
|
||||
|
||||
7
.github/labeler.yml
vendored
@@ -24,6 +24,8 @@
|
||||
- "!redbot/cogs/audio/**/locales/*"
|
||||
# Docs
|
||||
- docs/cog_guides/audio.rst
|
||||
# Tests
|
||||
- tests/cogs/audio/**/*
|
||||
"Category: Cogs - Bank": [] # historical label for a removed cog
|
||||
"Category: Cogs - Cleanup":
|
||||
# Source
|
||||
@@ -139,6 +141,8 @@
|
||||
"Category: Core - API - App Commands Package":
|
||||
# Source
|
||||
- redbot/core/app_commands/*
|
||||
# Docs
|
||||
- docs/framework_app_commands.rst
|
||||
# Tests
|
||||
- tests/core/test_app_commands.py
|
||||
"Category: Core - API - Commands Package":
|
||||
@@ -158,6 +162,7 @@
|
||||
- any:
|
||||
- redbot/core/_drivers/**/*
|
||||
- "!redbot/core/_drivers/**/locales/*"
|
||||
- redbot/core/_config.py
|
||||
- redbot/core/config.py
|
||||
# Docs
|
||||
- docs/framework_config.rst
|
||||
@@ -211,6 +216,7 @@
|
||||
- redbot/core/commands/help.py
|
||||
"Category: Core - i18n":
|
||||
# Source
|
||||
- redbot/core/_i18n.py
|
||||
- redbot/core/i18n.py
|
||||
# Locale files
|
||||
- redbot/**/locales/*
|
||||
@@ -267,6 +273,7 @@
|
||||
- docs/bot_application_guide.rst
|
||||
- docs/install_guides/**/*
|
||||
- docs/update_red.rst
|
||||
- docs/backup_red.rst
|
||||
"Category: Docs - Other":
|
||||
- docs/host-list.rst
|
||||
- docs/index.rst
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Install script's pre-requirements
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U pathspec pyyaml rich
|
||||
python -m pip install -U pathspec pyyaml rich typing_extensions
|
||||
- name: Check label pattern exhaustiveness
|
||||
run: |
|
||||
python .github/workflows/scripts/check_label_pattern_exhaustiveness.py
|
||||
|
||||
7
.github/workflows/codeql-analysis.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@@ -34,14 +34,13 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: 'python'
|
||||
# Override the default behavior so that the action doesn't attempt
|
||||
# to auto-install Python dependencies
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#analyzing-python-dependencies
|
||||
setup-python-dependencies: false
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -55,4 +54,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
8
.github/workflows/crowdin_upload_strings.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
- name: Generate source files
|
||||
run: |
|
||||
@@ -28,5 +28,5 @@ jobs:
|
||||
run: |
|
||||
make upload_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
|
||||
8
.github/workflows/lint_python.yaml
vendored
@@ -14,13 +14,17 @@ jobs:
|
||||
name: Lint Python
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://github.com/pycqa/flake8@3.7.9#egg=flake8"
|
||||
- run: >
|
||||
python -m pip install
|
||||
'pyflakes @ https://github.com/pycqa/pyflakes/tarball/1911c20'
|
||||
'pycodestyle @ https://github.com/pycqa/pycodestyle/tarball/d219c68'
|
||||
'flake8 @ https://github.com/pycqa/flake8/tarball/3.7.9'
|
||||
name: Install Flake8
|
||||
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
|
||||
name: Flake8 Linting
|
||||
|
||||
10
.github/workflows/prepare_release.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
needs: pr_stable_bump
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
|
||||
- name: Generate source files
|
||||
@@ -36,8 +36,8 @@ jobs:
|
||||
run: |
|
||||
make download_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_crowdin
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
||||
53
.github/workflows/publish_release.yml
vendored
@@ -2,7 +2,7 @@ name: Publish Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
- "3.[0-9]+.[0-9]+"
|
||||
|
||||
jobs:
|
||||
release_information:
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
name: Build package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@@ -75,27 +75,68 @@ jobs:
|
||||
run: python -m twine check dist/*
|
||||
|
||||
- name: Upload packaged distributions
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-output
|
||||
path: ./dist
|
||||
|
||||
generate_default_ll_server_config:
|
||||
name: Generate default application.yml
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install script's dependencies
|
||||
run: python -m pip install PyYAML
|
||||
|
||||
- name: Generate default application.yml
|
||||
env:
|
||||
APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml"
|
||||
run: |
|
||||
mkdir -p release_assets
|
||||
python .github/workflows/scripts/get_default_ll_server_config.py "release_assets/$APP_YML_FILE"
|
||||
|
||||
- name: Upload default application.yml
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: ./release_assets
|
||||
|
||||
release_to_pypi:
|
||||
needs:
|
||||
- release_information
|
||||
- build
|
||||
- generate_default_ll_server_config
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Download packaged distributions
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-output
|
||||
path: dist/
|
||||
|
||||
- name: Download default application.yml
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: release_assets/
|
||||
|
||||
- name: Upload dists to GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ github.token }}"
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" dist/* release_assets/* --repo "$GITHUB_REPOSITORY"
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
@@ -119,7 +160,7 @@ jobs:
|
||||
run: |
|
||||
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BASE_BRANCH }}
|
||||
- name: Set up Python
|
||||
|
||||
37
.github/workflows/run_pip_compile.yaml
vendored
@@ -15,17 +15,32 @@ jobs:
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout the repository.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: |
|
||||
3.11
|
||||
3.10
|
||||
3.9
|
||||
3.8
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install dependencies on Linux/macOS
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U pip-tools
|
||||
python3.11 -m pip install -U pip pip-tools
|
||||
python3.10 -m pip install -U pip pip-tools
|
||||
python3.9 -m pip install -U pip pip-tools
|
||||
python3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Install dependencies on Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
py -3.11 -m pip install -U pip pip-tools
|
||||
py -3.10 -m pip install -U pip pip-tools
|
||||
py -3.9 -m pip install -U pip pip-tools
|
||||
py -3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Generate requirements files.
|
||||
id: compile_requirements
|
||||
@@ -33,7 +48,7 @@ jobs:
|
||||
python .github/workflows/scripts/compile_requirements.py
|
||||
|
||||
- name: Upload requirements files.
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.compile_requirements.outputs.sys_platform }}
|
||||
path: requirements/${{ steps.compile_requirements.outputs.sys_platform }}-*.txt
|
||||
@@ -44,7 +59,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
@@ -56,17 +71,17 @@ jobs:
|
||||
python -m pip install -U "packaging>=22.0"
|
||||
|
||||
- name: Download Windows requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: requirements
|
||||
- name: Download Linux requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux
|
||||
path: requirements
|
||||
- name: Download macOS requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: darwin
|
||||
path: requirements
|
||||
@@ -76,7 +91,7 @@ jobs:
|
||||
python .github/workflows/scripts/merge_requirements.py
|
||||
|
||||
- name: Upload merged requirements files.
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: merged
|
||||
path: |
|
||||
|
||||
@@ -1,35 +1,52 @@
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
|
||||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
|
||||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
|
||||
os.chdir(REQUIREMENTS_FOLDER)
|
||||
|
||||
|
||||
def pip_compile(name: str) -> None:
|
||||
def pip_compile(version: str, name: str) -> None:
|
||||
stem = f"{sys.platform}-{version}-{name}"
|
||||
if EXCLUDE_STEM_RE.fullmatch(stem):
|
||||
return
|
||||
|
||||
constraint_flags = [
|
||||
arg
|
||||
for file in REQUIREMENTS_FOLDER.glob(f"{sys.platform}-3.8-*.txt")
|
||||
for arg in ("-c", file.name)
|
||||
]
|
||||
|
||||
executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",)
|
||||
subprocess.check_call(
|
||||
(
|
||||
sys.executable,
|
||||
*executable,
|
||||
"-m",
|
||||
"piptools",
|
||||
"compile",
|
||||
"--upgrade",
|
||||
"--resolver=backtracking",
|
||||
"--verbose",
|
||||
f"{name}.in",
|
||||
"--output-file",
|
||||
f"{sys.platform}-{name}.txt",
|
||||
f"{stem}.txt",
|
||||
*constraint_flags,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
pip_compile("base")
|
||||
shutil.copyfile(f"{sys.platform}-base.txt", "base.txt")
|
||||
for minor in range(8, 11 + 1):
|
||||
version = f"3.{minor}"
|
||||
pip_compile(version, "base")
|
||||
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
|
||||
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
|
||||
pip_compile(file.stem)
|
||||
pip_compile(version, file.stem)
|
||||
|
||||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
|
||||
fp.write(f"sys_platform={sys.platform}\n")
|
||||
|
||||
31
.github/workflows/scripts/get_default_ll_server_config.py
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
ROOT_FOLDER = Path(__file__).parents[3].absolute()
|
||||
AUDIO_FOLDER = ROOT_FOLDER / "redbot/cogs/audio"
|
||||
|
||||
# We want to import `redbot.cogs.audio.managed_node` package as if it were top-level package
|
||||
# so we have to the `redbot/cogs/audio` directory to Python's path.
|
||||
sys.path.insert(0, str(AUDIO_FOLDER))
|
||||
|
||||
|
||||
def main() -> int:
|
||||
try:
|
||||
output_file = sys.argv[1]
|
||||
except IndexError:
|
||||
print("Usage:", sys.argv[0], "<output_file>", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
import managed_node
|
||||
|
||||
server_config = managed_node.get_default_server_config()
|
||||
with open(output_file, "w", encoding="utf-8") as fp:
|
||||
yaml.safe_dump(server_config, fp)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
121
.github/workflows/scripts/merge_requirements.py
vendored
@@ -1,6 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import List, TextIO
|
||||
from typing import Dict, Iterable, List, TextIO, Tuple
|
||||
|
||||
from packaging.markers import Marker
|
||||
from packaging.requirements import Requirement
|
||||
@@ -15,6 +17,12 @@ class RequirementData:
|
||||
self.req = Requirement(requirement_string)
|
||||
self.comments = set()
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.req)
|
||||
|
||||
def __eq__(self, other: RequirementData) -> bool:
|
||||
return self.req == other.req
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.req.name
|
||||
@@ -41,6 +49,8 @@ def get_requirements(fp: TextIO) -> List[RequirementData]:
|
||||
via_prefix = "via "
|
||||
if source.startswith(via_prefix):
|
||||
source = source[len(via_prefix) :]
|
||||
if source.startswith("-c ") and source != "-c base.txt":
|
||||
continue
|
||||
current.comments.add(source)
|
||||
elif line and not line.startswith(("#", " ")):
|
||||
current = RequirementData(line)
|
||||
@@ -49,30 +59,47 @@ def get_requirements(fp: TextIO) -> List[RequirementData]:
|
||||
return requirements
|
||||
|
||||
|
||||
def iter_envs(envs: Iterable[str]) -> Iterable[Tuple[str, str]]:
|
||||
for env_name in envs:
|
||||
platform, python_version = env_name.split("-", maxsplit=1)
|
||||
yield (platform, python_version)
|
||||
|
||||
|
||||
names = ["base"]
|
||||
names.extend(file.stem for file in REQUIREMENTS_FOLDER.glob("extra-*.in"))
|
||||
base_requirements = []
|
||||
base_requirements: List[RequirementData] = []
|
||||
|
||||
for name in names:
|
||||
# {req_name: {sys_platform: RequirementData}
|
||||
input_data = {}
|
||||
# {req_data: {sys_platform: RequirementData}
|
||||
input_data: Dict[RequirementData, Dict[str, RequirementData]] = {}
|
||||
all_envs = set()
|
||||
all_platforms = set()
|
||||
all_python_versions = set()
|
||||
for file in REQUIREMENTS_FOLDER.glob(f"*-{name}.txt"):
|
||||
platform_name = file.stem.split("-", maxsplit=1)[0]
|
||||
platform_name, python_version, _ = file.stem.split("-", maxsplit=2)
|
||||
env_name = f"{platform_name}-{python_version}"
|
||||
all_envs.add(env_name)
|
||||
all_platforms.add(platform_name)
|
||||
all_python_versions.add(python_version)
|
||||
with file.open(encoding="utf-8") as fp:
|
||||
requirements = get_requirements(fp)
|
||||
|
||||
for req in requirements:
|
||||
platforms = input_data.setdefault(req.name, {})
|
||||
platforms[platform_name] = req
|
||||
envs = input_data.setdefault(req, {})
|
||||
envs[env_name] = req
|
||||
|
||||
output = base_requirements if name == "base" else []
|
||||
for req_name, platforms in input_data.items():
|
||||
req = next(iter(platforms.values()))
|
||||
for other_req in platforms.values():
|
||||
if req.req != other_req.req:
|
||||
raise RuntimeError(f"Incompatible requirements for {req_name}.")
|
||||
for req, envs in input_data.items():
|
||||
# {platform: [python_versions...]}
|
||||
python_versions_per_platform: Dict[str, List[str]] = {}
|
||||
# {python_version: [platforms...]}
|
||||
platforms_per_python_version: Dict[str, List[str]] = {}
|
||||
platforms = python_versions_per_platform.keys()
|
||||
python_versions = platforms_per_python_version.keys()
|
||||
for env_name, other_req in envs.items():
|
||||
platform_name, python_version = env_name.split("-", maxsplit=1)
|
||||
python_versions_per_platform.setdefault(platform_name, []).append(python_version)
|
||||
platforms_per_python_version.setdefault(python_version, []).append(platform_name)
|
||||
|
||||
req.comments.update(other_req.comments)
|
||||
|
||||
@@ -84,30 +111,76 @@ for name in names:
|
||||
old_req_marker = req.marker
|
||||
req.marker = base_req.marker = None
|
||||
if base_req.req != req.req:
|
||||
raise RuntimeError(f"Incompatible requirements for {req_name}.")
|
||||
raise RuntimeError(f"Incompatible requirements for {req.name}.")
|
||||
|
||||
base_req.marker = old_base_marker
|
||||
req.marker = old_req_marker
|
||||
if base_req.marker is None or base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
if len(platforms) == len(all_platforms):
|
||||
if len(envs) == len(all_envs):
|
||||
output.append(req)
|
||||
continue
|
||||
elif len(platforms) < len(all_platforms - platforms.keys()):
|
||||
platform_marker = " or ".join(
|
||||
f"sys_platform == '{platform}'" for platform in platforms
|
||||
|
||||
# At this point I'm wondering why I didn't just go for
|
||||
# a more generic boolean algebra simplification (sympy.simplify_logic())...
|
||||
if (
|
||||
len(set(map(frozenset, python_versions_per_platform.values()))) == 1
|
||||
or len(set(map(frozenset, platforms_per_python_version.values()))) == 1
|
||||
):
|
||||
# Either all platforms have the same Python version set
|
||||
# or all Python versions have the same platform set.
|
||||
# We can generate markers for platform (platform_marker) and Python
|
||||
# (python_version_marker) version sets separately and then simply require
|
||||
# that both markers are fulfilled at the same time (env_marker).
|
||||
|
||||
python_version_marker = (
|
||||
# Requirement present on less Python versions than not.
|
||||
" or ".join(
|
||||
f"python_version == '{python_version}'"
|
||||
for python_version in sorted(python_versions)
|
||||
)
|
||||
if len(python_versions) < len(all_python_versions - python_versions)
|
||||
# Requirement present on more Python versions than not
|
||||
# This may generate an empty string when Python version is irrelevant.
|
||||
else " and ".join(
|
||||
f"python_version != '{python_version}'"
|
||||
for python_version in sorted(all_python_versions - python_versions)
|
||||
)
|
||||
else:
|
||||
platform_marker = " and ".join(
|
||||
f"sys_platform != '{platform}'" for platform in all_platforms - platforms.keys()
|
||||
)
|
||||
|
||||
new_marker = (
|
||||
f"({req.marker}) and ({platform_marker})"
|
||||
if req.marker is not None
|
||||
else platform_marker
|
||||
platform_marker = (
|
||||
# Requirement present on less platforms than not.
|
||||
" or ".join(f"sys_platform == '{platform}'" for platform in sorted(platforms))
|
||||
if len(platforms) < len(all_platforms - platforms)
|
||||
# Requirement present on more platforms than not
|
||||
# This may generate an empty string when platform is irrelevant.
|
||||
else " and ".join(
|
||||
f"sys_platform != '{platform}'"
|
||||
for platform in sorted(all_platforms - platforms)
|
||||
)
|
||||
)
|
||||
|
||||
if python_version_marker and platform_marker:
|
||||
env_marker = f"({python_version_marker}) and ({platform_marker})"
|
||||
else:
|
||||
env_marker = python_version_marker or platform_marker
|
||||
else:
|
||||
# Fallback to generic case.
|
||||
env_marker = (
|
||||
# Requirement present on less envs than not.
|
||||
" or ".join(
|
||||
f"(sys_platform == '{platform}' and python_version == '{python_version}')"
|
||||
for platform, python_version in iter_envs(sorted(envs))
|
||||
)
|
||||
if len(envs) < len(all_envs - envs.keys())
|
||||
else " and ".join(
|
||||
f"(sys_platform != '{platform}' and python_version != '{python_version}')"
|
||||
for platform, python_version in iter_envs(sorted(all_envs - envs.keys()))
|
||||
)
|
||||
)
|
||||
|
||||
new_marker = f"({req.marker}) and ({env_marker})" if req.marker is not None else env_marker
|
||||
req.marker = Marker(new_marker)
|
||||
if base_req is not None and base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
4
.github/workflows/tests.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
fail-fast: false
|
||||
name: Tox - ${{ matrix.friendly_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
|
||||
@@ -26,14 +26,6 @@ unsafe-load-any-extension=no
|
||||
# run arbitrary code
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Allow optimization of some AST trees. This will activate a peephole AST
|
||||
# optimizer, which will apply various small optimizations. For instance, it can
|
||||
# be used to obtain the result of joining multiple strings with the addition
|
||||
# operator. Joining a lot of strings can lead to a maximum recursion error in
|
||||
# Pylint and this flag can prevent that. It has one side effect, the resulting
|
||||
# AST will be different than the one from reality.
|
||||
optimize-ast=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
@@ -66,7 +58,6 @@ disable=C, # black is enforcing this for us already, incompatibly
|
||||
[REPORTS]
|
||||
|
||||
output-format=parseable
|
||||
files-output=no
|
||||
reports=no
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@ build:
|
||||
os: "ubuntu-22.04"
|
||||
tools:
|
||||
python: "3.8"
|
||||
jobs:
|
||||
install:
|
||||
- pip install .[doc]
|
||||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
python:
|
||||
install:
|
||||
|
||||
1272
CHANGES.rst
8
LICENSE
@@ -675,10 +675,10 @@ the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
The Red-DiscordBot project contains subcomponents in audio.py that have a
|
||||
separate copyright notice and license terms. Your use of the source code for
|
||||
these subcomponents is subject to the terms and conditions of the following
|
||||
licenses.
|
||||
The Red-DiscordBot project contains subcomponents in the Audio module that
|
||||
have a separate copyright notice and license terms. Your use of the source
|
||||
code for these subcomponents is subject to the terms and conditions of the
|
||||
following licenses.
|
||||
|
||||
This product bundles methods from https://github.com/Just-Some-Bots/MusicBot/
|
||||
blob/master/musicbot/spotify.py which are available under an MIT license.
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
## Supported Versions
|
||||
|
||||
The table below explains the current state of our versions. Currently, only version
|
||||
3.4 and higher are supported and receive security updates. Versions lower than 3.4
|
||||
3.5 and higher are supported and receive security updates. Versions lower than 3.5
|
||||
are considered End of Life and will not receive any security updates.
|
||||
|
||||
| Version | Branch | Security Updates | End of Life |
|
||||
|---------------|------------|--------------------|--------------------|
|
||||
| < 2.0 | master | :x: | :white_check_mark: |
|
||||
| >= 2.0, < 3.0 | develop | :x: | :white_check_mark: |
|
||||
| >= 3.0, < 3.4 | V3/develop | :x: | :white_check_mark: |
|
||||
| >= 3.4 | V3/develop | :white_check_mark: | :x: |
|
||||
| >= 3.0, < 3.5 | V3/develop | :x: | :white_check_mark: |
|
||||
| >= 3.5 | V3/develop | :white_check_mark: | :x: |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
api_key_env: CROWDIN_API_KEY
|
||||
project_identifier_env: CROWDIN_PROJECT_ID
|
||||
project_id_env: CROWDIN_PROJECT_ID
|
||||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||
base_path: ./redbot/
|
||||
preserve_hierarchy: true
|
||||
files:
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 16 KiB |
BIN
docs/.resources/bot-guide/discord_installation_options.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
docs/.resources/bot-guide/discord_installation_tab.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 50 KiB |
154
docs/_ext/prompt_builder.py
Normal file
@@ -0,0 +1,154 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from typing import Any, Dict, List, Set
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.io import StringOutput
|
||||
from docutils.nodes import Element
|
||||
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.builders.text import TextBuilder
|
||||
from sphinx.writers.text import TextWriter
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.docutils import SphinxTranslator
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PromptTranslator(SphinxTranslator):
|
||||
builder: PromptBuilder
|
||||
|
||||
def __init__(self, document: nodes.document, builder: PromptBuilder) -> None:
|
||||
super().__init__(document, builder)
|
||||
self.body = ""
|
||||
self.prompts: List[Dict[str, str]] = []
|
||||
|
||||
def visit_document(self, node: Element) -> None:
|
||||
pass
|
||||
|
||||
def depart_document(self, node: Element) -> None:
|
||||
if not self.prompts:
|
||||
self.body = ""
|
||||
return
|
||||
if self.builder.out_suffix.endswith(".json"):
|
||||
self.body = json.dumps(self.prompts, indent=4)
|
||||
else:
|
||||
self.body = "\n".join(prompt["content"] for prompt in self.prompts)
|
||||
|
||||
def unknown_visit(self, node: Element) -> None:
|
||||
pass
|
||||
|
||||
def unknown_departure(self, node: Element) -> None:
|
||||
pass
|
||||
|
||||
def visit_prompt(self, node: Element) -> None:
|
||||
self.prompts.append(
|
||||
{
|
||||
"language": node.attributes["language"],
|
||||
"prompts": node.attributes["prompts"],
|
||||
"modifiers": node.attributes["modifiers"],
|
||||
"rawsource": node.rawsource,
|
||||
"content": node.children[0],
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class PromptWriter(TextWriter):
|
||||
def translate(self) -> None:
|
||||
visitor = self.builder.create_translator(self.document, self.builder)
|
||||
self.document.walkabout(visitor)
|
||||
self.output = visitor.body
|
||||
|
||||
|
||||
class prompt(nodes.literal_block):
|
||||
pass
|
||||
|
||||
|
||||
class PromptBuilder(TextBuilder):
|
||||
"""Extract prompts from documents."""
|
||||
|
||||
format = "json"
|
||||
epilog = "The files with prompts are in %(outdir)s."
|
||||
|
||||
out_suffix = ".json"
|
||||
default_translator_class = PromptTranslator
|
||||
writer: PromptWriter
|
||||
|
||||
def init(self) -> None:
|
||||
sphinx_prompt = __import__("sphinx-prompt")
|
||||
|
||||
def run(self) -> List[prompt]:
|
||||
self.assert_has_content()
|
||||
rawsource = "\n".join(self.content)
|
||||
language = self.options.get("language") or "text"
|
||||
prompts = [
|
||||
p
|
||||
for p in (
|
||||
self.options.get("prompts") or sphinx_prompt.PROMPTS.get(language, "")
|
||||
).split(",")
|
||||
if p
|
||||
]
|
||||
modifiers = [
|
||||
modifier for modifier in self.options.get("modifiers", "").split(",") if modifier
|
||||
]
|
||||
content = rawsource
|
||||
if "auto" in modifiers:
|
||||
parts = []
|
||||
for line in self.content:
|
||||
for p in prompts:
|
||||
if line.startswith(p):
|
||||
line = line[len(p) + 1 :].rstrip()
|
||||
parts.append(line)
|
||||
content = "\n".join(parts)
|
||||
node = prompt(
|
||||
rawsource,
|
||||
content,
|
||||
directive_content=self.content,
|
||||
language=language,
|
||||
prompts=self.options.get("prompts") or sphinx_prompt.PROMPTS.get(language, ""),
|
||||
modifiers=modifiers,
|
||||
)
|
||||
return [node]
|
||||
|
||||
sphinx_prompt.PromptDirective.run = run
|
||||
|
||||
def prepare_writing(self, docnames: Set[str]) -> None:
|
||||
del docnames
|
||||
self.writer = PromptWriter(self)
|
||||
|
||||
def write_doc(self, docname: str, doctree: nodes.document) -> None:
|
||||
self.writer.write(doctree, StringOutput(encoding="utf-8"))
|
||||
if not self.writer.output:
|
||||
# don't write empty files
|
||||
return
|
||||
|
||||
filename = os.path.join(self.outdir, docname.replace("/", os.path.sep) + self.out_suffix)
|
||||
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
||||
try:
|
||||
with open(filename, "w", encoding="utf-8") as f:
|
||||
f.write(self.writer.output)
|
||||
except OSError as err:
|
||||
logger.warning("error writing file %s: %s", filename, err)
|
||||
|
||||
|
||||
class JsonPromptBuilder(PromptBuilder):
|
||||
name = "jsonprompt"
|
||||
out_suffix = ".json"
|
||||
|
||||
|
||||
class TextPromptBuilder(PromptBuilder):
|
||||
name = "textprompt"
|
||||
out_suffix = ".txt"
|
||||
|
||||
|
||||
def setup(app: Sphinx) -> Dict[str, Any]:
|
||||
app.add_builder(JsonPromptBuilder)
|
||||
app.add_builder(TextPromptBuilder)
|
||||
|
||||
return {
|
||||
"version": "1.0",
|
||||
"parallel_read_safe": True,
|
||||
"parallel_write_safe": True,
|
||||
}
|
||||
2
docs/_templates/layout.html
vendored
@@ -5,7 +5,7 @@
|
||||
<p class="first admonition-title">Warning</p>
|
||||
<p class="last">
|
||||
This document is for Red's development version, which can be significantly different from previous releases.
|
||||
If you're a regular user, you should read the <a href="{{ dict(versions)['stable'] }}">Red documentation for the current stable release</a>.
|
||||
If you're a regular user, you should read the <a href="/{{ rtd_language }}/stable/">Red documentation for the current stable release</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -57,6 +57,8 @@ Paste the following and replace the following:
|
||||
<string>username</string>
|
||||
<key>InitGroups</key>
|
||||
<true/>
|
||||
<key>ProcessType</key>
|
||||
<string>Interactive</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
||||
@@ -28,10 +28,6 @@ Next, your python :code:`path` can be fetched with the following commands:
|
||||
$ source ~/redenv/bin/activate
|
||||
(redenv) $ /usr/bin/which python
|
||||
|
||||
# If redbot is installed in a pyenv virtualenv
|
||||
$ pyenv shell <virtualenv_name>
|
||||
(redenv) $ pyenv which python
|
||||
|
||||
Then create the new service file:
|
||||
|
||||
:code:`sudo nano /etc/systemd/system/red@.service`
|
||||
|
||||
35
docs/backup_red.rst
Normal file
@@ -0,0 +1,35 @@
|
||||
.. _backup-red:
|
||||
|
||||
============================
|
||||
Backing Up and Restoring Red
|
||||
============================
|
||||
|
||||
Red can be backed up and restored to any device as long as it is a supported operating system. See page: :ref:`end-user-guarantees`.
|
||||
|
||||
Backup steps are to be done in order and carefully to avoid any issues.
|
||||
|
||||
#. Take note of the installed cogs with ``[p]cogs``; and cog repositories with ``[p]load downloader``, then ``[p]repo list`` (``[p]`` is your bot's prefix).
|
||||
#. Stop the bot, ideally with ``[p]shutdown``.
|
||||
#. Activate your venv, and run ``redbot-setup backup <instancename>``, replacing ``<instancename>`` with the name of your instance.
|
||||
#. Copy your backup file to the new machine/location.
|
||||
#. Extract the file to a location of your choice (remember the full path and make sure that the user you are going to install/run Red under can access this path).
|
||||
#. :ref:`Install Red <install-guides>` as normal on the new machine/location.
|
||||
#. Run ``redbot-setup`` in your venv to create a new instance, using the path you remembered above as your data path.
|
||||
#. Start your new instance.
|
||||
#. Re-add the cog repositories using the same names as before.
|
||||
#. Do ``[p]cog update``.
|
||||
#. Re-add any cogs that were not re-installed (you may have to uninstall them first as Downloader may think they are still installed).
|
||||
|
||||
.. note::
|
||||
|
||||
The config (data) from cogs has been saved, but not the code itself.
|
||||
|
||||
.. tip::
|
||||
|
||||
You can fix permissions (if needed) on your directory using:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo chown -R <user>:<user> ~/.local
|
||||
|
||||
Replace ``<user>`` with your actual username.
|
||||
@@ -21,25 +21,34 @@ Creating a Bot account is a pretty straightforward process.
|
||||
.. image:: /.resources/bot-guide/discord_create_app_button.png
|
||||
:alt: The new application button.
|
||||
|
||||
4. Give the application a name and click "Create".
|
||||
4. Give the application a name, check the box to accept the Terms of Service, and click "Create".
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_create_app_form.png
|
||||
:alt: The new application form filled in.
|
||||
|
||||
5. Create a Bot User by navigating to the "Bot" tab and clicking "Add Bot".
|
||||
5. Navigate to the "Install" tab on the left side of the screen.
|
||||
|
||||
- Click "Yes, do it!" to continue.
|
||||
.. image:: /.resources/bot-guide/discord_installation_tab.png
|
||||
:alt: The installation tab in the application page.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_create_bot_user.png
|
||||
:alt: The Add Bot button.
|
||||
6. If you want others to be able to invite your bot tick the **Public Bot**. Keeping it unticked will prevent others from inviting your bot to their servers and only you will be able to add the bot to servers (provided that you have needed permissions in the server you want to add the bot to).
|
||||
6. Uncheck "User Install" and set "Install Link" to "None"
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_installation_options.png
|
||||
:alt: How the Installation options should look like for most people.
|
||||
|
||||
7. Navigate to the "Bot" tab on the left side of the screen.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_bot_tab.png
|
||||
:alt: The bot tab in the application page.
|
||||
|
||||
8. If you want others to be able to invite your bot tick the **Public Bot**. Keeping it unticked will prevent others from inviting your bot to their servers and only you will be able to add the bot to servers (provided that you have needed permissions in the server you want to add the bot to).
|
||||
|
||||
- Make sure **Require OAuth2 Code Grant** is unchecked.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_bot_user_options.png
|
||||
:alt: How the Bot User options should look like for most people.
|
||||
|
||||
7. Copy the token using the "Copy" button.
|
||||
9. Acquire the token using the "Reset Token" button, then "Copy" after it is revealed.
|
||||
|
||||
- **This is not the Client Secret at the General Information page**
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ find detailed docs about usage and commands.
|
||||
You can see additional help for any command in this guide by using ``[p]help`` with the
|
||||
command name, like ``[p]help playlist append``.
|
||||
|
||||
In this guide, you will see references to "Lavalink" or the "Lavalink.jar". `Lavalink <https://github.com/freyacodes/Lavalink/>`_ is the
|
||||
In this guide, you will see references to "Lavalink" or the "Lavalink.jar". `Lavalink <https://github.com/lavalink-devs/Lavalink/>`_ is the
|
||||
Java-based audio backend we use to be able to play music through the bot. Most users will
|
||||
not have to worry much about Lavalink or what it is, as Audio manages this process for you
|
||||
by default. Advanced users can read more about Lavalink and special cases under the
|
||||
@@ -116,18 +116,18 @@ How can I use this playlist link with playlist commands in audio?**
|
||||
:ref:`setting up Audio for multiple bots<multibots>`. Otherwise, another process is using the
|
||||
port, so you need to figure out what is using port 2333 and terminate/disconnect it yourself.
|
||||
|
||||
**Q: My terminal is saying that I "must install Java 11 for Lavalink to run". How can I fix this?**
|
||||
**Q: My terminal is saying that I "must install Java 21 or 17 for Lavalink to run". How can I fix this?**
|
||||
|
||||
You are getting this error because you have a different version of Java installed, or you don't have
|
||||
Java installed at all. As the error states, Java 11 is required, and can be installed from
|
||||
`here <https://adoptium.net/temurin/releases/?version=11>`__.
|
||||
Java installed at all. As the error states, Java 21 or 17 is required, and can be installed from
|
||||
`here <https://adoptium.net/temurin/releases/?version=21>`__.
|
||||
|
||||
If you have Java 11 installed, and are still getting this error, you will have to manually tell Audio where your Java install is located.
|
||||
Use ``[p]llset java <path_to_java_11_executable>``, to make Audio launch Lavalink with a
|
||||
If you have Java 21 or 17 installed, and are still getting this error, you will have to manually tell Audio where your Java install is located.
|
||||
Use ``[p]llset java <path_to_java_21_or_17_executable>``, to make Audio launch Lavalink with a
|
||||
specific Java binary. To do this, you will need to locate your ``java.exe``/``java`` file
|
||||
in your **Java 11 install**.
|
||||
in your **Java 21 or 17 install**.
|
||||
|
||||
Alternatively, update your PATH settings so that Java 11 is the one used by ``java``. However,
|
||||
Alternatively, update your PATH settings so that Java 21 or 17 is the one used by ``java``. However,
|
||||
you should confirm that nothing other than Red is running on the machine that requires Java.
|
||||
|
||||
.. _queue_commands:
|
||||
@@ -544,14 +544,14 @@ following commands one by one.
|
||||
sudo apt install curl nano -y
|
||||
|
||||
If you have no preference in which Java version you install on your target system, Red
|
||||
uses OpenJDK 11 in the managed Lavalink configuration. It can be installed by running:
|
||||
uses OpenJDK 17 in the managed Lavalink configuration. It can be installed by running:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install openjdk-11-jre-headless -y
|
||||
sudo apt install openjdk-17-jre-headless -y
|
||||
|
||||
Otherwise, Lavalink works well with most versions of Java 11, 13, 15, 16, 17, and 18. Azul
|
||||
Zulu builds are suggested, see `here <https://github.com/freyacodes/Lavalink/#requirements>`__ for more information.
|
||||
Otherwise, Lavalink works well with most versions of Java 17 and higher. Azul
|
||||
Zulu builds are suggested, see `here <https://github.com/lavalink-devs/Lavalink/#requirements>`__ for more information.
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Setting Up The Lavalink Folder
|
||||
@@ -583,7 +583,7 @@ the ``cd lavalink`` command in the previous section, you can run the following c
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl https://raw.githubusercontent.com/freyacodes/Lavalink/master/LavalinkServer/application.yml.example > application.yml
|
||||
curl https://raw.githubusercontent.com/lavalink-devs/Lavalink/master/LavalinkServer/application.yml.example > application.yml
|
||||
curl -LOz Lavalink.jar https://github.com/Cog-Creators/Lavalink-Jars/releases/latest/download/Lavalink.jar
|
||||
|
||||
If you did it properly, the files ``Lavalink.jar`` and ``application.yml`` will show up when we run ``ls``, the Linux command
|
||||
@@ -3651,7 +3651,7 @@ This command shouldn't need to be used most of the time,
|
||||
and is only useful if the host machine has conflicting Java versions.
|
||||
|
||||
If changing this make sure that the Java executable you set is supported by Audio.
|
||||
The current supported version is Java 11.
|
||||
The current supported versions are Java 21 or 17.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -3742,6 +3742,8 @@ llset port
|
||||
Set the Lavalink node port. This command sets the connection port which
|
||||
Audio will use to connect to an unmanaged Lavalink node.
|
||||
|
||||
Set port to ``-1`` to disable the port and connect to the specified host via ports ``80``/``443``.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[password]`` - The connection password, defaulting to 2333.
|
||||
|
||||
@@ -1475,9 +1475,6 @@ helpset maxpages
|
||||
|
||||
Set the maximum number of help pages sent in a server channel.
|
||||
|
||||
.. Note:: This setting does not apply to menu help.
|
||||
|
||||
|
||||
If a help message contains more pages than this value, the help message will
|
||||
be sent to the command author via DM. This is to help reduce spam in server
|
||||
text channels.
|
||||
@@ -1683,8 +1680,11 @@ Set the tagline to be used.
|
||||
The maximum tagline length is 2048 characters.
|
||||
This setting only applies to embedded help. If no tagline is specified, the default will be used instead.
|
||||
|
||||
You can use ``[p]`` in your tagline, which will be replaced by the bot's prefix.
|
||||
|
||||
**Examples:**
|
||||
- ``[p]helpset tagline Thanks for using the bot!``
|
||||
- ``[p]helpset tagline Use [p]invite to add me to your server.``
|
||||
- ``[p]helpset tagline`` - Resets the tagline to the default.
|
||||
|
||||
**Arguments:**
|
||||
@@ -1829,7 +1829,10 @@ Commands to add servers or channels to the ignore list.
|
||||
|
||||
The ignore list will prevent the bot from responding to commands in the configured locations.
|
||||
|
||||
.. Note:: Owners and Admins override the ignore list.
|
||||
.. Note::
|
||||
|
||||
- Category ignores are ignored by user-installed commands
|
||||
- Owners and Admins override the ignore list.
|
||||
|
||||
|
||||
.. _core-command-ignore-channel:
|
||||
@@ -1850,7 +1853,10 @@ Ignore commands in the channel, thread, or category.
|
||||
|
||||
Defaults to the current thread or channel.
|
||||
|
||||
.. Note:: Owners, Admins, and those with Manage Channel permissions override ignored channels.
|
||||
.. Note::
|
||||
|
||||
- Category ignores are ignored by user-installed commands
|
||||
- Owners and Admins override the ignore list.
|
||||
|
||||
|
||||
**Examples:**
|
||||
@@ -2867,7 +2873,7 @@ Supports either an attachment or an image URL.
|
||||
**Examples:**
|
||||
- ``[p]set bot avatar`` - With an image attachment, this will set the avatar.
|
||||
- ``[p]set bot avatar`` - Without an attachment, this will show the command help.
|
||||
- ``[p]set bot avatar https://links.flaree.xyz/k95`` - Sets the avatar to the provided url.
|
||||
- ``[p]set bot avatar https://avatars.githubusercontent.com/u/23690422`` - Sets the avatar to the provided url.
|
||||
|
||||
**Arguments:**
|
||||
- ``[url]`` - An image url to be used as an avatar. Leave blank when uploading an attachment.
|
||||
@@ -2895,6 +2901,57 @@ Removes Red's avatar.
|
||||
**Example:**
|
||||
- ``[p]set bot avatar remove``
|
||||
|
||||
.. _core-command-set-bot-banner:
|
||||
|
||||
""""""""""""""
|
||||
set bot banner
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]set bot banner [url]
|
||||
|
||||
**Description**
|
||||
|
||||
Sets Red's banner
|
||||
|
||||
Supports either an attachment or an image URL.
|
||||
|
||||
**Examples:**
|
||||
- ``[p]set bot banner`` - With an image attachment, this will set the banner.
|
||||
- ``[p]set bot banner`` - Without an attachment, this will show the command help.
|
||||
- ``[p]set bot banner https://opengraph.githubassets.com`` - Sets the banner to the provided url.
|
||||
|
||||
**Arguments:**
|
||||
- ``[url]`` - An image url to be used as an banner. Leave blank when uploading an attachment.
|
||||
|
||||
.. _core-command-set-bot-banner-remove:
|
||||
|
||||
"""""""""""""""""""""
|
||||
set bot banner remove
|
||||
"""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]set bot banner remove
|
||||
|
||||
.. tip:: Alias: ``set bot banner clear``
|
||||
|
||||
**Description**
|
||||
|
||||
Removes Red's banner.
|
||||
|
||||
**Example:**
|
||||
- ``[p]set bot banner remove``
|
||||
|
||||
.. _core-command-set-bot-custominfo:
|
||||
|
||||
""""""""""""""""""
|
||||
@@ -3695,6 +3752,7 @@ Sets Red's server prefix(es).
|
||||
- ``[p]set serverprefix "! "`` - Quotes are needed to use spaces in prefixes.
|
||||
- ``[p]set serverprefix "@Red "`` - This uses a mention as the prefix.
|
||||
- ``[p]set serverprefix ! ? .`` - Sets multiple prefixes.
|
||||
- ``[p]set serverprefix "Red - Discord Bot" ?`` - Sets the prefix for a specific server. Quotes are needed to use spaces in the server name.
|
||||
|
||||
**Arguments:**
|
||||
- ``[server]`` - The server to set the prefix for. Defaults to current server.
|
||||
@@ -3768,6 +3826,35 @@ Maximum length for a competing status is 128 characters.
|
||||
**Arguments:**
|
||||
- ``[competing]`` - The text to follow ``Competing in``. Leave blank to clear the current activity status.
|
||||
|
||||
.. _core-command-set-status-custom:
|
||||
|
||||
"""""""""""""""""
|
||||
set status custom
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]set status custom [text]
|
||||
|
||||
**Description**
|
||||
|
||||
Sets Red's custom status.
|
||||
|
||||
This will appear as ``<text>``.
|
||||
|
||||
Maximum length for a custom status is 128 characters.
|
||||
|
||||
**Examples:**
|
||||
- ``[p]set status custom`` - Clears the activity status.
|
||||
- ``[p]set status custom Running cogs...``
|
||||
|
||||
**Arguments:**
|
||||
- ``[text]`` - The custom status text. Leave blank to clear the current activity status.
|
||||
|
||||
.. _core-command-set-status-dnd:
|
||||
|
||||
""""""""""""""
|
||||
@@ -4104,7 +4191,7 @@ slash disablecog
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slash disablecog <cog_name>
|
||||
[p]slash disablecog <cog_names...>
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -4114,7 +4201,7 @@ This command does NOT sync the enabled commands with Discord, that must be done
|
||||
with ``[p]slash sync`` for commands to appear in users' clients.
|
||||
|
||||
**Arguments:**
|
||||
- ``<cog_name>`` - The cog to disable commands from. This argument is case sensitive.
|
||||
- ``<cog_names>`` - The cogs to disable commands from. This argument is case sensitive.
|
||||
|
||||
.. _core-command-slash-enable:
|
||||
|
||||
@@ -4149,7 +4236,7 @@ slash enablecog
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slash enablecog <cog_name>
|
||||
[p]slash enablecog <cog_names...>
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -4159,7 +4246,7 @@ This command does NOT sync the enabled commands with Discord, that must be done
|
||||
with ``[p]slash sync`` for commands to appear in users' clients.
|
||||
|
||||
**Arguments:**
|
||||
- ``<cog_name>`` - The cog to enable commands from. This argument is case sensitive.
|
||||
- ``<cog_names>`` - The cogs to enable commands from. This argument is case sensitive.
|
||||
|
||||
.. _core-command-slash-list:
|
||||
|
||||
|
||||
@@ -215,11 +215,11 @@ modset deletenames
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all stored usernames and nicknames.
|
||||
Delete all stored usernames, global display names, and server nicknames.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
|
||||
- ``<confirmation>``: Whether to delete all stored usernames, global display names, and server nicknames. |bool-input|
|
||||
|
||||
.. _mod-command-modset-deleterepeats:
|
||||
|
||||
@@ -253,7 +253,23 @@ modset dm
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm [enabled]
|
||||
[p]modset dm
|
||||
|
||||
**Description**
|
||||
|
||||
Settings for messaging the user when being kicked or banned.
|
||||
|
||||
.. _mod-command-modset-dm-sendmessage:
|
||||
|
||||
"""""""""""""""""""""
|
||||
modset dm sendmessage
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm sendmessage [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -266,6 +282,94 @@ and reason as to why they were kicked/banned.
|
||||
|
||||
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
|
||||
|
||||
.. _mod-command-modset-banshowextrafield:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
modset dm banshowextrafield
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm banshowextrafield [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether to show an extra customizable field when banning.
|
||||
|
||||
This can be used to add additional information for the banned user, such as a ban appeal link.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: If an extra customizable embed field should appear when banning. |bool-input|
|
||||
|
||||
.. _mod-command-modset-banextrafieldtitle:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
modset dm banextrafieldtitle
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm banextrafieldtitle [title]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the title for the optional extra embed on ban.
|
||||
|
||||
Cannot be over 252 characters long.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[title]``: The title of the embed field. Can by any string of text under 252 charcters long.
|
||||
|
||||
.. _mod-command-modset-banextrafieldcontents:
|
||||
|
||||
"""""""""""""""""""""""""""""""
|
||||
modset dm banextrafieldcontents
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm banextrafieldcontents [contents]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the contents for the optional extra embed on ban
|
||||
|
||||
Cannot be over 1024 characters long.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[contents]``: The contents of the embed field. Can by any string of text under 1024 charcters long.
|
||||
|
||||
.. _mod-command-modset-requirereason:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset requirereason
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset requirereason [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether a reason is required for mod actions.
|
||||
|
||||
If this is enabled, the bot will require a reason to be provided for all mod actions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether a reason should be required when performing mod actions. |bool-input|
|
||||
|
||||
.. _mod-command-modset-hierarchy:
|
||||
|
||||
""""""""""""""""
|
||||
@@ -469,7 +573,7 @@ modset tracknicknames
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether nickname changes should be tracked.
|
||||
Toggle whether server nickname changes should be tracked.
|
||||
|
||||
This setting will be overridden if trackallnames is disabled.
|
||||
|
||||
@@ -527,7 +631,7 @@ names
|
||||
|
||||
**Description**
|
||||
|
||||
Show previous names and nicknames of a member.
|
||||
Show previous usernames, global display names, and server nicknames of a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -549,14 +653,14 @@ rename
|
||||
|
||||
**Description**
|
||||
|
||||
Change a member's nickname.
|
||||
Change a member's server nickname.
|
||||
|
||||
Leaving the nickname empty will remove it.
|
||||
Leaving the nickname argument empty will remove it.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[nickname]``: The new nickname for the member.
|
||||
* ``[nickname]``: The new server nickname for the member.
|
||||
|
||||
.. _mod-command-slowmode:
|
||||
|
||||
@@ -684,9 +788,9 @@ userinfo
|
||||
Show information about a user.
|
||||
|
||||
This includes fields for status, discord join date, server
|
||||
join date, voice state and previous names/nicknames.
|
||||
join date, voice state and previous usernames/global display names/nicknames.
|
||||
|
||||
If the user has no roles, previous names or previous nicknames,
|
||||
If the user has no roles, previous usernames, global display names, or server nicknames,
|
||||
these fields will be omitted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -19,7 +19,7 @@ find detailed docs about usage and commands.
|
||||
Usage
|
||||
-----
|
||||
|
||||
Browse and manage modlog cases.
|
||||
Browse and manage modlog cases. To manage modlog settings, use ``[p]modlogset``.
|
||||
|
||||
|
||||
.. _modlog-commands:
|
||||
|
||||
@@ -145,28 +145,6 @@ If no time interval is provided this will be cleared.
|
||||
|
||||
* ``[time]``: The length of time for a default mute.
|
||||
|
||||
.. _mutes-command-muteset-forcerole:
|
||||
|
||||
"""""""""""""""""
|
||||
muteset forcerole
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset forcerole <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Whether or not to force role only mutes on the bot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-muteset-makerole:
|
||||
|
||||
""""""""""""""""
|
||||
@@ -238,8 +216,8 @@ muteset role
|
||||
|
||||
Sets the role to be applied when muting a user.
|
||||
|
||||
If no role is setup the bot will attempt to mute a user by setting
|
||||
channel overwrites in all channels to prevent the user from sending messages.
|
||||
If no role is setup the bot will attempt to mute a user
|
||||
by utilizing server timeouts.
|
||||
|
||||
.. Note::
|
||||
|
||||
@@ -362,6 +340,34 @@ Unmute a user in this channel (or in the parent of this thread).
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
|
||||
.. _mutes-command-timeout:
|
||||
|
||||
^^^^^^^
|
||||
timeout
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]timeout <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Timeout users.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]timeout @member1 @member2 spam 5 hours``
|
||||
* ``[p]timeout @member1 3 days``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or give an error if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-voicemute:
|
||||
|
||||
^^^^^^^^^
|
||||
@@ -372,7 +378,7 @@ voicemute
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicemute <users...> [reason]
|
||||
[p]voicemute <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
|
||||
@@ -334,6 +334,26 @@ will use all of the specified lists to select questions from.
|
||||
|
||||
- ``<categories...>`` The category to play. Can be multiple.
|
||||
|
||||
.. _trivia-command-trivia-info:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia info
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia info <category>
|
||||
|
||||
**Description**
|
||||
|
||||
Get information about a trivia category.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<category>``: The category to get the information for.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -291,7 +291,7 @@ warningset showmoderator
|
||||
|
||||
**Description**
|
||||
|
||||
Decide whether the name of the moderator warning a user should be included in the DM to that user.
|
||||
Decide whether the name of the moderator warning a user should be included in the DM to that user when being warned or self requesting their warnings.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -337,6 +337,26 @@ Set the channel where warnings should be sent to.
|
||||
|
||||
* ``[channel]``: |channel-input| Leave empty to use the channel ``[p]warn`` command was called in.
|
||||
|
||||
.. _warnings-command-warningset-mywarnings-sendtodms:
|
||||
|
||||
"""""""""""""""""""""""""""""""
|
||||
warningset mywarnings sendtodms
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset mywarnings sendtodms <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Whether a member self requesting their warnings with ``[p]mywarnings`` should get them sent to DMs or in the current channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warnreason:
|
||||
|
||||
^^^^^^^^^^
|
||||
|
||||
15
docs/conf.py
@@ -46,6 +46,7 @@ extensions = [
|
||||
"sphinxcontrib_trio",
|
||||
"sphinx-prompt",
|
||||
"deprecated_removed",
|
||||
"prompt_builder",
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -138,7 +139,10 @@ html_context = {
|
||||
"display_github": True,
|
||||
"github_user": "Cog-Creators",
|
||||
"github_repo": "Red-DiscordBot",
|
||||
"github_version": "V3/develop/docs/",
|
||||
"github_version": "V3/develop",
|
||||
"version_slug": os.environ.get("READTHEDOCS_VERSION", ""),
|
||||
"rtd_language": os.environ.get("READTHEDOCS_LANGUAGE", ""),
|
||||
"READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True",
|
||||
}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
@@ -248,9 +252,12 @@ intersphinx_mapping = {
|
||||
# This allows to create links to d.py docs with
|
||||
# :dpy_docs:`link text <site_name.html>`
|
||||
extlinks = {
|
||||
"dpy_docs": (f"{dpy_docs_url}/%s", None),
|
||||
"dpy_docs": (f"{dpy_docs_url}%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#%s"),
|
||||
"ghuser": ("https://github.com/%s", "@%s"),
|
||||
# below URL redirects to user page, if they don't have GH Sponsors set up,
|
||||
# while allowing us to direct readers directly at a sponsorship opportunity,
|
||||
# if they do
|
||||
"ghuser": ("https://github.com/sponsors/%s", "@%s"),
|
||||
}
|
||||
|
||||
# Doctest
|
||||
@@ -274,7 +281,7 @@ class IgnoreCoroSubstitution(SphinxTransform):
|
||||
def apply(self, **kwargs) -> None:
|
||||
for ref in self.document.traverse(nodes.substitution_reference):
|
||||
if ref["refname"] == "coro":
|
||||
ref.replace_self(nodes.Text("", ""))
|
||||
ref.replace_self(nodes.Text(""))
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
||||
13
docs/framework_app_commands.rst
Normal file
@@ -0,0 +1,13 @@
|
||||
.. red app_commands module documentation
|
||||
|
||||
====================
|
||||
App Commands Package
|
||||
====================
|
||||
|
||||
This package acts almost identically to :doc:`discord.ext.app_commands <dpy:interactions/api>`; i.e.
|
||||
all of the attributes from discord.py's are also in ours.
|
||||
Some of these attributes, however, have been slightly modified, while others have been added to
|
||||
extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. autoclass:: redbot.core.app_commands.UserFeedbackCheckFailure
|
||||
:members:
|
||||
@@ -47,6 +47,9 @@ extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. autoclass:: redbot.core.commands.DMContext
|
||||
|
||||
.. autoclass:: redbot.core.commands.UserFeedbackCheckFailure
|
||||
:members:
|
||||
|
||||
.. automodule:: redbot.core.commands.requires
|
||||
:members: PrivilegeLevel, PermState, Requires
|
||||
|
||||
@@ -66,7 +69,7 @@ Help Functionality
|
||||
|
||||
.. warning::
|
||||
|
||||
The content in this section is provisional and may change
|
||||
The content in this section is `provisional <developer-guarantees-exclusions>` and may change
|
||||
without prior notice or warning. Updates to this will be communicated
|
||||
on `this issue <https://github.com/Cog-Creators/Red-DiscordBot/issues/4084>`_
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Basic Usage
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
self.config.register_global(
|
||||
foo=True
|
||||
@@ -55,15 +55,19 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
The ``identifier`` in :py:meth:`Config.get_conf` is used to keep your cog's data separate
|
||||
from that of another cog, and thus should be unique to your cog. For example: if we
|
||||
have two cogs named :code:`MyCog` and their identifier is different, each will have
|
||||
its own data without overwriting the other's data. Note that it is also possible
|
||||
to force registration of a data key before allowing you to get and set data for
|
||||
that key by adding :code:`force_registration=True` after identifier (that defaults
|
||||
to :code:`False` though)
|
||||
its own data without overwriting the other's data.
|
||||
|
||||
Note that, as shown by most of the examples in this document, it is also possible to
|
||||
force registration of a data key before allowing you to get and set data for that key
|
||||
by adding :code:`force_registration=True` after identifier.
|
||||
When this is set to :code:`False` (the default), the default value for any key that isn't registered
|
||||
will be :code:`None`. When this is set to :code:`True` (as shown in this document), attempting
|
||||
to read from or write to any key that isn't registered will raise an :exc:`AttributeError`.
|
||||
|
||||
After we've gotten that, we need to register default values:
|
||||
|
||||
@@ -71,7 +75,7 @@ After we've gotten that, we need to register default values:
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_global = {
|
||||
"foobar": True,
|
||||
"foo": {
|
||||
@@ -151,6 +155,22 @@ Here is an example of the :code:`async with` syntax:
|
||||
blah.append(new_blah)
|
||||
await ctx.send("The new blah value has been added!")
|
||||
|
||||
There is also a :py:meth:`Group.all` method. This will return all the stored data associated
|
||||
with a specific config group as a :py:class:`dict`. By negating the need to excessively call config,
|
||||
this method can be particularly useful when multiple values are to be retrieved from the same group.
|
||||
|
||||
Here is an example of :py:meth:`Group.all` usage:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@commands.command()
|
||||
async def getall(self, ctx):
|
||||
all_global_data = await self.config.all()
|
||||
await ctx.send("Foobar is {foobar}, foo baz is {foo_baz}".format(
|
||||
foobar=str(all_global_data["foobar"]),
|
||||
foo_baz=str(all_global_data["foo"]["baz"])
|
||||
))
|
||||
|
||||
|
||||
.. important::
|
||||
|
||||
@@ -213,7 +233,7 @@ Tutorial example.
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_guild = {
|
||||
"blah": [],
|
||||
"baz": 1234567890
|
||||
@@ -264,7 +284,7 @@ Now let's see an example that uses multiple identifiers:
|
||||
|
||||
class ChannelAccess(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_access = {
|
||||
"allowed": False
|
||||
}
|
||||
@@ -304,7 +324,7 @@ the built-in Economy credits::
|
||||
|
||||
class Pets(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, 1234567890)
|
||||
self.config = Config.get_conf(self, 1234567890, force_registration=True)
|
||||
|
||||
# Here we'll assign some default costs for the pets
|
||||
self.config.register_global(
|
||||
@@ -394,7 +414,7 @@ We're responsible pet owners here, so we've also got to have a way to feed our p
|
||||
# We could accomplish the same thing a slightly different way
|
||||
await self.config.user(ctx.author).pets.get_attr(pet_name).hunger.set(new_hunger)
|
||||
|
||||
await ctx.send("Your pet is now at {}/100 hunger!".format(new_hunger)
|
||||
await ctx.send("Your pet is now at {}/100 hunger!".format(new_hunger))
|
||||
|
||||
Of course, if we're less than responsible pet owners, there are consequences::
|
||||
|
||||
@@ -477,7 +497,7 @@ Config prioritizes being a safe data store without developers needing to
|
||||
know how end users have configured their bot.
|
||||
|
||||
This does come with some performance costs, so keep the following in mind when choosing to
|
||||
develop using config
|
||||
develop using config.
|
||||
|
||||
* Config use in events should be kept minimal and should only occur
|
||||
after confirming the event needs to interact with config
|
||||
@@ -509,7 +529,7 @@ API Reference
|
||||
includes keys within a `dict` when one is being set, as well as keys in nested dictionaries
|
||||
within that `dict`. For example::
|
||||
|
||||
>>> config = Config.get_conf(self, identifier=999)
|
||||
>>> config = Config.get_conf(self, identifier=999, force_registration=True)
|
||||
>>> config.register_global(foo={})
|
||||
>>> await config.foo.set_raw(123, value=True)
|
||||
>>> await config.foo()
|
||||
|
||||
@@ -14,36 +14,96 @@ Basic Usage
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import commands
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
from redbot.core.i18n import Translator, cog_i18n, set_contextual_locales_from_guild
|
||||
|
||||
# The translator should be defined in the module scope, with __file__ as the second parameter
|
||||
_ = Translator("ExampleCog", __file__)
|
||||
|
||||
# This decorator must be used for cog and command docstrings to be translated!
|
||||
@cog_i18n(_)
|
||||
class ExampleCog:
|
||||
"""description"""
|
||||
class ExampleCog(commands.Cog):
|
||||
"""Cog description"""
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command()
|
||||
async def mycom(self, ctx):
|
||||
"""command description"""
|
||||
await ctx.send(_("This is a test command"))
|
||||
"""Command description"""
|
||||
# Correct way to translate strings:
|
||||
await ctx.send(_("This is a test command run by {author}!").format(author=ctx.author.display_name))
|
||||
|
||||
# !!! Do not do this - String interpolation should happen after translation
|
||||
await ctx.send(_("This is a test command run by {author}!".format(author=ctx.author.display_name)))
|
||||
|
||||
# !!! Do not use f-strings - String interpolation should happen after translation
|
||||
await ctx.send(_(f"This is a test command run by {ctx.author.display_name}!"))
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_message(self, message):
|
||||
# In non-command locations, you must manually call this method for guild locale settings to apply
|
||||
await set_contextual_locales_from_guild(self.bot, message.guild)
|
||||
if message.author.bot:
|
||||
return
|
||||
await message.channel.send(_("This is a non command with translation support!"))
|
||||
|
||||
--------
|
||||
Tutorial
|
||||
--------
|
||||
|
||||
After making your cog, generate a :code:`messages.pot` file
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Preparing your cog for translations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
We recommend using redgettext - a modified version of pygettext for Red.
|
||||
You can install redgettext by running :code:`pip install redgettext` in a command prompt.
|
||||
The first step to adding translations to your cog is to add Red's internationalization framework
|
||||
to the strings in your cog. The first step is to instantiate an instance of
|
||||
`redbot.core.i18n.Translator` just after the imports in each file. This object is traditionally
|
||||
stored in the variable ``_`` to reduce its character count and visual impact on the code. Next,
|
||||
add the `redbot.core.i18n.cog_i18n` decorator to your cog class. This will allow docstrings of
|
||||
the class and its commands to be translated. Every user-facing string that is not a docstring
|
||||
should then be wrapped by the Translator object. If variables are included in a string,
|
||||
``.format()`` must be used, and should be called after the translation function call. This is
|
||||
because ``.format()`` within the translation function call and f-strings cause the interpolation
|
||||
to happen **before** the translation is applied. The translation logic needs to match the template
|
||||
string to translate it, and will be unable to successfully match after interpolation occurs.
|
||||
Finally, any non-command portions of your code, including listeners, tasks, and views, should call
|
||||
`redbot.core.i18n.set_contextual_locales_from_guild` prior to translating any strings, as only
|
||||
commands are able to implicitly determine which guild's configured locale to use. See the example
|
||||
above for the exact recommended syntax.
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Generating a messages.pot file
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A ``messages.pot`` file is a template for translating all of the strings in your cog. It should
|
||||
be generated using ``redgettext`` - a modified version of ``pygettext`` for use with Red cogs.
|
||||
You can install ``redgettext`` by running :code:`pip install redgettext` in your development
|
||||
environment.
|
||||
|
||||
Once you have ``redgettext`` installed, you will now need to run
|
||||
|
||||
:code:`python -m redgettext -c [path_to_cog_folder]`
|
||||
|
||||
This will generate a ``messages.pot`` file in ``path_to_cog_folder/locales``. This file will
|
||||
contain all strings to be translated, including docstrings.
|
||||
|
||||
To generate the :code:`messages.pot` file, you will now need to run
|
||||
:code:`python -m redgettext -c [path_to_cog]`
|
||||
This file will contain all strings to be translated, including
|
||||
docstrings.
|
||||
(For advanced usage check :code:`python -m redgettext -h`)
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Creating language specific translations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can now use a tool like `poedit
|
||||
<https://poedit.net/>`_ to translate the strings in your messages.pot file.
|
||||
<https://poedit.net/>`_ to translate the strings in your ``messages.pot`` file.
|
||||
|
||||
Alternatively, you can use any text editor to manually create translations. To do this, first
|
||||
create a copy of the ``messages.pot`` file in the same folder, and name the copy
|
||||
``LANGUAGE-CODE.po``, where ``LANGUAGE-CODE`` is a five character language code supported by
|
||||
``[p]set locale``. Open the copy in your text editor of choice. This file contains the strings
|
||||
in your cog prefixed by ``msgid`` and an empty string for you to apply translations prefixed by
|
||||
``msgstr``. The original string should be translated to the target language by modifying the
|
||||
associated ``msgstr``. Any variables within curly braces should **not** be translated to avoid
|
||||
breaking the code when translations are applied. If keyword arguments were used in ``.format()``
|
||||
calls, it may be safe to re-order variables if the grammer of the language requires doing so.
|
||||
|
||||
-------------
|
||||
API Reference
|
||||
@@ -51,4 +111,4 @@ API Reference
|
||||
|
||||
.. automodule:: redbot.core.i18n
|
||||
:members:
|
||||
:special-members: __call__
|
||||
:special-members: __call__, __init__
|
||||
|
||||
@@ -6,7 +6,8 @@ RPC
|
||||
|
||||
.. important::
|
||||
|
||||
RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
|
||||
RPC support is included in Red on a `provisional <developer-guarantees-exclusions>` basis.
|
||||
Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
|
||||
|
||||
V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways.
|
||||
Cogs must register functions to be exposed to RPC clients.
|
||||
|
||||
@@ -84,6 +84,65 @@ Utility UI
|
||||
|
||||
.. automodule:: redbot.core.utils.views
|
||||
:members:
|
||||
:exclude-members: ConfirmView
|
||||
|
||||
.. autoclass:: ConfirmView
|
||||
:members:
|
||||
:exclude-members: confirm_button, dismiss_button
|
||||
|
||||
.. autoattribute:: confirm_button
|
||||
:no-value:
|
||||
|
||||
A `discord.ui.Button` to confirm the message.
|
||||
|
||||
The button's callback will set `result` to ``True``, defer the response,
|
||||
and call `on_timeout()` to clean up the view.
|
||||
|
||||
.. rubric:: Example
|
||||
|
||||
Changing the style and label of this `discord.ui.Button`::
|
||||
|
||||
view = ConfirmView(ctx.author)
|
||||
view.confirm_button.style = discord.ButtonStyle.red
|
||||
view.confirm_button.label = "Delete"
|
||||
view.dismiss_button.label = "Cancel"
|
||||
view.message = await ctx.send(
|
||||
"Are you sure you want to remove #very-important-channel?", view=view
|
||||
)
|
||||
await view.wait()
|
||||
if view.result:
|
||||
await ctx.send("Channel #very-important-channel deleted.")
|
||||
else:
|
||||
await ctx.send("Canceled.")
|
||||
|
||||
:type: discord.ui.Button
|
||||
|
||||
.. autoattribute:: dismiss_button
|
||||
:no-value:
|
||||
|
||||
A `discord.ui.Button` to dismiss the message.
|
||||
|
||||
The button's callback will set `result` to ``False``, defer the response,
|
||||
and call `on_timeout()` to clean up the view.
|
||||
|
||||
.. rubric:: Example
|
||||
|
||||
Changing the style and label of this `discord.ui.Button`::
|
||||
|
||||
view = ConfirmView(ctx.author)
|
||||
view.confirm_button.style = discord.ButtonStyle.red
|
||||
view.confirm_button.label = "Delete"
|
||||
view.dismiss_button.label = "Cancel"
|
||||
view.message = await ctx.send(
|
||||
"Are you sure you want to remove #very-important-channel?", view=view
|
||||
)
|
||||
await view.wait()
|
||||
if view.result:
|
||||
await ctx.send("Channel #very-important-channel deleted.")
|
||||
else:
|
||||
await ctx.send("Canceled.")
|
||||
|
||||
:type: discord.ui.Button
|
||||
|
||||
AntiSpam
|
||||
========
|
||||
|
||||
@@ -282,7 +282,7 @@ If you want to do it, follow these steps.
|
||||
2. **Install Linux**
|
||||
|
||||
Most of the VPS providers have tools for installing Linux automatically. If
|
||||
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
|
||||
you're a beginner, we recommend **Ubuntu 24.04 LTS**.
|
||||
|
||||
For Raspberry Pi users, just install `Raspbian
|
||||
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
|
||||
|
||||
@@ -31,7 +31,7 @@ Open a terminal or command prompt and type one of the following
|
||||
.. note::
|
||||
|
||||
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
|
||||
link below. **The development version of the bot contains experimental changes. It is not
|
||||
value below. **The development version of the bot contains experimental changes. It is not
|
||||
intended for normal users.** We will not support anyone using the development version in any
|
||||
support channels. Using the development version may break third party cogs and not all core
|
||||
commands may work. Downgrading to stable after installing the development version may cause
|
||||
@@ -40,7 +40,7 @@ Open a terminal or command prompt and type one of the following
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
|
||||
Red-DiscordBot @ https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop
|
||||
|
||||
|
||||
(Windows users may need to use :code:`py -3.8` or :code:`python` instead of :code:`python3.8`)
|
||||
@@ -55,7 +55,7 @@ the purposes of this example, we'll call this :code:`mycog`).
|
||||
In this folder, create three files: :code:`__init__.py`,
|
||||
:code:`mycog.py`, and :code:`info.json`. Open the folder in
|
||||
a text editor or IDE (examples include `Sublime Text 3 <https://www.sublimetext.com/>`_,
|
||||
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, and
|
||||
`Visual Studio Code <https://code.visualstudio.com/>`_, and
|
||||
`PyCharm <http://www.jetbrains.com/pycharm/>`_).
|
||||
|
||||
.. attention::
|
||||
@@ -147,7 +147,7 @@ have successfully created a cog!
|
||||
------ __init__.py
|
||||
------ coolcog.py
|
||||
|
||||
You would then use :code:`[p]addpath D:\red-cogs` to add the path
|
||||
You would then use :code:`[p]addpath D:\\red-cogs` to add the path
|
||||
and then you can use :code:`[p]load mycog` or :code:`[p]load coolcog`
|
||||
to load them
|
||||
|
||||
|
||||
@@ -41,17 +41,16 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
- Repo-wide ``info.json`` file with the keys
|
||||
|
||||
- ``author``
|
||||
- ``name``
|
||||
- ``short``
|
||||
- ``description``
|
||||
|
||||
- Cog ``info.json`` files with the keys
|
||||
|
||||
- ``author``
|
||||
- ``name``
|
||||
- ``short``
|
||||
- ``requirements`` (if applicable)
|
||||
- ``description``
|
||||
- ``min_python_version`` (if applicable)
|
||||
|
||||
See `info-json-format` for more information on how to set up ``info.json`` files.
|
||||
|
||||
@@ -94,8 +93,6 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
- If that's not possible, don't break anything in core or any other cog with your code.
|
||||
- If you have to use private methods, lock the cog to specific Red versions you can guarantee it works on without breaking anything using the ``min_bot_version`` and ``max_bot_version`` keys in that cog's ``info.json`` file.
|
||||
|
||||
- Cog Creators must keep their cogs up-to-date with core Red or be delisted until cogs meet Red API changes. Repositories must be kept up to date with the latest version of Red within 3 months of its release.
|
||||
|
||||
.. _recommendations-for-cog-creators:
|
||||
|
||||
--------------------------------
|
||||
@@ -196,7 +193,12 @@ Other Details
|
||||
- The reviewer of your application has the final word.
|
||||
- Hidden cogs will not be explicitly reviewed, however they are not allowed to contain malicious or ToS breaking code.
|
||||
- QA reserves the right to revoke these roles and all privileges if you are found to be in gross negligence, malicious intent, or reckless abandonment of your repository.
|
||||
- If a Cog Creator's repository is not maintained and kept up to date, that repo will be removed from the approved repo listings until such issues are addressed.
|
||||
- Cogs must be functionally working to the quality of an approved cog on the latest minor version of Red to be listed on the Red Index. Cogs that are not updated within 1 month of initial breakage will be delisted from the index until they are updated. Examples of potential breakage include, but are not limited to:
|
||||
|
||||
- A dependency without version constraints receiving a breaking update
|
||||
- An API changing the schema of its endpoints
|
||||
- Red itself releasing a new minor version
|
||||
|
||||
- Only 1 person is allowed to be the Cog Creator for a particular repo. Multiple people are allowed to maintain the repo, however the "main" owner (and the Cog Creator) is responsible for any code on the repo.
|
||||
- The Cog Creator status for a repo can be transferred to another user if the Cog Creator requests it.
|
||||
- An approved Cog Creator can ask QA to add additional repos they have created to the approved pool.
|
||||
|
||||
@@ -47,7 +47,7 @@ Keys common to both repo and cog info.json (case sensitive)
|
||||
is installed or a repo is added
|
||||
|
||||
.. tip:: You can use the ``[p]`` key in your string to use the prefix
|
||||
used for installing.
|
||||
used for installing, and ``[botname]`` to show the bot's username.
|
||||
|
||||
- ``short`` (string) - A short description of the cog or repo. For cogs, this info
|
||||
is displayed when a user executes ``[p]cog list``
|
||||
|
||||
@@ -17,7 +17,7 @@ Getting Started
|
||||
---------------
|
||||
|
||||
To start off, we will have to import some additional modules to our cog file.
|
||||
We will be using the :class:`redbot.core.app_commands` module to create our slash commands.
|
||||
We will be using the ``redbot.core.app_commands`` module to create our slash commands.
|
||||
Once we have imported the module, we can start creating our slash commands in our cog class.
|
||||
For this example we will use a basic hello world command.
|
||||
|
||||
@@ -39,6 +39,11 @@ Go ahead and load your cog. Once it is loaded, we will have to enable and sync o
|
||||
We can do this by using the :ref:`[p]slash<core-command-slash>` command to manage our slash commands.
|
||||
Once you have registered your slash commands, you can test them out by typing ``/hello`` in your server.
|
||||
|
||||
.. tip::
|
||||
|
||||
You may need to restart your Discord client with ``Ctrl + R`` (or your device's equivalent) to force
|
||||
your client to see the new command after syncing.
|
||||
|
||||
----------------------------
|
||||
Slash Commands and Arguments
|
||||
----------------------------
|
||||
@@ -49,7 +54,7 @@ Below we will go over some of the different stuff you can do with slash commands
|
||||
Decorators
|
||||
----------
|
||||
Just like with text commands, we can use decorators to modify the behaviour of our slash commands.
|
||||
For example, we can use the :func:`app_commands.guild_only` decorator to make our slash command only work in guilds.
|
||||
For example, we can use the `app_commands.guild_only() <discord.app_commands.guild_only>` decorator to make our slash command only work in guilds.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -66,7 +71,7 @@ For example, we can use the :func:`app_commands.guild_only` decorator to make ou
|
||||
async def hello(self, interaction: discord.Interaction):
|
||||
await interaction.response.send_message("Hello World!", ephemeral=True)
|
||||
|
||||
One of the more useful decorators is the :func:`app.commands.choices` decorator.
|
||||
One of the more useful decorators is the `app_commands.choices() <discord.app_commands.choices>` decorator.
|
||||
This decorator allows us to specify a list of choices for a specific argument.
|
||||
This is useful for arguments that have a limited number of options.
|
||||
For example, we can use this to create a command that allows us to choose between two different colors.
|
||||
@@ -85,15 +90,16 @@ For example, we can use this to create a command that allows us to choose betwee
|
||||
app_commands.Choice(name="Red", value="red"),
|
||||
app_commands.Choice(name="Blue", value="blue"),
|
||||
])
|
||||
async def color(self, interaction: discord.Interaction, color: Color):
|
||||
await interaction.response.send_message(f"Your color is {color}", ephemeral=True)
|
||||
async def color(self, interaction: discord.Interaction, color: app_commands.Choice[str]):
|
||||
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
|
||||
|
||||
The user will be shown the ``name`` of the choice, and the argument will be passed the
|
||||
``value`` associated with that choice. This allows user-facing names to be prettier than
|
||||
what is actually processed by the command.
|
||||
The user will be shown the ``name`` of the choice, and the argument will be passed a
|
||||
`app_commands.Choice <discord.app_commands.Choice>` object with the ``name`` and ``value`` associated with that choice.
|
||||
This allows user-facing names to be prettier than what is actually processed by the command.
|
||||
|
||||
Alternatively, ``Literal`` can be used if the argument does not need a different
|
||||
user-facing label.
|
||||
user-facing label. When done this way, the resulting parameter will be one of
|
||||
the literal values listed.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -109,8 +115,8 @@ user-facing label.
|
||||
async def color(self, interaction: discord.Interaction, color: Literal["Red", "Blue"]):
|
||||
await interaction.response.send_message(f"Your color is {color}", ephemeral=True)
|
||||
|
||||
Finally, an ``Enum`` subclass can be used to specify choices. When done this way, the
|
||||
resulting parameter will be an instance of that enum, rather than the ``value``.
|
||||
Finally, an `enum.Enum` subclass can be used to specify choices. When done this way, the
|
||||
resulting parameter will be an instance of that enum, rather than `app_commands.Choice <discord.app_commands.Choice>`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -130,7 +136,7 @@ resulting parameter will be an instance of that enum, rather than the ``value``.
|
||||
async def color(self, interaction: discord.Interaction, color: Color):
|
||||
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
|
||||
|
||||
Check out the full reference of decorators on Discord.py's documentation `here <https://discordpy.readthedocs.io/en/stable/interactions/api.html#decorators>`__.
|
||||
Check out :dpy_docs:`the full reference of decorators at Discord.py's documentation <interactions/api.html#decorators>`.
|
||||
|
||||
|
||||
Groups & Subcommands
|
||||
|
||||
@@ -41,12 +41,33 @@ If there are multiple authors, we can separate them with commas.
|
||||
|
||||
AUTHOR: Red, Rojo, Rouge
|
||||
|
||||
-----------------
|
||||
Description Field
|
||||
-----------------
|
||||
|
||||
We can also add an optional ``DESCRIPTION`` to our trivia list, which
|
||||
will show from the output of ``[p]trivia info <category>``. The
|
||||
description should indicate to the user what the trivia list is
|
||||
about and what kind of questions they can expect to face.
|
||||
|
||||
For example, if you were writing a logo quiz trivia list, you could
|
||||
create a description like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Kreusada
|
||||
DESCRIPTION: >-
|
||||
A quiz to test your logo knowledge to the limit. This trivia
|
||||
will send image URLs and ask you to identify the company's name
|
||||
from the logo that is sent.
|
||||
|
||||
---------------------
|
||||
Questions and Answers
|
||||
---------------------
|
||||
|
||||
Writing questions and answers is simple. Once you've finished your
|
||||
``AUTHOR`` field, you can move on to your questions just below.
|
||||
``AUTHOR`` field and ``DESCRIPTION`` field, you can move on to your questions
|
||||
just below.
|
||||
|
||||
Questions should consist of at least one answer, with other
|
||||
possible answers included if necessary. You must put a colon at the end
|
||||
@@ -98,6 +119,7 @@ As you've added more questions, your file should look something like this:
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Red
|
||||
DESCRIPTION: A general quiz to test your knowledge.
|
||||
How many days are there in a regular year?:
|
||||
- 365
|
||||
- three hundred and sixty five
|
||||
|
||||
@@ -32,12 +32,11 @@ First, we would like to make something clear:
|
||||
Hosting on a VPS or Dedicated Server
|
||||
------------------------------------
|
||||
|
||||
| You can host Red in a VPS running Linux or Windows. Using a Linux VPS is the
|
||||
| You can host Red on a VPS running Linux or Windows. Using a Linux VPS is the
|
||||
recommended option. Dedicated servers also work but are overpowered and cost
|
||||
ineffective unless one plans to run a very large bot or use their server for
|
||||
more than just hosting Red. If you have already created an instance, Red can be moved to a different
|
||||
server for hosting with a backup/restore process. More information and guidance
|
||||
about this process is available in the `Red Support Server <https://discord.com/invite/red>`_.
|
||||
server for hosting using the :doc:`backup/restore process </backup_red>`.
|
||||
|
||||
.. warning::
|
||||
Please be aware that a Linux server is controlled through a command line.
|
||||
@@ -87,7 +86,7 @@ Average Providers
|
||||
| `OVH <https://us.ovhcloud.com/vps/>`_ is a company focused on providing hosting
|
||||
and cloud services with locations in Europe, North America and Asia Pacific.
|
||||
|
||||
| `Time4VPS <https://www.time4vps.eu/>`_ is a Lithuanian VPS provider mainly focused
|
||||
| `Time4VPS <https://www.time4vps.com/>`_ is a Lithuanian VPS provider mainly focused
|
||||
on lower cost.
|
||||
|
||||
| `GalaxyGate <https://galaxygate.net/>`_ is a VPS and dedicated server provider
|
||||
@@ -114,7 +113,7 @@ Average Providers
|
||||
| `LowEndBox <http://lowendbox.com/>`_ is a website where hosting providers are
|
||||
discussed and curated, often with lower costs and less known providers.
|
||||
|
||||
| `AlphaVps <https://alphavps.com>`_ is a Bulgaria VPS and dedicated server provider
|
||||
| `AlphaVps <https://alphavps.com>`_ is a Bulgarian VPS and dedicated server provider
|
||||
with locations in Los Angeles, New York, England, Germany and Bulgaria.
|
||||
|
||||
--------------------
|
||||
|
||||
@@ -45,6 +45,16 @@ If you wish to continue using auto-restart functionality, we recommend following
|
||||
Behavior changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
x86-64 CPUs are now only supported if they support x86-64-v2 instruction set
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
On x86-64 systems, we now require that your CPU supports x86-64-v2 instruction set.
|
||||
This roughly translates to us dropping support for Intel CPUs that have been released before 2009
|
||||
and AMD CPUs that have been releasesd before 2012.
|
||||
|
||||
This has been mostly dictated by one of our dependencies but some Linux distributions
|
||||
are already dropping support for it in their latest versions as well.
|
||||
|
||||
Thread-related changes
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -16,6 +16,17 @@ For Developers
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
``SimpleMenu.select_menu`` attribute
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated-removed:: 3.5.14 60
|
||||
|
||||
The `SimpleMenu.select_menu` attribute has been deprecated.
|
||||
|
||||
Any behaviour enabled by the usage of this attribute should no longer be depended on.
|
||||
If you need this for something and cannot replace it with the other functionality,
|
||||
create an issue on Red's issue tracker.
|
||||
|
||||
Downloader's shared libraries
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
install_guides/index
|
||||
bot_application_guide
|
||||
update_red
|
||||
backup_red
|
||||
about_venv
|
||||
autostart_windows
|
||||
autostart_mac
|
||||
@@ -71,6 +72,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
framework_bot
|
||||
framework_checks
|
||||
framework_commands
|
||||
framework_app_commands
|
||||
framework_config
|
||||
framework_datamanager
|
||||
framework_events
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
To install/update pyenv, run the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
command -v pyenv && pyenv update || curl https://pyenv.run | bash
|
||||
|
||||
After this command, you will see a warning about 'pyenv' not being in the load path. To address this,
|
||||
you should run these commands:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
|
||||
rcfile=$([ -n "$ZSH_VERSION" ] && echo ~/.zshrc || echo ~/.bashrc)
|
||||
printf '%s\n%s\n%s\n' 'export PYENV_ROOT="$HOME/.pyenv"' 'export PATH="$PYENV_ROOT/bin:$PATH"' "$([ -f "$profile" ] && cat "$profile")" > "$profile"
|
||||
echo 'eval "$(pyenv init --path)"' >> "$profile"
|
||||
echo 'eval "$(pyenv init -)"' >> "$rcfile"
|
||||
echo 'eval "$(pyenv virtualenv-init -)"' >> "$rcfile"
|
||||
|
||||
Then **log out and log back in** and run the following command:
|
||||
@@ -1,44 +0,0 @@
|
||||
------------------------------
|
||||
Creating a Virtual Environment
|
||||
------------------------------
|
||||
|
||||
.. tip::
|
||||
|
||||
If you want to learn more about virtual environments, see page: `about-venvs`
|
||||
|
||||
We require installing Red into a virtual environment. Don't be scared, it's very
|
||||
straightforward.
|
||||
|
||||
**************************
|
||||
Using ``pyenv virtualenv``
|
||||
**************************
|
||||
|
||||
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
|
||||
environments. This option is only available if you installed Python with pyenv.
|
||||
|
||||
First, ensure your pyenv interpreter is set to python 3.8.1 or greater with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv version
|
||||
|
||||
Now, create a virtual environment with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv virtualenv <name>
|
||||
|
||||
Replace ``<name>`` with whatever you like. If you ever forget what you named it,
|
||||
you can always use the command ``pyenv versions`` to list all virtual environments.
|
||||
|
||||
Now activate your virtualenv with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv shell <name>
|
||||
|
||||
.. important::
|
||||
|
||||
You must activate the virtual environment with the above command every time you open a new
|
||||
shell to run, install or update Red. You can check out other commands like ``pyenv local`` and
|
||||
``pyenv global`` if you wish to keep the virtualenv activated all the time.
|
||||
@@ -8,6 +8,7 @@ To install without additional config backend support:
|
||||
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
:modifiers: red-install-guide-install-normal
|
||||
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U Red-DiscordBot
|
||||
@@ -16,6 +17,7 @@ Or, to install with PostgreSQL support:
|
||||
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
:modifiers: red-install-guide-install-postgres
|
||||
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U "Red-DiscordBot[postgres]"
|
||||
@@ -29,6 +31,7 @@ After installation, set up your instance with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
:modifiers: red-install-guide-setup
|
||||
|
||||
redbot-setup
|
||||
|
||||
@@ -40,6 +43,7 @@ Once done setting up the instance, run the following command to run Red:
|
||||
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
:modifiers: red-install-guide-run
|
||||
|
||||
redbot <your instance name>
|
||||
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Red Hat Enterprise Linux (RHEL) 8.4-8.x and its derivatives have all required packages available in official repositories.
|
||||
Red Hat Enterprise Linux (RHEL) 8.10 and its derivatives have all required packages available in official repositories.
|
||||
Install them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y update
|
||||
sudo dnf -y group install development
|
||||
sudo dnf -y install python39 python39-devel java-11-openjdk-headless nano git
|
||||
sudo dnf -y install python3.11 python3.11-devel java-17-openjdk-headless nano git
|
||||
|
||||
Set ``java`` executable to point to Java 11:
|
||||
Set ``java`` executable to point to Java 17:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo alternatives --set java "java-11-openjdk.$(uname -i)"
|
||||
sudo alternatives --set java "java-17-openjdk.$(uname -i)"
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Red Hat Enterprise Linux (RHEL) 9 and its derivatives have all required packages available in official repositories.
|
||||
Red Hat Enterprise Linux (RHEL) 9.4-9.x and its derivatives have all required packages available in official repositories.
|
||||
Install them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python39 python3-devel git java-11-openjdk-headless @development nano
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.11 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.11.1 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.11.1
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.11.
|
||||
@@ -1,27 +0,0 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.10 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.10.9 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.10.9
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.10.
|
||||
@@ -1,27 +0,0 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.16 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.9.16
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.9.
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
For safety reasons, DO NOT install Red with a root user. If you are unsure how to create
|
||||
a new user on Linux, see `DigitalOcean's tutorial: How To Create a New Sudo-enabled User
|
||||
<https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu-20-04-quickstart>`_.
|
||||
<https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu>`_.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-alma-linux-8:
|
||||
|
||||
====================================
|
||||
Installing Red on Alma Linux 8.4-8.x
|
||||
Installing Red on Alma Linux 8.6-8.x
|
||||
====================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
26
docs/install_guides/amazon-linux-2023.rst
Normal file
@@ -0,0 +1,26 @@
|
||||
.. _install-amazon-linux-2023:
|
||||
|
||||
===================================
|
||||
Installing Red on Amazon Linux 2023
|
||||
===================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Amazon Linux 2023 has all required packages available in official repositories. Install
|
||||
them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-17-amazon-corretto-headless @development nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -16,22 +16,22 @@ Install the pre-requirements with pacman:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo pacman -Syu git jre11-openjdk-headless base-devel nano
|
||||
sudo pacman -Syu git jre17-openjdk-headless base-devel nano
|
||||
|
||||
On Arch Linux, Python 3.9 can be installed from the Arch User Repository (AUR) from the ``python39`` package.
|
||||
On Arch Linux, Python 3.11 can be installed from the Arch User Repository (AUR) from the ``python311`` package.
|
||||
|
||||
The manual build process is the Arch-supported install method for AUR packages. You can install ``python39`` package with the following commands:
|
||||
The manual build process is the Arch-supported install method for AUR packages. You can install ``python311`` package with the following commands:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
git clone https://aur.archlinux.org/python39.git /tmp/python39
|
||||
cd /tmp/python39
|
||||
git clone https://aur.archlinux.org/python311.git /tmp/python311
|
||||
cd /tmp/python311
|
||||
makepkg -sicL
|
||||
cd -
|
||||
rm -rf /tmp/python39
|
||||
rm -rf /tmp/python311
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
.. _install-centos-7:
|
||||
|
||||
==========================
|
||||
Installing Red on CentOS 7
|
||||
==========================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Install the pre-requirements with yum:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel java-11-openjdk-headless nano git
|
||||
|
||||
In order to install gcc 8, we'll use SCL repository:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y install centos-release-scl
|
||||
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
|
||||
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
In order to install Git 2.11 or greater, we recommend adding the IUS repository:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y install https://repo.ius.io/ius-release-el7.rpm
|
||||
sudo yum -y swap git git236
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. Python 3.10 requires OpenSSL 1.1.1 which CentOS 7 doesn't provide in base repository.
|
||||
|
||||
.. include:: _includes/install-python39-pyenv.rst
|
||||
|
||||
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -1,7 +0,0 @@
|
||||
.. _install-centos-stream-8:
|
||||
|
||||
=================================
|
||||
Installing Red on CentOS Stream 8
|
||||
=================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-debian-11:
|
||||
.. _install-debian-12:
|
||||
|
||||
====================================
|
||||
Installing Red on Debian 11 Bullseye
|
||||
Installing Red on Debian 12 Bookworm
|
||||
====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64+armv7l.rst
|
||||
@@ -12,16 +12,16 @@ Installing Red on Debian 11 Bullseye
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Debian 11 "Bullseye" has all required packages available in official repositories. Install them
|
||||
Debian 12 "Bookworm" has all required packages available in official repositories. Install them
|
||||
with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-11-jre-headless build-essential nano
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -12,12 +12,14 @@ Installing Red on Fedora Linux
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Fedora Linux 36 and above has all required packages available in official repositories. Install
|
||||
Fedora Linux 42 and above has all required packages available in official repositories. Install
|
||||
them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-11-openjdk-headless @development-tools nano
|
||||
sudo dnf -y install python3.11 python3.11-devel git adoptium-temurin-java-repository @development-tools nano
|
||||
sudo dnf config-manager setopt adoptium-temurin-java-repository.enabled=1
|
||||
sudo dnf -y install temurin-17-jre
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Installing Red
|
||||
The list below shows the installation guides available based on the operating system being used.
|
||||
|
||||
If you want to host Red on a VPS and are unsure what operating system you should choose,
|
||||
we recommend **Ubuntu 22.04 LTS**.
|
||||
we recommend **Ubuntu 24.04 LTS**.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
@@ -15,23 +15,20 @@ we recommend **Ubuntu 22.04 LTS**.
|
||||
mac
|
||||
alma-linux-8
|
||||
alma-linux-9
|
||||
amazon-linux-2023
|
||||
arch
|
||||
centos-7
|
||||
centos-stream-8
|
||||
centos-stream-9
|
||||
debian-11
|
||||
debian-12
|
||||
fedora
|
||||
opensuse-leap-15
|
||||
opensuse-tumbleweed
|
||||
oracle-linux-8
|
||||
oracle-linux-9
|
||||
raspberry-pi-os-10
|
||||
raspberry-pi-os-11
|
||||
raspberry-pi-os-12
|
||||
rhel-8
|
||||
rhel-9
|
||||
rocky-linux-8
|
||||
rocky-linux-9
|
||||
ubuntu-1804
|
||||
ubuntu-2004
|
||||
ubuntu-2204
|
||||
ubuntu-2404
|
||||
ubuntu-non-lts
|
||||
|
||||
@@ -28,8 +28,7 @@ one-by-one:
|
||||
|
||||
brew install python@3.11
|
||||
brew install git
|
||||
brew tap homebrew/cask-versions
|
||||
brew install --cask temurin11
|
||||
brew install temurin@17
|
||||
|
||||
By default, Python installed through Homebrew is not added to the load path.
|
||||
To fix this, you should run these commands:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-opensuse-leap-15:
|
||||
|
||||
=====================================
|
||||
Installing Red on openSUSE Leap 15.4+
|
||||
Installing Red on openSUSE Leap 15.6+
|
||||
=====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
@@ -12,16 +12,16 @@ Installing Red on openSUSE Leap 15.4+
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
openSUSE Leap 15.4+ has all required dependencies available in official repositories. Install them
|
||||
openSUSE Leap 15.6+ has all required dependencies available in official repositories. Install them
|
||||
with zypper:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo zypper -n install python310 python310-devel git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install python311 python311-devel git-core java-17-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.10.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -17,7 +17,7 @@ with zypper:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo zypper -n install python311 python311-devel git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install python311 python311-devel git-core java-17-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-oracle-linux-8:
|
||||
|
||||
======================================
|
||||
Installing Red on Oracle Linux 8.4-8.x
|
||||
Installing Red on Oracle Linux 8.6-8.x
|
||||
======================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
.. _install-raspberry-pi-os-10:
|
||||
|
||||
====================================================
|
||||
Installing Red on Raspberry Pi OS (Legacy) 10 Buster
|
||||
====================================================
|
||||
|
||||
.. include:: _includes/supported-arch-armv7l.rst
|
||||
|
||||
.. note::
|
||||
|
||||
While we do provide support and install instructions for running Red
|
||||
on Raspberry Pi OS (Legacy) 10 Buster, we highly recommend installing/upgrading to
|
||||
the new version - Raspberry Pi OS 11 Bullseye.
|
||||
|
||||
If you're not sure what version you are using,
|
||||
you can check your version of Raspberry Pi OS by running:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
lsb_release -a
|
||||
|
||||
If you're running Bullseye already, read `install-raspberry-pi-os-11` document instead.
|
||||
|
||||
If you're using Buster, please consider upgrading to Bullseye if possible.
|
||||
You can read
|
||||
`the post about Bullseye release from Raspberry Pi Foundation <https://www.raspberrypi.com/news/raspberry-pi-os-debian-bullseye/>`__
|
||||
to learn how you can install/upgrade to the new version.
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
We recommend installing pyenv as a method of installing non-native versions of Python on
|
||||
Raspberry Pi OS. This guide will tell you how. First, run the following commands:
|
||||
|
||||
.. cmake is necessary to be able to successfully build rapidfuzz.
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install cmake make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. We should only build and install even versions of Python on Raspberry Pi OS as odd
|
||||
.. versions are part of piwheels and can cause installs of pip packages that won't work.
|
||||
|
||||
.. include:: _includes/install-python310-pyenv.rst
|
||||
|
||||
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -1,42 +0,0 @@
|
||||
.. _install-raspberry-pi-os-11:
|
||||
|
||||
=============================================
|
||||
Installing Red on Raspberry Pi OS 11 Bullseye
|
||||
=============================================
|
||||
|
||||
.. include:: _includes/supported-arch-aarch64+armv7l.rst
|
||||
|
||||
.. note::
|
||||
|
||||
This guide can only be used with Raspberry Pi OS 11 Bullseye,
|
||||
it will not work with any older (e.g. Raspberry Pi OS 10 Buster)
|
||||
or newer (e.g. Raspberry Pi OS 12 Bookworm) releases.
|
||||
You can check your version of Raspberry Pi OS by running:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
lsb_release -a
|
||||
|
||||
If you're not running Bullseye, you should read
|
||||
`the post about Bullseye release from Raspberry Pi Foundation <https://www.raspberrypi.com/news/raspberry-pi-os-debian-bullseye/>`__
|
||||
to learn how you can install/upgrade to the new version.
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Raspberry Pi OS "Bullseye" has all required packages available in official repositories. Install them
|
||||
with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-11-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
38
docs/install_guides/raspberry-pi-os-12.rst
Normal file
@@ -0,0 +1,38 @@
|
||||
.. _install-raspberry-pi-os-12:
|
||||
|
||||
======================================================
|
||||
Installing Red on Raspberry Pi OS (Legacy) 12 Bookworm
|
||||
======================================================
|
||||
|
||||
.. include:: _includes/supported-arch-aarch64+armv7l.rst
|
||||
|
||||
.. note::
|
||||
|
||||
This guide can only be used with Raspberry Pi OS 12 Bookworm,
|
||||
it will not work with any older (e.g. Raspberry Pi OS 11 Bullseye)
|
||||
or newer (e.g. Raspberry Pi OS 13 Trixie) releases.
|
||||
You can check your version of Raspberry Pi OS by running:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
lsb_release -a
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Raspberry Pi OS "Bookworm" has all required packages available in official repositories. Install them
|
||||
with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-rhel-8:
|
||||
|
||||
=========================================================
|
||||
Installing Red on Red Hat Enterprise Linux (RHEL) 8.4-8.x
|
||||
=========================================================
|
||||
======================================================
|
||||
Installing Red on Red Hat Enterprise Linux (RHEL) 8.10
|
||||
======================================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-rhel-9:
|
||||
|
||||
===================================================
|
||||
Installing Red on Red Hat Enterprise Linux (RHEL) 9
|
||||
===================================================
|
||||
=========================================================
|
||||
Installing Red on Red Hat Enterprise Linux (RHEL) 9.4-9.x
|
||||
=========================================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-rocky-linux-8:
|
||||
|
||||
===============================
|
||||
Installing Red on Rocky Linux 8
|
||||
===============================
|
||||
=====================================
|
||||
Installing Red on Rocky Linux 8.6-8.x
|
||||
=====================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
.. _install-ubuntu-2004:
|
||||
|
||||
==================================
|
||||
Installing Red on Ubuntu 20.04 LTS
|
||||
==================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Ubuntu 20.04 LTS has all required packages available in official repositories. Install them
|
||||
with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3.9 python3.9-dev python3.9-venv git openjdk-11-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -18,7 +18,7 @@ with apt:
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3.10 python3.10-dev python3.10-venv git openjdk-11-jre-headless build-essential nano
|
||||
sudo apt -y install python3.10 python3.10-dev python3.10-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-ubuntu-1804:
|
||||
.. _install-ubuntu-2404:
|
||||
|
||||
==================================
|
||||
Installing Red on Ubuntu 18.04 LTS
|
||||
Installing Red on Ubuntu 24.04 LTS
|
||||
==================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
@@ -12,29 +12,19 @@ Installing Red on Ubuntu 18.04 LTS
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
.. Git 2.17.0-2.22.0 have an issue with partial clone which is used in pip for git installs.
|
||||
.. Not incredibly important perhaps but this ppa is recommended by git-scm.com/download/linux
|
||||
.. so it should be fine.
|
||||
|
||||
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||
We recommend adding the ``deadsnakes`` ppa to install Python 3.11:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install software-properties-common
|
||||
sudo add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
We recommend adding the ``deadsnakes`` ppa to install Python 3.11:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
||||
|
||||
Now install the pre-requirements with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt -y install python3.11 python3.11-dev python3.11-venv git openjdk-11-jre-headless build-essential nano
|
||||
sudo apt -y install python3.11 python3.11-dev python3.11-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
@@ -4,23 +4,10 @@
|
||||
Installing Red on Ubuntu non-LTS versions
|
||||
=========================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
Latest Ubuntu non-LTS version (24.10 at the time of writing) is not supported at current time
|
||||
due to lack of availability of Python 3.11 or older in its repositories.
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
The support should come back once we get back on track with supporting current Python versions.
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Now install the pre-requirements with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3.11 python3.11-dev python3.11-venv git openjdk-11-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
We recommend usage of latest Ubuntu **LTS** versions instead, you can find
|
||||
`an install guide for Ubuntu 24.04 <ubuntu-2404>` in our docs.
|
||||
|
||||
@@ -39,7 +39,7 @@ For Audio support, you should also run the following command before exiting:
|
||||
|
||||
.. prompt:: powershell
|
||||
|
||||
choco upgrade temurin11 -y
|
||||
choco upgrade temurin17 -y
|
||||
|
||||
|
||||
From here, exit the prompt then continue onto `creating-venv-windows`.
|
||||
@@ -66,7 +66,7 @@ Manually installing dependencies
|
||||
|
||||
.. attention:: Please choose the option to "Git from the command line and also from 3rd-party software" in Git's setup.
|
||||
|
||||
* `Java 11 <https://adoptium.net/temurin/releases/?version=11>`_ - needed for Audio
|
||||
* `Java 17 <https://adoptium.net/temurin/releases/?version=17>`_ - needed for Audio
|
||||
|
||||
From here, continue onto `creating-venv-windows`.
|
||||
|
||||
@@ -133,6 +133,7 @@ Run **one** of the following set of commands, depending on what extras you want
|
||||
|
||||
.. prompt:: batch
|
||||
:prompts: (redenv) C:\\>
|
||||
:modifiers: red-install-guide-install-normal
|
||||
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U Red-DiscordBot
|
||||
@@ -141,6 +142,7 @@ Run **one** of the following set of commands, depending on what extras you want
|
||||
|
||||
.. prompt:: batch
|
||||
:prompts: (redenv) C:\\>
|
||||
:modifiers: red-install-guide-install-postgres
|
||||
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U Red-DiscordBot[postgres]
|
||||
@@ -153,6 +155,7 @@ After installation, set up your instance with the following command:
|
||||
|
||||
.. prompt:: batch
|
||||
:prompts: (redenv) C:\\>
|
||||
:modifiers: red-install-guide-setup
|
||||
|
||||
redbot-setup
|
||||
|
||||
@@ -164,6 +167,7 @@ Once done setting up the instance, run the following command to run Red:
|
||||
|
||||
.. prompt:: batch
|
||||
:prompts: (redenv) C:\\>
|
||||
:modifiers: red-install-guide-run
|
||||
|
||||
redbot <your instance name>
|
||||
|
||||
|
||||
@@ -8,40 +8,20 @@ About (privileged) intents and public bots
|
||||
==========================================
|
||||
|
||||
This page aims to explain Red's current intents requirements,
|
||||
our stance regarding "public bots" and the impact of some announced
|
||||
Discord changes coming in April 2022.
|
||||
our stance regarding "public bots", and the discord bot verification process.
|
||||
|
||||
To clarify:
|
||||
|
||||
- **Small bots** are bots under 100 servers. They currently do not need to undergo Discord's
|
||||
bot verification process
|
||||
- **Public bots** (or big bots) are bots that have reached 100 servers. They need to be
|
||||
`verified <https://support.discord.com/hc/en-us/articles/360040720412-Bot-Verification-and-Data-Whitelisting>`_
|
||||
`verified <https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified>`_
|
||||
by Discord to join more than 100 servers and gain privileged intents
|
||||
|
||||
.. warning::
|
||||
|
||||
It is **very** important that you fully read this page if you're the owner of a public bot or strive to scale your bot at that level.
|
||||
|
||||
.. _intents-intents:
|
||||
|
||||
-------
|
||||
Intents
|
||||
-------
|
||||
|
||||
Red currently requires **all intents** to be active in order to function properly.
|
||||
|
||||
The reason for this requirement is that there are some technical challenges that need
|
||||
to be overcome before we're able to adapt Red to function with only *some* intents:
|
||||
these challenges are mainly due to the modular / extensible nature of Red and the fact
|
||||
that Red has a long history (dating back to 2016!), making big changes naturally slower
|
||||
to happen. In comparison, intents have been introduced fairly recently. |br|
|
||||
This is not a problem if you have a small bot: you can simply go to the
|
||||
`Discord development portal <https://discord.com/developers/applications/me>`_
|
||||
and enable them. However, if you have a public bot Discord will want you to attain
|
||||
verified status: you should read :ref:`our stance regarding public bots <intents-public-bots>`
|
||||
and our guidelines for the :ref:`verification process <intents-bot-verification-process>`.
|
||||
|
||||
.. _intents-public-bots:
|
||||
|
||||
-----------
|
||||
@@ -54,8 +34,10 @@ Red was designed with one single goal in mind: a bot that you can host on your o
|
||||
and customize to your needs, making it really *your* bot. **The target audience of Red are server
|
||||
owners with a few servers**, often with specific needs that can be covered by the vast cog ecosystem
|
||||
that the community has built over the years. |br| Red was never built with big bots in mind,
|
||||
bots with thousands upon thousands of servers: these bots face unique challenges.
|
||||
Such Red instances *do exist*, it is not impossible to adapt Red and meet those criteria,
|
||||
bots with thousands upon thousands of servers: these bots face unique challenges. Large bots need
|
||||
to be extremely efficient to handle the large amount of requests they receive, and often need to
|
||||
distribute this work across multiple processes or machines to keep up.
|
||||
Such Red instances *do exist*, and it is not impossible to adapt Red and meet those criteria,
|
||||
but it requires work and bot owners with the technical knowledge to make it happen.
|
||||
It is **not** something that we support. |br|
|
||||
When your bot reaches the public bot scale and it is therefore required to be verified it
|
||||
@@ -75,8 +57,8 @@ the verification process.
|
||||
|
||||
Regardless of our stance, we do feel the need to give some pointers: many bot owners reach this point
|
||||
and become fairly lost, as they've simply been *users* so far.
|
||||
They have installed their bot, some cogs, personalized it, yadda yadda. Again, they have been users,
|
||||
not developers. Unless they also have an interest in development, they will likely not have a clue about
|
||||
They have installed their bot, some cogs, personalized it, but have not needed to write any code.
|
||||
Unless they also have an interest in development, they will likely not have a clue about
|
||||
what's going under the hood, much like you're not expected to be a mechanic to drive your car. And there's
|
||||
nothing wrong with that! Red has been designed to be as user friendly as possible. |br|
|
||||
The problem is this: Red is an outlier. Discord has built the bot verification process with the expectation
|
||||
@@ -94,41 +76,44 @@ out your application:
|
||||
of people that in their naivety went with the bad answer and it seems that at this point merely mentioning Red
|
||||
is a guaranteed way to have your application rejected.
|
||||
|
||||
.. _intents-slash-commands:
|
||||
.. _intents-intents:
|
||||
|
||||
---------------------------------
|
||||
Message intent and slash commands
|
||||
---------------------------------
|
||||
-------
|
||||
Intents
|
||||
-------
|
||||
|
||||
.. warning::
|
||||
Red expects **all intents** to be active. It is possible, but not recommended, to disable
|
||||
specific intents using the ``--disable-intent`` flag. If an intent is missing, you may
|
||||
experience errors due to Red expecting information provided by the intent to be present.
|
||||
|
||||
If you own a public bot it is extremely important that you read this section.
|
||||
Discord currently considers 3 intents to be
|
||||
`privileged <https://support-dev.discord.com/hc/en-us/articles/6205754771351-How-do-I-get-Privileged-Intents-for-my-bot>`_,
|
||||
and requires large bots to additionally apply for access to these intents. **If you have a small
|
||||
bot**, you can simply follow :ref:`these instructions <enabling-privileged-intents>` to enable them.
|
||||
|
||||
Discord has announced that **starting April 2022** the content of users' messages
|
||||
`will be "locked" behind message intent <https://support-dev.discord.com/hc/en-us/articles/4404772028055>`_ |br|
|
||||
If you're the owner of a small bot, fear not, this is yet another box that you have to tick from the
|
||||
`Discord development portal <https://discord.com/developers/applications/me>`_. |br|
|
||||
But if you're the owner of a public bot, things might be a lot less pleasant.
|
||||
A breakdown of how privileged intents are used in Red is provided below.
|
||||
|
||||
To recap, unless you have
|
||||
message intent, you will only receive message content for:
|
||||
The **Message Content** intent is required to use text based commands and inputs for
|
||||
configuration and all built in functionality. App commands (also known as slash commands)
|
||||
are limited to a total of 100 top level commands, which is difficult to manage on
|
||||
a modular bot. The approach we have taken to address this issue is to allow 3rd party
|
||||
cogs to provide slash commands, but require bot owners to pick which slash commands
|
||||
they actually want to use with the ``[p]slash`` command.
|
||||
Under this system, bot management commands that are not exposed to users are still
|
||||
expected to be provided as text commands, which requires the bot to be able to access
|
||||
message content. There are no current plans to provide slash versions of core commands.
|
||||
|
||||
- Messages that your bot sends
|
||||
- Messages that your bot receives in DM
|
||||
- Messages in which your bot is mentioned
|
||||
.. note::
|
||||
It is possible to work around this intent by using the ``--mentionable``
|
||||
flag, and using the bot mention as a prefix to use text based commands.
|
||||
|
||||
In case it's not clear by now, your bot needs message content to parse (see) the commands it receives. And if
|
||||
you don't attain message intent, your bot will not be able to... well, do anything. |br|
|
||||
The *bandaid fix* is for you to change your bot's prefix to a mention and a good portion of your commands will likely
|
||||
still work. You will however lose many functions, namely anything that relies on seeing message content to act. |br|
|
||||
The more *proper fix* is also not easy. You will need to justify your need for the message intent to Discord and
|
||||
they will only accept "compelling use cases".
|
||||
`It is not known what those even entail <https://gist.github.com/spiralw/091714718718379b6efcdbcaf807a024#q-what-usecases-will-be-valid>`_ at this point, but they have already stated that "parsing commands" is not a valid justification. |br|
|
||||
To make the matter worse, Discord is making `a huge push for all bot developers to implement slash commands <https://support.discord.com/hc/en-us/articles/1500000368501-Slash-Commands-FAQ>`_, which at the moment
|
||||
are rather lacking in features and cannot cover all the functionalities that standard commands offer. |br|
|
||||
Discord staff
|
||||
`stated that they will want your bot to have slash commands when you ask for message intent <https://gist.github.com/spiralw/091714718718379b6efcdbcaf807a024#q-if-we-are-granted-this-intent-will-bots-be-sanctioned-if-they-use-it-for-their-own-use-case-but-also-to-continue-to-run-normal-non-slash-commands-or-do-we-assume-that-if-you-are-granted-the-intent-you-are-trusted-with-it-and-are-allowed-to-use-it-for-additional-uses>`_. |br|
|
||||
Slash commands might very well turn out to be a big undertaking for the Red team to implement, even more now that our
|
||||
underlying library, `discord.py <https://github.com/Rapptz/discord.py>`_, has been discontinued. |br|
|
||||
The time window that Discord is giving us to adapt is very narrow: **Red will likely not be able to support slash
|
||||
commands for April 2022** and you should plan accordingly.
|
||||
The **Guild Members** intent is required to properly cache member information, including
|
||||
what users are in each server, what roles they have, what their name is, etc. It is also
|
||||
required to receive events corresponding to when members join or leave a server, and when
|
||||
they change their nickname or other server options. Almost all cogs expect to be able
|
||||
to reference the member cache in order to avoid making API requests, and are not set
|
||||
up to check if the intent is present before doing so.
|
||||
|
||||
The **Guild Presences** intent is required to view the activities and status of
|
||||
users. Cogs which perform actions on users based on their activity or status will
|
||||
be unable to access this information if this intent is not enabled.
|
||||
|
||||
@@ -66,11 +66,6 @@ If you have Red 3.5.0 or newer, you can upgrade by following these steps:
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
If you used ``pyenv`` for your virtual environment, use:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv shell <name>
|
||||
#. Update Red with this command:
|
||||
|
||||
.. prompt:: bash
|
||||
@@ -113,7 +108,6 @@ If you have a Red version between 3.2.0 and 3.4.19, you can upgrade by following
|
||||
#. Start your bot with ``--no-cogs --load-cogs downloader`` flags, for example:
|
||||
|
||||
.. prompt:: batch
|
||||
|
||||
:prompts: (redenv) C:\\>
|
||||
|
||||
redbot <your instance name> --no-cogs --load-cogs downloader
|
||||
@@ -138,11 +132,6 @@ If you have a Red version between 3.2.0 and 3.4.19, you can upgrade by following
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
If you used ``pyenv`` for your virtual environment, use:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv shell <name>
|
||||
#. Update Red with this command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
@@ -38,7 +38,8 @@ their end-of-life date.
|
||||
The meaning of architecture names:
|
||||
|
||||
- **x86-64** (also known as amd64) refers to computers running a 64-bit version of the operating system
|
||||
on standard Intel and AMD 64-bit processors.
|
||||
on standard Intel and AMD 64-bit processors supporting x86-64-v2 instruction set
|
||||
(post-2008 Intel processors and post-2011 AMD processors).
|
||||
- **aarch64** (also known as arm64) refers to computers running an ARM 64-bit version of the operating system
|
||||
on 64-bit ARM processors (ARMv8-A and ARMv9-A) such as Apple M1 devices or Raspberry Pi computers
|
||||
(Raspberry Pi 3B and above, excluding Pi Zero (W/WH) model).
|
||||
@@ -49,39 +50,33 @@ their end-of-life date.
|
||||
================================ ======================= ============================================================
|
||||
Operating system version Supported architectures Ideally supported until
|
||||
================================ ======================= ============================================================
|
||||
Windows 10 x86-64 `End/Retirement Date <https://docs.microsoft.com/en-us/lifecycle/products/windows-10-home-and-pro>`__
|
||||
Windows 10 x86-64 2026-10-13 (`End of Consumer Extended Security Updates (ESU) program <https://www.microsoft.com/en-us/windows/extended-security-updates>`__)
|
||||
Windows 11 x86-64 `Retirement Date <https://docs.microsoft.com/en-us/lifecycle/products/windows-11-home-and-pro-version-21h2>`__
|
||||
macOS 11 (Big Sur) x86-64, aarch64 ~2023-10
|
||||
macOS 12 (Monterey) x86-64, aarch64 ~2024-10
|
||||
macOS 13 (Ventura) x86-64, aarch64 ~2025-10
|
||||
Alma Linux 8 x86-64, aarch64 2029-05-31 (`How long will CloudLinux support AlmaLinux? <https://wiki.almalinux.org/FAQ.html#how-long-will-cloudlinux-support-almalinux>`__)
|
||||
Alma Linux 9 x86-64, aarch64 2032-05-31
|
||||
macOS 14 (Sonoma) x86-64, aarch64 ~2026-10
|
||||
macOS 15 (Sequoia) x86-64, aarch64 ~2027-10
|
||||
macOS 26 (Tahoe) x86-64, aarch64 ~2028-10
|
||||
Alma Linux 8 x86-64, aarch64 2029-05-31 (`security support <https://wiki.almalinux.org/release-notes/>`__)
|
||||
Alma Linux 9 x86-64, aarch64 2032-05-31 (`security support <https://wiki.almalinux.org/release-notes/>`__)
|
||||
Amazon Linux 2023 x86-64, aarch64 2028-03-15 (`end-of-life <https://docs.aws.amazon.com/linux/al2023/release-notes/support-info-by-support-statement.html#support-info-by-support-statement-eol>`__)
|
||||
Arch Linux x86-64 forever (support is only provided for an up-to-date system)
|
||||
CentOS 7 x86-64, aarch64 2024-06-30 (`end of Maintenance Updates <https://wiki.centos.org/About/Product>`__)
|
||||
CentOS Stream 8 x86-64, aarch64 2024-05-31 (`end of Maintenance Updates <https://wiki.centos.org/About/Product>`__)
|
||||
CentOS Stream 9 x86-64, aarch64 2027-05-31 (`expected EOL <https://centos.org/stream9/#timeline>`__)
|
||||
Debian 11 Bullseye x86-64, aarch64, armv7l ~2024-09 (`End of life <https://wiki.debian.org/DebianReleases#Production_Releases>`__)
|
||||
Fedora Linux 36 x86-64, aarch64 2023-05-16 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
|
||||
Fedora Linux 37 x86-64, aarch64 2023-11-14 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
|
||||
Fedora Linux 38 x86-64, aarch64 2024-05-14 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
|
||||
openSUSE Leap 15.4 x86-64, aarch64 2023-11-30 (`end of maintenance life cycle <https://en.opensuse.org/Lifetime#openSUSE_Leap>`__)
|
||||
CentOS Stream 9 x86-64, aarch64 2027-05-31 (`Expected EOL <https://centos.org/stream9/#timeline>`__)
|
||||
Debian 12 Bookworm x86-64, aarch64, armv7l 2026-06-10 (`End of life <https://wiki.debian.org/DebianReleases#Production_Releases>`__)
|
||||
Fedora Linux 42 x86-64, aarch64 2026-05-13 (`End of Life <https://fedorapeople.org/groups/schedule/f-42/f-42-key-tasks.html>`__)
|
||||
Fedora Linux 43 x86-64, aarch64 2026-12-09 (`End of Life <https://fedorapeople.org/groups/schedule/f-43/f-43-key-tasks.html>`__)
|
||||
openSUSE Leap 15.6 x86-64, aarch64 2025-12-31 (`end of maintenance lifecycle <https://en.opensuse.org/Lifetime#openSUSE_Leap>`__)
|
||||
openSUSE Tumbleweed x86-64, aarch64 forever (support is only provided for an up-to-date system)
|
||||
Oracle Linux 8 x86-64, aarch64 2029-07-31 (`End of Premier Support <https://www.oracle.com/us/support/library/elsp-lifetime-069338.pdf>`__)
|
||||
Oracle Linux 9 x86-64, aarch64 2032-06-31 (`End of Premier Support <https://www.oracle.com/us/support/library/elsp-lifetime-069338.pdf>`__)
|
||||
Raspberry Pi OS (Legacy) 10 armv7l ~2023-12 (approximate date of release of Raspberry Pi OS 12)
|
||||
Raspberry Pi OS 11 aarch64, armv7l ~2023-12 (approximate date of release of Raspberry Pi OS 12)
|
||||
Raspberry Pi OS (Legacy) 12 aarch64, armv7l ~2027-10 (approximate date of release of Raspberry Pi OS 14)
|
||||
RHEL 8 (latest) x86-64, aarch64 2029-05-31 (`End of Maintenance Support <https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates>`__)
|
||||
RHEL 8.4 x86-64, aarch64 2023-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
RHEL 8.6 x86-64, aarch64 2024-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
RHEL 8.10 x86-64, aarch64 2029-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
RHEL 9 (latest) x86-64, aarch64 2032-05-31 (`End of Maintenance Support <https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates>`__)
|
||||
RHEL 9.0 x86-64, aarch64 2024-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
Rocky Linux 8 x86-64, aarch64 2029-05-31 (`end-of-life <https://rockylinux.org/download/>`__)
|
||||
Rocky Linux 9 x86-64, aarch64 2032-05-31 (`end-of-life <https://rockylinux.org/download/>`__)
|
||||
Ubuntu 18.04 LTS x86-64, aarch64 2023-04-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
Ubuntu 20.04 LTS x86-64, aarch64 2025-04-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
Ubuntu 22.04 LTS x86-64, aarch64 2027-04-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
Ubuntu 22.10 x86-64, aarch64 2023-07-31 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
Ubuntu 23.04 x86-64, aarch64 2024-01-31 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
RHEL 9.4 x86-64, aarch64 2026-04-30 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
RHEL 9.6 x86-64, aarch64 2027-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
|
||||
Rocky Linux 8 x86-64, aarch64 2029-05-31 (`End of Life <https://wiki.rockylinux.org/rocky/version/>`__)
|
||||
Rocky Linux 9 x86-64, aarch64 2032-05-31 (`End of Life <https://wiki.rockylinux.org/rocky/version/>`__)
|
||||
Ubuntu 22.04 LTS x86-64, aarch64 2027-06-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
Ubuntu 24.04 LTS x86-64, aarch64 2029-06-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
|
||||
================================ ======================= ============================================================
|
||||
|
||||
.. _developer-guarantees:
|
||||
@@ -112,12 +107,18 @@ This allows us to add certain optional features non-breakingly without a name co
|
||||
|
||||
Any RPC method exposed by Red may break without notice.
|
||||
|
||||
Any exclusion from these guarantees should be noted in the documentation of
|
||||
the affected attribute, function, class, or method.
|
||||
|
||||
If you would like something in here to be guaranteed,
|
||||
open an issue making a case for it to be moved.
|
||||
|
||||
.. _developer-guarantees-exclusions:
|
||||
|
||||
Exclusions
|
||||
----------
|
||||
|
||||
Any exclusion from these guarantees should be noted in the documentation of
|
||||
the affected attribute, function, class, or method. The term "provisional"
|
||||
may be used in documentation to note such exclusions.
|
||||
|
||||
.. _breaking-change-notices:
|
||||
|
||||
=======================
|
||||
|
||||
@@ -33,6 +33,7 @@ dynamic = ["version", "requires-python", "dependencies", "optional-dependencies"
|
||||
"Donate on Patreon" = "https://www.patreon.com/Red_Devs"
|
||||
"Issue Tracker" = "https://github.com/Cog-Creators/Red-DiscordBot/issues"
|
||||
"Source Code" = "https://github.com/Cog-Creators/Red-DiscordBot"
|
||||
"Changelog" = "https://docs.discord.red/en/stable/changelog.html"
|
||||
|
||||
[project.scripts]
|
||||
redbot = "redbot.__main__:main"
|
||||
|
||||
@@ -339,7 +339,7 @@ def _early_init():
|
||||
|
||||
|
||||
# This is bumped automatically by release workflow (`.github/workflows/scripts/bump_version.py`)
|
||||
_VERSION = "3.5.1"
|
||||
_VERSION = "3.5.25.dev1"
|
||||
|
||||
__version__, version_info = VersionInfo._get_version()
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import sys
|
||||
from argparse import Namespace
|
||||
from copy import deepcopy
|
||||
from pathlib import Path
|
||||
from typing import Any, Awaitable, Callable, NoReturn, Union
|
||||
from typing import Any, Awaitable, Callable, NoReturn, Optional, Union
|
||||
|
||||
import discord
|
||||
import rich
|
||||
@@ -62,9 +62,9 @@ def list_instances():
|
||||
sys.exit(ExitCodes.SHUTDOWN)
|
||||
|
||||
|
||||
async def debug_info(*args: Any) -> None:
|
||||
async def debug_info(red: Optional[Red] = None, *args: Any) -> None:
|
||||
"""Shows debug information useful for debugging."""
|
||||
print(await DebugInfo().get_text())
|
||||
print(await DebugInfo(red).get_cli_text())
|
||||
|
||||
|
||||
async def edit_instance(red, cli_flags):
|
||||
@@ -268,7 +268,7 @@ def _copy_data(data):
|
||||
def early_exit_runner(
|
||||
cli_flags: Namespace,
|
||||
func: Union[Callable[[], Awaitable[Any]], Callable[[Red, Namespace], Awaitable[Any]]],
|
||||
) -> None:
|
||||
) -> NoReturn:
|
||||
"""
|
||||
This one exists to not log all the things like it's a full run of the bot.
|
||||
"""
|
||||
@@ -277,6 +277,7 @@ def early_exit_runner(
|
||||
try:
|
||||
if not cli_flags.instance_name:
|
||||
loop.run_until_complete(func())
|
||||
sys.exit(ExitCodes.SHUTDOWN)
|
||||
return
|
||||
|
||||
data_manager.load_basic_configuration(cli_flags.instance_name)
|
||||
@@ -288,11 +289,13 @@ def early_exit_runner(
|
||||
except (KeyboardInterrupt, EOFError):
|
||||
print("Aborted!")
|
||||
finally:
|
||||
loop.run_until_complete(asyncio.sleep(1))
|
||||
# note: sleep is unnecessary since we're not making any network connections
|
||||
asyncio.set_event_loop(None)
|
||||
loop.stop()
|
||||
loop.close()
|
||||
|
||||
sys.exit(ExitCodes.SHUTDOWN)
|
||||
|
||||
|
||||
async def run_bot(red: Red, cli_flags: Namespace) -> None:
|
||||
"""
|
||||
@@ -394,7 +397,8 @@ async def run_bot(red: Red, cli_flags: Namespace) -> None:
|
||||
"With that out of the way, depending on who you want to be considered as owner,"
|
||||
" you can:\n"
|
||||
"a) pass --team-members-are-owners when launching Red"
|
||||
" - in this case Red will treat all members of the bot application's team as owners\n"
|
||||
" - in this case Red will treat members of the bot application's team as owners,"
|
||||
" if their team role is Owner, Admin, or Developer\n"
|
||||
f"b) set owner manually with `redbot --edit {cli_flags.instance_name}`\n"
|
||||
"c) pass owner ID(s) when launching Red with --owner"
|
||||
" (and --co-owner if you need more than one) flag\n"
|
||||
@@ -418,20 +422,13 @@ def handle_early_exit_flags(cli_flags: Namespace):
|
||||
sys.exit(ExitCodes.INVALID_CLI_USAGE)
|
||||
|
||||
|
||||
async def shutdown_handler(red, signal_type=None, exit_code=None):
|
||||
if signal_type:
|
||||
async def signal_shutdown_handler(red: Red, signal_type: signal.Signals) -> NoReturn:
|
||||
log.info("%s received. Quitting...", signal_type.name)
|
||||
# Do not collapse the below line into other logic
|
||||
# We need to renter this function
|
||||
# after it interrupts the event loop.
|
||||
sys.exit(ExitCodes.SHUTDOWN)
|
||||
elif exit_code is None:
|
||||
log.info("Shutting down from unhandled exception")
|
||||
red._shutdown_mode = ExitCodes.CRITICAL
|
||||
|
||||
if exit_code is not None:
|
||||
|
||||
async def shutdown_handler(red: Red, exit_code: int) -> None:
|
||||
red._shutdown_mode = exit_code
|
||||
|
||||
try:
|
||||
if not red.is_closed():
|
||||
await red.close()
|
||||
@@ -469,7 +466,8 @@ def red_exception_handler(red, red_task: asyncio.Future):
|
||||
except Exception as exc:
|
||||
log.critical("The main bot task didn't handle an exception and has crashed", exc_info=exc)
|
||||
log.warning("Attempting to die as gracefully as possible...")
|
||||
asyncio.create_task(shutdown_handler(red))
|
||||
log.info("Shutting down from unhandled exception")
|
||||
sys.exit(ExitCodes.CRITICAL)
|
||||
|
||||
|
||||
def main():
|
||||
@@ -503,7 +501,7 @@ def main():
|
||||
signals = (signal.SIGHUP, signal.SIGTERM, signal.SIGINT)
|
||||
for s in signals:
|
||||
loop.add_signal_handler(
|
||||
s, lambda s=s: asyncio.create_task(shutdown_handler(red, s))
|
||||
s, lambda s=s: asyncio.create_task(signal_shutdown_handler(red, s))
|
||||
)
|
||||
|
||||
exc_handler = functools.partial(global_exception_handler, red)
|
||||
@@ -520,7 +518,7 @@ def main():
|
||||
log.warning("Please do not use Ctrl+C to Shutdown Red! (attempting to die gracefully...)")
|
||||
log.error("Received KeyboardInterrupt, treating as interrupt")
|
||||
if red is not None:
|
||||
loop.run_until_complete(shutdown_handler(red, signal.SIGINT))
|
||||
loop.run_until_complete(signal_shutdown_handler(red, signal.SIGINT))
|
||||
except SystemExit as exc:
|
||||
# We also have to catch this one here. Basically any exception which normally
|
||||
# Kills the python interpreter (Base Exceptions minus asyncio.cancelled)
|
||||
@@ -532,11 +530,11 @@ def main():
|
||||
exit_code_name = "UNKNOWN"
|
||||
log.info("Shutting down with exit code: %s (%s)", exit_code, exit_code_name)
|
||||
if red is not None:
|
||||
loop.run_until_complete(shutdown_handler(red, None, exc.code))
|
||||
loop.run_until_complete(shutdown_handler(red, exc.code))
|
||||
except Exception as exc: # Non standard case.
|
||||
log.exception("Unexpected exception (%s): ", type(exc), exc_info=exc)
|
||||
if red is not None:
|
||||
loop.run_until_complete(shutdown_handler(red, None, ExitCodes.CRITICAL))
|
||||
loop.run_until_complete(shutdown_handler(red, ExitCodes.CRITICAL))
|
||||
finally:
|
||||
# Allows transports to close properly, and prevent new ones from being opened.
|
||||
# Transports may still not be closed correctly on windows, see below
|
||||
|
||||
@@ -272,7 +272,9 @@ class Admin(commands.Cog):
|
||||
`[p]editrole colour Test #ff9900`
|
||||
"""
|
||||
author = ctx.author
|
||||
reason = "{}({}) changed the colour of role '{}'".format(author.name, author.id, role.name)
|
||||
reason = _("{author} ({author.id}) changed the colour of role '{role.name}'").format(
|
||||
author=author, role=role
|
||||
)
|
||||
|
||||
if not self.pass_user_hierarchy_check(ctx, role):
|
||||
await ctx.send(_(ROLE_USER_HIERARCHY_ISSUE).format(role=role))
|
||||
@@ -303,9 +305,9 @@ class Admin(commands.Cog):
|
||||
"""
|
||||
author = ctx.message.author
|
||||
old_name = role.name
|
||||
reason = "{}({}) changed the name of role '{}' to '{}'".format(
|
||||
author.name, author.id, old_name, name
|
||||
)
|
||||
reason = _(
|
||||
"{author} ({author.id}) changed the name of role '{old_name}' to '{name}'"
|
||||
).format(author=author, old_name=old_name, name=name)
|
||||
|
||||
if not self.pass_user_hierarchy_check(ctx, role):
|
||||
await ctx.send(_(ROLE_USER_HIERARCHY_ISSUE).format(role=role))
|
||||
|
||||
100
redbot/cogs/admin/locales/ar-SA.po
generated
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: red-discordbot\n"
|
||||
"POT-Creation-Date: 2023-05-02 23:06+0000\n"
|
||||
"POT-Creation-Date: 2023-06-14 02:57+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Arabic\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -120,11 +120,15 @@ msgstr "\n"
|
||||
" أمثلة:\n"
|
||||
" '[p]editrole اللون \"الترانزستور\" #ff0000'n'n'[p]editrole لون اختبار #ff9900'n"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:292 redbot/cogs/admin/admin.py:325
|
||||
#: redbot/cogs/admin/admin.py:275
|
||||
msgid "{author} ({author.id}) changed the colour of role '{role.name}'"
|
||||
msgstr "{author}({author.id}) تغيير لون رول {role.name}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:294 redbot/cogs/admin/admin.py:327
|
||||
msgid "Done."
|
||||
msgstr "تم."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:296
|
||||
#: redbot/cogs/admin/admin.py:298
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Edit a role's name.\n\n"
|
||||
@@ -138,57 +142,65 @@ msgstr "\n"
|
||||
" المثال:\n"
|
||||
" '[p]اسم تحرير \"The Transistor\" Test'\n"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:330
|
||||
#: redbot/cogs/admin/admin.py:308
|
||||
msgid "{author} ({author.id}) changed the name of role '{old_name}' to '{name}'"
|
||||
msgstr "{author}({author.id}) تغيير اسم رول {old_name} إلى {name}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:332
|
||||
#, docstring
|
||||
msgid "Announce a message to all servers the bot is in."
|
||||
msgstr "الإعلان عن رسالة إلى جميع السيرفرات المتواجد بها البوت."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:337
|
||||
#: redbot/cogs/admin/admin.py:339
|
||||
msgid "The announcement has begun."
|
||||
msgstr "تم البدء في الإعلان."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:344
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#, docstring
|
||||
msgid "Cancel a running announce."
|
||||
msgstr "إلغاء إعلان جارٍ."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#: redbot/cogs/admin/admin.py:348
|
||||
msgid "There is no currently running announcement."
|
||||
msgstr "لا يوجد إعلان قيد التشغيل حالياً."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:349
|
||||
#: redbot/cogs/admin/admin.py:351
|
||||
msgid "The current announcement has been cancelled."
|
||||
msgstr "تم إلغاء الإعلان الحالي."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:355
|
||||
#: redbot/cogs/admin/admin.py:357
|
||||
#, docstring
|
||||
msgid "Change how announcements are sent in this guild."
|
||||
msgstr "تغيير كيفية إرسال الإعلانات في هذه النقابة."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:365
|
||||
#: redbot/cogs/admin/admin.py:367
|
||||
#, docstring
|
||||
msgid "Change the channel where the bot will send announcements."
|
||||
msgstr "Sul5anqz."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:368
|
||||
#: redbot/cogs/admin/admin.py:370
|
||||
msgid "The announcement channel has been set to {channel.mention}"
|
||||
msgstr "تم تحديث قناة الإعلانات إلى {channel.mention}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:373
|
||||
#: redbot/cogs/admin/admin.py:375
|
||||
#, docstring
|
||||
msgid "Unsets the channel for announcements."
|
||||
msgstr ""
|
||||
msgstr "إزالة القناة من الإعلانات."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:398
|
||||
#: redbot/cogs/admin/admin.py:400
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add or remove a selfrole from yourself.\n\n"
|
||||
" Server admins must have configured the role as user settable.\n"
|
||||
" NOTE: The role is case sensitive!\n"
|
||||
" "
|
||||
msgstr ""
|
||||
msgstr "\n"
|
||||
" أزاله أو ازالة الرول الشخصي منك.\n\n"
|
||||
" يجب أن يكون لدى أدمن السيرفر اعدادت للتعيين من قبل المستخدم.\n"
|
||||
" ملاحظة: الرول حساس لحالة الأحرف\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:411
|
||||
#: redbot/cogs/admin/admin.py:413
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a selfrole to yourself.\n\n"
|
||||
@@ -200,7 +212,7 @@ msgstr "\n"
|
||||
" يجب أن يكون مسؤولو الخادم قد قاموا بتكوين الرتبة كـ settable للمستخدم.\n"
|
||||
" ملاحظة: الرتبة حساس للحالة!\n"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:422
|
||||
#: redbot/cogs/admin/admin.py:424
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a selfrole from yourself.\n\n"
|
||||
@@ -212,7 +224,7 @@ msgstr "\n"
|
||||
" يجب أن يكون مسؤولو الخادم قد قاموا بتكوين الرتبة كـ settable للمستخدم.\n"
|
||||
" ملاحظة: الرتبة حساس للحالة!\n"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:433
|
||||
#: redbot/cogs/admin/admin.py:435
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Lists all available selfroles.\n"
|
||||
@@ -220,18 +232,18 @@ msgid "\n"
|
||||
msgstr "\n"
|
||||
" يسرد كافة الرتب الذاتية المتوفرة.\n"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:443
|
||||
#: redbot/cogs/admin/admin.py:445
|
||||
msgid "Available Selfroles:\n"
|
||||
"{selfroles}"
|
||||
msgstr "الرتب الذاتية المتوفرة:\n"
|
||||
"{selfroles}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:449
|
||||
#: redbot/cogs/admin/admin.py:451
|
||||
#, docstring
|
||||
msgid "Manage selfroles."
|
||||
msgstr "تطبيق الرتبالذاتية."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:454
|
||||
#: redbot/cogs/admin/admin.py:456
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a role, or a selection of roles, to the list of available selfroles.\n\n"
|
||||
@@ -239,23 +251,23 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:463
|
||||
#: redbot/cogs/admin/admin.py:465
|
||||
msgid "I cannot let you add {role.name} as a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr "لا يمكنني السماح لك بإضافة {role.name} لرتبة ذاتي لأن هذا الرتبة أعلى من أو يساوي أعلى رتبةك في التسلسل الهرمي لـ Discord."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:473
|
||||
#: redbot/cogs/admin/admin.py:475
|
||||
msgid "The role \"{role.name}\" is already a selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:479
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr ""
|
||||
msgstr "الرول \"{role.name}\" هو بالفعل رول شخصي."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr ""
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr "إضافة {count} رول شخصي."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:487
|
||||
#: redbot/cogs/admin/admin.py:483
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr "تم اضافة 1 رول شخصي."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:489
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a role, or a selection of roles, from the list of available selfroles.\n\n"
|
||||
@@ -263,57 +275,57 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:496
|
||||
#: redbot/cogs/admin/admin.py:498
|
||||
msgid "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr "لا يمكنني السماح لك بإزالة {role.name} من كونه رتبةًا ذاتيًا لأن هذا الرتبة أعلى من أو يساوي أعلى رتبة لك في التسلسل الهرمي Discord."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:506
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
msgid "Removed {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
#: redbot/cogs/admin/admin.py:510
|
||||
msgid "Removed 1 selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:514
|
||||
#: redbot/cogs/admin/admin.py:516
|
||||
#, docstring
|
||||
msgid "Clear the list of available selfroles for this server."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:518
|
||||
#: redbot/cogs/admin/admin.py:520
|
||||
msgid "There are currently no selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:521
|
||||
#: redbot/cogs/admin/admin.py:523
|
||||
msgid "Are you sure you want to clear this server's selfrole list?"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:527
|
||||
#: redbot/cogs/admin/admin.py:529
|
||||
msgid "You took too long to respond."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:536
|
||||
#: redbot/cogs/admin/admin.py:538
|
||||
msgid "I cannot clear the selfroles because the selfrole '{role.name}' is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:542
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
msgid "Selfrole list cleared."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
#: redbot/cogs/admin/admin.py:546
|
||||
msgid "No changes have been made."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:549
|
||||
#: redbot/cogs/admin/admin.py:551
|
||||
#, docstring
|
||||
msgid "Lock a bot to its current servers only."
|
||||
msgstr "قفل البوت للسيرفر الحالي فقط."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:554
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
msgid "The bot is no longer serverlocked."
|
||||
msgstr "لم يعد البوت مقفول للسيرفر الحالي فقط."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
#: redbot/cogs/admin/admin.py:558
|
||||
msgid "The bot is now serverlocked."
|
||||
msgstr "لقد تم قفل البوت للسيرفر الحالي فقط."
|
||||
|
||||
|
||||
82
redbot/cogs/admin/locales/bg-BG.po
generated
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: red-discordbot\n"
|
||||
"POT-Creation-Date: 2023-05-02 23:06+0000\n"
|
||||
"POT-Creation-Date: 2023-06-14 02:57+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Bulgarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -116,11 +116,15 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:292 redbot/cogs/admin/admin.py:325
|
||||
#: redbot/cogs/admin/admin.py:275
|
||||
msgid "{author} ({author.id}) changed the colour of role '{role.name}'"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:294 redbot/cogs/admin/admin.py:327
|
||||
msgid "Done."
|
||||
msgstr "Завършено."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:296
|
||||
#: redbot/cogs/admin/admin.py:298
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Edit a role's name.\n\n"
|
||||
@@ -130,48 +134,52 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:330
|
||||
#: redbot/cogs/admin/admin.py:308
|
||||
msgid "{author} ({author.id}) changed the name of role '{old_name}' to '{name}'"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:332
|
||||
#, docstring
|
||||
msgid "Announce a message to all servers the bot is in."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:337
|
||||
#: redbot/cogs/admin/admin.py:339
|
||||
msgid "The announcement has begun."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:344
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#, docstring
|
||||
msgid "Cancel a running announce."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#: redbot/cogs/admin/admin.py:348
|
||||
msgid "There is no currently running announcement."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:349
|
||||
#: redbot/cogs/admin/admin.py:351
|
||||
msgid "The current announcement has been cancelled."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:355
|
||||
#: redbot/cogs/admin/admin.py:357
|
||||
#, docstring
|
||||
msgid "Change how announcements are sent in this guild."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:365
|
||||
#: redbot/cogs/admin/admin.py:367
|
||||
#, docstring
|
||||
msgid "Change the channel where the bot will send announcements."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:368
|
||||
#: redbot/cogs/admin/admin.py:370
|
||||
msgid "The announcement channel has been set to {channel.mention}"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:373
|
||||
#: redbot/cogs/admin/admin.py:375
|
||||
#, docstring
|
||||
msgid "Unsets the channel for announcements."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:398
|
||||
#: redbot/cogs/admin/admin.py:400
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add or remove a selfrole from yourself.\n\n"
|
||||
@@ -180,7 +188,7 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:411
|
||||
#: redbot/cogs/admin/admin.py:413
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a selfrole to yourself.\n\n"
|
||||
@@ -189,7 +197,7 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:422
|
||||
#: redbot/cogs/admin/admin.py:424
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a selfrole from yourself.\n\n"
|
||||
@@ -198,24 +206,24 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:433
|
||||
#: redbot/cogs/admin/admin.py:435
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Lists all available selfroles.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:443
|
||||
#: redbot/cogs/admin/admin.py:445
|
||||
msgid "Available Selfroles:\n"
|
||||
"{selfroles}"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:449
|
||||
#: redbot/cogs/admin/admin.py:451
|
||||
#, docstring
|
||||
msgid "Manage selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:454
|
||||
#: redbot/cogs/admin/admin.py:456
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a role, or a selection of roles, to the list of available selfroles.\n\n"
|
||||
@@ -223,23 +231,23 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:463
|
||||
#: redbot/cogs/admin/admin.py:465
|
||||
msgid "I cannot let you add {role.name} as a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:473
|
||||
#: redbot/cogs/admin/admin.py:475
|
||||
msgid "The role \"{role.name}\" is already a selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:479
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
#: redbot/cogs/admin/admin.py:483
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:487
|
||||
#: redbot/cogs/admin/admin.py:489
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a role, or a selection of roles, from the list of available selfroles.\n\n"
|
||||
@@ -247,57 +255,57 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:496
|
||||
#: redbot/cogs/admin/admin.py:498
|
||||
msgid "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:506
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
msgid "Removed {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
#: redbot/cogs/admin/admin.py:510
|
||||
msgid "Removed 1 selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:514
|
||||
#: redbot/cogs/admin/admin.py:516
|
||||
#, docstring
|
||||
msgid "Clear the list of available selfroles for this server."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:518
|
||||
#: redbot/cogs/admin/admin.py:520
|
||||
msgid "There are currently no selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:521
|
||||
#: redbot/cogs/admin/admin.py:523
|
||||
msgid "Are you sure you want to clear this server's selfrole list?"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:527
|
||||
#: redbot/cogs/admin/admin.py:529
|
||||
msgid "You took too long to respond."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:536
|
||||
#: redbot/cogs/admin/admin.py:538
|
||||
msgid "I cannot clear the selfroles because the selfrole '{role.name}' is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:542
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
msgid "Selfrole list cleared."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
#: redbot/cogs/admin/admin.py:546
|
||||
msgid "No changes have been made."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:549
|
||||
#: redbot/cogs/admin/admin.py:551
|
||||
#, docstring
|
||||
msgid "Lock a bot to its current servers only."
|
||||
msgstr "Заключете бота само за текущите му сървъри."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:554
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
msgid "The bot is no longer serverlocked."
|
||||
msgstr "Ботът вече не е заключен за сървъри."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
#: redbot/cogs/admin/admin.py:558
|
||||
msgid "The bot is now serverlocked."
|
||||
msgstr "Ботът е заключен за сървъри."
|
||||
|
||||
|
||||
180
redbot/cogs/admin/locales/cs-CZ.po
generated
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: red-discordbot\n"
|
||||
"POT-Creation-Date: 2023-05-02 23:06+0000\n"
|
||||
"POT-Creation-Date: 2023-06-14 02:57+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -17,7 +17,7 @@ msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:20
|
||||
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
|
||||
msgstr "Pokusil jsem se udělat něco, co mi Discord odepřel. Tvůj příkaz se nepodažilo úspěšně dokončit."
|
||||
msgstr "Discord zamítl provedení akce. Tvůj příkaz nebyl úspěšně dokončen."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:25
|
||||
msgid "I can not give {role.name} to {member.display_name} because that role is higher than or equal to my highest role in the Discord hierarchy."
|
||||
@@ -45,7 +45,7 @@ msgstr "Nemohu ti dovolit upravit {role.name}, protože tato role je vyšší ne
|
||||
|
||||
#: redbot/cogs/admin/admin.py:61
|
||||
msgid "I need the \"Manage Roles\" permission to do that."
|
||||
msgstr ""
|
||||
msgstr "Potřebuji oprávnění \"Správa rolí\"."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:63
|
||||
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
|
||||
@@ -66,7 +66,7 @@ msgstr "Úspěšně jsem přidal {role.name} k {member.display_name}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:190
|
||||
msgid "{member.display_name} does not have the role {role.name}."
|
||||
msgstr "{member.display_name} již má roli {role.name}."
|
||||
msgstr "Uživatel {member.display_name} nemá roli {role.name}."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:211
|
||||
msgid "I successfully removed {role.name} from {member.display_name}"
|
||||
@@ -81,8 +81,8 @@ msgid "\n"
|
||||
" "
|
||||
msgstr "\n"
|
||||
" Přidá roli uživateli.\n\n"
|
||||
" Pokud role obsahuje mezery, použijte dvojí uvozovky.\n"
|
||||
" Ponecháte-li uživatel prázdný, výchozí hodnota autorovi příkazu.\n"
|
||||
" Použijte dvojí uvozovky, pokud role obsahuje mezery.\n"
|
||||
" Pokud je pole uživatele prázdné, bude nastaveno na autora příkazu.\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:244
|
||||
@@ -94,8 +94,8 @@ msgid "\n"
|
||||
" "
|
||||
msgstr "\n"
|
||||
" Odebrat roli uživateli.\n\n"
|
||||
" Pokud role obsahuje mezery, použijte dvojí uvozovky.\n"
|
||||
" Ponecháte-li uživatel prázdný, výchozí hodnota autorovi příkazu.\n"
|
||||
" Použijte dvojí uvozovky, pokud role obsahuje mezery.\n"
|
||||
" Pokud je pole uživatele prázdné, bude nastaveno na autora příkazu.\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:256
|
||||
@@ -120,15 +120,19 @@ msgstr "\n"
|
||||
" Barva musí být v hexadecimálním formátu.\n"
|
||||
" [Výběr barev online](http://www.w3schools.com/colors/colors_picker.asp)\n\n"
|
||||
" Příklady:\n"
|
||||
" `[p]editrole colour \"Spravce\" #ff0000`\n"
|
||||
" `[p]editrole colour \"Nejlepsi Spravce\" #ff0000`\n"
|
||||
" `[p]editrole colour Spravce #ff9900`\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:292 redbot/cogs/admin/admin.py:325
|
||||
#: redbot/cogs/admin/admin.py:275
|
||||
msgid "{author} ({author.id}) changed the colour of role '{role.name}'"
|
||||
msgstr "{author} ({author.id}) změnil barvu role '{role.name}'"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:294 redbot/cogs/admin/admin.py:327
|
||||
msgid "Done."
|
||||
msgstr "Hotovo."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:296
|
||||
#: redbot/cogs/admin/admin.py:298
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Edit a role's name.\n\n"
|
||||
@@ -140,60 +144,68 @@ msgstr "\n"
|
||||
" Upraví název role\n\n"
|
||||
" Použijte dvojité uvozovky, pokud role nebo název obsahuje mezery.\n\n"
|
||||
" Příklady:\n"
|
||||
" `[p]editrole name \"Spravce\" Admin`\n"
|
||||
" `[p]editrole name \"Nejlepsi Spravce\" Admin`\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:330
|
||||
#: redbot/cogs/admin/admin.py:308
|
||||
msgid "{author} ({author.id}) changed the name of role '{old_name}' to '{name}'"
|
||||
msgstr "{author} ({author.id}) změnil jméno role '{old_name}' na '{name}'"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:332
|
||||
#, docstring
|
||||
msgid "Announce a message to all servers the bot is in."
|
||||
msgstr "Oznámit zprávu na všechny servery ve kterých je bot."
|
||||
msgstr "Oznámit zprávu na všechny servery, ve kterých bot je."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:337
|
||||
#: redbot/cogs/admin/admin.py:339
|
||||
msgid "The announcement has begun."
|
||||
msgstr "Oznámení začalo."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:344
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#, docstring
|
||||
msgid "Cancel a running announce."
|
||||
msgstr "Zrušit běžící oznámení."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#: redbot/cogs/admin/admin.py:348
|
||||
msgid "There is no currently running announcement."
|
||||
msgstr "V současné době neexistuje žádné spuštěné oznámení."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:349
|
||||
#: redbot/cogs/admin/admin.py:351
|
||||
msgid "The current announcement has been cancelled."
|
||||
msgstr "Momentální oznámení bylo zrušeno."
|
||||
msgstr "Současné oznámení bylo zrušeno."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:355
|
||||
#: redbot/cogs/admin/admin.py:357
|
||||
#, docstring
|
||||
msgid "Change how announcements are sent in this guild."
|
||||
msgstr "Změňte způsob odesílání oznámení v tomto klanu."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:365
|
||||
#: redbot/cogs/admin/admin.py:367
|
||||
#, docstring
|
||||
msgid "Change the channel where the bot will send announcements."
|
||||
msgstr ""
|
||||
msgstr "Změnit kanál, kam bude bot zasílat oznámení."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:368
|
||||
#: redbot/cogs/admin/admin.py:370
|
||||
msgid "The announcement channel has been set to {channel.mention}"
|
||||
msgstr "Kanál pro oznámení byl nastaven na {channel.mention}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:373
|
||||
#: redbot/cogs/admin/admin.py:375
|
||||
#, docstring
|
||||
msgid "Unsets the channel for announcements."
|
||||
msgstr "Zruší kanál pro oznámení."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:398
|
||||
#: redbot/cogs/admin/admin.py:400
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add or remove a selfrole from yourself.\n\n"
|
||||
" Server admins must have configured the role as user settable.\n"
|
||||
" NOTE: The role is case sensitive!\n"
|
||||
" "
|
||||
msgstr ""
|
||||
msgstr "\n"
|
||||
" Přidat nebo odebrat self-roli.\n\n"
|
||||
" Administrátoři serveru musí povolit nastavení role uživatelům.\n"
|
||||
" POZNÁMKA: Název role je citlivý na velká a malá písmena!\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:411
|
||||
#: redbot/cogs/admin/admin.py:413
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a selfrole to yourself.\n\n"
|
||||
@@ -202,11 +214,11 @@ msgid "\n"
|
||||
" "
|
||||
msgstr "\n"
|
||||
" Přidá vám self-roli.\n\n"
|
||||
" Administrátoři serveru musí mít nastavenou roli podle nastaveného uživatele.\n"
|
||||
" POZNÁMKA: Role je citlivá na malá a velká písmena!\n"
|
||||
" Administrátoři serveru musí povolit přiřazení role uživatelům.\n"
|
||||
" POZNÁMKA: Název role je citlivý na velká a malá písmena!\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:422
|
||||
#: redbot/cogs/admin/admin.py:424
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a selfrole from yourself.\n\n"
|
||||
@@ -214,12 +226,12 @@ msgid "\n"
|
||||
" NOTE: The role is case sensitive!\n"
|
||||
" "
|
||||
msgstr "\n"
|
||||
" Odstraní vámself-roli.\n\n"
|
||||
" Administrátoři serveru musí mít nastavenou roli podle nastaveného uživatele.\n"
|
||||
" POZNÁMKA: Role je citlivá na malá a velká písmena!\n"
|
||||
" Odebere vám self-roli.\n\n"
|
||||
" Administrátoři serveru musí povolit odebrání role uživatelům.\n"
|
||||
" POZNÁMKA: Název role je citlivý na velká a malá písmena!\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:433
|
||||
#: redbot/cogs/admin/admin.py:435
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Lists all available selfroles.\n"
|
||||
@@ -228,110 +240,116 @@ msgstr "\n"
|
||||
" Seznam všech dostupných self-rolí.\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:443
|
||||
#: redbot/cogs/admin/admin.py:445
|
||||
msgid "Available Selfroles:\n"
|
||||
"{selfroles}"
|
||||
msgstr "Dostupné self-role:\n"
|
||||
"{selfroles}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:449
|
||||
#: redbot/cogs/admin/admin.py:451
|
||||
#, docstring
|
||||
msgid "Manage selfroles."
|
||||
msgstr "Spravovat self-role."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:454
|
||||
#: redbot/cogs/admin/admin.py:456
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a role, or a selection of roles, to the list of available selfroles.\n\n"
|
||||
" NOTE: The role is case sensitive!\n"
|
||||
" "
|
||||
msgstr ""
|
||||
msgstr "\n"
|
||||
" Přidat roli, nebo výběr rolí, do seznamu dostupných self-roli.\n\n"
|
||||
" POZNÁMKA: Název role je citlivý na velká a malá písmena!\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:463
|
||||
#: redbot/cogs/admin/admin.py:465
|
||||
msgid "I cannot let you add {role.name} as a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr "Nemohu ti dovolit odebrat {role.name} jako self-roli uživateli, protože tato role je vyšší nebo rovna tvé nejvyšší roli v Discord hierarchii."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:473
|
||||
#: redbot/cogs/admin/admin.py:475
|
||||
msgid "The role \"{role.name}\" is already a selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:479
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr ""
|
||||
msgstr "Role \"{role.name}\" již je self-rolí."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr ""
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr "Přidáno {count} self-rolí."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:487
|
||||
#: redbot/cogs/admin/admin.py:483
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr "Přidána 1 self-role."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:489
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a role, or a selection of roles, from the list of available selfroles.\n\n"
|
||||
" NOTE: The role is case sensitive!\n"
|
||||
" "
|
||||
msgstr ""
|
||||
msgstr "\n"
|
||||
" Odebrat roli, nebo výběr rolí, ze seznamu dostupných self-roli.\n\n"
|
||||
" POZNÁMKA: Název role je citlivý na velká a malá písmena!\n"
|
||||
" "
|
||||
|
||||
#: redbot/cogs/admin/admin.py:496
|
||||
#: redbot/cogs/admin/admin.py:498
|
||||
msgid "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr "Nemohu ti dovolit odebrat {role.name} uživateli, protože tato role je vyšší nebo rovna tvé nejvyšší roli v Discord hierarchii."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:506
|
||||
msgid "Removed {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
msgid "Removed 1 selfrole."
|
||||
msgstr ""
|
||||
msgid "Removed {count} selfroles."
|
||||
msgstr "Odebráno {count} self-rolí."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:514
|
||||
#: redbot/cogs/admin/admin.py:510
|
||||
msgid "Removed 1 selfrole."
|
||||
msgstr "Odebrána 1 self-role."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:516
|
||||
#, docstring
|
||||
msgid "Clear the list of available selfroles for this server."
|
||||
msgstr ""
|
||||
msgstr "Vymazat seznam dostupných self-rolí pro tento server."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:518
|
||||
#: redbot/cogs/admin/admin.py:520
|
||||
msgid "There are currently no selfroles."
|
||||
msgstr ""
|
||||
msgstr "V současné době neexistují žádné self-role."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:521
|
||||
#: redbot/cogs/admin/admin.py:523
|
||||
msgid "Are you sure you want to clear this server's selfrole list?"
|
||||
msgstr ""
|
||||
msgstr "Určitě chcete vymazat seznam dostupných self-rolí pro tento server?"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:527
|
||||
#: redbot/cogs/admin/admin.py:529
|
||||
msgid "You took too long to respond."
|
||||
msgstr ""
|
||||
msgstr "Reakce vám trvala příliš dlouho."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:536
|
||||
#: redbot/cogs/admin/admin.py:538
|
||||
msgid "I cannot clear the selfroles because the selfrole '{role.name}' is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:542
|
||||
msgid "Selfrole list cleared."
|
||||
msgstr ""
|
||||
msgstr "Nemohu vymazat seznam self-rolí, protože self-role '{role.name}' je vyšší nebo rovna tvé nejvyšší roli v Discord hierarchii."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
msgid "No changes have been made."
|
||||
msgstr ""
|
||||
msgid "Selfrole list cleared."
|
||||
msgstr "Seznam self-rolí byl vymazán."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:549
|
||||
#: redbot/cogs/admin/admin.py:546
|
||||
msgid "No changes have been made."
|
||||
msgstr "Nebyly provedeny žádné změny."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:551
|
||||
#, docstring
|
||||
msgid "Lock a bot to its current servers only."
|
||||
msgstr "Uzamkne bota pouze na jeho aktuální servery."
|
||||
msgstr "Omezí bota pouze na jeho aktuální servery."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:554
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
msgid "The bot is no longer serverlocked."
|
||||
msgstr "Bot již není uzamčen na server."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
#: redbot/cogs/admin/admin.py:558
|
||||
msgid "The bot is now serverlocked."
|
||||
msgstr "Bot je nyní serverem uzamčen."
|
||||
msgstr "Bot je nyní omezen na aktuální servery."
|
||||
|
||||
#: redbot/cogs/admin/announcer.py:68
|
||||
msgid "I could not announce to the following server: "
|
||||
msgstr "Nemohu oznámit následujícímu serveru: "
|
||||
msgstr "Nemohu provést oznámení na tomto serveru: "
|
||||
|
||||
#: redbot/cogs/admin/announcer.py:70
|
||||
msgid "I could not announce to the following servers: "
|
||||
msgstr "Nemohu oznámit následujícím serverům: "
|
||||
msgstr "Nemohu provést oznámení na těchto serverech: "
|
||||
|
||||
#: redbot/cogs/admin/converters.py:13
|
||||
msgid "The Admin cog is not loaded."
|
||||
@@ -339,9 +357,9 @@ msgstr "Admin cog není načten."
|
||||
|
||||
#: redbot/cogs/admin/converters.py:30
|
||||
msgid "The role \"{role_name}\" is not a valid selfrole."
|
||||
msgstr ""
|
||||
msgstr "Role \"{role_name}\" není validní self-rolí."
|
||||
|
||||
#: redbot/cogs/admin/converters.py:36
|
||||
msgid "This selfrole has more than one case insensitive match. Please ask a moderator to resolve the ambiguity, or use the role ID to reference the role."
|
||||
msgstr ""
|
||||
msgstr "Tato self-role má více než jeden stejný název. Požádejte správce o výřešení těchto nejasností nebo použijte ID role."
|
||||
|
||||
|
||||
82
redbot/cogs/admin/locales/da-DK.po
generated
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: red-discordbot\n"
|
||||
"POT-Creation-Date: 2023-05-02 23:06+0000\n"
|
||||
"POT-Creation-Date: 2023-06-14 02:57+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Danish\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -108,11 +108,15 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:292 redbot/cogs/admin/admin.py:325
|
||||
#: redbot/cogs/admin/admin.py:275
|
||||
msgid "{author} ({author.id}) changed the colour of role '{role.name}'"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:294 redbot/cogs/admin/admin.py:327
|
||||
msgid "Done."
|
||||
msgstr "Færdig."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:296
|
||||
#: redbot/cogs/admin/admin.py:298
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Edit a role's name.\n\n"
|
||||
@@ -122,48 +126,52 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:330
|
||||
#: redbot/cogs/admin/admin.py:308
|
||||
msgid "{author} ({author.id}) changed the name of role '{old_name}' to '{name}'"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:332
|
||||
#, docstring
|
||||
msgid "Announce a message to all servers the bot is in."
|
||||
msgstr "Annoncer en besked til alle serverne botten er i."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:337
|
||||
#: redbot/cogs/admin/admin.py:339
|
||||
msgid "The announcement has begun."
|
||||
msgstr "Annonceringen er påbegyndt."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:344
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#, docstring
|
||||
msgid "Cancel a running announce."
|
||||
msgstr "Afbryd en kørende annonce."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:346
|
||||
#: redbot/cogs/admin/admin.py:348
|
||||
msgid "There is no currently running announcement."
|
||||
msgstr "Der er i øjeblikket ikke nogen kørende annonceringer."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:349
|
||||
#: redbot/cogs/admin/admin.py:351
|
||||
msgid "The current announcement has been cancelled."
|
||||
msgstr "Den nuværende annoncering er blevet afbrudt."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:355
|
||||
#: redbot/cogs/admin/admin.py:357
|
||||
#, docstring
|
||||
msgid "Change how announcements are sent in this guild."
|
||||
msgstr "Ændre hvordan annonceringer er udsendt i denne server."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:365
|
||||
#: redbot/cogs/admin/admin.py:367
|
||||
#, docstring
|
||||
msgid "Change the channel where the bot will send announcements."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:368
|
||||
#: redbot/cogs/admin/admin.py:370
|
||||
msgid "The announcement channel has been set to {channel.mention}"
|
||||
msgstr "Annoncerings kanalen er blevet sat til {channel.mention}"
|
||||
|
||||
#: redbot/cogs/admin/admin.py:373
|
||||
#: redbot/cogs/admin/admin.py:375
|
||||
#, docstring
|
||||
msgid "Unsets the channel for announcements."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:398
|
||||
#: redbot/cogs/admin/admin.py:400
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add or remove a selfrole from yourself.\n\n"
|
||||
@@ -172,7 +180,7 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:411
|
||||
#: redbot/cogs/admin/admin.py:413
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a selfrole to yourself.\n\n"
|
||||
@@ -181,7 +189,7 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:422
|
||||
#: redbot/cogs/admin/admin.py:424
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a selfrole from yourself.\n\n"
|
||||
@@ -190,24 +198,24 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:433
|
||||
#: redbot/cogs/admin/admin.py:435
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Lists all available selfroles.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:443
|
||||
#: redbot/cogs/admin/admin.py:445
|
||||
msgid "Available Selfroles:\n"
|
||||
"{selfroles}"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:449
|
||||
#: redbot/cogs/admin/admin.py:451
|
||||
#, docstring
|
||||
msgid "Manage selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:454
|
||||
#: redbot/cogs/admin/admin.py:456
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Add a role, or a selection of roles, to the list of available selfroles.\n\n"
|
||||
@@ -215,23 +223,23 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:463
|
||||
#: redbot/cogs/admin/admin.py:465
|
||||
msgid "I cannot let you add {role.name} as a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:473
|
||||
#: redbot/cogs/admin/admin.py:475
|
||||
msgid "The role \"{role.name}\" is already a selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:479
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
msgid "Added {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:481
|
||||
#: redbot/cogs/admin/admin.py:483
|
||||
msgid "Added 1 selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:487
|
||||
#: redbot/cogs/admin/admin.py:489
|
||||
#, docstring
|
||||
msgid "\n"
|
||||
" Remove a role, or a selection of roles, from the list of available selfroles.\n\n"
|
||||
@@ -239,57 +247,57 @@ msgid "\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:496
|
||||
#: redbot/cogs/admin/admin.py:498
|
||||
msgid "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:506
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
msgid "Removed {count} selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:508
|
||||
#: redbot/cogs/admin/admin.py:510
|
||||
msgid "Removed 1 selfrole."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:514
|
||||
#: redbot/cogs/admin/admin.py:516
|
||||
#, docstring
|
||||
msgid "Clear the list of available selfroles for this server."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:518
|
||||
#: redbot/cogs/admin/admin.py:520
|
||||
msgid "There are currently no selfroles."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:521
|
||||
#: redbot/cogs/admin/admin.py:523
|
||||
msgid "Are you sure you want to clear this server's selfrole list?"
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:527
|
||||
#: redbot/cogs/admin/admin.py:529
|
||||
msgid "You took too long to respond."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:536
|
||||
#: redbot/cogs/admin/admin.py:538
|
||||
msgid "I cannot clear the selfroles because the selfrole '{role.name}' is higher than or equal to your highest role in the Discord hierarchy."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:542
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
msgid "Selfrole list cleared."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:544
|
||||
#: redbot/cogs/admin/admin.py:546
|
||||
msgid "No changes have been made."
|
||||
msgstr ""
|
||||
|
||||
#: redbot/cogs/admin/admin.py:549
|
||||
#: redbot/cogs/admin/admin.py:551
|
||||
#, docstring
|
||||
msgid "Lock a bot to its current servers only."
|
||||
msgstr "Lås en bot til dens nuværende server."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:554
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
msgid "The bot is no longer serverlocked."
|
||||
msgstr "Botten er ikke længere låst til serveren."
|
||||
|
||||
#: redbot/cogs/admin/admin.py:556
|
||||
#: redbot/cogs/admin/admin.py:558
|
||||
msgid "The bot is now serverlocked."
|
||||
msgstr "Botten er nu låst til serveren."
|
||||
|
||||
|
||||