Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec0c71d5c2 | ||
|
|
3eb4017263 | ||
|
|
6b5bcdfe74 | ||
|
|
2bd082e8f2 | ||
|
|
7d36cc8366 | ||
|
|
9fc0e627ee | ||
|
|
989e16b20b | ||
|
|
1c648abea2 | ||
|
|
11d87067aa |
396
.bandit.yml
@@ -1,396 +0,0 @@
|
||||
|
||||
### Bandit config file generated
|
||||
|
||||
### This config may optionally select a subset of tests to run or skip by
|
||||
### filling out the 'tests' and 'skips' lists given below. If no tests are
|
||||
### specified for inclusion then it is assumed all tests are desired. The skips
|
||||
### set will remove specific tests from the include set. This can be controlled
|
||||
### using the -t/-s CLI options. Note that the same test ID should not appear
|
||||
### in both 'tests' and 'skips', this would be nonsensical and is detected by
|
||||
### Bandit at runtime.
|
||||
|
||||
# Available tests:
|
||||
# B101 : assert_used
|
||||
# B102 : exec_used
|
||||
# B103 : set_bad_file_permissions
|
||||
# B104 : hardcoded_bind_all_interfaces
|
||||
# B105 : hardcoded_password_string
|
||||
# B106 : hardcoded_password_funcarg
|
||||
# B107 : hardcoded_password_default
|
||||
# B108 : hardcoded_tmp_directory
|
||||
# B110 : try_except_pass
|
||||
# B112 : try_except_continue
|
||||
# B201 : flask_debug_true
|
||||
# B301 : pickle
|
||||
# B302 : marshal
|
||||
# B303 : md5
|
||||
# B304 : ciphers
|
||||
# B305 : cipher_modes
|
||||
# B306 : mktemp_q
|
||||
# B307 : eval
|
||||
# B308 : mark_safe
|
||||
# B309 : httpsconnection
|
||||
# B310 : urllib_urlopen
|
||||
# B311 : random
|
||||
# B312 : telnetlib
|
||||
# B313 : xml_bad_cElementTree
|
||||
# B314 : xml_bad_ElementTree
|
||||
# B315 : xml_bad_expatreader
|
||||
# B316 : xml_bad_expatbuilder
|
||||
# B317 : xml_bad_sax
|
||||
# B318 : xml_bad_minidom
|
||||
# B319 : xml_bad_pulldom
|
||||
# B320 : xml_bad_etree
|
||||
# B321 : ftplib
|
||||
# B322 : input
|
||||
# B323 : unverified_context
|
||||
# B324 : hashlib_new_insecure_functions
|
||||
# B325 : tempnam
|
||||
# B401 : import_telnetlib
|
||||
# B402 : import_ftplib
|
||||
# B403 : import_pickle
|
||||
# B404 : import_subprocess
|
||||
# B405 : import_xml_etree
|
||||
# B406 : import_xml_sax
|
||||
# B407 : import_xml_expat
|
||||
# B408 : import_xml_minidom
|
||||
# B409 : import_xml_pulldom
|
||||
# B410 : import_lxml
|
||||
# B411 : import_xmlrpclib
|
||||
# B412 : import_httpoxy
|
||||
# B413 : import_pycrypto
|
||||
# B501 : request_with_no_cert_validation
|
||||
# B502 : ssl_with_bad_version
|
||||
# B503 : ssl_with_bad_defaults
|
||||
# B504 : ssl_with_no_version
|
||||
# B505 : weak_cryptographic_key
|
||||
# B506 : yaml_load
|
||||
# B507 : ssh_no_host_key_verification
|
||||
# B601 : paramiko_calls
|
||||
# B602 : subprocess_popen_with_shell_equals_true
|
||||
# B603 : subprocess_without_shell_equals_true
|
||||
# B604 : any_other_function_with_shell_equals_true
|
||||
# B605 : start_process_with_a_shell
|
||||
# B606 : start_process_with_no_shell
|
||||
# B607 : start_process_with_partial_path
|
||||
# B608 : hardcoded_sql_expressions
|
||||
# B609 : linux_commands_wildcard_injection
|
||||
# B610 : django_extra_used
|
||||
# B611 : django_rawsql_used
|
||||
# B701 : jinja2_autoescape_false
|
||||
# B702 : use_of_mako_templates
|
||||
# B703 : django_mark_safe
|
||||
|
||||
# (optional) list included test IDs here, eg '[B101, B406]':
|
||||
tests:
|
||||
|
||||
# (optional) list skipped test IDs here, eg '[B101, B406]':
|
||||
skips: ['B322']
|
||||
|
||||
### (optional) plugin settings - some test plugins require configuration data
|
||||
### that may be given here, per-plugin. All bandit test plugins have a built in
|
||||
### set of sensible defaults and these will be used if no configuration is
|
||||
### provided. It is not necessary to provide settings for every (or any) plugin
|
||||
### if the defaults are acceptable.
|
||||
|
||||
any_other_function_with_shell_equals_true:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
hardcoded_tmp_directory:
|
||||
tmp_dirs:
|
||||
- /tmp
|
||||
- /var/tmp
|
||||
- /dev/shm
|
||||
linux_commands_wildcard_injection:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
ssl_with_bad_defaults:
|
||||
bad_protocol_versions:
|
||||
- PROTOCOL_SSLv2
|
||||
- SSLv2_METHOD
|
||||
- SSLv23_METHOD
|
||||
- PROTOCOL_SSLv3
|
||||
- PROTOCOL_TLSv1
|
||||
- SSLv3_METHOD
|
||||
- TLSv1_METHOD
|
||||
ssl_with_bad_version:
|
||||
bad_protocol_versions:
|
||||
- PROTOCOL_SSLv2
|
||||
- SSLv2_METHOD
|
||||
- SSLv23_METHOD
|
||||
- PROTOCOL_SSLv3
|
||||
- PROTOCOL_TLSv1
|
||||
- SSLv3_METHOD
|
||||
- TLSv1_METHOD
|
||||
start_process_with_a_shell:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
start_process_with_no_shell:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
start_process_with_partial_path:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
subprocess_popen_with_shell_equals_true:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
subprocess_without_shell_equals_true:
|
||||
no_shell:
|
||||
- os.execl
|
||||
- os.execle
|
||||
- os.execlp
|
||||
- os.execlpe
|
||||
- os.execv
|
||||
- os.execve
|
||||
- os.execvp
|
||||
- os.execvpe
|
||||
- os.spawnl
|
||||
- os.spawnle
|
||||
- os.spawnlp
|
||||
- os.spawnlpe
|
||||
- os.spawnv
|
||||
- os.spawnve
|
||||
- os.spawnvp
|
||||
- os.spawnvpe
|
||||
- os.startfile
|
||||
shell:
|
||||
- os.system
|
||||
- os.popen
|
||||
- os.popen2
|
||||
- os.popen3
|
||||
- os.popen4
|
||||
- popen2.popen2
|
||||
- popen2.popen3
|
||||
- popen2.popen4
|
||||
- popen2.Popen3
|
||||
- popen2.Popen4
|
||||
- commands.getoutput
|
||||
- commands.getstatusoutput
|
||||
subprocess:
|
||||
- subprocess.Popen
|
||||
- subprocess.call
|
||||
- subprocess.check_call
|
||||
- subprocess.check_output
|
||||
- subprocess.run
|
||||
try_except_continue:
|
||||
check_typed_exception: false
|
||||
try_except_pass:
|
||||
check_typed_exception: false
|
||||
weak_cryptographic_key:
|
||||
weak_key_size_dsa_high: 1024
|
||||
weak_key_size_dsa_medium: 2048
|
||||
weak_key_size_ec_high: 160
|
||||
weak_key_size_ec_medium: 224
|
||||
weak_key_size_rsa_high: 1024
|
||||
weak_key_size_rsa_medium: 2048
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
team = "Cog-Creators"
|
||||
repo = "Red-DiscordBot"
|
||||
check_sha = "6251c585e4ec0a53813a9993ede3ab5309024579"
|
||||
fix_commit_msg = false
|
||||
default_branch = "V3/develop"
|
||||
@@ -1,52 +0,0 @@
|
||||
version: "2" # required to adjust maintainability checks
|
||||
checks:
|
||||
argument-count:
|
||||
config:
|
||||
threshold: 8 # work on this later
|
||||
complex-logic:
|
||||
enabled: false # Disabled in favor of using Radon for this
|
||||
config:
|
||||
threshold: 4
|
||||
file-lines:
|
||||
enabled: false # enable after audio stuff...
|
||||
config:
|
||||
threshold: 2000 # I would set this lower if not for cogs as command containers.
|
||||
method-complexity:
|
||||
enabled: false # Disabled in favor of using Radon for this
|
||||
config:
|
||||
threshold: 5
|
||||
method-count:
|
||||
enabled: false # I would set this lower if not for cogs as command containers.
|
||||
config:
|
||||
threshold: 20
|
||||
method-lines:
|
||||
enabled: false
|
||||
config:
|
||||
threshold: 25 # I'm fine with long methods, cautious about the complexity of a single method.
|
||||
nested-control-flow:
|
||||
config:
|
||||
threshold: 6
|
||||
return-statements:
|
||||
config:
|
||||
threshold: 6
|
||||
similar-code:
|
||||
enabled: false
|
||||
config:
|
||||
threshold: # language-specific defaults. an override will affect all languages.
|
||||
identical-code:
|
||||
enabled: false
|
||||
config:
|
||||
threshold: # language-specific defaults. an override will affect all languages.
|
||||
plugins:
|
||||
bandit:
|
||||
enabled: false
|
||||
radon:
|
||||
enabled: false
|
||||
config:
|
||||
threshold: "D"
|
||||
duplication:
|
||||
enabled: false
|
||||
config:
|
||||
languages:
|
||||
python:
|
||||
python_version: 3
|
||||
4
.gitattributes
vendored
@@ -1,4 +0,0 @@
|
||||
* text eol=lf
|
||||
|
||||
# binary file excludsions
|
||||
*.png binary
|
||||
75
.github/CODEOWNERS
vendored
@@ -1,23 +1,60 @@
|
||||
# Default
|
||||
* @Twentysix26
|
||||
|
||||
# Core
|
||||
redbot/core/bank.py @palmtree5
|
||||
redbot/core/checks.py @tekulvw
|
||||
redbot/core/cli.py @tekulvw
|
||||
redbot/core/config.py @tekulvw
|
||||
redbot/core/cog_manager.py @tekulvw
|
||||
redbot/core/core_commands.py @tekulvw
|
||||
redbot/core/context.py @Tobotimus
|
||||
redbot/core/commands/* @mikeshardmind
|
||||
redbot/core/data_manager.py @tekulvw
|
||||
redbot/core/dev_commands.py @tekulvw
|
||||
redbot/core/drivers/* @tekulvw
|
||||
redbot/core/events.py @tekulvw
|
||||
redbot/core/global_checks.py @tekulvw
|
||||
redbot/core/i18n.py @tekulvw
|
||||
redbot/core/modlog.py @palmtree5
|
||||
redbot/core/rpc.py @tekulvw
|
||||
redbot/core/utils/chat_formatting.py @tekulvw
|
||||
redbot/core/utils/mod.py @palmtree5
|
||||
redbot/core/utils/data_converter.py @mikeshardmind
|
||||
redbot/core/utils/antispam.py @mikeshardmind
|
||||
redbot/core/utils/tunnel.py @mikeshardmind
|
||||
redbot/core/utils/caching.py @mikeshardmind
|
||||
redbot/core/utils/common_filters.py @mikeshardmind
|
||||
|
||||
# Cogs
|
||||
/redbot/cogs/audio/** @aikaterna @PredaaA
|
||||
/redbot/cogs/downloader/* @jack1142
|
||||
/redbot/cogs/streams/* @palmtree5
|
||||
/redbot/cogs/mutes/* @TrustyJAID
|
||||
redbot/cogs/admin/* @tekulvw
|
||||
redbot/cogs/alias/* @tekulvw
|
||||
redbot/cogs/audio/* @aikaterna
|
||||
redbot/cogs/bank/* @tekulvw
|
||||
redbot/cogs/cleanup/* @palmtree5
|
||||
redbot/cogs/customcom/* @palmtree5
|
||||
redbot/cogs/downloader/* @tekulvw
|
||||
redbot/cogs/economy/* @palmtree5
|
||||
redbot/cogs/filter/* @palmtree5
|
||||
redbot/cogs/general/* @palmtree5
|
||||
redbot/cogs/image/* @palmtree5
|
||||
redbot/cogs/mod/* @palmtree5
|
||||
redbot/cogs/modlog/* @palmtree5
|
||||
redbot/cogs/streams/* @Twentysix26 @palmtree5
|
||||
redbot/cogs/trivia/* @Tobotimus
|
||||
redbot/cogs/reports/* @mikeshardmind
|
||||
redbot/cogs/permissions/* @mikeshardmind
|
||||
redbot/cogs/warnings/* @palmtree5
|
||||
|
||||
# Trivia Lists
|
||||
/redbot/cogs/trivia/data/lists/whosthatpokemon*.yaml @aikaterna
|
||||
# Docs
|
||||
docs/* @tekulvw @palmtree5
|
||||
|
||||
# Tests
|
||||
/redbot/pytest/downloader* @jack1142
|
||||
/tests/cogs/downloader/* @jack1142
|
||||
# Setup, instance setup, and running the bot
|
||||
setup.py @tekulvw
|
||||
redbot/__init__.py @tekulvw
|
||||
redbot/__main__.py @tekulvw
|
||||
redbot/setup.py @tekulvw
|
||||
|
||||
# Schemas
|
||||
/schema/* @jack1142
|
||||
|
||||
# CI
|
||||
/.travis.yml @Kowlin
|
||||
/crowdin.yml @Kowlin
|
||||
/.github/workflows/* @Kowlin
|
||||
|
||||
# Excludes
|
||||
**/locales/* @ghost
|
||||
# Others
|
||||
.travis.yml @Kowlin
|
||||
crowdin.yml @Kowlin
|
||||
|
||||
29
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
@@ -29,8 +29,9 @@ Red is an open source project. This means that each and every one of the develop
|
||||
We love receiving contributions from our community. Any assistance you can provide with regards to bug fixes, feature enhancements, and documentation is more than welcome.
|
||||
|
||||
# 2. Ground Rules
|
||||
We've made a point to use [ZenHub](https://www.zenhub.com/) (a plugin for GitHub) as our main source of collaboration and coordination. Your experience contributing to Red will be greatly improved if you go get that plugin.
|
||||
1. Ensure cross compatibility for Windows, Mac OS and Linux.
|
||||
2. Ensure all Python features used in contributions exist and work in Python 3.8.1 and above.
|
||||
2. Ensure all Python features used in contributions exist and work in Python 3.7 and above.
|
||||
3. Create new tests for code you add or bugs you fix. It helps us help you by making sure we don't accidentally break anything :grinning:
|
||||
4. Create any issues for new features you'd like to implement and explain why this feature is useful to everyone and not just you personally.
|
||||
5. Don't add new cogs unless specifically given approval in an issue discussing said cog idea.
|
||||
@@ -42,7 +43,7 @@ Unsure of how to get started contributing to Red? Please take a look at the Issu
|
||||
* beginner - issues that can normally be fixed in just a few lines of code and maybe a test or two.
|
||||
* help-wanted - issues that are currently unassigned to anyone and may be a bit more involved/complex than issues tagged with beginner.
|
||||
|
||||
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
|
||||
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
|
||||
|
||||
At this point you're ready to start making changes. Feel free to ask for help; everyone was a beginner at some point!
|
||||
|
||||
@@ -52,7 +53,7 @@ Red's repository is configured to follow a particular development workflow, usin
|
||||
|
||||
### 4.1 Setting up your development environment
|
||||
The following requirements must be installed prior to setting up:
|
||||
- Python 3.8.1 or greater
|
||||
- Python 3.7.0 or greater
|
||||
- git
|
||||
- pip
|
||||
|
||||
@@ -78,12 +79,12 @@ If you're not on Windows, you should also have GNU make installed, and you can o
|
||||
**Note:** If you're comfortable with setting up virtual environments yourself and would rather do it manually, just run `pip install -Ur tools/dev-requirements.txt` after setting it up.
|
||||
|
||||
### 4.2 Testing
|
||||
We're using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's extremely simple to use, and if you followed the previous section correctly, it is already installed to your virtual environment.
|
||||
We've recently started using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's extremely simple to use, and if you followed the previous section correctly, it is already installed to your virtual environment.
|
||||
|
||||
Currently, tox does the following, creating its own virtual environments for each stage:
|
||||
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.8 (test environment `py38`)
|
||||
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.7 (test environment `py37`)
|
||||
- Ensures documentation builds without warnings, and all hyperlinks have a valid destination (test environment `docs`)
|
||||
- Ensures that the code meets our style guide with [black](https://github.com/psf/black) (test environment `style`)
|
||||
- Ensures that the code meets our style guide with [black](https://github.com/ambv/black) (test environment `style`)
|
||||
|
||||
To run all of these tests, just run the command `tox` in the project directory.
|
||||
|
||||
@@ -92,21 +93,17 @@ To run a subset of these tests, use the command `tox -e <env>`, where `<env>` is
|
||||
Your PR will not be merged until all of these tests pass.
|
||||
|
||||
### 4.3 Style
|
||||
Our style checker of choice, [black](https://github.com/psf/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
|
||||
Our style checker of choice, [black](https://github.com/ambv/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
|
||||
|
||||
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/psf/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. This is already set in `pyproject.toml` configuration file in the repo so you can simply format code with Black like so: `black <src>`.
|
||||
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. When using `black` on the command line, simply use it like so: `black -l 99 -N <src>`.
|
||||
|
||||
### 4.4 Make
|
||||
You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do a few things with them:
|
||||
You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do three things with them:
|
||||
1. `make reformat`: Reformat all python files in the project with Black
|
||||
2. `make stylecheck`: Check if any `.py` files in the project need reformatting
|
||||
3. `make newenv`: Set up a new virtual environment in the `.venv` subdirectory, and install Red and its dependencies. If one already exists, it is cleared out and replaced.
|
||||
4. `make syncenv`: Sync your environment with Red's latest dependencies.
|
||||
|
||||
The other make recipes are most likely for project maintainers rather than contributors.
|
||||
|
||||
You can specify the Python executable used in the make recipes with the `PYTHON` environment variable, e.g. `make PYTHON=/usr/bin/python3.8 newenv`.
|
||||
|
||||
### 4.5 Keeping your dependencies up to date
|
||||
Whenever you pull from upstream (V3/develop on the main repository) and you notice either of the files `setup.cfg` or `tools/dev-requirements.txt` have been changed, it can often mean some package dependencies have been updated, added or removed. To make sure you're testing and formatting with the most up-to-date versions of our dependencies, run `make syncenv`. You could also simply do `make newenv` to install them to a clean new virtual environment.
|
||||
|
||||
@@ -117,10 +114,6 @@ Whenever you pull from upstream (V3/develop on the main repository) and you noti
|
||||
3. If you like the changes and think the main Red project could use it:
|
||||
* Run tests with `tox` to ensure your code is up to scratch
|
||||
* Create a Pull Request on GitHub with your changes
|
||||
- If you are contributing a behavior change, please keep in mind that behavior changes
|
||||
are conditional on them being appropriate for the project's current goals.
|
||||
If you would like to reduce the risk of putting in effort for something we aren't
|
||||
going to use, open an issue discussing it first.
|
||||
|
||||
### 4.7 How To Report A Bug
|
||||
Please see our **ISSUES.MD** for more information.
|
||||
@@ -144,7 +137,7 @@ Pull requests are evaluated by their quality and how effectively they solve thei
|
||||
|
||||
1. A pull request is submitted
|
||||
2. Core team members will review and test the pull request (usually within a week)
|
||||
3. After a member of the core team approves your pull request:
|
||||
3. After a majority of the core team approves your pull request:
|
||||
* If your pull request is considered an improvement or enhancement the project owner will have 1 day to veto or approve your pull request.
|
||||
* If your pull request is considered a new feature the project owner will have 1 week to veto or approve your pull request.
|
||||
4. If any feedback is given we expect a response within 1 week or we may decide to close the PR.
|
||||
86
.github/ISSUE_TEMPLATE/01_command_bug.yml
vendored
@@ -1,86 +0,0 @@
|
||||
name: Bug reports for commands
|
||||
description: For bugs that involve commands found within Red.
|
||||
labels: 'Type: Bug'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for any issues related to commands.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: red-version
|
||||
attributes:
|
||||
label: "What Red version are you using?"
|
||||
placeholder: 3.4.5
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: cog-name
|
||||
attributes:
|
||||
label: "Cog name"
|
||||
description: "From which cog does the command come from?"
|
||||
options:
|
||||
- Admin
|
||||
- Alias
|
||||
- Audio
|
||||
- Bank
|
||||
- Cleanup
|
||||
- CogManagerUI
|
||||
- Core
|
||||
- Customcom
|
||||
- Dev
|
||||
- Downloader
|
||||
- Economy
|
||||
- Filter
|
||||
- General
|
||||
- Image
|
||||
- Mod
|
||||
- Modlog
|
||||
- Mutes
|
||||
- Permissions
|
||||
- Reports
|
||||
- Streams
|
||||
- Trivia
|
||||
- Warnings
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: command-name
|
||||
attributes:
|
||||
label: "Command name"
|
||||
description: "What is the command that caused the error?"
|
||||
placeholder: "play"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: weh
|
||||
attributes:
|
||||
label: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: wah
|
||||
attributes:
|
||||
label: "What actually happened?"
|
||||
description: |
|
||||
A clear and concise description of what the bug is.
|
||||
If the issue is visual in nature, consider posting a screenshot.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: "How can we reproduce this error?"
|
||||
description: "List of steps required to reproduce this error."
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
54
.github/ISSUE_TEMPLATE/02_other_bugs.yml
vendored
@@ -1,54 +0,0 @@
|
||||
name: Bug report
|
||||
description: "For bugs that don't involve a command."
|
||||
labels: 'Type: Bug'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for any issues not related to any existing command.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: red-version
|
||||
attributes:
|
||||
label: "What Red version are you using?"
|
||||
placeholder: 3.4.5
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: "What were you trying to do?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: weh
|
||||
attributes:
|
||||
label: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: wah
|
||||
attributes:
|
||||
label: "What actually happened?"
|
||||
description: |
|
||||
If the issue is visual in nature, consider posting a screenshot.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: "How can we reproduce this error?"
|
||||
description: |
|
||||
List of steps required to reproduce the error. If the bug is code related, a minimal code example that reproduces the problem would be a big help.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
29
.github/ISSUE_TEMPLATE/03_enhancements.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Enhancement proposal
|
||||
description: For feature requests and improvements related to already existing functionality.
|
||||
labels: 'Type: Enhancement'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for feature requests and improvements to already existing functionality.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: component-name
|
||||
attributes:
|
||||
label: "What component of Red (cog, command, API) would you like to see improvements on?"
|
||||
placeholder: Audio
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: "Describe the enhancement you're suggesting."
|
||||
description: |
|
||||
Feel free to describe in as much detail as you wish.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
52
.github/ISSUE_TEMPLATE/04_feature_request.yml
vendored
@@ -1,52 +0,0 @@
|
||||
name: Feature request
|
||||
description: For feature requests regarding Red itself.
|
||||
labels: 'Type: Feature'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue, this template is meant for any feature suggestions.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: dropdown
|
||||
id: feature-name
|
||||
attributes:
|
||||
label: "Type of feature request"
|
||||
description: "What type of feature would you like to request?"
|
||||
multiple: true
|
||||
options:
|
||||
- API functionality
|
||||
- Cog
|
||||
- Command
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: "Description of the feature you're suggesting"
|
||||
description: |
|
||||
Feel free to describe in as much detail as you wish.
|
||||
|
||||
If you are requesting API functionality:
|
||||
- Describe what it should do
|
||||
- Note whether it is to extend existing functionality or introduce new functionality
|
||||
|
||||
If you are requesting a cog to be included in core:
|
||||
- Describe the functionality in as much detail as possible
|
||||
- Include the command structure, if possible
|
||||
- Please note that unless it's something that should be core functionality,
|
||||
we reserve the right to reject your suggestion and point you to our cog
|
||||
board to request it for a third-party cog
|
||||
|
||||
If you are requesting a command:
|
||||
- Include what cog it should be in and a name for the command
|
||||
- Describe the intended functionality for the command
|
||||
- Note any restrictions on who can use the command or where it can be used
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
|
||||
20
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
|
||||
been suggested/reported
|
||||
|
||||
### Type:
|
||||
|
||||
- [ ] Suggestion
|
||||
- [ ] Bug
|
||||
|
||||
### Brief description of the problem
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
31
.github/ISSUE_TEMPLATE/command_bug.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Bug reports for commands
|
||||
about: For bugs that involve commands found within Red
|
||||
|
||||
---
|
||||
|
||||
# Command bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### Command name
|
||||
|
||||
<!-- Replace this line with the name of the command -->
|
||||
|
||||
#### What cog is this command from?
|
||||
|
||||
<!-- Replace this line with the name of the cog -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Support question
|
||||
url: https://discord.gg/red
|
||||
about: For any questions regarding on how to operate and run Red.
|
||||
41
.github/ISSUE_TEMPLATE/feature_req.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: For feature requests regarding Red itself.
|
||||
|
||||
---
|
||||
|
||||
# Feature request
|
||||
|
||||
<!-- This template is for feature requests. Please fill out the following: -->
|
||||
|
||||
|
||||
#### Select the type of feature you are requesting:
|
||||
|
||||
<!-- To check a box, replace the space between the [] with a x -->
|
||||
|
||||
- [ ] Cog
|
||||
- [ ] Command
|
||||
- [ ] API functionality
|
||||
|
||||
#### Describe your requested feature
|
||||
|
||||
<!--
|
||||
Feel free to describe in as much detail as you wish.
|
||||
|
||||
If you are requesting a cog to be included in core:
|
||||
- Describe the functionality in as much detail as possible
|
||||
- Include the command structure, if possible
|
||||
- Please note that unless it's something that should be core functionality,
|
||||
we reserve the right to reject your suggestion and point you to our cog
|
||||
board to request it for a third-party cog
|
||||
|
||||
If you are requesting a command:
|
||||
- Include what cog it should be in and a name for the command
|
||||
- Describe the intended functionality for the command
|
||||
- Note any restrictions on who can use the command or where it can be used
|
||||
|
||||
If you are requesting API functionality:
|
||||
- Describe what it should do
|
||||
- Note whether it is to extend existing functionality or introduce new functionality
|
||||
|
||||
-->
|
||||
27
.github/ISSUE_TEMPLATE/other_bug.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: For bugs that don't involve a command.
|
||||
|
||||
---
|
||||
|
||||
# Other bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with something other than a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### What were you trying to do?
|
||||
|
||||
<!-- Replace this line with a description of what you were trying to do -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1 +1,7 @@
|
||||
### Type
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Enhancement
|
||||
- [ ] New feature
|
||||
|
||||
### Description of the changes
|
||||
|
||||
7
.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
### Type
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Enhancement
|
||||
- [ ] New feature
|
||||
|
||||
### Description of the changes
|
||||
186
.github/labeler.yml
vendored
@@ -1,186 +0,0 @@
|
||||
"Category: Admin":
|
||||
# Source
|
||||
- redbot/cogs/admin/*
|
||||
# Docs
|
||||
- docs/cog_guides/admin.rst
|
||||
"Category: Alias":
|
||||
# Source
|
||||
- redbot/cogs/alias/*
|
||||
# Docs
|
||||
- docs/cog_guides/alias.rst
|
||||
"Category: Audio Cog":
|
||||
- any:
|
||||
- redbot/cogs/audio/**/*
|
||||
all:
|
||||
- "!redbot/cogs/audio/**/locales/*"
|
||||
"Category: Bank API":
|
||||
# Source
|
||||
- redbot/core/bank.py
|
||||
# Docs
|
||||
- docs/framework_bank.rst
|
||||
"Category: Bank Cog":
|
||||
# Source
|
||||
- redbot/cogs/bank/*
|
||||
# Docs
|
||||
- docs/cog_guides/bank.rst
|
||||
"Category: Bot Core":
|
||||
# Source
|
||||
- redbot/*
|
||||
- redbot/core/__init__.py
|
||||
- redbot/core/_diagnoser.py
|
||||
- redbot/core/_sharedlibdeprecation.py
|
||||
- redbot/core/bot.py
|
||||
- redbot/core/checks.py
|
||||
- redbot/core/cli.py
|
||||
- redbot/core/cog_manager.py
|
||||
- redbot/core/core_commands.py
|
||||
- redbot/core/data_manager.py
|
||||
- redbot/core/errors.py
|
||||
- redbot/core/events.py
|
||||
- redbot/core/global_checks.py
|
||||
- redbot/core/settings_caches.py
|
||||
# Docs
|
||||
- docs/framework_apikeys.rst
|
||||
- docs/framework_bot.rst
|
||||
- docs/framework_cogmanager.rst
|
||||
- docs/framework_datamanager.rst
|
||||
- docs/framework_events.rst
|
||||
- docs/cog_guides/cog_manager_ui.rst
|
||||
- docs/cog_guides/core.rst
|
||||
"Category: CI":
|
||||
- .github/workflows/*
|
||||
"Category: Cleanup Cog":
|
||||
# Source
|
||||
- redbot/cogs/cleanup/*
|
||||
# Docs
|
||||
- docs/cog_guides/cleanup.rst
|
||||
"Category: Command Module":
|
||||
# Source
|
||||
- any:
|
||||
# Source
|
||||
- redbot/core/commands/*
|
||||
# Docs
|
||||
- docs/framework_checks.rst
|
||||
- docs/framework_commands.rst
|
||||
all:
|
||||
- "!redbot/core/commands/help.py"
|
||||
"Category: Config":
|
||||
# Source
|
||||
- redbot/core/drivers/*
|
||||
- redbot/core/config.py
|
||||
# Docs
|
||||
- docs/framework_config.rst
|
||||
"Category: CustomCom":
|
||||
# Source
|
||||
- redbot/cogs/customcom/*
|
||||
# Docs
|
||||
- docs/cog_customcom.rst
|
||||
- docs/cog_guides/customcommands.rst
|
||||
"Category: Dev Cog":
|
||||
- redbot/core/dev_commands.py
|
||||
"Category: Docs":
|
||||
- docs/**/*
|
||||
"Category: Downloader":
|
||||
# Source
|
||||
- redbot/cogs/downloader/*
|
||||
# Docs
|
||||
- docs/cog_guides/downloader.rst
|
||||
"Category: Economy Cog":
|
||||
# Source
|
||||
- redbot/cogs/economy/*
|
||||
# Docs
|
||||
- docs/cog_guides/economy.rst
|
||||
"Category: Filter":
|
||||
# Source
|
||||
- redbot/cogs/filter/*
|
||||
# Docs
|
||||
- docs/cog_guides/filter.rst
|
||||
"Category: General Cog":
|
||||
# Source
|
||||
- redbot/cogs/general/*
|
||||
# Docs
|
||||
- docs/cog_guides/general.rst
|
||||
"Category: Help":
|
||||
- redbot/core/commands/help.py
|
||||
"Category: i18n":
|
||||
# Source
|
||||
- redbot/core/i18n.py
|
||||
# Locale files
|
||||
- redbot/**/locales/*
|
||||
# Docs
|
||||
- docs/framework_i18n.rst
|
||||
"Category: Image":
|
||||
# Source
|
||||
- redbot/cogs/image/*
|
||||
# Docs
|
||||
- docs/cog_guides/image.rst
|
||||
"Category: Meta":
|
||||
- ./*
|
||||
- .github/*
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .github/PULL_REQUEST_TEMPLATE/*
|
||||
- schema/*
|
||||
- tools/*
|
||||
"Category: Mod Cog":
|
||||
# Source
|
||||
- redbot/cogs/mod/*
|
||||
# Docs
|
||||
- docs/cog_guides/mod.rst
|
||||
"Category: Modlog API":
|
||||
# Source
|
||||
- redbot/core/generic_casetypes.py
|
||||
- redbot/core/modlog.py
|
||||
# Docs
|
||||
- docs/framework_modlog.rst
|
||||
"Category: Modlog Cog":
|
||||
# Source
|
||||
- redbot/cogs/modlog/*
|
||||
# Docs
|
||||
- docs/cog_guides/modlog.rst
|
||||
"Category: Mutes Cog":
|
||||
# Source
|
||||
- redbot/cogs/mutes/*
|
||||
# Docs
|
||||
- docs/cog_guides/mutes.rst
|
||||
"Category: Permissions":
|
||||
# Source
|
||||
- redbot/cogs/permissions/*
|
||||
# Docs
|
||||
- docs/cog_guides/permissions.rst
|
||||
- docs/cog_permissions.rst
|
||||
"Category: Reports Cog":
|
||||
# Source
|
||||
- redbot/cogs/reports/*
|
||||
# Docs
|
||||
- docs/cog_guides/reports.rst
|
||||
"Category: RPC/ZMQ API":
|
||||
# Source
|
||||
- redbot/core/rpc.py
|
||||
# Docs
|
||||
- docs/framework_rpc.rst
|
||||
"Category: Streams":
|
||||
# Source
|
||||
- redbot/cogs/streams/*
|
||||
# Docs
|
||||
- docs/cog_guides/streams.rst
|
||||
"Category: Tests":
|
||||
- redbot/pytest/*
|
||||
- tests/**/*
|
||||
"Category: Trivia Cog":
|
||||
# Source
|
||||
- redbot/cogs/trivia/*
|
||||
# Docs
|
||||
- docs/cog_guides/trivia.rst
|
||||
- docs/guide_trivia_list_creation.rst
|
||||
"Category: Trivia Lists":
|
||||
- redbot/cogs/trivia/data/lists/*
|
||||
"Category: Utility Functions":
|
||||
# Source
|
||||
- redbot/core/utils/*
|
||||
# Docs
|
||||
- docs/framework_utils.rst
|
||||
"Category: Warnings":
|
||||
# Source
|
||||
- redbot/cogs/warnings/*
|
||||
# Docs
|
||||
- docs/cog_guides/warnings.rst
|
||||
29
.github/workflows/auto_labeler_issues.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Auto Labeler - Issues
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Triage Label
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const is_status_label = (label) => label.name.startsWith('Status: ');
|
||||
if (context.payload.issue.labels.some(is_status_label)) {
|
||||
console.log('Issue already has Status label, skipping...');
|
||||
return;
|
||||
}
|
||||
github.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['Status: Needs Triage']
|
||||
});
|
||||
16
.github/workflows/auto_labeler_pr.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Auto Labeler - PRs
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Type Label
|
||||
uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: "" # this is a temporary workaround, see #4844
|
||||
58
.github/workflows/codeql-analysis.yml
vendored
@@ -1,58 +0,0 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 14 * * 4'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
actions: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -e .[all]
|
||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||
# that includes the dependencies
|
||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
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
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
32
.github/workflows/crowdin_upload_strings.yml
vendored
@@ -1,32 +0,0 @@
|
||||
name: Crowdin - Upload strings
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- V3/develop
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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
|
||||
pip install redgettext==3.3
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
- name: Upload source files
|
||||
run: |
|
||||
make upload_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
26
.github/workflows/lint_python.yaml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Lint Python
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- dispatched_test
|
||||
|
||||
env:
|
||||
ref: ${{ github.event.client_payload.ref || '' }}
|
||||
|
||||
jobs:
|
||||
lint_python:
|
||||
name: Lint Python
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- uses: actions/setup-python@v2
|
||||
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://gitlab.com/pycqa/flake8@3.7.9#egg=flake8"
|
||||
name: Install Flake8
|
||||
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
|
||||
name: Flake8 Linting
|
||||
130
.github/workflows/prepare_release.yml
vendored
@@ -1,130 +0,0 @@
|
||||
name: Prepare Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
new_stable_version:
|
||||
description: Version number for the new stable release (leave empty to just strip `.dev1`)
|
||||
required: false
|
||||
default: 'auto'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
crowdin_download_translations:
|
||||
needs: pr_stable_bump
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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
|
||||
pip install redgettext==3.3
|
||||
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
- name: Download translations
|
||||
run: |
|
||||
make download_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_crowdin
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Automated Crowdin downstream
|
||||
title: "[i18n] Automated Crowdin downstream"
|
||||
body: |
|
||||
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
|
||||
branch: "automated/i18n"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_crowdin.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_crowdin.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(script({github, context}));
|
||||
|
||||
pr_stable_bump:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Create PR for stable version bump
|
||||
- name: Update Red version number from input
|
||||
id: bump_version_stable
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
NEW_STABLE_VERSION: ${{ github.event.inputs.new_stable_version }}
|
||||
|
||||
# Get milestone number of the milestone for the new stable version
|
||||
- name: Get milestone number
|
||||
id: get_milestone_number
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
MILESTONE_TITLE: ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
with:
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
|
||||
);
|
||||
return await script({github, context});
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_bump_stable
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
title: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
body: |
|
||||
This is an automated PR that is part of Prepare Release automated workflow (1 out of 2).
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/pr_bumps/${{ steps.bump_version_stable.outputs.new_version }}"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ steps.get_milestone_number.outputs.result }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_bump_stable.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_bump_stable.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(await script({github, context}));
|
||||
150
.github/workflows/publish_release.yml
vendored
@@ -1,150 +0,0 @@
|
||||
name: Publish Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
release_information:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
name: GO HERE BEFORE APPROVING
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Get version to release
|
||||
- name: Get version to release
|
||||
id: version_to_release
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
JUST_RETURN_VERSION: '1'
|
||||
|
||||
# Print release information
|
||||
- name: REVIEW OUTPUT OF THIS STEP BEFORE APPROVING
|
||||
env:
|
||||
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
|
||||
TAG_REF_NAME: ${{ github.ref }}
|
||||
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
|
||||
run: |
|
||||
echo 'Release information:'
|
||||
echo "- Branch the tag was based off: ${TAG_BASE_BRANCH#'refs/heads/'}"
|
||||
echo "- Tag name: ${TAG_REF_NAME#'refs/tags/'}"
|
||||
echo "- Release version: $RELEASE_VERSION"
|
||||
|
||||
echo "TAG_NAME=${TAG_REF_NAME#'refs/tags/'}" >> $GITHUB_ENV
|
||||
|
||||
- name: Ensure the tag name corresponds to the released version
|
||||
env:
|
||||
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
|
||||
run: |
|
||||
if [[ "$TAG_NAME" != "$RELEASE_VERSION" ]]; then
|
||||
echo -n "The tag name ($TAG_NAME) is not the same as"
|
||||
echo " the release version ($RELEASE_VERSION)!"
|
||||
exit 1
|
||||
else
|
||||
echo "The tag name and the release version are the same ($TAG_NAME)."
|
||||
echo 'Continuing...'
|
||||
fi
|
||||
|
||||
release_to_pypi:
|
||||
needs: release_information
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||
run: |
|
||||
python -m build
|
||||
twine upload dist/*
|
||||
|
||||
pr_dev_bump:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
needs: release_to_pypi
|
||||
name: Update Red version number to dev
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get base branch
|
||||
env:
|
||||
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
|
||||
run: |
|
||||
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.BASE_BRANCH }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Version bump to development version
|
||||
- name: Update Red version number to dev
|
||||
id: bump_version_dev
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
DEV_BUMP: '1'
|
||||
|
||||
# Get milestone number of the milestone for the old version
|
||||
- name: Get milestone number
|
||||
id: get_milestone_number
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
MILESTONE_TITLE: ${{ steps.bump_version_dev.outputs.old_version }}
|
||||
with:
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
|
||||
);
|
||||
return await script({github, context});
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_bump_dev
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
|
||||
title: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
|
||||
body: |
|
||||
This is an automated PR.
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/pr_bumps/${{ steps.bump_version_dev.outputs.new_version }}"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ steps.get_milestone_number.outputs.result }}
|
||||
base: ${{ env.BASE_BRANCH }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_bump_dev.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_bump_dev.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(await script({github, context}));
|
||||
52
.github/workflows/scripts/bump_version.py
vendored
@@ -1,52 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from typing import Match
|
||||
|
||||
import redbot
|
||||
|
||||
|
||||
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
|
||||
print(f"::set-output name=version::{redbot.__version__}")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
version_info = None
|
||||
|
||||
|
||||
def repl(match: Match[str]) -> str:
|
||||
global version_info
|
||||
|
||||
print(f"::set-output name=old_version::{match.group('version')}")
|
||||
|
||||
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
|
||||
if new_stable_version == "auto":
|
||||
version_info = redbot.VersionInfo.from_str(match.group("version"))
|
||||
version_info.dev_release = None
|
||||
else:
|
||||
version_info = redbot.VersionInfo.from_str(new_stable_version)
|
||||
|
||||
if int(os.environ.get("DEV_BUMP", 0)):
|
||||
version_info.micro += 1
|
||||
version_info.dev_release = 1
|
||||
|
||||
return f'__version__ = "{version_info}"'
|
||||
|
||||
|
||||
with open("redbot/__init__.py", encoding="utf-8") as fp:
|
||||
new_contents, found = re.subn(
|
||||
pattern=r'^__version__ = "(?P<version>[^"]*)"$',
|
||||
repl=repl,
|
||||
string=fp.read(),
|
||||
count=1,
|
||||
flags=re.MULTILINE,
|
||||
)
|
||||
|
||||
if not found:
|
||||
print("Couldn't find `__version__` line!")
|
||||
sys.exit(1)
|
||||
|
||||
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
|
||||
fp.write(new_contents)
|
||||
|
||||
print(f"::set-output name=new_version::{version_info}")
|
||||
25
.github/workflows/scripts/close_and_reopen_pr.js
vendored
@@ -1,25 +0,0 @@
|
||||
module.exports = (async function ({github, context}) {
|
||||
const pr_number = process.env.PR_NUMBER;
|
||||
const pr_operation = process.env.PR_OPERATION;
|
||||
let sleep_time = 0;
|
||||
|
||||
if (!['created', 'updated'].includes(pr_operation)) {
|
||||
console.log('PR was not created as there were no changes.')
|
||||
return;
|
||||
}
|
||||
|
||||
for (const new_state of ['closed', 'open']) {
|
||||
// some sleep time needed to make sure API handles open after close
|
||||
if (sleep_time)
|
||||
await new Promise(r => setTimeout(r, sleep_time));
|
||||
|
||||
github.issues.update({
|
||||
issue_number: pr_number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: new_state
|
||||
});
|
||||
|
||||
sleep_time = 2000;
|
||||
}
|
||||
})
|
||||
@@ -1,49 +0,0 @@
|
||||
module.exports = (async function ({github, context}) {
|
||||
const milestone_title = process.env.MILESTONE_TITLE;
|
||||
const [repo_owner, repo_name] = process.env.GITHUB_REPOSITORY.split('/');
|
||||
|
||||
const {
|
||||
repository: {
|
||||
milestones: {
|
||||
nodes: milestones,
|
||||
pageInfo: {hasNextPage}
|
||||
}
|
||||
}
|
||||
} = await github.graphql({
|
||||
query: `
|
||||
query getMilestoneNumberByTitle(
|
||||
$repo_owner: String!
|
||||
$repo_name: String!
|
||||
$milestone_title: String!
|
||||
) {
|
||||
repository(owner:$repo_owner name:$repo_name) {
|
||||
milestones(query:$milestone_title states:OPEN first:100) {
|
||||
nodes {
|
||||
number
|
||||
title
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
repo_owner: repo_owner,
|
||||
repo_name: repo_name,
|
||||
milestone_title: milestone_title,
|
||||
});
|
||||
|
||||
if (hasNextPage) {
|
||||
// this should realistically never happen so let's just error
|
||||
core.setFailed('Impossible happened! :)');
|
||||
return;
|
||||
}
|
||||
|
||||
for (const milestone of milestones)
|
||||
if (milestone.title === milestone_title)
|
||||
return milestone.number;
|
||||
|
||||
// if no exact match is found, assume the milestone doesn't exist
|
||||
console.log('The milestone was not found. API returned the array: %o', milestones);
|
||||
return null;
|
||||
})
|
||||
93
.github/workflows/tests.yml
vendored
@@ -1,93 +0,0 @@
|
||||
name: Tests
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- dispatched_test
|
||||
|
||||
env:
|
||||
ref: ${{ github.event.client_payload.ref || '' }}
|
||||
|
||||
jobs:
|
||||
tox:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python_version:
|
||||
- "3.8"
|
||||
tox_env:
|
||||
- style
|
||||
- docs
|
||||
include:
|
||||
- tox_env: py38
|
||||
python_version: "3.8"
|
||||
friendly_name: Python 3.8 - Tests
|
||||
- tox_env: py39
|
||||
python_version: "3.9"
|
||||
friendly_name: Python 3.9 - Tests
|
||||
- tox_env: py310
|
||||
python_version: "3.10-dev"
|
||||
friendly_name: Python 3.10-dev - Tests
|
||||
- tox_env: style
|
||||
friendly_name: Style
|
||||
- tox_env: docs
|
||||
friendly_name: Docs
|
||||
fail-fast: false
|
||||
name: Tox - ${{ matrix.friendly_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
- name: Install tox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Tox test
|
||||
env:
|
||||
TOXENV: ${{ matrix.tox_env }}
|
||||
run: tox
|
||||
|
||||
tox-postgres:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python_version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10-dev"
|
||||
fail-fast: false
|
||||
name: Tox - Postgres
|
||||
services:
|
||||
postgresql:
|
||||
image: postgres:10
|
||||
ports:
|
||||
- 5432:5432
|
||||
env:
|
||||
POSTGRES_DB: red_db
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
- name: Install tox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Tox test
|
||||
env:
|
||||
TOXENV: postgres
|
||||
PGDATABASE: red_db
|
||||
PGUSER: postgres
|
||||
PGPASSWORD: postgres
|
||||
PGPORT: 5432
|
||||
run: tox
|
||||
92
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.json
|
||||
*.exe
|
||||
*.dll
|
||||
*.pot
|
||||
@@ -5,7 +6,6 @@
|
||||
!/tests/cogs/dataconverter/data/**/*.json
|
||||
Pipfile
|
||||
Pipfile.lock
|
||||
.directory
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
@@ -14,9 +14,6 @@ Pipfile.lock
|
||||
# User-specific stuff:
|
||||
.idea/
|
||||
*.iws
|
||||
.vscode/
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
@@ -60,7 +57,6 @@ parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
@@ -140,89 +136,3 @@ ENV/
|
||||
|
||||
# pytest
|
||||
.pytest_cache/
|
||||
|
||||
# Pre-commit hooks
|
||||
/.pre-commit-config.yaml
|
||||
|
||||
### macOS template
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### Windows template
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### SublimeText template
|
||||
# Cache files for Sublime Text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# Workspace files are user-specific
|
||||
|
||||
# SFTP configuration file
|
||||
sftp-config.json
|
||||
sftp-config-alt*.json
|
||||
|
||||
# Package control specific files
|
||||
Package Control.last-run
|
||||
Package Control.ca-list
|
||||
Package Control.ca-bundle
|
||||
Package Control.system-ca-bundle
|
||||
Package Control.cache/
|
||||
Package Control.ca-certs/
|
||||
Package Control.merged-ca-bundle
|
||||
Package Control.user-ca-bundle
|
||||
oscrypto-ca-bundle.crt
|
||||
bh_unicode_properties.cache
|
||||
|
||||
# Sublime-github package stores a github token in this file
|
||||
# https://packagecontrol.io/packages/sublime-github
|
||||
GitHub.sublime-settings
|
||||
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
version: 2
|
||||
|
||||
formats:
|
||||
- pdf
|
||||
|
||||
build:
|
||||
image: latest
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
version: 3.7
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- method: pip
|
||||
path: .
|
||||
extra_requirements:
|
||||
- docs
|
||||
- mongo
|
||||
|
||||
60
.travis.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
dist: xenial
|
||||
language: python
|
||||
cache: pip
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
python:
|
||||
- 3.7.2
|
||||
env:
|
||||
global:
|
||||
- PIPENV_IGNORE_VIRTUALENVS=1
|
||||
matrix:
|
||||
- TOXENV=py
|
||||
- TOXENV=docs
|
||||
- TOXENV=style
|
||||
|
||||
install:
|
||||
- pip install --upgrade pip tox
|
||||
|
||||
script:
|
||||
- tox
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# These jobs only occur on tag creation if the prior ones succeed
|
||||
- stage: PyPi Deployment
|
||||
if: tag IS present
|
||||
python: 3.7.2
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
- TOXENV=py36
|
||||
deploy:
|
||||
- provider: pypi
|
||||
distributions: sdist bdist_wheel
|
||||
user: Red-DiscordBot
|
||||
password:
|
||||
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: Cog-Creators/Red-DiscordBot
|
||||
tags: true
|
||||
- stage: Crowdin Deployment
|
||||
if: tag IS present
|
||||
python: 3.7.2
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
- TOXENV=py36
|
||||
before_deploy:
|
||||
- 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
|
||||
- pip install redgettext==3.1
|
||||
deploy:
|
||||
- provider: script
|
||||
script: make upload_translations
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: Cog-Creators/Red-DiscordBot
|
||||
tags: true
|
||||
9
LICENSE
@@ -632,8 +632,7 @@ state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
Red - A fully customizable Discord bot
|
||||
Copyright (C) 2017-2021 Cog Creators
|
||||
Copyright (C) 2015-2017 Twentysix
|
||||
Copyright (C) 2015-2019 Twentysix
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -653,8 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Red-DiscordBot Copyright (C) 2017-2021 Cog Creators
|
||||
Red-DiscordBot Copyright (C) 2015-2017 Twentysix
|
||||
Red-DiscordBot Copyright (C) 2015-2019 Twentysix
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@@ -702,6 +700,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
This project vendors discord.ext.menus package (https://github.com/Rapptz/discord-ext-menus) made by Danny Y. (Rapptz) which is distributed under MIT License.
|
||||
Copy of this license can be found in discord-ext-menus.LICENSE file in redbot/vendored folder of this repository.
|
||||
|
||||
27
MANIFEST.in
@@ -1,27 +0,0 @@
|
||||
# include license files
|
||||
include LICENSE
|
||||
recursive-include redbot *.LICENSE
|
||||
|
||||
# include locale files
|
||||
recursive-include redbot locales/*.po
|
||||
|
||||
# include data folders for cogs
|
||||
recursive-include redbot/**/data *
|
||||
|
||||
# include *.export files from the test fixtures
|
||||
recursive-include redbot *.export
|
||||
|
||||
# include the py.typed file informing about Red being typed
|
||||
recursive-include redbot py.typed
|
||||
|
||||
# include *.sql files from postgres driver
|
||||
recursive-include redbot/core/drivers/postgres *.sql
|
||||
|
||||
# include tests
|
||||
graft tests
|
||||
|
||||
# include tox configuration
|
||||
include tox.ini
|
||||
|
||||
# exclude files containing byte-code and compiled libs
|
||||
global-exclude *.py[cod]
|
||||
50
Makefile
@@ -1,62 +1,26 @@
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
PYTHON ?= python3.8
|
||||
|
||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
ifneq ($(wildcard $(ROOT_DIR)/.venv/.),)
|
||||
VENV_PYTHON = $(ROOT_DIR)/.venv/bin/python
|
||||
else
|
||||
VENV_PYTHON = $(PYTHON)
|
||||
endif
|
||||
|
||||
define HELP_BODY
|
||||
Usage:
|
||||
make <command>
|
||||
|
||||
Commands:
|
||||
reformat Reformat all .py files being tracked by git.
|
||||
stylecheck Check which tracked .py files need reformatting.
|
||||
stylediff Show the post-reformat diff of the tracked .py files
|
||||
without modifying them.
|
||||
gettext Generate pot files.
|
||||
upload_translations Upload pot files to Crowdin.
|
||||
download_translations Download translations from Crowdin.
|
||||
bumpdeps Run script bumping dependencies.
|
||||
newenv Create or replace this project's virtual environment.
|
||||
syncenv Sync this project's virtual environment to Red's latest
|
||||
dependencies.
|
||||
endef
|
||||
export HELP_BODY
|
||||
|
||||
# Python Code Style
|
||||
reformat:
|
||||
$(VENV_PYTHON) -m black $(ROOT_DIR)
|
||||
black -l 99 `git ls-files "*.py"`
|
||||
stylecheck:
|
||||
$(VENV_PYTHON) -m black --check $(ROOT_DIR)
|
||||
stylediff:
|
||||
$(VENV_PYTHON) -m black --check --diff $(ROOT_DIR)
|
||||
black --check -l 99 `git ls-files "*.py"`
|
||||
|
||||
# Translations
|
||||
gettext:
|
||||
$(PYTHON) -m redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
|
||||
redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
|
||||
upload_translations:
|
||||
$(MAKE) gettext
|
||||
crowdin upload sources
|
||||
download_translations:
|
||||
crowdin download
|
||||
|
||||
# Dependencies
|
||||
bumpdeps:
|
||||
$(PYTHON) tools/bumpdeps.py
|
||||
python tools/bumpdeps.py
|
||||
|
||||
# Development environment
|
||||
newenv:
|
||||
$(PYTHON) -m venv --clear .venv
|
||||
.venv/bin/pip install -U pip setuptools wheel
|
||||
python3.7 -m venv --clear .venv
|
||||
.venv/bin/pip install -U pip setuptools
|
||||
$(MAKE) syncenv
|
||||
syncenv:
|
||||
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
|
||||
|
||||
# Help
|
||||
help:
|
||||
@echo "$$HELP_BODY"
|
||||
|
||||
43
README.md
@@ -12,35 +12,32 @@
|
||||
<a href="https://discord.gg/red">
|
||||
<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=shield" alt="Discord Server">
|
||||
</a>
|
||||
<a href="https://pypi.org/project/Red-DiscordBot/">
|
||||
<img alt="PyPI" src="https://img.shields.io/pypi/v/Red-Discordbot">
|
||||
<a href="https://www.patreon.com/Red_Devs">
|
||||
<img src="https://img.shields.io/badge/Support-Red!-yellow.svg" alt="Support Red on Patreon!">
|
||||
</a>
|
||||
<a href="https://www.python.org/downloads/">
|
||||
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/Red-Discordbot">
|
||||
<img src="https://img.shields.io/badge/Made%20With-Python%203.7-blue.svg?style=for-the-badge" alt="Made with Python 3.7">
|
||||
</a>
|
||||
<a href="https://crowdin.com/project/red-discordbot">
|
||||
<img src="https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg" alt="Localized with Crowdin">
|
||||
</a>
|
||||
<a href="https://github.com/Rapptz/discord.py/">
|
||||
<img src="https://img.shields.io/badge/discord-py-blue.svg" alt="discord.py">
|
||||
</a>
|
||||
<a href="https://www.patreon.com/Red_Devs">
|
||||
<img src="https://img.shields.io/badge/Support-Red!-red.svg" alt="Support Red on Patreon!">
|
||||
<img src="https://img.shields.io/badge/discord-py-blue.svg" alt="discord.py">
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/Cog-Creators/Red-DiscordBot/actions">
|
||||
<img src="https://img.shields.io/github/workflow/status/Cog-Creators/Red-Discordbot/Tests?label=tests" alt="GitHub Actions">
|
||||
<a href="https://travis-ci.com/Cog-Creators/Red-DiscordBot">
|
||||
<img src="https://api.travis-ci.com/Cog-Creators/Red-DiscordBot.svg?branch=V3/develop" alt="Travis CI">
|
||||
</a>
|
||||
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
|
||||
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
|
||||
</a>
|
||||
<a href="https://github.com/psf/black">
|
||||
<a href="https://github.com/ambv/black">
|
||||
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black">
|
||||
</a>
|
||||
<a href="http://makeapullrequest.com">
|
||||
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
|
||||
</a>
|
||||
<a href="https://crowdin.com/project/red-discordbot">
|
||||
<img src="https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg" alt="Localized with Crowdin">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -60,19 +57,19 @@
|
||||
# Overview
|
||||
|
||||
Red is a fully modular bot – meaning all features and commands can be enabled/disabled to your
|
||||
liking, making it completely customizable. This is a *self-hosted bot* – meaning you will need
|
||||
liking, making it completely customizable. This is also a *self-hosted bot* – meaning you will need
|
||||
to host and maintain your own instance. You can turn Red into an admin bot, music bot, trivia bot,
|
||||
new best friend or all of these together!
|
||||
|
||||
[Installation](#installation) is easy, and you do **NOT** need to know anything about coding! Aside
|
||||
from installing and updating, every part of the bot can be controlled from within Discord.
|
||||
from installation and updating, every part of the bot can be controlled from within Discord.
|
||||
|
||||
**The default set of modules includes and is not limited to:**
|
||||
|
||||
- Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
|
||||
- Trivia (lists are included and can be easily added)
|
||||
- Music features (YouTube, SoundCloud, local files, playlists, queues)
|
||||
- Stream alerts (Twitch, Youtube, Picarto)
|
||||
- Stream alerts (Twitch, Youtube, Mixer, Hitbox, Picarto)
|
||||
- Bank (slot machine, user credits)
|
||||
- Custom commands
|
||||
- Imgur/gif search
|
||||
@@ -88,7 +85,12 @@ community of cog repositories.**
|
||||
|
||||
- [Windows](https://red-discordbot.readthedocs.io/en/stable/install_windows.html)
|
||||
- [MacOS](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Most major linux distributions](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Ubuntu](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Debian Stretch](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [CentOS 7](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Arch Linux](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Raspbian Stretch](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
|
||||
|
||||
If after reading the guide you are still experiencing issues, feel free to join the
|
||||
[Official Discord Server](https://discord.gg/red) and ask in the **#support** channel for help.
|
||||
@@ -107,14 +109,14 @@ plugins directly from Discord! A few examples are:
|
||||
- AniList
|
||||
- And much, much more!
|
||||
|
||||
Feel free to take a [peek](https://index.discord.red) at a list of
|
||||
Feel free to take a [peek](https://cogboard.red/t/approved-repositories/210) at a list of
|
||||
available 3rd party cogs!
|
||||
|
||||
# Join the community!
|
||||
|
||||
**Red** is in continuous development, and it’s supported by an active community which produces new
|
||||
content (cogs/plugins) for everyone to enjoy. New features are constantly added. If you can’t
|
||||
[find](https://index.discord.red) the cog you’re looking for,
|
||||
[find](https://cogboard.red/t/approved-repositories/210) the cog you’re looking for,
|
||||
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
|
||||
building your own cogs!
|
||||
|
||||
@@ -129,6 +131,3 @@ Red is named after the main character of "Transistor", a video game by
|
||||
|
||||
Artwork created by [Sinlaire](https://sinlaire.deviantart.com/) on Deviant Art for the Red Discord
|
||||
Bot Project.
|
||||
|
||||
This project vendors [discord.ext.menus](https://github.com/Rapptz/discord-ext-menus) package made by Danny Y. (Rapptz) which is distributed under MIT License.
|
||||
A copy of this license can be found in the [discord-ext-menus.LICENSE](redbot/vendored/discord-ext-menus.LICENSE) file in the [redbot/vendored](redbot/vendored) folder of this repository.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
api_key_env: CROWDIN_API_KEY
|
||||
project_identifier_env: CROWDIN_PROJECT_ID
|
||||
base_path: ./redbot/
|
||||
preserve_hierarchy: true
|
||||
files:
|
||||
- source: cogs/**/messages.pot
|
||||
translation: /%original_path%/%locale%.po
|
||||
|
||||
|
Before Width: | Height: | Size: 334 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@@ -3,7 +3,7 @@
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = python3 -msphinx
|
||||
SPHINXBUILD = python -msphinx
|
||||
SPHINXPROJ = Red-DiscordBot
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
@@ -17,4 +17,4 @@ help:
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@@ -1,129 +0,0 @@
|
||||
"""
|
||||
A Sphinx extension adding a ``deprecated-removed`` directive that works
|
||||
similarly to CPython's directive with the same name.
|
||||
|
||||
The key difference is that instead of passing the version of planned removal,
|
||||
the writer must provide the minimum amount of days that must pass
|
||||
since the date of the release it was deprecated in.
|
||||
|
||||
Due to lack of a concrete release schedule for Red, this ensures that
|
||||
we give enough time to people affected by the changes no matter
|
||||
when the releases actually happen.
|
||||
|
||||
`DeprecatedRemoved` class is heavily based on
|
||||
`sphinx.domains.changeset.VersionChange` class that is available at:
|
||||
https://github.com/sphinx-doc/sphinx/blob/0949735210abaa05b6448e531984f159403053f4/sphinx/domains/changeset.py
|
||||
|
||||
Copyright 2007-2020 by the Sphinx team, see AUTHORS:
|
||||
https://github.com/sphinx-doc/sphinx/blob/82f495fed386c798735adf675f867b95d61ee0e1/AUTHORS
|
||||
|
||||
The original copy was distributed under BSD License and this derivative work
|
||||
is distributed under GNU GPL Version 3.
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import multiprocessing
|
||||
import subprocess
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx import addnodes
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
|
||||
|
||||
class TagDateCache:
|
||||
def __init__(self) -> None:
|
||||
self._tags: Dict[str, datetime.date] = {}
|
||||
|
||||
def _populate_tags(self) -> None:
|
||||
with _LOCK:
|
||||
if self._tags:
|
||||
return
|
||||
out = subprocess.check_output(
|
||||
("git", "tag", "-l", "--format", "%(creatordate:raw)\t%(refname:short)"),
|
||||
text=True,
|
||||
)
|
||||
lines = out.splitlines(False)
|
||||
for line in lines:
|
||||
creator_date, tag_name = line.split("\t", maxsplit=1)
|
||||
timestamp = int(creator_date.split(" ", maxsplit=1)[0])
|
||||
self._tags[tag_name] = datetime.datetime.fromtimestamp(
|
||||
timestamp, tz=datetime.timezone.utc
|
||||
).date()
|
||||
|
||||
def get_tag_date(self, tag_name: str) -> Optional[datetime.date]:
|
||||
self._populate_tags()
|
||||
return self._tags.get(tag_name)
|
||||
|
||||
|
||||
_LOCK = multiprocessing.Manager().Lock()
|
||||
_TAGS = TagDateCache()
|
||||
|
||||
|
||||
class DeprecatedRemoved(SphinxDirective):
|
||||
has_content = True
|
||||
required_arguments = 2
|
||||
optional_arguments = 1
|
||||
final_argument_whitespace = True
|
||||
|
||||
def run(self) -> List[nodes.Node]:
|
||||
# Some Sphinx stuff
|
||||
node = addnodes.versionmodified()
|
||||
node.document = self.state.document
|
||||
self.set_source_info(node)
|
||||
node["type"] = self.name
|
||||
node["version"] = tuple(self.arguments)
|
||||
if len(self.arguments) == 3:
|
||||
inodes, messages = self.state.inline_text(self.arguments[2], self.lineno + 1)
|
||||
para = nodes.paragraph(self.arguments[2], "", *inodes, translatable=False)
|
||||
self.set_source_info(para)
|
||||
node.append(para)
|
||||
else:
|
||||
messages = []
|
||||
|
||||
# Text generation
|
||||
deprecation_version = self.arguments[0]
|
||||
minimum_days = int(self.arguments[1])
|
||||
tag_date = _TAGS.get_tag_date(deprecation_version)
|
||||
text = (
|
||||
f"Will be deprecated in version {deprecation_version},"
|
||||
" and removed in the first minor version that gets released"
|
||||
f" after {minimum_days} days since deprecation"
|
||||
if tag_date is None
|
||||
else f"Deprecated since version {deprecation_version},"
|
||||
" will be removed in the first minor version that gets released"
|
||||
f" after {tag_date + datetime.timedelta(days=minimum_days)}"
|
||||
)
|
||||
|
||||
# More Sphinx stuff
|
||||
if self.content:
|
||||
self.state.nested_parse(self.content, self.content_offset, node)
|
||||
classes = ["versionmodified"]
|
||||
if len(node):
|
||||
if isinstance(node[0], nodes.paragraph) and node[0].rawsource:
|
||||
content = nodes.inline(node[0].rawsource, translatable=True)
|
||||
content.source = node[0].source
|
||||
content.line = node[0].line
|
||||
content += node[0].children
|
||||
node[0].replace_self(nodes.paragraph("", "", content, translatable=False))
|
||||
|
||||
node[0].insert(0, nodes.inline("", f"{text}: ", classes=classes))
|
||||
else:
|
||||
para = nodes.paragraph(
|
||||
"", "", nodes.inline("", f"{text}.", classes=classes), translatable=False
|
||||
)
|
||||
node.append(para)
|
||||
|
||||
ret = [node]
|
||||
ret += messages
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def setup(app: Sphinx) -> Dict[str, Any]:
|
||||
app.add_directive("deprecated-removed", DeprecatedRemoved)
|
||||
return {
|
||||
"version": "1.0",
|
||||
"parallel_read_safe": True,
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
Allow: /en/stable
|
||||
Allow: /en/latest
|
||||
|
||||
Sitemap: https://docs.discord.red/sitemap.xml
|
||||
18
docs/_templates/layout.html
vendored
@@ -1,18 +0,0 @@
|
||||
{% extends '!layout.html' %}
|
||||
{% block document %}
|
||||
{% if version_slug == 'latest' %}
|
||||
<div class="admonition warning">
|
||||
<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>.
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
<a href="https://github.com/Cog-Creators/Red-DiscordBot">
|
||||
<img style="position: absolute; top: 0; right: 0; border: 0;"
|
||||
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149"
|
||||
class="attachment-full size-full" alt="Fork me on GitHub">
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -1,39 +0,0 @@
|
||||
.. _about-venvs:
|
||||
|
||||
==========================
|
||||
About Virtual Environments
|
||||
==========================
|
||||
Creating a virtual environment is really easy and usually prevents many common installation
|
||||
problems.
|
||||
|
||||
**What Are Virtual Environments For?**
|
||||
|
||||
Virtual environments allow you to isolate Red's library dependencies, cog dependencies and python
|
||||
binaries from the rest of your system. There is no performance overhead to using virtual environment
|
||||
and it saves you from a lot of troubles during setup. It also makes sure Red and its dependencies
|
||||
are installed to a predictable location which makes uninstalling Red as simple as removing a single folder,
|
||||
without worrying about losing your data or other things on your system becoming broken.
|
||||
|
||||
|
||||
--------------------------------------------
|
||||
Virtual Environments with Multiple Instances
|
||||
--------------------------------------------
|
||||
If you are running multiple instances of Red on the same machine, you have the option of either
|
||||
using the same virtual environment for all of them, or creating separate ones.
|
||||
|
||||
.. note::
|
||||
|
||||
This only applies for multiple instances of V3. If you are running a V2 instance as well,
|
||||
you **must** use separate virtual environments.
|
||||
|
||||
The advantages of using a *single* virtual environment for all of your V3 instances are:
|
||||
|
||||
- When updating Red, you will only need to update it once for all instances (however you will still need to restart all instances for the changes to take effect)
|
||||
- It will save space on your hard drive
|
||||
|
||||
On the other hand, you may wish to update each of your instances individually.
|
||||
|
||||
.. important::
|
||||
|
||||
Windows users with multiple instances should create *separate* virtual environments, as
|
||||
updating multiple running instances at once is likely to cause errors.
|
||||
@@ -1,110 +0,0 @@
|
||||
.. launchd guide
|
||||
|
||||
==============================
|
||||
Setting up auto-restart on Mac
|
||||
==============================
|
||||
|
||||
-----------------------
|
||||
Creating the plist file
|
||||
-----------------------
|
||||
|
||||
Start by activating your venv. Then run the following command:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
which python
|
||||
|
||||
Copy the output of that command.
|
||||
|
||||
Now run :code:`sudo nano /Library/LaunchDaemons/red.plist`
|
||||
|
||||
Paste the following and replace the following:
|
||||
|
||||
- :code:`username` (but not :code:`UserName`) with your Mac username
|
||||
- :code:`path` with the path you copied earlier
|
||||
- :code:`instance-name` with your instance name:
|
||||
|
||||
.. code-block:: none
|
||||
:emphasize-lines: 9, 13, 28
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>red</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>path</string>
|
||||
<string>-O</string>
|
||||
<string>-m</string>
|
||||
<string>redbot</string>
|
||||
<string>instance-name</string>
|
||||
<string>--no-prompt</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/tmp/red_out.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/tmp/red_err.log</string>
|
||||
<key>UserName</key>
|
||||
<string>username</string>
|
||||
<key>InitGroups</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
.. note::
|
||||
|
||||
You may add any additional arguments you need to add to the :code:`redbot` command by
|
||||
adding them to the end of the array under :code:`ProgramArguments`
|
||||
|
||||
.. note::
|
||||
|
||||
Should you need to set up auto-restart for additional bots, create a :code:`.plist` file for
|
||||
each bot under a different file name, and use the respective file names for the commands below.
|
||||
|
||||
Save and exit :code:`ctrl + O; enter; ctrl + x`
|
||||
|
||||
-------------------------------
|
||||
Starting and loading the plist
|
||||
-------------------------------
|
||||
|
||||
To start the bot and set it to start on boot, you must run the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl load -w /Library/LaunchDaemons/red.plist
|
||||
|
||||
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
|
||||
type the following command in the terminal:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl stop red
|
||||
|
||||
To start the bot again after a shutdown, run the following:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl start red
|
||||
|
||||
To stop the bot and set it to not start on boot anymore, run the following:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl unload -w /Library/LaunchDaemons/red.plist
|
||||
|
||||
To view Red's log, run the following (:code:`red_out.log` is for the console output, and
|
||||
:code:`red_err.log` for the error logs):
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
nano /tmp/red_out.log
|
||||
nano /tmp/red_err.log
|
||||
@@ -1,54 +1,27 @@
|
||||
.. _systemd-service-guide:
|
||||
.. systemd service guide
|
||||
|
||||
==============================================
|
||||
Setting up auto-restart using systemd on Linux
|
||||
==============================================
|
||||
|
||||
.. note:: This guide is for setting up systemd on a Linux environment. This guide assumes that you already have a working Red instance.
|
||||
|
||||
-------------------------
|
||||
Creating the service file
|
||||
-------------------------
|
||||
|
||||
In order to create the service file, you will first need to know two things, your Linux :code:`username` and your Python :code:`path`
|
||||
Create the new service file:
|
||||
|
||||
First, your Linux :code:`username` can be fetched with the following command:
|
||||
:code:`sudo -e /etc/systemd/system/red@.service`
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
whoami
|
||||
|
||||
Next, your python :code:`path` can be fetched with the following commands:
|
||||
|
||||
.. prompt:: bash
|
||||
:prompts: $,(redenv) $
|
||||
:modifiers: auto
|
||||
|
||||
# If redbot is installed in a venv
|
||||
$ 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`
|
||||
|
||||
Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
|
||||
Paste the following and replace all instances of :code:`username` with the username your bot is running under (hopefully not root):
|
||||
|
||||
.. code-block:: none
|
||||
:emphasize-lines: 8-10
|
||||
|
||||
[Unit]
|
||||
Description=%I redbot
|
||||
After=multi-user.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=path -O -m redbot %I --no-prompt
|
||||
ExecStart=/home/username/.local/bin/redbot %I --no-prompt
|
||||
User=username
|
||||
Group=username
|
||||
Type=idle
|
||||
@@ -70,34 +43,20 @@ Starting and enabling the service
|
||||
|
||||
To start the bot, run the service and add the instance name after the **@**:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl start red@instancename
|
||||
:code:`sudo systemctl start red@instancename`
|
||||
|
||||
To set the bot to start on boot, you must enable the service, again adding the instance name after the **@**:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl enable red@instancename
|
||||
:code:`sudo systemctl enable red@instancename`
|
||||
|
||||
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
|
||||
type the following command in the terminal, still by adding the instance name after the **@**:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl stop red@instancename
|
||||
:code:`sudo systemctl stop red@instancename`
|
||||
|
||||
.. warning:: If the service doesn't stop in the next 10 seconds, the process is killed.
|
||||
Check your logs to know the cause of the error that prevents the shutdown.
|
||||
|
||||
To set the bot to not start on boot anymore, you must disable the service by running the following command, adding the instance name after the **@**:
|
||||
To view Red’s log, you can acccess through journalctl:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl disable red@instancename
|
||||
|
||||
You can access Red's log through journalctl:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo journalctl -eu red@instancename
|
||||
:code:`sudo journalctl -u red@instancename`
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
===========================================
|
||||
Creating a bot account
|
||||
===========================================
|
||||
|
||||
To use Red you will require a bot account and to enable privileged intents. Both these steps will be covered below.
|
||||
|
||||
.. _creating-a-bot-account:
|
||||
|
||||
-------------------------------
|
||||
Creating the bot application
|
||||
-------------------------------
|
||||
|
||||
In order to use Red, we must first create a Discord Bot account.
|
||||
|
||||
Creating a Bot account is a pretty straightforward process.
|
||||
|
||||
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
|
||||
2. Navigate to the `application page <https://discord.com/developers/applications>`_
|
||||
3. Click on the "New Application" button.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_create_app_button.png
|
||||
:alt: The new application button.
|
||||
|
||||
4. Give the application a name 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".
|
||||
|
||||
- Click "Yes, do it!" to continue.
|
||||
|
||||
.. 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).
|
||||
|
||||
- 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.
|
||||
|
||||
- **This is not the Client Secret at the General Information page**
|
||||
|
||||
.. warning::
|
||||
|
||||
Do not share your token as it is like your password.
|
||||
If you shared your token you can regenerate it.
|
||||
|
||||
Continue to the next section to enable privileged intents.
|
||||
|
||||
.. _enabling-privileged-intents:
|
||||
|
||||
-------------------------------
|
||||
Enabling Privileged Intents
|
||||
-------------------------------
|
||||
.. warning::
|
||||
:ref:`Red Bot requires all intents. <intents>`
|
||||
\This section is required.
|
||||
|
||||
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
|
||||
2. Navigate to the `application page <https://discord.com/developers/applications>`_
|
||||
3. Click on the bot you want to enable privileged intents for.
|
||||
4. 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.
|
||||
|
||||
5. Scroll down to the "Privileged Gateway Intents" section, enable both privileged intents and save your changes.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_privileged_intents.png
|
||||
:alt: The privileged gateway intents selector.
|
||||
|
||||
.. warning::
|
||||
|
||||
Red bots with over 100 servers require `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ which is not covered in this guide.
|
||||
Remember that :ref:`we do not support public bots <intents>`. We encourage you to read that page before scaling up your bot.
|
||||
|
||||
*Parts of this guide have been adapted from* `discord.py intro <https://discordpy.readthedocs.io/en/stable/discord.html#discord-intro>`_ *and* `discord.py privileged intents <https://discordpy.readthedocs.io/en/stable/intents.html#privileged-intents>`_.
|
||||
@@ -110,7 +110,7 @@ Downloader
|
||||
* ``[p]cog uninstall`` allows to uninstall multiple cogs now (`#2592`_)
|
||||
* ``[p]cog uninstall`` will now remove cog from installed cogs even if it can't find the cog in install path anymore (`#2595`_)
|
||||
* ``[p]cog install`` will not allow to install cogs which aren't suitable for installed version of Red anymore (`#2605`_)
|
||||
* Cog Developers now have to use ``min_bot_version`` in form of version string instead of ``bot_version`` in info.json and they can also use ``max_bot_version`` to specify maximum version of Red, more in :ref:`info-json-format`. (`#2605`_)
|
||||
* Cog Developers now have to use ``min_bot_version`` in form of version string instead of ``bot_version`` in info.json and they can also use ``max_bot_version`` to specify maximum version of Red, more in :doc:`framework_downloader`. (`#2605`_)
|
||||
|
||||
------
|
||||
Filter
|
||||
|
||||
@@ -1,565 +0,0 @@
|
||||
.. 3.2.x Changelogs
|
||||
|
||||
Redbot 3.2.3 (2020-01-17)
|
||||
=========================
|
||||
|
||||
Core Bot Changes
|
||||
----------------
|
||||
|
||||
- Further improvements have been made to bot startup and shutdown.
|
||||
- Prefixes are now cached for performance.
|
||||
- Added the means for cog creators to use a global preinvoke hook.
|
||||
- The bot now ensures it has at least the bare neccessary permissions before running commands.
|
||||
- Deleting instances works as intended again.
|
||||
- Sinbad stopped fighting it and embraced the entrypoint madness.
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- The servers command now also shows the ids.
|
||||
|
||||
Admin Cog
|
||||
---------
|
||||
|
||||
- The selfrole command now has reasonable expectations about hierarchy.
|
||||
|
||||
Help Formatter
|
||||
--------------
|
||||
|
||||
- ``[botname]`` is now replaced with the bot's display name in help text.
|
||||
- New features added for cog creators to further customize help behavior.
|
||||
|
||||
- Check out our command reference for details on new ``format_help_for_context`` method.
|
||||
- Embed settings are now consistent.
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
- Improved a few user facing messages.
|
||||
- Added pagination of output on cog update.
|
||||
- Added logging of failures.
|
||||
|
||||
Docs
|
||||
----
|
||||
|
||||
There's more detail to the below changes, so go read the docs.
|
||||
For some reason, documenting documentation changes is hard.
|
||||
|
||||
- Added instructions about git version.
|
||||
- Clarified instructions for installation and update.
|
||||
- Added more details to the API key reference.
|
||||
- Fixed some typos and versioning mistakes.
|
||||
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
Draper did things.
|
||||
|
||||
- No seriously, Draper did things.
|
||||
- Wait you wanted details? Ok, I guess we can share those.
|
||||
- Audio properly disconnects with autodisconnect, even if notify is being used.
|
||||
- Symbolic links now work as intended for local tracks.
|
||||
- Bump play now shows the correct time till next track.
|
||||
- Multiple user facing messages have been made more correct.
|
||||
|
||||
Redbot 3.2.2 (2020-01-10)
|
||||
=========================
|
||||
|
||||
Hotfixes
|
||||
--------
|
||||
|
||||
- Fix Help Pagination issue
|
||||
|
||||
Docs
|
||||
----
|
||||
|
||||
- Correct venv docs
|
||||
|
||||
|
||||
Redbot 3.2.1 (2020-01-10)
|
||||
=========================
|
||||
|
||||
Hotfixes
|
||||
--------
|
||||
|
||||
- Fix Mongo conversion from being incorrectly blocked
|
||||
- Fix announcer not creating a message for success feedback
|
||||
- Log an error with creating case types rather than crash
|
||||
|
||||
|
||||
Redbot 3.2.0 (2020-01-09)
|
||||
=========================
|
||||
Core Bot Changes
|
||||
----------------
|
||||
|
||||
Breaking Changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- Modlog casetypes no longer have an attribute for auditlog action type. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Removed ``redbot.core.modlog.get_next_case_number()``. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Removed ``bank.MAX_BALANCE``, use ``bank.get_max_balance()`` from now on. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
|
||||
- The main bot config is no longer directly accessible to cogs. New methods have been added for use where this is concerned.
|
||||
New methods for this include
|
||||
|
||||
- ``bot.get_shared_api_tokens``
|
||||
- ``bot.set_shared_api_tokens``
|
||||
- ``bot.get_embed_color``
|
||||
- ``bot.get_embed_colour``
|
||||
- ``bot.get_admin_roles``
|
||||
- ``bot.get_admin_role_ids``
|
||||
- ``bot.get_mod_roles``
|
||||
- ``bot.get_mod_role_ids`` (`#2967 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2967>`_)
|
||||
- Reserved some command names for internal Red use. These are available programatically as ``redbot.core.commands.RESERVED_COMMAND_NAMES``. (`#2973 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2973>`_)
|
||||
- Removed ``bot._counter``, Made a few more attrs private (``cog_mgr``, ``main_dir``). (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
|
||||
- Extension's ``setup()`` function should no longer assume that we are, or even will be connected to Discord.
|
||||
This also means that cog creators should no longer use ``bot.wait_until_ready()`` inside it. (`#3073 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3073>`_)
|
||||
- Removed the mongo driver. (`#3099 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3099>`_)
|
||||
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Help now properly hides disabled commands. (`#2863 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2863>`_)
|
||||
- Fixed ``bot.remove_command`` throwing an error when trying to remove a non-existent command. (`#2888 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2888>`_)
|
||||
- ``Command.can_see`` now works as intended for disabled commands. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
|
||||
- Modlog entries now show up properly without the mod cog loaded. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Fixed an error in ``[p]reason`` when setting the reason for a case without a moderator. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Bank functions now check the recipient balance before transferring and stop the transfer if the recipient's balance will go above the maximum allowed balance. (`#2923 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2923>`_)
|
||||
- Removed potential for additional bad API calls per ban/unban. (`#2945 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2945>`_)
|
||||
- The ``[p]invite`` command no longer errors when a user has the bot blocked or DMs disabled in the server. (`#2948 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2948>`_)
|
||||
- Stopped using the ``:`` character in backup's filename - Windows doesn't accept it. (`#2954 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2954>`_)
|
||||
- ``redbot-setup delete`` no longer errors with "unexpected keyword argument". (`#2955 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2955>`_)
|
||||
- ``redbot-setup delete`` no longer prompts about backup when the user passes the option ``--no-prompt``. (`#2956 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2956>`_)
|
||||
- Cleaned up the ``[p]inviteset public`` and ``[p]inviteset perms`` help strings. (`#2963 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2963>`_)
|
||||
- ```[p]embedset user`` now only affects DM's. (`#2966 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2966>`_)
|
||||
- Fixed an unfriendly error when the provided instance name doesn't exist. (`#2968 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2968>`_)
|
||||
- Fixed the help text and response of ``[p]set usebotcolor`` to accurately reflect what the command is doing. (`#2974 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2974>`_)
|
||||
- Red no longer types infinitely when a command with a cooldown is called within the last second of a cooldown. (`#2985 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2985>`_)
|
||||
- Removed f-string usage in the launcher to prevent our error handling from causing an error. (`#3002 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3002>`_)
|
||||
- Fixed ``MessagePredicate.greater`` and ``MessagePredicate.less`` allowing any valid int instead of only valid ints/floats that are greater/less than the given value. (`#3004 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3004>`_)
|
||||
- Fixed an error in ``[p]uptime`` when the uptime is under a second. (`#3009 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3009>`_)
|
||||
- Added quotation marks to the response of ``[p]helpset tagline`` so that two consecutive full stops do not appear. (`#3010 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3010>`_)
|
||||
- Fixed an issue with clearing rules in permissions. (`#3014 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3014>`_)
|
||||
- Lavalink will now be restarted after an unexpected shutdown. (`#3033 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3033>`_)
|
||||
- Added a 3rd-party lib folder to ``sys.path`` before loading cogs. This prevents issues with 3rd-party cogs failing to load when Downloader is not loaded to install requirements. (`#3036 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3036>`_)
|
||||
- Escaped track descriptions so that they do not break markdown. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Red will now properly send a message when the invoked command is guild-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
|
||||
- Arguments ``--co-owner`` and ``--load-cogs`` now properly require at least one argument to be passed. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Now always appends the 3rd-party lib folder to the end of ``sys.path`` to avoid shadowing Red's dependencies. (`#3062 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3062>`_)
|
||||
- Fixed ``is_automod_immune``'s handling of the guild check and added support for checking webhooks. (`#3100 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3100>`_)
|
||||
- Fixed the generation of the ``repos.json`` file in the backup process. (`#3114 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3114>`_)
|
||||
- Fixed an issue where calling audio commands when not in a voice channel could result in a crash. (`#3120 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3120>`_)
|
||||
- Added handling for invalid folder names in the data path gracefully in ``redbot-setup`` and ``redbot --edit``. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- ``--owner`` and ``-p`` cli flags now work when added from launcher. (`#3174 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3174>`_)
|
||||
- Red will now prevent users from locking themselves out with localblacklist. (`#3207 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3207>`_)
|
||||
- Fixed help ending up a little too large for discord embed limits. (`#3208 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3208>`_)
|
||||
- Fixed formatting issues in commands that list whitelisted/blacklisted users/roles when the list is empty. (`#3219 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3219>`_)
|
||||
- Red will now prevent users from locking the guild owner out with localblacklist (unless the command caller is bot owner). (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
|
||||
- Guild owners are no longer affected by the local whitelist and blacklist. (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
|
||||
- Fixed an attribute error that can be raised in ``humanize_timedelta`` if ``seconds = 0``. (`#3231 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3231>`_)
|
||||
- Fixed ``ctx.clean_prefix`` issues resulting from undocumented changes from discord. (`#3249 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3249>`_)
|
||||
- ``redbot.core.bot.Bot.owner_id`` is now set in the post connection startup. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now wait until Red is done with post connection startup to ensure owner ID is available. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added the option to modify the RPC port with the ``--rpc-port`` flag. (`#2429 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2429>`_)
|
||||
- Slots now has a 62.5% expected payout and will not inflate economy when spammed. (`#2875 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2875>`_)
|
||||
- Allowed passing ``cls`` in the ``redbot.core.commands.group()`` decorator. (`#2881 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2881>`_)
|
||||
- Red's Help Formatter is now considered to have a stable API. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
|
||||
- Modlog no longer generates cases without being told to for actions the bot did. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Some generic modlog casetypes are now pre-registered for cog creator use. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- ModLog is now much faster at creating cases, especially in large servers. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- JSON config files are now stored without indentation, this is to reduce the file size and increase the performance of write operations. (`#2921 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2921>`_)
|
||||
- ``--[no-]backup``, ``--[no-]drop-db`` and ``--[no-]remove-datapath`` in the ``redbot-setup delete`` command are now on/off flags. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
|
||||
- The confirmation prompts in ``redbot-setup`` now have default values for user convenience. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
|
||||
- ``redbot-setup delete`` now has the option to leave Red's data untouched on database backends. (`#2962 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2962>`_)
|
||||
- Red now takes less time to fetch cases, unban members, and list warnings. (`#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_)
|
||||
- Red now handles more things prior to connecting to discord to reduce issues during the initial load. (`#3045 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3045>`_)
|
||||
- ``bot.send_filtered`` now returns the message that is sent. (`#3052 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3052>`_)
|
||||
- Red will now send a message when the invoked command is DM-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
|
||||
- All ``y/n`` confirmations in cli commands are now unified. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Changed ``[p]info`` to say "This bot is an..." instead of "This is an..." for clarity. (`#3121 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3121>`_)
|
||||
- ``redbot-setup`` will now use the instance name in default data paths to avoid creating a second instance with the same data path. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- Instance names can now only include characters A-z, numbers, underscores, and hyphens. Old instances are unaffected by this change. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- Clarified that ``[p]backup`` saves the **bot's** data in the help text. (`#3172 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3172>`_)
|
||||
- Added ``redbot --debuginfo`` flag which shows useful information for debugging. (`#3183 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3183>`_)
|
||||
- Added the Python executable field to ``[p]debuginfo``. (`#3184 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3184>`_)
|
||||
- When Red prompts for a token, it will now print a link to the guide explaining how to obtain a token. (`#3204 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3204>`_)
|
||||
- ``redbot-setup`` will no longer log to disk. (`#3269 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3269>`_)
|
||||
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now log when they are not able to find the owner notification destination. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
- The lib folder is now cleared on minor Python version changes. ``[p]cog reinstallreqs`` in Downloader can be used to regenerate the lib folder for a new Python version. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
|
||||
- If Red detects operating system or architecture change, it will now warn the owner about possible problems with the lib folder. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
|
||||
- ``[p]playlist download`` will now compress playlists larger than the server attachment limit and attempt to send that. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added functions to acquire locks on Config groups and values. These locks are acquired by default when calling a value as a context manager. See ``Value.get_lock`` for details. (`#2654 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2654>`_)
|
||||
- Added a config driver for PostgreSQL. (`#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_)
|
||||
- Added methods to Config for accessing things by id without mocked objects
|
||||
|
||||
- ``Config.guild_from_id``
|
||||
- ``Config.user_from_id``
|
||||
- ``Config.role_from_id``
|
||||
- ``Config.channel_from_id``
|
||||
- ``Config.member_from_ids``
|
||||
- This one requires multiple ids, one for the guild, one for the user
|
||||
- Consequence of discord's object model (`#2804 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2804>`_)
|
||||
- New method ``humanize_number`` in ``redbot.core.utils.chat_formatting`` to convert numbers into text that respects the current locale. (`#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_)
|
||||
- Added new commands to Economy
|
||||
|
||||
- ``[p]bank prune user`` - This will delete a user's bank account.
|
||||
- ``[p]bank prune local`` - This will prune the bank of accounts for users who are no longer in the server.
|
||||
- ``[p]bank prune global`` - This will prune the global bank of accounts for users who do not share any servers with the bot. (`#2845 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2845>`_)
|
||||
- Red now uses towncrier for changelog generation. (`#2872 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2872>`_)
|
||||
- Added ``redbot.core.modlog.get_latest_case`` to fetch the case object for the most recent ModLog case. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Added ``[p]bankset maxbal`` to set the maximum bank balance. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
|
||||
- Added a few methods and classes replacing direct config access (which is no longer supported)
|
||||
|
||||
- ``redbot.core.Red.allowed_by_whitelist_blacklist``
|
||||
- ``redbot.core.Red.get_valid_prefixes``
|
||||
- ``redbot.core.Red.clear_shared_api_tokens``
|
||||
- ``redbot.core.commands.help.HelpSettings`` (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
|
||||
- Added the cli flag ``redbot --edit`` which is used to edit the instance name, token, owner, and datapath. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Added ``[p]licenseinfo``. (`#3090 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3090>`_)
|
||||
- Ensured that people can migrate from MongoDB. (`#3108 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3108>`_)
|
||||
- Added a command to list disabled commands globally or per guild. (`#3118 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3118>`_)
|
||||
- New event ``on_red_api_tokens_update`` is now dispatched when shared api keys for a service are updated. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
|
||||
- Added ``redbot-setup backup``. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
|
||||
- Added the method ``redbot.core.bot.Bot.wait_until_red_ready()`` that waits until Red's post connection startup is done. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
|
||||
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
- ``[p]set owner`` and ``[p]set token`` have been removed in favor of managing server side. (`#2928 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2928>`_)
|
||||
- Shared libraries are marked for removal in Red 3.4. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
|
||||
- Removed ``[p]backup``. Use the cli command ``redbot-setup backup`` instead. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
|
||||
- Removed the functions ``safe_delete``, ``fuzzy_command_search``, ``format_fuzzy_results`` and ``create_backup`` from ``redbot.core.utils``. (`#3240 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3240>`_)
|
||||
- Removed a lot of the launcher's handled behavior. (`#3289 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3289>`_)
|
||||
|
||||
|
||||
Miscellaneous changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- `#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_, `#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_, `#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_, `#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_, `#2849 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2849>`_, `#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_, `#2885 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2885>`_, `#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_, `#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_, `#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_, `#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_, `#2939 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2939>`_, `#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_, `#2941 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2941>`_, `#2949 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2949>`_, `#2953 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2953>`_, `#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_, `#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_, `#2993 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2993>`_, `#2997 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2997>`_, `#3008 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3008>`_, `#3017 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3017>`_, `#3048 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3048>`_, `#3059 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3059>`_, `#3080 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3080>`_, `#3089 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3089>`_, `#3104 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3104>`_, `#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_, `#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_, `#3152 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3152>`_, `#3160 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3160>`_, `#3168 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3168>`_, `#3173 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3173>`_, `#3176 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3176>`_, `#3186 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3186>`_, `#3192 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3192>`_, `#3193 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3193>`_, `#3195 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3195>`_, `#3202 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3202>`_, `#3214 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3214>`_, `#3223 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3223>`_, `#3229 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3229>`_, `#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_, `#3247 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3247>`_, `#3248 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3248>`_, `#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_, `#3254 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3254>`_, `#3255 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3255>`_, `#3256 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3256>`_, `#3258 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3258>`_, `#3261 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3261>`_, `#3275 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3275>`_, `#3276 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3276>`_, `#3293 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3293>`_, `#3278 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3278>`_, `#3285 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3285>`_, `#3296 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3296>`_,
|
||||
|
||||
|
||||
Dependency changes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Added ``pytest-mock`` requirement to ``tests`` extra. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Updated the python minimum requirement to 3.8.1, updated JRE to Java 11. (`#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_)
|
||||
- Bumped dependency versions. (`#3288 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3288>`_)
|
||||
- Bumped red-lavalink version. (`#3290 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3290>`_)
|
||||
|
||||
|
||||
Documentation Changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Started the user guides covering cogs and the user interface of the bot. This includes, for now, a "Getting started" guide. (`#1734 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1734>`_)
|
||||
- Added documentation for PM2 support. (`#2105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2105>`_)
|
||||
- Updated linux install docs, adding sections for Fedora Linux, Debian/Raspbian Buster, and openSUSE. (`#2558 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2558>`_)
|
||||
- Created documentation covering what we consider a developer facing breaking change and the guarantees regarding them. (`#2882 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2882>`_)
|
||||
- Fixed the user parameter being labeled as ``discord.TextChannel`` instead of ``discord.abc.User`` in ``redbot.core.utils.predicates``. (`#2914 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2914>`_)
|
||||
- Updated towncrier info in the contribution guidelines to explain how to create a changelog for a standalone PR. (`#2915 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2915>`_)
|
||||
- Reworded the virtual environment guide to make it sound less scary. (`#2920 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2920>`_)
|
||||
- Driver docs no longer show twice. (`#2972 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2972>`_)
|
||||
- Added more information about ``redbot.core.utils.humanize_timedelta`` into the docs. (`#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_)
|
||||
- Added a direct link to the "Installing Red" section in "Installing using powershell and chocolatey". (`#2995 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2995>`_)
|
||||
- Updated Git PATH install (Windows), capitalized some words, stopped mentioning the launcher. (`#2998 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2998>`_)
|
||||
- Added autostart documentation for Red users who installed Red inside of a virtual environment. (`#3005 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3005>`_)
|
||||
- Updated the Cog Creation guide with a note regarding the Develop version as well as the folder layout for local cogs. (`#3021 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3021>`_)
|
||||
- Added links to the getting started guide at the end of installation guides. (`#3025 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3025>`_)
|
||||
- Added proper docstrings to enums that show in drivers docs. (`#3035 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3035>`_)
|
||||
- Discord.py doc links will now always use the docs for the currently used version of discord.py. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
|
||||
- Added ``|DPY_VERSION|`` substitution that will automatically get replaced by the current discord.py version. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
|
||||
- Added missing descriptions for function returns. (`#3054 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3054>`_)
|
||||
- Stopped overwriting the ``docs/prolog.txt`` file in ``conf.py``. (`#3082 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3082>`_)
|
||||
- Fixed some typos and wording, added MS Azure to the host list. (`#3083 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3083>`_)
|
||||
- Updated the docs footer copyright to 2019. (`#3105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3105>`_)
|
||||
- Added a deprecation note about shared libraries in the Downloader Framework docs. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
|
||||
- Updated the apikey framework documentation. Changed ``bot.get_shared_api_keys()`` to ``bot.get_shared_api_tokens()``. (`#3110 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3110>`_)
|
||||
- Added information about ``info.json``'s ``min_python_version`` key in Downloader Framework docs. (`#3124 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3124>`_)
|
||||
- Added an event reference for the ``on_red_api_tokens_update`` event in the Shared API Keys docs. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
|
||||
- Added notes explaining the best practices with config. (`#3149 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3149>`_)
|
||||
- Documented additional attributes in Context. (`#3151 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3151>`_)
|
||||
- Updated Windows docs with up to date dependency instructions. (`#3188 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3188>`_)
|
||||
- Added a "Publishing cogs for V3" document explaining how to make user's cogs work with Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
|
||||
- Fixed broken docs for ``redbot.core.commands.Context.react_quietly``. (`#3257 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3257>`_)
|
||||
- Updated copyright notices on License and RTD config to 2020. (`#3259 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3259>`_)
|
||||
- Added a line about setuptools and wheel. (`#3262 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3262>`_)
|
||||
- Ensured development builds are not advertised to the wrong audience. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
|
||||
- Clarified the usage intent of some of the chat formatting functions. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
|
||||
|
||||
|
||||
Admin
|
||||
-----
|
||||
|
||||
Breaking Changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- Changed ``[p]announce ignore`` and ``[p]announce channel`` to ``[p]announceset ignore`` and ``[p]announceset channel``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Changed ``[p]selfrole <role>`` to ``[p]selfrole add <role>``, changed ``[p]selfrole add`` to ``[p]selfroleset add`` , and changed ``[p]selfrole delete`` to ``[p]selfroleset remove``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed ``[p]announce`` failing after encountering an error attempting to message the bot owner. (`#3166 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3166>`_)
|
||||
- Improved the clarity of user facing messages when the user is not allowed to do something due to Discord hierarchy rules. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed some role managing commands not properly checking if Red had ``manage_roles`` perms before attempting to manage roles. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed ``[p]editrole`` commands not checking if roles to be edited are higher than Red's highest role before trying to edit them. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed ``[p]announce ignore`` and ``[p]announce channel`` not being able to be used by guild owners and administrators. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added custom issue messages for adding and removing roles, this makes it easier to create translations. (`#3016 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3016>`_)
|
||||
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- ``[p]playlist remove`` now removes the playlist url if the playlist was created through ``[p]playlist save``. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- Users are no longer able to accidentally overwrite existing playlist if a new one with the same name is created/renamed. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]audioset settings`` no longer shows lavalink JAR version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Fixed a ``KeyError: loadType`` when trying to play tracks. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset settings`` now uses ``ctx.is_owner()`` to check if the context author is the bot owner. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Fixed track indexs being off by 1 in ``[p]search``. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Fixed an issue where updating your Spotify and YouTube Data API tokens did not refresh them. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Fixed an issue where the blacklist was not being applied correctly. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Fixed an issue in ``[p]audioset restrictions blacklist list`` where it would call the list a ``Whitelist``. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Red's status is now properly cleared on emptydisconnect. (`#3050 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3050>`_)
|
||||
- Fixed a console spam caused sometimes when auto disconnect and auto pause are used. (`#3123 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3123>`_)
|
||||
- Fixed an error that was thrown when running ``[p]audioset dj``. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
|
||||
- Fixed a crash that could happen when the bot can't connect to the lavalink node. (`#3238 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3238>`_)
|
||||
- Restricted the number of songs shown in the queue to first 500 to avoid heartbeats. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
|
||||
- Added more cooldowns to playlist commands and restricted the queue and playlists to 10k songs to avoid bot errors. (`#3286 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3286>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- ``[p]playlist upload`` will now load playlists generated via ``[p]playlist download`` much faster if the playlist uses the new scheme. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist`` commands now can be used by everyone regardless of DJ settings, however it will respect DJ settings when creating/modifying playlists in the server scope. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- Spotify, Youtube Data, and Lavalink API calls can be cached to avoid repeated calls in the future, see ``[p]audioset cache``. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
|
||||
- Playlists will now start playing as soon as first track is loaded. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
|
||||
- ``[p]audioset localpath`` can set a path anywhere in your machine now. Note: This path needs to be visible by ``Lavalink.jar``. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue`` now works when there are no tracks in the queue, showing the track currently playing. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset settings`` now reports Red Lavalink version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Adding and removing reactions in Audio is no longer a blocking action. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- When shuffle is on, queue now shows the correct play order. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]seek`` and ``[p]skip`` can be used by user if they are the song requester while DJ mode is enabled and votes are disabled. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Adding a playlist and an album to a saved playlist skips tracks already in the playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- DJ mode is now turned off if the DJ role is deleted. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- When playing a localtrack, ``[p]play`` and ``[p]bumpplay`` no longer require the use of the prefix "localtracks\\".
|
||||
|
||||
Before: ``[p]bumpplay localtracks\\ENM\\501 - Inside The Machine.mp3``
|
||||
Now: ``[p]bumpplay ENM\\501 - Inside The Machine.mp3``
|
||||
Now nested folders: ``[p]bumpplay Parent Folder\\Nested Folder\\track.mp3`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Removed commas in explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
- Expanded local track support to all file formats (m3u, m4a, mp4, etc). (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Cooldowns are now reset upon failure of commands that have a cooldown timer. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Improved the explanation in the help string for ``[p]audioset emptydisconnect``. (`#3051 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3051>`_)
|
||||
- Added a typing indicator to playlist dedupe. (`#3058 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3058>`_)
|
||||
- Exposed clearer errors to users in the play commands. (`#3085 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3085>`_)
|
||||
- Better error handling when the player is unable to play multiple tracks in the sequence. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added support for nested folders in the localtrack folder. (`#270 <https://github.com/Cog-Creators/Red-DiscordBot/issues/270>`_)
|
||||
- Now auto pauses the queue when the voice channel is empty. (`#721 <https://github.com/Cog-Creators/Red-DiscordBot/issues/721>`_)
|
||||
- All Playlist commands now accept optional arguments, use ``[p]help playlist <subcommand>`` for more details. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist rename`` will now allow users to rename existing playlists. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist update`` will now allow users to update non-custom Playlists to the latest available tracks. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- There are now 3 different scopes of playlist. To define them, use the ``--scope`` argument.
|
||||
|
||||
``Global Playlist``
|
||||
|
||||
- These playlists will be available in all servers the bot is in.
|
||||
- These can be managed by the Bot Owner only.
|
||||
|
||||
``Server Playlist``
|
||||
|
||||
- These playlists will only be available in the server they were created in.
|
||||
- These can be managed by the Bot Owner, Guild Owner, Mods, Admins, DJs, and the Creator (if the DJ role is disabled).
|
||||
|
||||
``User Playlist``
|
||||
|
||||
- These playlists will be available in all servers both the bot and the creator are in.
|
||||
- These can be managed by the Bot Owner and Creator only. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]audioset cache`` can be used to set the cache level. **It's off by default**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]genre`` can be used to play spotify playlists. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset cacheage`` can be used to set the maximum age of an entry in the cache. **Default is 365 days**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset autoplay`` can be used to enable auto play once the queue runs out. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- New events dispatched by Audio.
|
||||
|
||||
- ``on_red_audio_track_start(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_enqueue(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_auto_play(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_queue_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_audio_disconnect(guild: discord.Guild)``
|
||||
- ``on_red_audio_skip_track(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue shuffle`` can be used to shuffle the queue manually. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue clean self`` can be used to remove all songs you requested from the queue. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset restrictions`` can be used to add or remove keywords which songs must have or are not allowed to have. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]playlist dedupe`` can be used to remove duplicated tracks from a playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]autoplay`` can be used to play a random song. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]bumpplay`` can be used to add a song to the front of the queue. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- ``[p]shuffle`` has an additional argument to tell the bot whether it should shuffle bumped tracks. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Added global whitelist/blacklist commands. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Added self-managed daily playlists in the GUILD scope, these are called "Daily playlist - YYYY-MM-DD" and auto delete after 7 days. (`#3199 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3199>`_)
|
||||
|
||||
|
||||
CustomCom
|
||||
---------
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- The group command ``[p]cc create`` can now be used to create simple CCs without specifying "simple". (`#1767 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1767>`_)
|
||||
- Added a query option for CC typehints for URL-based CCs. (`#3228 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3228>`_)
|
||||
- Now uses the ``humanize_list`` utility for iterable parameter results, e.g. ``{#:Role.members}``. (`#3277 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3277>`_)
|
||||
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Made the regex for repo names use raw strings to stop causing a ``DeprecationWarning`` for invalid escape sequences. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Downloader will no longer attempt to install cogs that are already installed. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Repo names can now only contain the characters listed in the help text (A-Z, 0-9, underscores, and hyphens). (`#2827 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2827>`_)
|
||||
- ``[p]findcog`` no longer attempts to find a cog for commands without a cog. (`#2902 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2902>`_)
|
||||
- Downloader will no longer attempt to install a cog with same name as another cog that is already installed. (`#2927 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2927>`_)
|
||||
- Added error handling for when a remote repository or branch is deleted, now notifies the which repository failed and continues to update the others. (`#2936 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2936>`_)
|
||||
- ``[p]cog install`` will no longer error if a cog has an empty install message. (`#3024 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3024>`_)
|
||||
- Made ``redbot.cogs.downloader.repo_manager.Repo.clean_url`` work with relative urls. This property is ``str`` type now. (`#3141 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3141>`_)
|
||||
- Fixed an error on repo add from empty string values for the ``install_msg`` info.json field. (`#3153 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3153>`_)
|
||||
- Disabled all git auth prompts when adding/updating a repo with Downloader. (`#3159 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3159>`_)
|
||||
- ``[p]findcog`` now properly works for cogs with less typical folder structure. (`#3177 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3177>`_)
|
||||
- ``[p]cog uninstall`` now fully unloads cog - the bot will not try to load it on next startup. (`#3179 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3179>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Downloader will now check if the Python and bot versions match requirements in ``info.json`` during update. (`#1866 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1866>`_)
|
||||
- ``[p]cog install`` now accepts multiple cog names. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- When passing cogs to ``[p]cog update``, it will now only update those cogs, not all cogs from the repo those cogs are from. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added error messages for failures when installing/reinstalling requirements and copying cogs and shared libraries. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- ``[p]findcog`` now uses sanitized urls (without HTTP Basic Auth fragments). (`#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_)
|
||||
- ``[p]repo info`` will now show the repo's url, branch, and authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
- ``[p]cog info`` will now show cog authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
- ``[p]findcog`` will now show the repo's branch. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added ``[p]repo update [repos]`` which updates repos without updating the cogs from them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog installversion <repo_name> <revision> <cogs>`` which installs cogs from a specified revision (commit, tag) of the given repo. When using this command, the cog will automatically be pinned. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog pin <cogs>`` and ``[p]cog unpin <cogs>`` for pinning cogs. Cogs that are pinned will not be updated when using update commands. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog checkforupdates`` that lists which cogs can be updated (including pinned cog) without updating them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog updateallfromrepos <repos>`` that updates all cogs from the given repos. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog updatetoversion <repo_name> <revision> [cogs]`` that updates all cogs or ones of user's choosing to chosen revision of the given repo. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog reinstallreqs`` that reinstalls cog requirements and shared libraries for all installed cogs. (`#3167 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3167>`_)
|
||||
|
||||
|
||||
Documentation Changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Added ``redbot.cogs.downloader.installable.InstalledModule`` to Downloader's framework docs. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Removed API References for Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
|
||||
|
||||
|
||||
Image
|
||||
-----
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Updated the giphycreds command to match the formatting of the other API commands. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
|
||||
|
||||
Mod
|
||||
---
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- ``[p]userinfo`` no longer breaks when a user has an absurd numbers of roles. (`#2910 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2910>`_)
|
||||
- Fixed Mod cog not recording username changes for ``[p]names`` and ``[p]userinfo`` commands. (`#2918 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2918>`_)
|
||||
- Fixed ``[p]modset deletedelay`` deleting non-command messages. (`#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_)
|
||||
- Fixed an error when reloading Mod. (`#2932 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2932>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Slowmode now accepts integer-only inputs as seconds. (`#2884 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2884>`_)
|
||||
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Defaults are now cleared properly when clearing all rules. (`#3037 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3037>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Better explained the usage of commands with the ``<who_or_what>`` argument. (`#2991 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2991>`_)
|
||||
|
||||
|
||||
Streams
|
||||
-------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed a ``TypeError`` in the ``TwitchStream`` class when calling Twitch client_id from Red shared APIs tokens. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
|
||||
- Changed the ``stream_alert`` function for Twitch alerts to make it work with how the ``TwitchStream`` class works now. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
|
||||
|
||||
Trivia
|
||||
------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed a typo in Ahsoka Tano's name in the Starwars trivia list. (`#2909 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2909>`_)
|
||||
- Fixed a bug where ``[p]trivia leaderboard`` failed to run. (`#2911 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2911>`_)
|
||||
- Fixed a typo in the Greek mythology trivia list regarding Hermes' staff. (`#2994 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2994>`_)
|
||||
- Fixed a question in the Overwatch trivia list that accepted blank responses. (`#2996 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2996>`_)
|
||||
- Fixed questions and answers that were incorrect in the Clash Royale trivia list. (`#3236 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3236>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added trivia lists for Prince and Michael Jackson lyrics. (`#12 <https://github.com/Cog-Creators/Red-DiscordBot/issues/12>`_)
|
||||
@@ -1,910 +0,0 @@
|
||||
.. 3.3.x Changelogs
|
||||
|
||||
Redbot 3.3.12 (2020-08-18)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`Dav-Git`, :ghuser:`douglas-cpp`, :ghuser:`flaree`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MeatyChunks`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`, :ghuser:`zephyrkul`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Red now logs clearer error if it can't find package to load in any cog path during bot startup (:issue:`4079`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]mute voice`` and ``[p]unmute voice`` now take action instantly if bot has Move Members permission (:issue:`4064`)
|
||||
- Added typing to ``[p](un)mute guild`` to indicate that mute is being processed (:issue:`4066`, :issue:`4172`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Improve error messages for invalid channel names/IDs (:issue:`4147`, :issue:`4148`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Added ``whosthatpokemon2`` trivia containing Pokémons from 2nd generation (:issue:`4102`)
|
||||
- Added ``whosthatpokemon3`` trivia containing Pokémons from 3rd generation (:issue:`4141`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Updated features list in ``[p]serverinfo`` with the latest changes from Discord (:issue:`4116`)
|
||||
- Simple version of ``[p]serverinfo`` now shows info about more detailed ``[p]serverinfo 1`` (:issue:`4121`)
|
||||
|
||||
|
||||
Redbot 3.3.11 (2020-08-10)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`douglas-cpp`, :ghuser:`Drapersniper`, :ghuser:`Flame`, :ghuser:`jack1142`, :ghuser:`MeatyChunks`, :ghuser:`Vexed01`, :ghuser:`yamikaitou`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Audio should now work again on all voice regions (:issue:`4162`, :issue:`4168`)
|
||||
- Removed an edge case where an unfriendly error message was sent in Audio cog (:issue:`3879`)
|
||||
|
||||
Cleanup
|
||||
*******
|
||||
|
||||
- Fixed a bug causing ``[p]cleanup`` commands to clear all messages within last 2 weeks when ``0`` is passed as the amount of messages to delete (:issue:`4114`, :issue:`4115`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- ``[p]cc show`` now sends an error message when command with the provided name couldn't be found (:issue:`4108`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- ``[p]findcog`` no longer fails for 3rd-party cogs without any author (:issue:`4032`, :issue:`4042`)
|
||||
- Update commands no longer crash when a different repo is added under a repo name that was once used (:issue:`4086`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- ``[p]permissions removeserverrule`` and ``[p]permissions removeglobalrule`` no longer error when trying to remove a rule that doesn't exist (:issue:`4028`, :issue:`4036`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- ``[p]warn`` now sends an error message (instead of no feedback) when an unregistered reason is used by someone who doesn't have Administrator permission (:issue:`3839`, :issue:`3840`)
|
||||
|
||||
|
||||
Redbot 3.3.10 (2020-07-09)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`bobloy`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`Injabie3`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Added information about internally managed jar to ``[p]audioset info`` (:issue:`3915`)
|
||||
- Updated to Lavaplayer 1.3.50
|
||||
- Twitch playback and YouTube searching should be functioning again.
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Fixed delayed help when ``[p]set deletedelay`` is enabled (:issue:`3884`, :issue:`3883`)
|
||||
- Bumped the Discord.py requirement from 1.3.3 to 1.3.4 (:issue:`4053`)
|
||||
- Added settings view commands for nearly all cogs. (:issue:`4041`)
|
||||
- Added more strings to be fully translatable by i18n. (:issue:`4044`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Added ``[p]cog listpinned`` subcommand to see currently pinned cogs (:issue:`3974`)
|
||||
- Fixed unnecessary typing when running downloader commands (:issue:`3964`, :issue:`3948`)
|
||||
- Added embed version of ``[p]findcog`` (:issue:`3965`, :issue:`3944`)
|
||||
- Fixed ``[p]findcog`` not differentiating between core cogs and local cogs(:issue:`3969`, :issue:`3966`)
|
||||
|
||||
Filter
|
||||
******
|
||||
|
||||
- Added ``[p]filter list`` to show filtered words, and removed DMs when no subcommand was passed (:issue:`3973`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Updated instructions for obtaining and setting the GIPHY API key (:issue:`3994`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- Added option to delete messages within the passed amount of days with ``[p]tempban`` (:issue:`3958`)
|
||||
- Added the ability to permanently ban a temporary banned user with ``[p]hackban`` (:issue:`4025`)
|
||||
- Fixed the passed reason not being used when using ``[p]tempban`` (:issue:`3958`)
|
||||
- Fixed invite being sent with ``[p]tempban`` even when no invite was set (:issue:`3991`)
|
||||
- Prevented an issue whereby the author may lock him self out of using the bot via whitelists (:issue:`3903`)
|
||||
- Reduced the number of API calls made to the storage APIs (:issue:`3910`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Uploaded YAML files now accept integer commands without quotes (:issue:`3987`, :issue:`3185`)
|
||||
- Uploaded YAML files now accept command rules with empty dictionaries (:issue:`3987`, :issue:`3961`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed streams cog sending multiple owner notifications about twitch secret not set (:issue:`3901`, :issue:`3587`)
|
||||
- Fixed old bearer tokens not being invalidated when the API key is updated (:issue:`3990`, :issue:`3917`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Fixed URLs in ``whosthatpokemon`` (:issue:`3975`, :issue:`3023`)
|
||||
- Fixed trivia files ``leagueults`` and ``sports`` (:issue:`4026`)
|
||||
- Updated ``greekmyth`` to include more answer variations (:issue:`3970`)
|
||||
- Added new ``lotr`` trivia list (:issue:`3980`)
|
||||
- Added new ``r6seige`` trivia list (:issue:`4026`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
- Added the utility functions ``map``, ``find``, and ``next`` to ``AsyncIter`` (:issue:`3921`, :issue:`3887`)
|
||||
- Updated deprecation times for ``APIToken``, and loops being passed to various functions to the first minor release (represented by ``X`` in ``3.X.0``) after 2020-08-05 (:issue:`3608`)
|
||||
- Updated deprecation warnings for shared libs to reflect that they have been moved for an undefined time (:issue:`3608`)
|
||||
- Added new ``discord.com`` domain to ``INVITE_URL_RE`` common filter (:issue:`4012`)
|
||||
- Fixed incorrect role mention regex in ``MessagePredicate`` (:issue:`4030`)
|
||||
- Vendor the ``discord.ext.menus`` module (:issue:`4039`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Improved error responses for when Modlog and Autoban on mention spam were already disabled (:issue:`3951`, :issue:`3949`)
|
||||
- Clarified that ``[p]embedset user`` only affects commands executed in DMs (:issue:`3972`, :issue:`3953`)
|
||||
- Added link to Getting Started guide if the bot was not in any guilds (:issue:`3906`)
|
||||
- Fixed exceptions being ignored or not sent to log files in special cases (:issue:`3895`)
|
||||
- Added the option of using dots in the instance name when creating your instances (:issue:`3920`)
|
||||
- Added a confirmation when using hyphens in instance names to discourage the use of them (:issue:`3920`)
|
||||
- Fixed migration owner notifications being sent even when migration was not necessary (:issue:`3911`. :issue:`3909`)
|
||||
- Fixed commands being translated where they should not be (:issue:`3938`, :issue:`3919`)
|
||||
- Fixed grammar errors and added full stopts in ``core_commands.py`` (:issue:`4023`)
|
||||
|
||||
|
||||
Redbot 3.3.9 (2020-06-12)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`Predeactor`, :ghuser:`Vexed01`
|
||||
|
|
||||
| **Read before updating**:
|
||||
| 1. Bot owners can no longer restrict access to some commands in Permissions cog using global permissions rules. Look at `Permissions changelog <important-339-2>` for full details.
|
||||
| 2. There's been a change in behavior of warning messages. Look at `Warnings changelog <important-339-1>` for full details.
|
||||
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Security
|
||||
********
|
||||
|
||||
**NOTE**: If you can't update immediately, we recommend disabling the affected command until you can.
|
||||
|
||||
- **Mod** - ``[p]tempban`` now properly respects Discord's hierarchy rules (:issue:`3957`)
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- ``[p]info`` command can now be used when bot doesn't have Embed Links permission (:issue:`3907`, :issue:`3102`)
|
||||
- Fixed ungraceful error that happened in ``[p]set custominfo`` when provided text was too long (:issue:`3923`)
|
||||
- Red's start up message now shows storage type (:issue:`3935`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Audio now properly ignores streams when max length is enabled (:issue:`3878`, :issue:`3877`)
|
||||
- Commands that should work in DMs no longer error (:issue:`3880`)
|
||||
|
||||
Filter
|
||||
******
|
||||
|
||||
- Fixed behavior of detecting quotes in commands for adding/removing filtered words (:issue:`3925`)
|
||||
|
||||
.. _important-339-2:
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- **Both global and server rules** can no longer prevent guild owners from accessing commands for changing server rules. Bot owners can still use ``[p]command disable`` if they wish to completely disable any command in Permissions cog (:issue:`3955`, :issue:`3107`)
|
||||
|
||||
Full list of affected commands:
|
||||
|
||||
- ``[p]permissions acl getserver``
|
||||
- ``[p]permissions acl setserver``
|
||||
- ``[p]permissions acl updateserver``
|
||||
- ``[p]permissions addserverrule``
|
||||
- ``[p]permissions removeserverrule``
|
||||
- ``[p]permissions setdefaultserverrule``
|
||||
- ``[p]permissions clearserverrules``
|
||||
- ``[p]permissions canrun``
|
||||
- ``[p]permissions explain``
|
||||
|
||||
.. _important-339-1:
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Warnings sent to users don't show the moderator who warned the user by default now. Newly added ``[p]warningset showmoderators`` command can be used to switch this behaviour (:issue:`3781`)
|
||||
- Warn channel functionality has been fixed (:issue:`3781`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Added `bot.set_prefixes() <RedBase.set_prefixes()>` method that allows developers to set global/server prefixes (:issue:`3890`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added Oracle Cloud to free hosting section in :ref:`host-list` (:issue:`3916`)
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Added missing help message for Downloader, Reports and Streams cogs (:issue:`3892`)
|
||||
- **Core Bot** - cooldown in ``[p]contact`` no longer applies when it's used without any arguments (:issue:`3942`)
|
||||
- **Core Bot** - improved instructions on obtaining user ID in help of ``[p]dm`` command (:issue:`3946`)
|
||||
- **Alias** - ``[p]alias global`` group, ``[p]alias help``, and ``[p]alias show`` commands can now be used in DMs (:issue:`3941`, :issue:`3940`)
|
||||
- **Audio** - Typo fix (:issue:`3889`, :issue:`3900`)
|
||||
- **Audio** - Fixed ``[p]audioset autoplay`` being available in DMs (:issue:`3899`)
|
||||
- **Bank** - ``[p]bankset`` now displays bank's scope (:issue:`3954`)
|
||||
- **Mod** - Preemptive fix for d.py 1.4 (:issue:`3891`)
|
||||
|
||||
|
||||
Redbot 3.3.8 (2020-05-29)
|
||||
==================================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Bakersbakebread`, :ghuser:`DariusStClair`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`qaisjp`, :ghuser:`Tobotimus`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Important fixes to how PostgreSQL data backend saves data in bulks (:issue:`3829`)
|
||||
- Fixed ``[p]localwhitelist`` and ``[p]localblacklist`` commands (:issue:`3857`)
|
||||
- Red now includes information on how to update when sending information about being out of date (:issue:`3744`)
|
||||
- Using backslashes in bot's username/nickname no longer causes issues (:issue:`3826`, :issue:`3825`)
|
||||
|
||||
Admin
|
||||
*****
|
||||
|
||||
- Fixed server lock (:issue:`3815`, :issue:`3814`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- Added pagination to ``[p]alias list`` and ``[p]alias global list`` to avoid errors for users with a lot of aliases (:issue:`3844`, :issue:`3834`)
|
||||
- ``[p]alias help`` should now work more reliably (:issue:`3864`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Twitch playback is functional once again (:issue:`3873`)
|
||||
- Recent errors with YouTube playback should be resolved (:issue:`3873`)
|
||||
- Added new option (settable with ``[p]audioset lyrics``) that makes Audio cog prefer (prioritize) tracks with lyrics (:issue:`3519`)
|
||||
- Added global daily (historical) queues (:issue:`3518`)
|
||||
- Added ``[p]audioset countrycode`` that allows to set the country code for spotify searches (:issue:`3528`)
|
||||
- Fixed ``[p]local search`` (:issue:`3528`, :issue:`3501`)
|
||||
- Local folders with special characters should work properly now (:issue:`3528`, :issue:`3467`)
|
||||
- Audio no longer fails to take the last spot in the voice channel with user limit (:issue:`3528`)
|
||||
- ``[p]local play`` no longer enqueues tracks from nested folders (:issue:`3528`)
|
||||
- Fixed ``[p]playlist dedupe`` not removing tracks (:issue:`3518`)
|
||||
- ``[p]disconnect`` now allows to disconnect if both DJ mode and voteskip aren't enabled (:issue:`3502`, :issue:`3485`)
|
||||
- Many UX improvements and fixes, including, among other things:
|
||||
|
||||
- Creating playlists without explicitly passing ``-scope`` no longer causes errors (:issue:`3500`)
|
||||
- ``[p]playlist list`` now shows all accessible playlists if ``--scope`` flag isn't used (:issue:`3518`)
|
||||
- ``[p]remove`` now also accepts a track URL in addition to queue index (:issue:`3201`)
|
||||
- ``[p]playlist upload`` now accepts a playlist file uploaded in the message with a command (:issue:`3251`)
|
||||
- Commands now send friendly error messages for common errors like lost Lavalink connection or bot not connected to voice channel (:issue:`3503`, :issue:`3528`, :issue:`3353`, :issue:`3712`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- ``[p]customcom create`` no longer allows spaces in custom command names (:issue:`3816`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]userinfo`` now shows default avatar when no avatar is set (:issue:`3819`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Fixed (again) ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3805`, :issue:`3784`, :issue:`3778`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Commands for settings ACL using yaml files now properly works on PostgreSQL data backend (:issue:`3829`, :issue:`3796`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Warnings cog no longer allows to warn bot users (:issue:`3855`, :issue:`3854`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
| **Important:**
|
||||
| If you're using RPC, please see the full annoucement about current state of RPC in main Red server
|
||||
`by clicking here <https://discord.com/channels/133049272517001216/411381123101491200/714560168465137694>`_.
|
||||
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Red now inherits from `discord.ext.commands.AutoShardedBot` for better compatibility with code expecting d.py bot (:issue:`3822`)
|
||||
- Libraries using ``pkg_resources`` (like ``humanize`` or ``google-api-python-client``) that were installed through Downloader should now work properly (:issue:`3843`)
|
||||
- All bot owner IDs can now be found under ``bot.owner_ids`` attribute (:issue:`3793`)
|
||||
|
||||
- Note: If you want to use this on bot startup (e.g. in cog's initialisation), you need to await ``bot.wait_until_red_ready()`` first
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added information about provisional status of RPC (:issue:`3862`)
|
||||
- Revised install instructions (:issue:`3847`)
|
||||
- Improved navigation in `document about updating Red <update_red>` (:issue:`3856`, :issue:`3849`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Few clarifications and typo fixes in few command help docstrings (:issue:`3817`, :issue:`3823`, :issue:`3837`, :issue:`3851`, :issue:`3861`)
|
||||
- **Downloader** - Downloader no longer removes the repo when it fails to load it (:issue:`3867`)
|
||||
|
||||
|
||||
Redbot 3.3.7 (2020-04-28)
|
||||
=========================
|
||||
|
||||
This is a hotfix release fixing issue with generating messages for new cases in Modlog.
|
||||
|
||||
|
||||
Redbot 3.3.6 (2020-04-27)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Drapersniper`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`TrustyJAID`, :ghuser:`yamikaitou`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Converting from and to Postgres driver with ``redbot-setup convert`` have been fixed (:issue:`3714`, :issue:`3115`)
|
||||
- Fixed big delays in commands that happened when the bot was owner-less (or if it only used co-owners feature) and command caller wasn't the owner (:issue:`3782`)
|
||||
- Various optimizations
|
||||
|
||||
- Reduced calls to data backend when loading bot's commands (:issue:`3764`)
|
||||
- Reduced calls to data backend when showing help for cogs/commands (:issue:`3766`)
|
||||
- Improved performance for bots with big amount of guilds (:issue:`3767`)
|
||||
- Mod cog no longer fetches guild's bans every 60 seconds when handling unbanning for tempbans (:issue:`3783`)
|
||||
- Reduced the bot load for messages starting with a prefix when fuzzy search is disabled (:issue:`3718`)
|
||||
- Aliases in Alias cog are now cached for better performance (:issue:`3788`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- ``[p]set avatar`` now supports setting avatar using attachment (:issue:`3747`)
|
||||
- Added ``[p]set avatar remove`` subcommand for removing bot's avatar (:issue:`3757`)
|
||||
- Fixed list of ignored channels that is shown in ``[p]ignore``/``[p]unignore`` (:issue:`3746`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Age-restricted tracks, live streams, and mix playlists from YouTube should work in Audio again (:issue:`3791`)
|
||||
- Soundcloud's sets and playlists with more than 50 tracks should work in Audio again (:issue:`3791`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- Added ``[p]cc raw`` command that gives you the raw response of a custom command for ease of copy pasting (:issue:`3795`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Fixed ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3784`, :issue:`3778`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed incorrect stream URLs for Twitch channels that have localised display name (:issue:`3773`, :issue:`3772`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Fixed the error in ``[p]trivia stop`` that happened when there was no ongoing trivia session in the channel (:issue:`3774`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Updated ``leagueoflegends`` list with new changes to League of Legends (`b8ac70e <https://github.com/Cog-Creators/Red-DiscordBot/commit/b8ac70e59aa1328f246784f14f992d6ffe00d778>`_)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- Added `redbot.core.utils.AsyncIter` utility class which allows you to wrap regular iterable into async iterator yielding items and sleeping for ``delay`` seconds every ``steps`` items (:issue:`3767`, :issue:`3776`)
|
||||
- `bold()`, `italics()`, `strikethrough()`, and `underline()` now accept ``escape_formatting`` argument that can be used to disable escaping of markdown formatting in passed text (:issue:`3742`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added `document about updating Red <update_red>` (:issue:`3790`)
|
||||
- ``pyenv`` instructions will now update ``pyenv`` if it's already installed (:issue:`3740`)
|
||||
- Updated Python version in ``pyenv`` instructions (:issue:`3740`)
|
||||
- Updated install docs to include Ubuntu 20.04 (:issue:`3792`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- **Config** - JSON driver will now properly have only one lock per cog name (:issue:`3780`)
|
||||
- **Core Commands** - ``[p]debuginfo`` now shows used storage type (:issue:`3794`)
|
||||
- **Trivia** - Corrected spelling of Compact Disc in ``games`` list (:issue:`3759`, :issue:`3758`)
|
||||
|
||||
|
||||
Redbot 3.3.5 (2020-04-09)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`jack1142`, :ghuser:`Kowlin`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- "Outdated" field no longer shows in ``[p]info`` when Red is up-to-date (:issue:`3730`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- Fixed regression in ``[p]alias add`` that caused it to reject commands containing arguments (:issue:`3734`)
|
||||
|
||||
|
||||
Redbot 3.3.4 (2020-04-05)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`jack1142`, :ghuser:`kennnyshiwa`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Fixed checks related to bank's global state that were used in commands in Bank, Economy and Trivia cogs (:issue:`3707`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- ``[p]alias add`` now sends an error when command user tries to alias doesn't exist (:issue:`3710`, :issue:`3545`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Bump dependencies, including update to discord.py 1.3.3 (:issue:`3723`)
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- `redbot.core.utils.common_filters.filter_invites` now filters ``discord.io/discord.li`` invites links (:issue:`3717`)
|
||||
- Fixed false-positives in `redbot.core.utils.common_filters.filter_invites` (:issue:`3717`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Versions of pre-requirements are now included in Windows install guide (:issue:`3708`)
|
||||
|
||||
|
||||
Redbot 3.3.3 (2020-03-28)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`AnonGuy`, :ghuser:`Dav-Git`, :ghuser:`FancyJesse`, :ghuser:`Ianardo-DiCaprio`, :ghuser:`jack1142`, :ghuser:`kennnyshiwa`, :ghuser:`Kowlin`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`TrustyJAID`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Delete delay for command messages has been moved from Mod cog to Core (:issue:`3638`, :issue:`3636`)
|
||||
- Fixed various bugs with blacklist and whitelist (:issue:`3643`, :issue:`3642`)
|
||||
- Added ``[p]set regionalformat`` command that allows users to set regional formatting that is different from bot's locale (:issue:`3677`, :issue:`3588`)
|
||||
- ``[p]set locale`` allows any valid locale now, not just locales for which Red has translations (:issue:`3676`, :issue:`3596`)
|
||||
- Permissions for commands in Bank, Economy and Trivia cogs can now be overridden by Permissions cog (:issue:`3672`, :issue:`3233`)
|
||||
- Outages of ``pypi.org`` no longer prevent the bot from starting (:issue:`3663`)
|
||||
- Fixed formatting of help strings in fuzzy search results (:issue:`3673`, :issue:`3507`)
|
||||
- Fixed few deprecation warnings related to menus and uvloop (:issue:`3644`, :issue:`3700`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- ``[p]set game`` no longer errors when trying to clear the status (:issue:`3630`, :issue:`3628`)
|
||||
- All owner notifcations in Core now use proper prefixes in messages (:issue:`3632`)
|
||||
- Added ``[p]set playing`` and ``[p]set streaming`` aliases for respectively ``[p]set game`` and ``[p]set stream`` (:issue:`3646`, :issue:`3590`)
|
||||
|
||||
ModLog
|
||||
******
|
||||
|
||||
- Modlog's cases now keep last known username to prevent losing that information from case's message on edit (:issue:`3674`, :issue:`3443`)
|
||||
|
||||
CustomCom
|
||||
*********
|
||||
|
||||
- Added ``[p]cc search`` command that allows users to search through created custom commands (:issue:`2573`)
|
||||
|
||||
Cleanup
|
||||
*******
|
||||
|
||||
- Added ``[p]cleanup spam`` command that deletes duplicate messages from the last X messages and keeps only one copy (:issue:`3688`)
|
||||
- Removed regex support in ``[p]cleanup self`` (:issue:`3704`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- ``[p]cog checkforupdates`` now includes information about cogs that can't be installed due to Red/Python version requirements (:issue:`3678`, :issue:`3448`)
|
||||
|
||||
General
|
||||
*******
|
||||
|
||||
- Added more detailed mode to ``[p]serverinfo`` command that can be accessed with ``[p]serverinfo 1`` (:issue:`2382`, :issue:`3659`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Users can now specify how many images should be returned in ``[p]imgur search`` and ``[p]imgur subreddit`` using ``[count]`` argument (:issue:`3667`, :issue:`3044`)
|
||||
- ``[p]imgur search`` and ``[p]imgur subreddit`` now return one image by default (:issue:`3667`, :issue:`3044`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]userinfo`` now shows user's activities (:issue:`3669`)
|
||||
- ``[p]userinfo`` now shows status icon near the username (:issue:`3669`)
|
||||
- Muting no longer fails if user leaves while applying overwrite (:issue:`3627`)
|
||||
- Fixed error that happened when Mod cog was loaded for the first time during bot startup (:issue:`3632`, :issue:`3626`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Commands for setting default rules now error when user tries to deny access to command designated as being always available (:issue:`3504`, :issue:`3465`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed an error that happened when no game was set on Twitch stream (:issue:`3631`)
|
||||
- Preview picture for YouTube stream alerts is now bigger (:issue:`3689`, :issue:`3685`)
|
||||
- YouTube channels with a livestream that doesn't have any current viewer are now properly showing as streaming (:issue:`3690`)
|
||||
- Failures in Twitch API authentication are now logged (:issue:`3657`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Added ``[p]triviaset custom upload/delete/list`` commands for managing custom trivia lists from Discord (:issue:`3420`, :issue:`3307`)
|
||||
- Trivia sessions no longer error on payout when winner's balance would exceed max balance (:issue:`3666`, :issue:`3584`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Sending warnings to warned user can now be disabled with ``[p]warnset toggledm`` command (:issue:`2929`, :issue:`2800`)
|
||||
- Added ``[p]warnset warnchannel`` command that allows to set a channel where warnings should be sent to instead of the channel command was called in (:issue:`2929`, :issue:`2800`)
|
||||
- Added ``[p]warnset togglechannel`` command that allows to disable sending warn message in guild channel (:issue:`2929`, :issue:`2800`)
|
||||
- ``[p]warn`` now tells the moderator when bot wasn't able to send the warning to the user (:issue:`3653`, :issue:`3633`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Deprecation warnings issued by Red now use correct stack level so that the cog developers can find the cause of them (:issue:`3644`)
|
||||
|
||||
Dev Cog
|
||||
*******
|
||||
|
||||
- Add ``__name__`` to environment's globals (:issue:`3649`, :issue:`3648`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Fixed install instructions for Mac (:issue:`3675`, :issue:`3436`)
|
||||
- Windows install instructions now use ``choco upgrade`` commands instead of ``choco install`` to ensure up-to-date packages (:issue:`3684`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- **Core Bot** - Command errors (i.e. command on cooldown, dm-only and guild-only commands, etc) can now be translated (:issue:`3665`, :issue:`2988`)
|
||||
- **Core Bot** - ``redbot-setup`` now prints link to Getting started guide at the end of the setup (:issue:`3027`)
|
||||
- **Core Bot** - Whitelist and blacklist commands now properly require passing at least one user (or role in case of local whitelist/blacklist) (:issue:`3652`, :issue:`3645`)
|
||||
- **Downloader** - Fix misleading error appearing when repo name is already taken in ``[p]repo add`` (:issue:`3695`)
|
||||
- **Downloader** - Improved error messages for unexpected errors in ``[p]repo add`` (:issue:`3656`)
|
||||
- **Downloader** - Prevent encoding errors from crashing ``[p]cog update`` (:issue:`3639`, :issue:`3637`)
|
||||
- **Trivia** - Non-finite numbers can no longer be passed to ``[p]triviaset timelimit``, ``[p]triviaset stopafter`` and ``[p]triviaset payout`` (:issue:`3668`, :issue:`3583`)
|
||||
- **Utility Functions** - `redbot.core.utils.menus.menu()` now checks permissions *before* trying to clear reactions (:issue:`3589`, :issue:`3145`)
|
||||
|
||||
|
||||
Redbot 3.3.2 (2020-02-28)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`chasehult`, :ghuser:`Dav-Git`, :ghuser:`DiscordLiz`, :ghuser:`Drapersniper`, :ghuser:`fixator10`, :ghuser:`Flame442`, :ghuser:`Hedlund01`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`mikeshardmind`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`trundleroo`, :ghuser:`TrustyJAID`, :ghuser:`zephyrkul`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Ignored guilds/channels and whitelist/blacklist are now cached for performance (:issue:`3472`)
|
||||
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
|
||||
- ``[p]ignore channel`` command can now also ignore channel categories (:issue:`3472`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- Core cogs will now send bot mention prefix properly in places where discord doesn't render mentions (:issue:`3579`, :issue:`3591`, :issue:`3499`)
|
||||
- Fix a bug with ``[p]blacklist add`` that made it impossible to blacklist users that bot doesn't share a server with (:issue:`3472`, :issue:`3220`)
|
||||
- Improve user experience of ``[p]set game/listening/watching/`` commands (:issue:`3562`)
|
||||
- Add ``[p]licenceinfo`` alias for ``[p]licenseinfo`` command to conform with non-American English (:issue:`3460`)
|
||||
|
||||
Admin
|
||||
*****
|
||||
|
||||
- ``[p]announce`` will now only send error message if an actual errors occurs (:issue:`3514`, :issue:`3513`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- ``[p]alias help`` will now properly work in non-English locales (:issue:`3546`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Users should be able to play age-restricted tracks from YouTube again (:issue:`3620`)
|
||||
|
||||
Economy
|
||||
*******
|
||||
|
||||
- Next payday time will now be adjusted for users when payday time is changed (:issue:`3496`, :issue:`3438`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Downloader will no longer fail because of invalid ``info.json`` files (:issue:`3533`, :issue:`3456`)
|
||||
- Add better logging of errors when Downloader fails to add a repo (:issue:`3558`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Fix load error for users that updated Red from version lower than 3.1 to version 3.2 or newer (:issue:`3617`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]hackban`` and ``[p]unban`` commands support user mentions now (:issue:`3524`)
|
||||
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fix stream alerts for Twitch (:issue:`3487`)
|
||||
- Significantly reduce the quota usage for YouTube stream alerts (:issue:`3237`)
|
||||
- Add ``[p]streamset timer`` command which can be used to control how often the cog checks for live streams (:issue:`3237`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Add better handling for errors in trivia session (:issue:`3606`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Remove empty answers in trivia lists (:issue:`3581`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Users can now pass a reason to ``[p]unwarn`` command (:issue:`3490`, :issue:`3093`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Updated all our dependencies - we're using discord.py 1.3.2 now (:issue:`3609`)
|
||||
- Add traceback logging to task exception handling (:issue:`3517`)
|
||||
- Developers can now create a command from an async function wrapped in `functools.partial` (:issue:`3542`)
|
||||
- Bot will now show deprecation warnings in logs (:issue:`3527`, :issue:`3615`)
|
||||
- Subcommands of command group with ``invoke_without_command=True`` will again inherit this group's checks (:issue:`3614`)
|
||||
|
||||
Config
|
||||
******
|
||||
|
||||
- Fix Config's singletons (:issue:`3137`, :issue:`3136`)
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- Add clearer error when page is of a wrong type in `redbot.core.utils.menus.menu()` (:issue:`3571`)
|
||||
|
||||
Dev Cog
|
||||
*******
|
||||
|
||||
- Allow for top-level `await`, `async for` and `async with` in ``[p]debug`` and ``[p]repl`` commands (:issue:`3508`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Downloader will now replace ``[p]`` with clean prefix same as it does in help command (:issue:`3592`)
|
||||
- Add schema validation to ``info.json`` file processing - it should now be easier to notice any issues with those files (:issue:`3533`, :issue:`3442`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Add guidelines for Cog Creators in `guide_cog_creation` document (:issue:`3568`)
|
||||
- Restructure virtual environment instructions to improve user experience (:issue:`3495`, :issue:`3411`, :issue:`3412`)
|
||||
- Getting started guide now explain use of quotes for arguments with spaces (:issue:`3555`, :issue:`3111`)
|
||||
- ``latest`` version of docs now displays a warning about possible differences from current stable release (:issue:`3570`)
|
||||
- Make systemd guide clearer on obtaining username and python path (:issue:`3537`, :issue:`3462`)
|
||||
- Indicate instructions for different venv types in systemd guide better (:issue:`3538`)
|
||||
- Service file in `autostart_systemd` now also waits for network connection to be ready (:issue:`3549`)
|
||||
- Hide alias of ``randomize_colour`` in docs (:issue:`3491`)
|
||||
- Add separate headers for each event predicate class for better navigation (:issue:`3595`, :issue:`3164`)
|
||||
- Improve wording of explanation for ``required_cogs`` key in `guide_publish_cogs` (:issue:`3520`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Use more reliant way of checking if command is bot owner only in ``[p]warnaction`` (Warnings cog) (:issue:`3516`, :issue:`3515`)
|
||||
- Update PyPI domain in ``[p]info`` and update checker (:issue:`3607`)
|
||||
- Stop using deprecated code in core (:issue:`3610`)
|
||||
|
||||
|
||||
Redbot 3.3.1 (2020-02-05)
|
||||
=========================
|
||||
|
||||
|
||||
Core Bot
|
||||
--------
|
||||
|
||||
- Add a cli flag for setting a max size of message cache
|
||||
- Allow to edit prefix from command line using ``redbot --edit``.
|
||||
- Some functions have been changed to no longer use deprecated asyncio functions
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- The short help text for dm has been made more useful
|
||||
- dm no longer allows owners to have the bot attempt to DM itself
|
||||
|
||||
Utils
|
||||
-----
|
||||
|
||||
- Passing the event loop explicitly in utils is deprecated (Removal in 3.4)
|
||||
|
||||
Mod Cog
|
||||
-------
|
||||
|
||||
- Hackban now works properly without being provided a number of days
|
||||
|
||||
Documentation Changes
|
||||
---------------------
|
||||
|
||||
- Add ``-e`` flag to ``journalctl`` command in systemd guide so that it takes the user to the end of logs automatically.
|
||||
- Added section to install docs for CentOS 8
|
||||
- Improve usage of apt update in docs
|
||||
|
||||
Redbot 3.3.0 (2020-01-26)
|
||||
=========================
|
||||
|
||||
Core Bot
|
||||
--------
|
||||
|
||||
- The bot's description is now configurable.
|
||||
- We now use discord.py 1.3.1, this comes with added teams support.
|
||||
- The commands module has been slightly restructured to provide more useful data to developers.
|
||||
- Help is now self consistent in the extra formatting used.
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- Slowmode should no longer error on nonsensical time quantities.
|
||||
- Embed use can be configured per channel as well.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
- We've made some small fixes to inaccurate instructions about installing with pyenv.
|
||||
- Notes about deprecating in 3.3 have been altered to 3.4 to match the intended timeframe.
|
||||
|
||||
Admin
|
||||
-----
|
||||
|
||||
- Gives feedback when adding or removing a role doesn't make sense.
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
- Playlist finding is more intuitive.
|
||||
- disconnect and repeat commands no longer interfere with eachother.
|
||||
|
||||
CustomCom
|
||||
---------
|
||||
|
||||
- No longer errors when exiting an interactive menu.
|
||||
|
||||
Cleanup
|
||||
-------
|
||||
|
||||
- A rare edge case involving messages which are deleted during cleanup and are the only message was fixed.
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
- Some user facing messages were improved.
|
||||
- Downloader's initialization can no longer time out at startup.
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
- Roll command will no longer attempt to roll obscenely large amounts.
|
||||
|
||||
Mod
|
||||
---
|
||||
|
||||
- You can set a default amount of days to clean up when banning.
|
||||
- Ban and hackban now use that default.
|
||||
- Users can now optionally be DMed their ban reason.
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
- Now has stronger enforcement of prioritizing botwide settings.
|
||||
@@ -1,5 +1,4 @@
|
||||
.. CustomCommands Cog Reference
|
||||
.. _cog_customcom:
|
||||
|
||||
============================
|
||||
CustomCommands Cog Reference
|
||||
|
||||
9
docs/cog_downloader.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
.. Downloader Cog Reference
|
||||
|
||||
Downloader Cog Reference
|
||||
========================
|
||||
|
||||
.. automodule:: redbot.cogs.downloader
|
||||
|
||||
.. autoclass:: redbot.cogs.downloader.downloader.Downloader
|
||||
:members:
|
||||
@@ -1,454 +0,0 @@
|
||||
.. _admin:
|
||||
|
||||
=====
|
||||
Admin
|
||||
=====
|
||||
|
||||
This is the cog guide for the admin cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load admin
|
||||
|
||||
.. _admin-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog will provide tools for server admins and bot owners.
|
||||
|
||||
It can add or remove a role to a member, edit one or make some available
|
||||
for members so they can self-assign them as they wish.
|
||||
|
||||
It also provides tools for the bot owner such as server locking (once enabled,
|
||||
the bot will instantly leave new servers it joins) and announcements, which
|
||||
can send something in all the servers of the bot.
|
||||
|
||||
.. _admin-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _admin-command-selfrole:
|
||||
|
||||
^^^^^^^^
|
||||
selfrole
|
||||
^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfrole <selfrole>
|
||||
|
||||
**Description**
|
||||
|
||||
Add or remove a role from yourself. It must have been configured as user settable
|
||||
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<selfrole>``: The role you want to attribute or remove from yourself. |role-input|
|
||||
|
||||
.. _admin-command-selfrole-add:
|
||||
|
||||
""""""""""""
|
||||
selfrole add
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfrole add <selfrole>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a role to yourself. It must have been configured as user settable
|
||||
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<selfrole>``: The role you want to attribute to yourself. |role-input|
|
||||
|
||||
.. _admin-command-selfrole-remove:
|
||||
|
||||
"""""""""""""""
|
||||
selfrole remove
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfrole remove <selfrole>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a role from yourself. It must have been configured as user settable
|
||||
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<selfrole>``: The role you want to remove from yourself. |role-input|
|
||||
|
||||
|
||||
.. _admin-command-selfrole-list:
|
||||
|
||||
"""""""""""""
|
||||
selfrole list
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfrole list
|
||||
|
||||
**Description**
|
||||
|
||||
List all of the available roles you can assign to yourself.
|
||||
|
||||
.. _admin-command-selfroleset:
|
||||
|
||||
^^^^^^^^^^^
|
||||
selfroleset
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock| This is also usable by the members with the
|
||||
``Manage roles`` permission.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfroleset
|
||||
|
||||
**Description**
|
||||
|
||||
Define the list of user settable roles. Those roles will be available to any
|
||||
member using the :ref:`selfrole command <admin-command-selfrole>`.
|
||||
|
||||
.. _admin-command-selfroleset-add:
|
||||
|
||||
"""""""""""""""
|
||||
selfroleset add
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfroleset add <role>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a role, or a selection of roles, to the list of available selfroles.
|
||||
|
||||
.. warning:: Members will be able to assign themselves the role.
|
||||
Make sure it doesn't give extra perms or anything that can break
|
||||
your server's security.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to add to the list. |role-input|
|
||||
|
||||
.. _admin-command-selfroleset-clear:
|
||||
|
||||
"""""""""""""""""
|
||||
selfroleset clear
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfroleset clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clear the list of available selfroles for this server.
|
||||
|
||||
.. _admin-command-selfroleset-remove:
|
||||
|
||||
""""""""""""""""""
|
||||
selfroleset remove
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfroleset remove <role>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a role, or a selection of roles, from the list of available selfroles.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to remove from the list. |role-input|
|
||||
|
||||
.. _admin-command-addrole:
|
||||
|
||||
^^^^^^^
|
||||
addrole
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock| This is also usable by the members with the ``Manage
|
||||
roles`` permission.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]addrole <rolename> [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Adds a role to a member. If ``user`` is not given, it will be considered
|
||||
as yourself, the command author.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to add to the member. |role-input-quotes|
|
||||
|
||||
* ``[user]``: The member you want to add the role to. Defaults to the
|
||||
command author. |member-input|
|
||||
|
||||
.. _admin-command-removerole:
|
||||
|
||||
^^^^^^^^^^
|
||||
removerole
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock| This is also usable by the members with the
|
||||
``Manage roles`` permission.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]removerole <rolename> [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Removes a role from a member. If ``user`` is not given, it will be considered
|
||||
as yourself, the command author.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to remove. |role-input-quotes|
|
||||
|
||||
* ``[user]``: The member to remove the role from. |member-input| Defaults
|
||||
to the command author.
|
||||
|
||||
.. _admin-command-editrole:
|
||||
|
||||
^^^^^^^^
|
||||
editrole
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]editrole
|
||||
|
||||
**Description**
|
||||
|
||||
Edits the settings of a role.
|
||||
|
||||
.. _admin-command-editrole-name:
|
||||
|
||||
"""""""""""""
|
||||
editrole name
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]editrole name <role> <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Edits the name of a role.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role name to edit. |role-input-quotes|
|
||||
|
||||
* ``<name>``: The new role name. If it has spaces, you must use quotes.
|
||||
|
||||
.. _admin-command-editrole-color:
|
||||
|
||||
""""""""""""""
|
||||
editrole color
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]editrole color <role> <color>
|
||||
|
||||
**Description**
|
||||
|
||||
Edits the color of a role.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role name to edit. |role-input-quotes|
|
||||
|
||||
* ``<color>``: The new color to assign. |color-input|
|
||||
|
||||
**Examples**
|
||||
|
||||
* ``[p]editrole color "My role" #ff0000``
|
||||
|
||||
* ``[p]editrole color "My role" dark_blue``
|
||||
|
||||
.. _admin-command-announce:
|
||||
|
||||
^^^^^^^^
|
||||
announce
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announce <message>
|
||||
|
||||
**Description**
|
||||
|
||||
Announce your message to all of the servers the bot is in.
|
||||
|
||||
The bot will announce the message in the guild's announcements channel.
|
||||
If this channel is not set, the message won't be announced.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<message>``: The message to send.
|
||||
|
||||
.. _admin-command-announce-cancel:
|
||||
|
||||
"""""""""""""""
|
||||
announce cancel
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announce cancel
|
||||
|
||||
**Description**
|
||||
|
||||
Cancels an active announcement.
|
||||
|
||||
.. _admin-command-announceset:
|
||||
|
||||
^^^^^^^^^^^
|
||||
announceset
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announceset
|
||||
|
||||
**Description**
|
||||
|
||||
Change how announcements are received in this guild.
|
||||
|
||||
.. _admin-command-announceset-channel:
|
||||
|
||||
"""""""""""""""""""
|
||||
announceset channel
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announceset channel [channel]
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the channel where the bot owner announcements will be sent.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: The channel that will be used for bot announcements.
|
||||
|channel-input| Defaults to where you typed the command.
|
||||
|
||||
.. _admin-command-announceset-clearchannel:
|
||||
|
||||
""""""""""""""""""""""""
|
||||
announceset clearchannel
|
||||
""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announceset clearchannel
|
||||
|
||||
**Description**
|
||||
|
||||
Disables announcements on your server. To enable them again, you will have to
|
||||
re-enter your announcements channel with the :ref:`announceset channel
|
||||
<admin-command-announceset-channel>` command.
|
||||
|
||||
.. _admin-command-serverlock:
|
||||
|
||||
^^^^^^^^^^
|
||||
serverlock
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock| This is also usable by the members with the
|
||||
``Administrator`` permission.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]serverlock
|
||||
|
||||
**Description**
|
||||
|
||||
Lock a bot to its current servers only.
|
||||
|
||||
This means that, once you enable this, if someone invites the bot to a new
|
||||
server, the bot will automatically leave the server.
|
||||
|
||||
.. tip:: Another way to prevent your bot from being invited on more servers is
|
||||
making it private directly from the developer portal.
|
||||
|
||||
Once a bot is private, it can only be invited by its owner (or team
|
||||
owners). Other users will get an error on Discord's webpage explaining that
|
||||
the bot is private.
|
||||
|
||||
To do this, go to the `Discord developer portal
|
||||
<https://discord.com/developers>`_, select your application, click "Bot" in
|
||||
the sidebar, then untick "Public bot".
|
||||
|
||||
.. image:: ../.resources/admin/public_bot.png
|
||||
@@ -1,277 +0,0 @@
|
||||
.. _alias:
|
||||
|
||||
=====
|
||||
Alias
|
||||
=====
|
||||
|
||||
This is the cog guide for the alias cog. You will
|
||||
find detailed docs about the usage and the commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load alias
|
||||
|
||||
.. _alias-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog is used to create shortcuts for commands.
|
||||
|
||||
Here's an example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
[p]play
|
||||
# with an alias, you can call the command above with a shortcut like this:
|
||||
[p]p
|
||||
# "p" is now a shortcut for "play"
|
||||
|
||||
In this example, we made an alias named ``p`` that will
|
||||
invoke the ``play`` command. If you use ``[p]play`` or ``[p]p``, the result will
|
||||
be the same.
|
||||
|
||||
----
|
||||
|
||||
Here's another example
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
[p]cleanup messages
|
||||
# now we're creating another alias that will group both the command and the subcommand into this:
|
||||
[p]clear
|
||||
# "clear" is now a shortcut for "cleanup messages"
|
||||
|
||||
In this second example, we made an alias called ``clear`` that will
|
||||
invoke the ``cleanup messages`` subcommand. Now if you use ``[p]cleanup
|
||||
message`` or ``[p]clear``, the result will be the same.
|
||||
|
||||
----
|
||||
|
||||
This is the basic usage, where you can define an alias for the first part of
|
||||
the command and give the second part when invoking the command. A more advanced
|
||||
usage of aliases is the usage of arguments.
|
||||
|
||||
Let's suppose you want to make an alias to ban someone, delete 7 days of
|
||||
messages and set the reason to "Spam bot.", that cannot be done with a classic
|
||||
alias since the required member argument is the first one. If you create the
|
||||
alias "spamban" using arguments like this ``ban {0} 7 Spam bot.``, ``{0}`` will
|
||||
be replaced by the first argument of your alias:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# we created the following alias named "spamban"
|
||||
[p]spamban Slime#3160
|
||||
# this alias will execute the following command:
|
||||
[p]ban Slime#3160 7 Spam bot.
|
||||
|
||||
For a more detailed explaination, read :ref:`this <alias-command-alias-add>`.
|
||||
|
||||
.. _alias-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _alias-command-alias:
|
||||
|
||||
^^^^^
|
||||
alias
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias
|
||||
|
||||
**Description**
|
||||
|
||||
This is the main command used for setting up the cog.
|
||||
It will be used for all other commands.
|
||||
|
||||
.. _alias-command-alias-add:
|
||||
|
||||
"""""""""
|
||||
alias add
|
||||
"""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias add <alias_name> <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Creates an alias. It will be used like this ``[p]alias_name <arguments>``
|
||||
and will be equal to this ``[p]command <arguments>``.
|
||||
|
||||
Let's develop the examples given :ref:`earlier <alias-usage>` a bit more,
|
||||
the left part of the command is the alias (blue), and the right part is the
|
||||
parameters members have to give for the command (orange).
|
||||
|
||||
.. image:: ../.resources/alias/example-1.png
|
||||
|
||||
One more thing you can do with aliases is using arguments, a bit like
|
||||
CustomCommands. Let's suppose you want an alias that bans x member and deletes
|
||||
7 days of messages. Without aliases, the command would look like this:
|
||||
|
||||
``[p]ban NotSoTrustyJAID#0001 7 My random reason``
|
||||
|
||||
A classic alias wouldn't work because the member argument is the first one,
|
||||
and you can only shorten the left part before the required argument.
|
||||
|
||||
An alias with arguments can fix that, you can define the alias on the whole
|
||||
command and replace the required argument by ``{0}``, which will be replaced
|
||||
by the first parameter given when invoking the alias.
|
||||
|
||||
Back to our example, let's make an alias named ``bigban`` which will be
|
||||
assigned to this expression: ``ban {0} 7``
|
||||
|
||||
.. image:: ../.resources/alias/example-2.png
|
||||
|
||||
You can see in blue the "static" part of the alias, what is contained and
|
||||
doesn't need to be given, the orange part is the arguments given at the end of
|
||||
the command, just like a classic alias, and the green part is the positional
|
||||
argument we defined: the first argument of the alias will be the green part.
|
||||
|
||||
You can add as many arguments as you want, they can start at ``{0}`` or ``{1}``
|
||||
and must be in order: ``{1}`` will be the first argument, ``{2}`` will be the
|
||||
second one...
|
||||
|
||||
.. attention:: The numbers must be in order, you cannot use ``{0}`` and ``{2}``
|
||||
without using ``{1}``.
|
||||
|
||||
Here are more examples:
|
||||
|
||||
* * Full command: ``[p]cleanup messages 75 True``
|
||||
* Alias: ``[p]alias add fullclear cleanup messages {0} True``
|
||||
* Invoked alias: ``[p]fullclear 75``
|
||||
|
||||
*The* ``True`` *at the end tells the bot to also clear pinned messages.*
|
||||
|
||||
* * Full command: ``[p]repo add SinbadCogs
|
||||
https://github.com/mikeshardmind/SinbadCogs v3``
|
||||
|
||||
* Alias: ``[p]alias add newrepo repo add {2} https://github.com/{1}/{2}``
|
||||
* Invoked with alias: ``[p]newrepo mikeshardmind SinbadCogs v3``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<alias_name>``: The new command name.
|
||||
|
||||
* ``<command>``: The command to execute when ``[p]alias_name`` is invoked.
|
||||
|
||||
.. _alias-command-alias-delete:
|
||||
|
||||
""""""""""""
|
||||
alias delete
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias [delete|remove|del] <alias_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Removes an alias from the list. Check the list with
|
||||
the :ref:`alias list <alias-command-alias-list>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<alias_name>``: The alias' name to delete.
|
||||
|
||||
.. _alias-command-alias-list:
|
||||
|
||||
""""""""""
|
||||
alias list
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias list
|
||||
|
||||
**Description**
|
||||
|
||||
Shows all of the existing aliases on the current server.
|
||||
|
||||
.. _alias-command-alias-show:
|
||||
|
||||
""""""""""
|
||||
alias show
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias show <alias_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the command associated to the alias.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<alias_name>``: The alias you want information from.
|
||||
|
||||
.. _alias-command-alias-help:
|
||||
|
||||
""""""""""
|
||||
alias help
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias help <alias_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Shows help message for an alias.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<alias_name>``: Alias you want to get help from.
|
||||
|
||||
.. _alias-command-alias-global:
|
||||
|
||||
""""""""""""
|
||||
alias global
|
||||
""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]alias global
|
||||
|
||||
**Description**
|
||||
|
||||
Another group command which contains the :ref:`add
|
||||
<alias-command-alias-add>`, :ref:`del
|
||||
<alias-command-alias-delete>` and :ref:`list
|
||||
<alias-command-alias-list>` commands.
|
||||
|
||||
They work the same, except the created aliases will be
|
||||
global instead of being only server-wide.
|
||||
|
||||
Please refer to these docs for the commands, they work with the
|
||||
same arguments. For example, if you want to add a global alias,
|
||||
instead of doing ``[p]alias add <arguments>``, do ``[p]alias
|
||||
global add <arguments>``.
|
||||
@@ -1,186 +0,0 @@
|
||||
.. _bank:
|
||||
|
||||
====
|
||||
Bank
|
||||
====
|
||||
|
||||
This is the cog guide for the bank cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load bank
|
||||
|
||||
.. _bank-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog manages the bank. It won't be used often by
|
||||
users but this is what makes any interaction with the
|
||||
money possible.
|
||||
|
||||
You will be able to switch between a global and a server-
|
||||
wide bank and choose the bank/currency name.
|
||||
|
||||
.. _bank-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _bank-command-bankset:
|
||||
|
||||
^^^^^^^
|
||||
bankset
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for configuring bank settings.
|
||||
|
||||
.. _bank-command-bankset-toggleglobal:
|
||||
|
||||
""""""""""""""""""""
|
||||
bankset toggleglobal
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset toggleglobal [confirm=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Makes the bank global instead of server-wide. If it
|
||||
is already global, the command will switch it back
|
||||
to the server-wide bank.
|
||||
|
||||
.. warning:: Using this command will reset **all** accounts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[confirm=False]``: Put ``yes`` to confirm.
|
||||
|
||||
.. _bank-command-bankset-creditsname:
|
||||
|
||||
"""""""""""""""""""
|
||||
bankset creditsname
|
||||
"""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset creditsname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Change the credits name of the bank. It is ``credits`` by default.
|
||||
|
||||
For example, if you switch it to ``dollars``, the payday
|
||||
command will show this:
|
||||
|
||||
.. TODO reference the payday command
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
Here, take some dollars. Enjoy! (+120 dollars!)
|
||||
|
||||
You currently have 220 dollars.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new credits name.
|
||||
|
||||
.. _bank-command-bankset-bankname:
|
||||
|
||||
""""""""""""""""
|
||||
bankset bankname
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset bankname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Set bank's name.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new bank's name.
|
||||
|
||||
.. _bank-command-bankset-maxbal:
|
||||
|
||||
""""""""""""""
|
||||
bankset maxbal
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset maxbal <amount>
|
||||
|
||||
**Description**
|
||||
|
||||
Defines the maximum amount of money a user can have with the bot.
|
||||
|
||||
If an user reaches this limit, he will be unable to gain more money.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<amount>``: The maximum amount of money for users.
|
||||
|
||||
.. _bank-command-bankset-showsettings:
|
||||
|
||||
""""""""""""""""""""
|
||||
bankset showsettings
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current settings of your bank.
|
||||
|
||||
This will display the following information:
|
||||
|
||||
* Name of the bank
|
||||
* Scope of the bank (global or per server)
|
||||
* Currency name
|
||||
* Default balance
|
||||
* Maximum allowed balance
|
||||
@@ -1,333 +0,0 @@
|
||||
.. _cleanup:
|
||||
|
||||
=======
|
||||
Cleanup
|
||||
=======
|
||||
|
||||
This is the cog guide for the cleanup cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load cleanup
|
||||
|
||||
.. _cleanup-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog contains commands used for "cleaning up" (deleting) messages.
|
||||
|
||||
This is designed as a moderator tool and offers many convenient use cases.
|
||||
All cleanup commands only apply to the channel the command is executed in.
|
||||
|
||||
Messages older than two weeks cannot be mass deleted.
|
||||
This is a limitation of the API.
|
||||
|
||||
|
||||
.. _cleanup-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _cleanup-command-cleanup:
|
||||
|
||||
^^^^^^^
|
||||
cleanup
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for deleting messages.
|
||||
|
||||
.. _cleanup-command-cleanup-after:
|
||||
|
||||
"""""""""""""
|
||||
cleanup after
|
||||
"""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup after <message_id> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all messages after a specified message.
|
||||
|
||||
To get a message id, enable developer mode in Discord's
|
||||
settings, 'appearance' tab. Then right click a message
|
||||
and copy its id.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<message_id>`` The id of the message to cleanup after. This message won't be deleted.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-before:
|
||||
|
||||
""""""""""""""
|
||||
cleanup before
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup before <message_id> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Deletes X messages before the specified message.
|
||||
|
||||
To get a message id, enable developer mode in Discord's
|
||||
settings, 'appearance' tab. Then right click a message
|
||||
and copy its id.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<message_id>`` The id of the message to cleanup before. This message won't be deleted.
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-between:
|
||||
|
||||
"""""""""""""""
|
||||
cleanup between
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup between <one> <two> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the messages between Message One and Message Two, providing the messages IDs.
|
||||
|
||||
The first message ID should be the older message and the second one the newer.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup between 123456789123456789 987654321987654321``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<one>`` The id of the message to cleanup after. This message won't be deleted.
|
||||
- ``<two>`` The id of the message to cleanup before. This message won't be deleted.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-bot:
|
||||
|
||||
"""""""""""
|
||||
cleanup bot
|
||||
"""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup bot <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Clean up command messages and messages from the bot in the current channel.
|
||||
|
||||
Can only cleanup custom commands and alias commands if those cogs are loaded.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-messages:
|
||||
|
||||
""""""""""""""""
|
||||
cleanup messages
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup messages <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages in the current channel.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup messages 26``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-self:
|
||||
|
||||
""""""""""""
|
||||
cleanup self
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup self <number> [match_pattern] [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Clean up messages owned by the bot in the current channel.
|
||||
|
||||
By default, all messages are cleaned. If a second argument is specified,
|
||||
it is used for pattern matching - only messages containing the given text will be deleted.
|
||||
|
||||
Examples:
|
||||
- ``[p]cleanup self 6``
|
||||
- ``[p]cleanup self 10 Pong``
|
||||
- ``[p]cleanup self 7 "" True``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<match_pattern>`` The text that messages must contain to be deleted. Use "" to skip this.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-spam:
|
||||
|
||||
""""""""""""
|
||||
cleanup spam
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup spam [number=50]
|
||||
|
||||
**Description**
|
||||
|
||||
Deletes duplicate messages in the channel from the last X messages and keeps only one copy.
|
||||
|
||||
Defaults to 50.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The number of messages to check for duplicates. Must be a positive integer.
|
||||
|
||||
.. _cleanup-command-cleanup-text:
|
||||
|
||||
""""""""""""
|
||||
cleanup text
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup text <text> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages matching the specified text in the current channel.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup text "test" 5``
|
||||
|
||||
Remember to use double quotes.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-user:
|
||||
|
||||
""""""""""""
|
||||
cleanup user
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup user <user> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages from a specified user in the current channel.
|
||||
|
||||
Examples:
|
||||
- ``[p]cleanup user @Twentysix 2``
|
||||
- ``[p]cleanup user Red 6``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<user>`` The user whose messages are to be cleaned up.
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanupset:
|
||||
|
||||
^^^^^^^^^^
|
||||
cleanupset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanupset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage the settings for the cleanup command.
|
||||
|
||||
.. _cleanup-command-cleanupset-notify:
|
||||
|
||||
"""""""""""""""""
|
||||
cleanupset notify
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanupset notify
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle clean up notification settings.
|
||||
|
||||
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
|
||||
This message will be deleted after 5 seconds.
|
||||
@@ -1,251 +0,0 @@
|
||||
.. _cogmanagerui:
|
||||
|
||||
==============
|
||||
Cog Manager UI
|
||||
==============
|
||||
|
||||
This is the cog guide for the core cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: This cog is not like the other cogs. It is loaded by default, not
|
||||
included in the cogs paths and it cannot be unloaded. It contains needed
|
||||
commands for cog management.
|
||||
|
||||
.. _cogmanaerui-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog allows you to manage your cogs and where you can install them. Unlike
|
||||
V2, which had a ``cogs`` folder where everything was installed, you can
|
||||
install V3 cogs everywhere, and also make them cross-compatible with other
|
||||
instances!
|
||||
|
||||
If you want to install your cogs using a Github repo (usually what you will
|
||||
always be looking for), you need to use the downloader cog. However, if you
|
||||
have the files of a cog or want to code one, this cog is what you should be
|
||||
looking for.
|
||||
|
||||
The most basic command is :ref:`paths <cogmanagerui-command-paths>`, which
|
||||
will list you all of the currently set paths.
|
||||
|
||||
You can add a path by using the :ref:`addpath <cogmanagerui-command-addpath>`
|
||||
command. All cogs in that path will be available for the bot and listed in
|
||||
the :ref:`cogs <cogmanagerui-command-cogs>`. You can then load
|
||||
or unload them.
|
||||
|
||||
.. TODO add ref to load and unload commands
|
||||
|
||||
.. _cogmanagerui-usage-installation:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
How to install a local package without using downloader
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Let's suppose you made a cog request on the `cog board <https://cogboard.discord.red>`_
|
||||
and now you want to add your own cog to Red. You should have a folder that
|
||||
looks like this:
|
||||
|
||||
.. image:: ../.resources/cog_manager_ui/custom-cog-example.png
|
||||
|
||||
You will first need to add a cog path to your instance. For that, use the
|
||||
:ref:`addpath <cogmanagerui-command-addpath>` command with a new directory.
|
||||
|
||||
Create a folder somewhere (should stay accessible) and copy its path. A path
|
||||
looks like this:
|
||||
|
||||
* Windows: ``C:\Users\username\Documents\MyCogs``
|
||||
* macOS: ``/Users/username/Documents/MyCogs``
|
||||
* Linux: ``/home/username/Documents/MyCogs``
|
||||
|
||||
You can now use the command we talked about before: type ``[p]addpath
|
||||
<your_path>``.
|
||||
|
||||
.. attention:: A path shouldn't have spaces in it. If it does, add quotation
|
||||
marks around the path, or a backslash before the space.
|
||||
|
||||
In that ``MyCogs`` folder, you can drop your cog folder. You should now have
|
||||
something that looks like this:
|
||||
|
||||
.. image:: ../.resources/cog_manager_ui/cog-path.png
|
||||
|
||||
Now if you type ``[p]cogs``, your new cog should be listed, and you will be
|
||||
able to load it!
|
||||
|
||||
.. _cogmanagerui-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. note:: The whole cog is locked to the
|
||||
:ref:`bot owner <getting-started-permissions>`. If you are not the owner
|
||||
of the instance, you can ignore this.
|
||||
|
||||
.. _cogmanagerui-command-cogs:
|
||||
|
||||
^^^^
|
||||
cogs
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cogs
|
||||
|
||||
**Description**
|
||||
|
||||
Returns a list of loaded and unloaded cogs on the bot.
|
||||
|
||||
Cogs are unloaded by default. This is where you can find your cogs if you
|
||||
installed some recently.
|
||||
|
||||
All of the cogs located inside a cog path will be listed here. You can see a
|
||||
list of the paths with the :ref:`paths <cogmanagerui-command-paths>` command.
|
||||
|
||||
.. _cogmanagerui-command-paths:
|
||||
|
||||
^^^^^
|
||||
paths
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]paths
|
||||
|
||||
**Description**
|
||||
|
||||
Lists the registered cog paths, with the install path for the downloader and
|
||||
the core path for the core cogs.
|
||||
|
||||
.. TODO add ref to downloader
|
||||
|
||||
You can use the :ref:`reorderpath <cogmanagerui-command-reorderpath>` command
|
||||
to reorder the listed paths.
|
||||
|
||||
.. tip:: The number before a cog path can be used for the
|
||||
:ref:`removepath <cogmanagerui-command-removepath>` command.
|
||||
|
||||
.. _cogmanagerui-command-addpath:
|
||||
|
||||
^^^^^^^
|
||||
addpath
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]addpath <path>
|
||||
|
||||
**Description**
|
||||
|
||||
Adds a path to the list of available cog paths. This means that all valid cogs
|
||||
under the path will be added to the list of available cogs, listed in
|
||||
:ref:`cogs <cogmanagerui-command-cogs>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<path>``: A path that should look like this and point to a folder:
|
||||
|
||||
* Windows: ``C:\Users\username\Documents\MyCogs``
|
||||
* macOS: ``/Users/username/Documents/MyCogs``
|
||||
* Linux: ``/home/username/Documents/MyCogs``
|
||||
|
||||
Try to avoid paths with spaces. If there are spaces, add a backslash before
|
||||
the space on Linux. Add quotation marks around the path if needed.
|
||||
|
||||
.. _cogmanagerui-command-removepath:
|
||||
|
||||
^^^^^^^^^^
|
||||
removepath
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]removepath <path_number>
|
||||
|
||||
**Description**
|
||||
|
||||
Removes a path from the list of available paths. Its cogs won't be accessible
|
||||
anymore.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<path_number>``: The number of the path to remove. You can get it with
|
||||
the :ref:`paths <cogmanagerui>` command.
|
||||
|
||||
.. _cogmanagerui-command-reorderpath:
|
||||
|
||||
^^^^^^^^^^^
|
||||
reorderpath
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reorderpath <from_> <to>
|
||||
|
||||
**Description**
|
||||
|
||||
Reorders the paths listed with the :ref:`paths <cogmanagerui-command-paths>`
|
||||
command. The goal of this command is to allow the discovery of different cogs.
|
||||
If there are multiple packages with the same names, the one that is inside the
|
||||
highest folder in the list will be kept and the other ones will be ignored.
|
||||
|
||||
For example, let's suppose this is the output of
|
||||
:ref:`paths <cogmanagerui-command-paths>`:
|
||||
|
||||
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
|
||||
2. ``/home/laggron/custom_cogs``
|
||||
3. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
|
||||
|
||||
The folders 2 and 3 both have a package named ``leveler`` while being different
|
||||
cogs, and you want to load the one located in the 3rd folder. To do that, you
|
||||
have to put the 3rd path higher than the 2nd path, let's swap them! Type
|
||||
``[p]reorderpath 2 3`` and the output of
|
||||
:ref:`paths <cogmanagerui-command-paths>` will then be the following:
|
||||
|
||||
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
|
||||
2. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
|
||||
3. ``/home/laggron/custom_cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<from_>``: The index of the path you want to move.
|
||||
* ``<to>``: The location where you want to insert the path.
|
||||
|
||||
.. _cogmanagerui-command-installpath:
|
||||
|
||||
^^^^^^^^^^^
|
||||
installpath
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]installpath [path]
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the install path, or sets a new one.
|
||||
|
||||
If you want to set a new path, the same rules as for
|
||||
:ref:`addpath <cogmanagerui-command-addpath>` apply
|
||||
|
||||
.. warning:: If you edit the install path, the cogs won't be transfered.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[path]``: The absolute path to set. If omitted, the current path will
|
||||
be returned instead.
|
||||
@@ -1,294 +0,0 @@
|
||||
.. _customcommands:
|
||||
|
||||
==============
|
||||
CustomCommands
|
||||
==============
|
||||
|
||||
This is the cog guide for the customcommands cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load customcom
|
||||
|
||||
.. _customcommands-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog contains commands for creating and managing custom commands that display text.
|
||||
|
||||
These are useful for storing information members might need, like FAQ answers or invite links.
|
||||
Custom commands can be used by anyone by default, so be careful with pings.
|
||||
Commands can only be lowercase, and will not respond to any uppercase letters.
|
||||
|
||||
|
||||
.. _customcommands-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _customcommands-command-customcom:
|
||||
|
||||
^^^^^^^^^
|
||||
customcom
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom
|
||||
|
||||
.. tip:: Alias: ``cc``
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for Custom Commands management.
|
||||
|
||||
.. _customcommands-command-customcom-cooldown:
|
||||
|
||||
""""""""""""""""""
|
||||
customcom cooldown
|
||||
""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom cooldown <command> [cooldown] [per=member]
|
||||
|
||||
**Description**
|
||||
|
||||
Set, edit, or view the cooldown for a custom command.
|
||||
|
||||
You may set cooldowns per member, channel, or guild. Multiple
|
||||
cooldowns may be set. All cooldowns must be cooled to call the
|
||||
custom command.
|
||||
|
||||
Examples:
|
||||
- ``[p]customcom cooldown pingrole``
|
||||
- ``[p]customcom cooldown yourcommand 30``
|
||||
- ``[p]cc cooldown mycommand 30 guild``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to check or set the cooldown.
|
||||
- ``<cooldown>`` The number of seconds to wait before allowing the command to be invoked again. If omitted, will instead return the current cooldown settings.
|
||||
- ``<per>`` The group to apply the cooldown on. Defaults to per member. Valid choices are server, guild, user, and member.
|
||||
|
||||
.. _customcommands-command-customcom-create:
|
||||
|
||||
""""""""""""""""
|
||||
customcom create
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create <command> <text>
|
||||
|
||||
.. tip:: Alias: ``customcom add``
|
||||
|
||||
**Description**
|
||||
|
||||
Create custom commands.
|
||||
|
||||
If a type is not specified, a simple CC will be created.
|
||||
CCs can be enhanced with arguments, see the guide
|
||||
:ref:`here <cog_customcom>`.
|
||||
|
||||
.. _customcommands-command-customcom-create-random:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
customcom create random
|
||||
"""""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create random <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a CC where it will randomly choose a response!
|
||||
|
||||
Note: This command is interactive.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The command executed to return the text. Cast to lowercase.
|
||||
|
||||
.. _customcommands-command-customcom-create-simple:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
customcom create simple
|
||||
"""""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create simple <command> <text>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a simple custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom create simple yourcommand Text you want``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The command executed to return the text. Cast to lowercase.
|
||||
- ``<text>`` The text to return when executing the command. See guide for enhanced usage.
|
||||
|
||||
.. _customcommands-command-customcom-delete:
|
||||
|
||||
""""""""""""""""
|
||||
customcom delete
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom delete <command>
|
||||
|
||||
.. tip:: Aliases: ``customcom del``, ``customcom remove``
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom delete yourcommand``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to delete.
|
||||
|
||||
.. _customcommands-command-customcom-edit:
|
||||
|
||||
""""""""""""""
|
||||
customcom edit
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom edit <command> [text]
|
||||
|
||||
**Description**
|
||||
|
||||
Edit a custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom edit yourcommand Text you want``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to edit.
|
||||
- ``<text>`` The new text to return when executing the command.
|
||||
|
||||
.. _customcommands-command-customcom-list:
|
||||
|
||||
""""""""""""""
|
||||
customcom list
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom list
|
||||
|
||||
**Description**
|
||||
|
||||
List all available custom commands.
|
||||
|
||||
The list displays a preview of each command's response, with
|
||||
markdown escaped and newlines replaced with spaces.
|
||||
|
||||
.. _customcommands-command-customcom-raw:
|
||||
|
||||
"""""""""""""
|
||||
customcom raw
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom raw <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Get the raw response of a custom command, to get the proper markdown.
|
||||
|
||||
This is helpful for copy and pasting.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to get the raw response of.
|
||||
|
||||
.. _customcommands-command-customcom-search:
|
||||
|
||||
""""""""""""""""
|
||||
customcom search
|
||||
""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom search <query>
|
||||
|
||||
**Description**
|
||||
|
||||
Searches through custom commands, according to the query.
|
||||
|
||||
Uses fuzzywuzzy searching to find close matches.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<query>`` The query to search for. Can be multiple words.
|
||||
|
||||
.. _customcommands-command-customcom-show:
|
||||
|
||||
""""""""""""""
|
||||
customcom show
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom show <command_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Shows a custom command's responses and its settings.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command_name>`` The custom command to show.
|
||||
@@ -1,538 +0,0 @@
|
||||
.. _downloader:
|
||||
|
||||
==========
|
||||
Downloader
|
||||
==========
|
||||
|
||||
This is the cog guide for the downloader cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load downloader
|
||||
|
||||
.. _downloader-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Install community cogs made by Cog Creators.
|
||||
|
||||
Community cogs, also called third party cogs, are not included
|
||||
in the default Red install.
|
||||
|
||||
Community cogs come in repositories. Repos are a group of cogs
|
||||
you can install. You always need to add the creator's repository
|
||||
using the ``[p]repo`` command before you can install one or more
|
||||
cogs from the creator.
|
||||
|
||||
|
||||
.. _downloader-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _downloader-command-cog:
|
||||
|
||||
^^^
|
||||
cog
|
||||
^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for cog installation management commands.
|
||||
|
||||
.. _downloader-command-cog-checkforupdates:
|
||||
|
||||
"""""""""""""""""""
|
||||
cog checkforupdates
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog checkforupdates
|
||||
|
||||
**Description**
|
||||
|
||||
Check for available cog updates (including pinned cogs).
|
||||
|
||||
This command doesn't update cogs, it only checks for updates.
|
||||
Use ``[p]cog update`` to update cogs.
|
||||
|
||||
.. _downloader-command-cog-info:
|
||||
|
||||
""""""""
|
||||
cog info
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog info <repo> <cog>
|
||||
|
||||
**Description**
|
||||
|
||||
List information about a single cog.
|
||||
|
||||
Example:
|
||||
- ``[p]cog info 26-Cogs defender``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo to get cog info from.
|
||||
- ``<cog>`` The cog to get info on.
|
||||
|
||||
.. _downloader-command-cog-install:
|
||||
|
||||
"""""""""""
|
||||
cog install
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog install <repo> <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a cog from the given repo.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog install 26-Cogs defender``
|
||||
- ``[p]cog install Laggrons-Dumb-Cogs say roleinvite``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to install cogs from.
|
||||
- ``<cogs...>`` The cog or cogs to install.
|
||||
|
||||
.. _downloader-command-cog-installversion:
|
||||
|
||||
""""""""""""""""""
|
||||
cog installversion
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog installversion <repo> <revision> <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a cog from the specified revision of given repo.
|
||||
|
||||
Revisions are "commit ids" that point to the point in the code when a specific change was made.
|
||||
The latest revision can be found in the URL bar for any GitHub repo by `pressing "y" on that repo <https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/getting-permanent-links-to-files#press-y-to-permalink-to-a-file-in-a-specific-commit>`_.
|
||||
|
||||
Older revisions can be found in the URL bar by `viewing the commit history of any repo <https://cdn.discordapp.com/attachments/133251234164375552/775760247787749406/unknown.png>`_
|
||||
|
||||
Example:
|
||||
- ``[p]cog installversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to install cogs from.
|
||||
- ``<revision>`` The revision to install from.
|
||||
- ``<cogs...>`` The cog or cogs to install.
|
||||
|
||||
.. _downloader-command-cog-list:
|
||||
|
||||
""""""""
|
||||
cog list
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog list <repo>
|
||||
|
||||
**Description**
|
||||
|
||||
List all available cogs from a single repo.
|
||||
|
||||
Example:
|
||||
- ``[p]cog list 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo to list cogs from.
|
||||
|
||||
.. _downloader-command-cog-listpinned:
|
||||
|
||||
""""""""""""""
|
||||
cog listpinned
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog listpinned
|
||||
|
||||
**Description**
|
||||
|
||||
List currently pinned cogs.
|
||||
|
||||
.. _downloader-command-cog-pin:
|
||||
|
||||
"""""""
|
||||
cog pin
|
||||
"""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog pin <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Pin cogs - this will lock cogs on their current version.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog pin defender``
|
||||
- ``[p]cog pin outdated_cog1 outdated_cog2``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to pin. Must already be installed.
|
||||
|
||||
.. _downloader-command-cog-uninstall:
|
||||
|
||||
"""""""""""""
|
||||
cog uninstall
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog uninstall <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Uninstall cogs.
|
||||
|
||||
You may only uninstall cogs which were previously installed
|
||||
by Downloader.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog uninstall defender``
|
||||
- ``[p]cog uninstall say roleinvite``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to uninstall.
|
||||
|
||||
.. _downloader-command-cog-unpin:
|
||||
|
||||
"""""""""
|
||||
cog unpin
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog unpin <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Unpin cogs - this will remove the update lock from those cogs.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog unpin defender``
|
||||
- ``[p]cog unpin updated_cog1 updated_cog2``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to unpin. Must already be installed and pinned.
|
||||
|
||||
.. _downloader-command-cog-update:
|
||||
|
||||
""""""""""
|
||||
cog update
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog update [cogs...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs, or ones of your choosing.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog update``
|
||||
- ``[p]cog update defender``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[cogs...]`` The cog or cogs to update. If omitted, all cogs are updated.
|
||||
|
||||
.. _downloader-command-cog-updateallfromrepos:
|
||||
|
||||
""""""""""""""""""""""
|
||||
cog updateallfromrepos
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog updateallfromrepos <repos...>
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs from repos of your choosing.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog updateallfromrepos 26-Cogs``
|
||||
- ``[p]cog updateallfromrepos Laggrons-Dumb-Cogs 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repos...>`` The repo or repos to update all cogs from.
|
||||
|
||||
.. _downloader-command-cog-updatetoversion:
|
||||
|
||||
"""""""""""""""""""
|
||||
cog updatetoversion
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog updatetoversion <repo> <revision> [cogs...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs, or ones of your choosing to chosen revision of one repo.
|
||||
|
||||
Note that update doesn't mean downgrade and therefore ``revision``
|
||||
has to be newer than the version that cog currently has installed. If you want to
|
||||
downgrade the cog, uninstall and install it again.
|
||||
|
||||
See ``[p]cog installversion`` for an explanation of ``revision``.
|
||||
|
||||
Example:
|
||||
- ``[p]cog updatetoversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo or repos to update all cogs from.
|
||||
- ``<revision>`` The revision to update to.
|
||||
- ``[cogs...]`` The cog or cogs to update.
|
||||
|
||||
.. _downloader-command-findcog:
|
||||
|
||||
^^^^^^^
|
||||
findcog
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]findcog <command_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Find which cog a command comes from.
|
||||
|
||||
This will only work with loaded cogs.
|
||||
|
||||
Example:
|
||||
- ``[p]findcog ping``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<command_name>`` The command to search for.
|
||||
|
||||
.. _downloader-command-pipinstall:
|
||||
|
||||
^^^^^^^^^^
|
||||
pipinstall
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]pipinstall <deps...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a group of dependencies using pip.
|
||||
|
||||
Examples:
|
||||
- ``[p]pipinstall bs4``
|
||||
- ``[p]pipinstall py-cpuinfo psutil``
|
||||
|
||||
Improper usage of this command can break your bot, be careful.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<deps...>`` The package or packages you wish to install.
|
||||
|
||||
.. _downloader-command-repo:
|
||||
|
||||
^^^^
|
||||
repo
|
||||
^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for repository management.
|
||||
|
||||
.. _downloader-command-repo-add:
|
||||
|
||||
""""""""
|
||||
repo add
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo add <name> <repo_url> [branch]
|
||||
|
||||
**Description**
|
||||
|
||||
Add a new repo.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo add 26-Cogs https://github.com/Twentysix26/x26-Cogs``
|
||||
- ``[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3``
|
||||
|
||||
Repo names can only contain characters A-z, numbers, underscores, and hyphens.
|
||||
The branch will be the default branch if not specified.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<name>`` The name given to the repo.
|
||||
- ``<repo_url>`` URL to the cog branch. Usually GitHub or GitLab.
|
||||
- ``[branch]`` Optional branch to install cogs from.
|
||||
|
||||
.. _downloader-command-repo-delete:
|
||||
|
||||
"""""""""""
|
||||
repo delete
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo delete <repo>
|
||||
|
||||
.. tip:: Aliases: ``repo remove``, ``repo del``
|
||||
|
||||
**Description**
|
||||
|
||||
Remove repos and their files.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo delete 26-Cogs``
|
||||
- ``[p]repo delete 26-Cogs Laggrons-Dumb-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repos...>`` The repo or repos to remove.
|
||||
|
||||
.. _downloader-command-repo-info:
|
||||
|
||||
"""""""""
|
||||
repo info
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo info <repo>
|
||||
|
||||
**Description**
|
||||
|
||||
Show information about a repo.
|
||||
|
||||
Example:
|
||||
- ``[p]repo info 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to show info about.
|
||||
|
||||
.. _downloader-command-repo-list:
|
||||
|
||||
"""""""""
|
||||
repo list
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo list
|
||||
|
||||
**Description**
|
||||
|
||||
List all installed repos.
|
||||
|
||||
.. _downloader-command-repo-update:
|
||||
|
||||
"""""""""""
|
||||
repo update
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo update [repos...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all repos, or ones of your choosing.
|
||||
|
||||
This will *not* update the cogs installed from those repos.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo update``
|
||||
- ``[p]repo update 26-Cogs``
|
||||
- ``[p]repo update 26-Cogs Laggrons-Dumb-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[repos...]`` The name or names of repos to update. If omitted, all repos are updated.
|
||||
@@ -1,541 +0,0 @@
|
||||
.. _economy:
|
||||
|
||||
=======
|
||||
Economy
|
||||
=======
|
||||
|
||||
This is the cog guide for the economy cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load economy
|
||||
|
||||
.. _economy-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Get rich and have fun with imaginary currency!
|
||||
|
||||
|
||||
.. _economy-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _economy-command-bank:
|
||||
|
||||
^^^^
|
||||
bank
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage the bank.
|
||||
|
||||
.. _economy-command-bank-balance:
|
||||
|
||||
""""""""""""
|
||||
bank balance
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank balance [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Show the user's account balance.
|
||||
|
||||
Example:
|
||||
- ``[p]bank balance``
|
||||
- ``[p]bank balance @Twentysix``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<user>`` The user to check the balance of. If omitted, defaults to your own balance.
|
||||
|
||||
.. _economy-command-bank-prune:
|
||||
|
||||
""""""""""
|
||||
bank prune
|
||||
""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for pruning bank accounts.
|
||||
|
||||
.. _economy-command-bank-prune-global:
|
||||
|
||||
"""""""""""""""""
|
||||
bank prune global
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune global [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Prune bank accounts for users who no longer share a server with the bot.
|
||||
|
||||
Cannot be used without a global bank. See ``[p]bank prune server``.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune global`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune global yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-prune-server:
|
||||
|
||||
"""""""""""""""""
|
||||
bank prune server
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune server [confirmation=False]
|
||||
|
||||
.. tip:: Aliases: ``bank prune guild``, ``bank prune local``
|
||||
|
||||
**Description**
|
||||
|
||||
Prune bank accounts for users no longer in the server.
|
||||
|
||||
Cannot be used with a global bank. See ``[p]bank prune global``.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune server`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune server yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-prune-user:
|
||||
|
||||
"""""""""""""""
|
||||
bank prune user
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune user <user> [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the bank account of a specified user.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune user @TwentySix`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune user @TwentySix yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<user>`` The user to delete the bank of. Takes mentions, names, and user ids.
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-reset:
|
||||
|
||||
""""""""""
|
||||
bank reset
|
||||
""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank reset [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all bank accounts.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank reset`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank reset yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-set:
|
||||
|
||||
""""""""
|
||||
bank set
|
||||
""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank set <to> <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the balance of a user's bank account.
|
||||
|
||||
Putting + or - signs before the amount will add/remove currency on the user's bank account instead.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank set @Twentysix 26`` - Sets balance to 26
|
||||
- ``[p]bank set @Twentysix +2`` - Increases balance by 2
|
||||
- ``[p]bank set @Twentysix -6`` - Decreases balance by 6
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<to>`` The user to set the currency of.
|
||||
- ``<creds>`` The amount of currency to set their balance to.
|
||||
|
||||
.. _economy-command-bank-transfer:
|
||||
|
||||
"""""""""""""
|
||||
bank transfer
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank transfer <to> <amount>
|
||||
|
||||
**Description**
|
||||
|
||||
Transfer currency to other users.
|
||||
|
||||
This will come out of your balance, so make sure you have enough.
|
||||
|
||||
Example:
|
||||
- ``[p]bank transfer @Twentysix 500``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<to>`` The user to give currency to.
|
||||
- ``<amount>`` The amount of currency to give.
|
||||
|
||||
.. _economy-command-economyset:
|
||||
|
||||
^^^^^^^^^^
|
||||
economyset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage Economy settings.
|
||||
|
||||
.. _economy-command-economyset-paydayamount:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
economyset paydayamount
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset paydayamount <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the amount earned each payday.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset paydayamount 400``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<creds>`` The new amount to give when using the payday command. Default is 120.
|
||||
|
||||
.. _economy-command-economyset-paydaytime:
|
||||
|
||||
"""""""""""""""""""""
|
||||
economyset paydaytime
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset paydaytime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the payday command.
|
||||
|
||||
Examples:
|
||||
- ``[p]economyset paydaytime 86400``
|
||||
- ``[p]economyset paydaytime 1d``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-economyset-registeramount:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
economyset registeramount
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset registeramount <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the initial balance for new bank accounts.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset registeramount 5000``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<creds>`` The new initial balance amount. Default is 0.
|
||||
|
||||
.. _economy-command-economyset-rolepaydayamount:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
economyset rolepaydayamount
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset rolepaydayamount <role> <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the amount earned each payday for a role.
|
||||
|
||||
Set to 0 will remove the custom payday for that role instead.
|
||||
|
||||
Only available when not using a global bank.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset rolepaydayamount @Members 400``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<role>`` The role to assign a custom payday amount to.
|
||||
- ``<creds>`` The new amount to give when using the payday command.
|
||||
|
||||
.. _economy-command-economyset-showsettings:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
economyset showsettings
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current economy settings
|
||||
|
||||
.. _economy-command-economyset-slotmax:
|
||||
|
||||
""""""""""""""""""
|
||||
economyset slotmax
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slotmax <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the maximum slot machine bid.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset slotmax 50``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The new maximum bid for using the slot machine. Default is 100.
|
||||
|
||||
.. _economy-command-economyset-slotmin:
|
||||
|
||||
""""""""""""""""""
|
||||
economyset slotmin
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slotmin <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the minimum slot machine bid.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset slotmin 10``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The new minimum bid for using the slot machine. Default is 5.
|
||||
|
||||
.. _economy-command-economyset-slottime:
|
||||
|
||||
"""""""""""""""""""
|
||||
economyset slottime
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slottime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the slot machine.
|
||||
|
||||
Examples:
|
||||
- ``[p]economyset slottime 10``
|
||||
- ``[p]economyset slottime 10m``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- | ``<duration>`` The new duration to wait in between uses of the slot machine. Default is 5 seconds.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-leaderboard:
|
||||
|
||||
^^^^^^^^^^^
|
||||
leaderboard
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]leaderboard [top=10] [show_global=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Print the leaderboard.
|
||||
|
||||
Defaults to top 10.
|
||||
|
||||
Examples:
|
||||
- ``[p]leaderboard``
|
||||
- ``[p]leaderboard 50`` - Shows the top 50 instead of top 10.
|
||||
- ``[p]leaderboard 100 yes`` - Shows the top 100 from all servers.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<top>`` How many positions on the leaderboard to show. Defaults to 10 if omitted.
|
||||
- ``<show_global>`` Whether to include results from all servers. This will default to false unless specified.
|
||||
|
||||
.. _economy-command-payday:
|
||||
|
||||
^^^^^^
|
||||
payday
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]payday
|
||||
|
||||
**Description**
|
||||
|
||||
Get some free currency.
|
||||
|
||||
The amount awarded and frequency can be configured.
|
||||
|
||||
.. _economy-command-payouts:
|
||||
|
||||
^^^^^^^
|
||||
payouts
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]payouts
|
||||
|
||||
**Description**
|
||||
|
||||
Show the payouts for the slot machine.
|
||||
|
||||
.. _economy-command-slot:
|
||||
|
||||
^^^^
|
||||
slot
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slot <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Use the slot machine.
|
||||
|
||||
Example:
|
||||
- ``[p]slot 50``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The amount to bet on the slot machine. Winning payouts are higher when you bet more.
|
||||
@@ -1,335 +0,0 @@
|
||||
.. _filter:
|
||||
|
||||
======
|
||||
Filter
|
||||
======
|
||||
|
||||
This is the cog guide for the filter cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load filter
|
||||
|
||||
.. _filter-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog is designed for "filtering" unwanted words and phrases from a server.
|
||||
|
||||
It provides tools to manage a list of words or sentences, and to customize automatic actions to be taken against users who use those words in channels or in their name/nickname.
|
||||
|
||||
This can be used to prevent inappropriate language, off-topic discussions, invite links, and more.
|
||||
|
||||
|
||||
.. _filter-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _filter-command-filter:
|
||||
|
||||
^^^^^^
|
||||
filter
|
||||
^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to add or remove words from the server filter.
|
||||
|
||||
Use double quotes to add or remove sentences.
|
||||
|
||||
.. _filter-command-filter-add:
|
||||
|
||||
""""""""""
|
||||
filter add
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter add [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Add words to the filter.
|
||||
|
||||
Use double quotes to add sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter add word1 word2 word3``
|
||||
- ``[p]filter add "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to filter.
|
||||
|
||||
.. _filter-command-filter-channel:
|
||||
|
||||
""""""""""""""
|
||||
filter channel
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to add or remove words from the channel filter.
|
||||
|
||||
Use double quotes to add or remove sentences.
|
||||
|
||||
.. _filter-command-filter-channel-add:
|
||||
|
||||
""""""""""""""""""
|
||||
filter channel add
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel add [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Add words to the filter.
|
||||
|
||||
Use double quotes to add sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel add word1 word2 word3``
|
||||
- ``[p]filter channel add "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to filter.
|
||||
|
||||
.. _filter-command-filter-channel-clear:
|
||||
|
||||
""""""""""""""""""""
|
||||
filter channel clear
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clears this channel's filter list.
|
||||
|
||||
.. _filter-command-filter-channel-list:
|
||||
|
||||
"""""""""""""""""""
|
||||
filter channel list
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel list
|
||||
|
||||
**Description**
|
||||
|
||||
Send a list of the channel's filtered words.
|
||||
|
||||
.. _filter-command-filter-channel-remove:
|
||||
|
||||
"""""""""""""""""""""
|
||||
filter channel remove
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel remove [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Remove words from the filter.
|
||||
|
||||
Use double quotes to remove sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel remove word1 word2 word3``
|
||||
- ``[p]filter channel remove "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to no longer filter.
|
||||
|
||||
.. _filter-command-filter-clear:
|
||||
|
||||
""""""""""""
|
||||
filter clear
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clears this server's filter list.
|
||||
|
||||
.. _filter-command-filter-delete:
|
||||
|
||||
"""""""""""""
|
||||
filter delete
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter delete [words...]
|
||||
|
||||
.. tip:: Aliases: ``filter remove``, ``filter del``
|
||||
|
||||
**Description**
|
||||
|
||||
Remove words from the filter.
|
||||
|
||||
Use double quotes to remove sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter remove word1 word2 word3``
|
||||
- ``[p]filter remove "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to no longer filter.
|
||||
|
||||
.. _filter-command-filter-list:
|
||||
|
||||
"""""""""""
|
||||
filter list
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter list
|
||||
|
||||
**Description**
|
||||
|
||||
Send a list of this server's filtered words.
|
||||
|
||||
.. _filter-command-filter-names:
|
||||
|
||||
""""""""""""
|
||||
filter names
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter names
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle name and nickname filtering.
|
||||
|
||||
This is disabled by default.
|
||||
|
||||
.. _filter-command-filterset:
|
||||
|
||||
^^^^^^^^^
|
||||
filterset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage filter settings.
|
||||
|
||||
.. _filter-command-filterset-ban:
|
||||
|
||||
"""""""""""""
|
||||
filterset ban
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset ban <count> <timeframe>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the filter's autoban conditions.
|
||||
|
||||
Users will be banned if they send ``<count>`` filtered words in
|
||||
``<timeframe>`` seconds.
|
||||
|
||||
Set both to zero to disable autoban.
|
||||
|
||||
Examples:
|
||||
- ``[p]filterset ban 5 5`` - Ban users who say 5 filtered words in 5 seconds.
|
||||
- ``[p]filterset ban 2 20`` - Ban users who say 2 filtered words in 20 seconds.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<count>`` The amount of filtered words required to trigger a ban.
|
||||
- ``<timeframe>`` The period of time in which too many filtered words will trigger a ban.
|
||||
|
||||
.. _filter-command-filterset-defaultname:
|
||||
|
||||
"""""""""""""""""""""
|
||||
filterset defaultname
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset defaultname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the nickname for users with a filtered name.
|
||||
|
||||
Note that this has no effect if filtering names is disabled
|
||||
(to toggle, run ``[p]filter names``).
|
||||
|
||||
The default name used is *John Doe*.
|
||||
|
||||
Example:
|
||||
- ``[p]filterset defaultname Missingno``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<name>`` The new nickname to assign.
|
||||
@@ -1,218 +0,0 @@
|
||||
.. _general:
|
||||
|
||||
=======
|
||||
General
|
||||
=======
|
||||
|
||||
This is the cog guide for the general cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load general
|
||||
|
||||
.. _general-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog includes a miscellaneous group of games, useful
|
||||
tools, and informative commands such as ``serverinfo`` or ``urban``.
|
||||
|
||||
.. _general-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _general-command-8:
|
||||
|
||||
^^^^^^^^^
|
||||
8 (8ball)
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]8 <question>
|
||||
|
||||
**Description**
|
||||
|
||||
Ask 8 ball a question.
|
||||
|
||||
.. note:: Your question must end with a question mark.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<question>``: The question you would like to ask 8 ball.
|
||||
|
||||
.. _general-command-choose:
|
||||
|
||||
^^^^^^
|
||||
choose
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]choose <first> <second> [others...]
|
||||
|
||||
**Description**
|
||||
|
||||
Choose between multiple options.
|
||||
Options are separated by spaces.
|
||||
|
||||
.. note:: There must be at least 2 options to pick from.
|
||||
.. note:: To denote options which include whitespace, you should enclose the option in double quotes.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<first>``: The first mandatory option.
|
||||
* ``<second>``: The second mandatory option.
|
||||
* ``[others...]``: Any remaining optional options.
|
||||
|
||||
|
||||
.. _general-command-flip:
|
||||
|
||||
^^^^
|
||||
flip
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]flip [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Flip a coin... or a user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[user]``: The user to flip. Defaults to flipping a coin if no user is provided.
|
||||
|
||||
.. _general-command-lmgtfy:
|
||||
|
||||
^^^^^^
|
||||
lmgtfy
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]lmgtfy <search_terms>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a lmgtfy link.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<search_terms>``: The terms used to generate the lmgtfy link.
|
||||
|
||||
.. _general-command-roll:
|
||||
|
||||
^^^^
|
||||
roll
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]roll [number=100]
|
||||
|
||||
**Description**
|
||||
|
||||
Roll a random number. The result will be between 1 and ``<number>``.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[number]``: The maximum number that can be rolled. Defaults to 100.
|
||||
|
||||
.. _general-command-rps:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
rps (Rock Paper Scissors)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]rps <your_choice>
|
||||
|
||||
**Description**
|
||||
|
||||
Play Rock Paper Scissors.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<your_choice>``: The choice that you choose.
|
||||
|
||||
.. note:: Choices **must** be between ``rock``, ``paper``, or ``scissors``.
|
||||
|
||||
.. _general-commands-serverinfo:
|
||||
|
||||
^^^^^^^^^^
|
||||
serverinfo
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]serverinfo [details=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Show server information.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[details]``: Show extra details about the server when set to True. Defaults to False.
|
||||
|
||||
.. _general-commands-stopwatch:
|
||||
|
||||
^^^^^^^^^
|
||||
stopwatch
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]stopwatch
|
||||
|
||||
**Description**
|
||||
|
||||
Start or stop the stopwatch.
|
||||
|
||||
.. _general-commands-urban:
|
||||
|
||||
^^^^^
|
||||
urban
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]urban <word>
|
||||
|
||||
**Description**
|
||||
|
||||
Search the Urban Dictionary.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<word>``: The term to search for.
|
||||
@@ -1,205 +0,0 @@
|
||||
.. _image:
|
||||
|
||||
=====
|
||||
Image
|
||||
=====
|
||||
|
||||
This is the cog guide for the image cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load image
|
||||
|
||||
.. _image-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog provides commands for retrieving pictures from
|
||||
websites such as Giphy and Imgur.
|
||||
|
||||
.. _image-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _image-command-gif:
|
||||
|
||||
^^^
|
||||
gif
|
||||
^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gif <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the first search result from Giphy. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to search Giphy.
|
||||
|
||||
.. _image-command-gifr:
|
||||
|
||||
^^^^
|
||||
gifr
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gifr <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve a random GIF from a Giphy search. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to generate a random GIF.
|
||||
|
||||
.. _image-command-imgur:
|
||||
|
||||
^^^^^
|
||||
imgur
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieves pictures from Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
.. _image-command-imgur-search:
|
||||
|
||||
""""""""""""
|
||||
imgur search
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur search [count=1] <terms...>
|
||||
|
||||
**Description**
|
||||
|
||||
Search for pictures on Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[count]``: How many images should be returned (maximum 5). Defaults to 1.
|
||||
|
||||
* ``<terms...>``: The terms used to search Imgur.
|
||||
|
||||
.. _image-command-imgur-subreddit:
|
||||
|
||||
"""""""""""""""
|
||||
imgur subreddit
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur subreddit <subreddit> [count=1] [sort_type=top] [window=day]
|
||||
|
||||
**Description**
|
||||
|
||||
Get images from a subreddit. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<subreddit>``: The subreddit to get images from.
|
||||
|
||||
* ``[count]``: The number of images to return (maximum 5). Defaults to 1.
|
||||
|
||||
* ``[sort_type]``: New, or top results. Defaults to top.
|
||||
|
||||
* ``[window]``: The timeframe, can be the past day, week, month, year or all. Defaults to day.
|
||||
|
||||
.. _image-command-giphycreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
giphycreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]giphycreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set GIPHY API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login (or create) a GIPHY account.
|
||||
2. Visit `this page <https://developers.giphy.com/dashboard>`__.
|
||||
3. Press 'Create an App'.
|
||||
4. Click 'Select API', and then 'Next Step'.
|
||||
5. Add an app name, for example 'Red'.
|
||||
6. Add an app description, for example 'Used for Red's image cog'.
|
||||
7. Click 'Create App'. You'll need to agree to the GIPHY API terms.
|
||||
8. Copy the API Key.
|
||||
9. In Discord, run the following command::
|
||||
|
||||
[p]set api GIPHY api_key <your_api_key_here>
|
||||
|
||||
.. _image-command-imgurcreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
imgurcreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgurcreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set Imgur API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login to (or create) an Imgur account.
|
||||
2. Visit `this page <https://api.imgur.com/oauth2/addclient>`__.
|
||||
3. Add an app name for your application, for example 'Red'.
|
||||
4. Select 'Anonymous usage without user authorization' for the auth type.
|
||||
5. Set the authorization callback URL to ``https://localhost``
|
||||
6. Leave the app website blank.
|
||||
7. Enter a valid email address and a description.
|
||||
8. Check the captcha box and click next.
|
||||
9. Your Client ID will be on the next page.
|
||||
10. In Discord, run the following command::
|
||||
|
||||
[p]set api imgur client_id <your_client_id_here>
|
||||
@@ -1,763 +0,0 @@
|
||||
.. _mod:
|
||||
|
||||
===
|
||||
Mod
|
||||
===
|
||||
|
||||
This is the cog guide for the mod cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load mod
|
||||
|
||||
.. _mod-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
A range of highly customizable moderation tools used to protect your
|
||||
guild from users who cannot follow the rules.
|
||||
|
||||
|
||||
.. _mod-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _mod-command-ban:
|
||||
|
||||
^^^
|
||||
ban
|
||||
^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]ban <user> [days] [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Ban a user from this server and optionally delete days of messages.
|
||||
|
||||
``days`` is the amount of days of messages to cleanup on ban.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The user to ban. |user-input|
|
||||
* ``[days]``: The amount of days of messages to cleanup on ban. This parameter defaults to the defaultdays setting, or no days if this has not yet been configured.
|
||||
* ``[reason]``: The reason why the user was banned (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]ban 428675506947227648 7 Continued to spam after told to stop.``
|
||||
This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
|
||||
* ``[p]ban @Twentysix 7 Continued to spam after told to stop.``
|
||||
This will ban Twentysix and it will delete 7 days worth of messages.
|
||||
|
||||
A user ID should be provided if the user is not a member of this server.
|
||||
If days is not a number, it's treated as the first word of the reason.
|
||||
Minimum 0 days, maximum 7. If not specified, the defaultdays setting will be used instead.
|
||||
|
||||
.. _mod-command-kick:
|
||||
|
||||
^^^^
|
||||
kick
|
||||
^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]kick <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to kick. |member-input|
|
||||
* ``[reason]``: The reason why the user was kicked (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]kick 428675506947227648 wanted to be kicked.``
|
||||
This will kick the user with ID 428675506947227648 from the server.
|
||||
* ``[p]kick @Twentysix wanted to be kicked.``
|
||||
This will kick Twentysix from the server.
|
||||
|
||||
If a reason is specified, it will be the reason that shows up
|
||||
in the audit log.
|
||||
|
||||
.. _mod-command-massban:
|
||||
|
||||
^^^^^^^
|
||||
massban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]massban <user_ids...> [days] [reason]
|
||||
|
||||
.. tip:: Alias: ``hackban``
|
||||
|
||||
**Description**
|
||||
|
||||
Mass bans user(s) from the server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user_ids...>``: The users to ban. This must be a list of user IDs separated by spaces.
|
||||
* ``[days]``: The amount of days of messages to cleanup on massban.
|
||||
* ``[reason]``: The reason why these users were banned.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]massban 345628097929936898 57287406247743488 7 they broke all rules.``
|
||||
This will ban all the added userids and delete 7 days worth of their messages.
|
||||
|
||||
.. _mod-command-modset:
|
||||
|
||||
^^^^^^
|
||||
modset
|
||||
^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage server administration settings.
|
||||
|
||||
.. _mod-command-modset-defaultdays:
|
||||
|
||||
""""""""""""""""""
|
||||
modset defaultdays
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset defaultdays [days=0]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default number of days worth of messages to be deleted when a user is banned.
|
||||
|
||||
The number of days must be between 0 and 7.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[days=0]``: The default number of days of messages to be deleted when a user is banned.
|
||||
|
||||
.. note:: This value must be between 0 and 7.
|
||||
|
||||
.. _mod-command-modset-defaultduration:
|
||||
|
||||
""""""""""""""""""""""
|
||||
modset defaultduration
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset defaultduration <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default time to be used when a user is tempbanned.
|
||||
|
||||
Accepts: seconds, minutes, hours, days, weeks
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<duration>``: The default duration for when a user is temporarily banned. Accepts seconds, minutes, hours, days or weeks.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]modset defaultduration 7d12h10m``
|
||||
* ``[p]modset defaultduration 7 days 12 hours 10 minutes``
|
||||
|
||||
.. _mod-command-modset-deletenames:
|
||||
|
||||
""""""""""""""""""
|
||||
modset deletenames
|
||||
""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset deletenames [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all stored usernames and nicknames.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
|
||||
|
||||
.. _mod-command-modset-deleterepeats:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset deleterepeats
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset deleterepeats [repeats]
|
||||
|
||||
**Description**
|
||||
|
||||
Enable auto-deletion of repeated messages.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[repeats]``: The number of repeated messages needed before further messages are deleted.
|
||||
|
||||
.. note:: Must be between 2 and 20. Set to -1 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-dm:
|
||||
|
||||
"""""""""
|
||||
modset dm
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether a message should be sent to a user when they are kicked/banned.
|
||||
|
||||
If this option is enabled, the bot will attempt to DM the user with the guild name
|
||||
and reason as to why they were kicked/banned.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
|
||||
|
||||
.. _mod-command-modset-hierarchy:
|
||||
|
||||
""""""""""""""""
|
||||
modset hierarchy
|
||||
""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset hierarchy
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle role hierarchy check for mods and admins.
|
||||
|
||||
.. warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
|
||||
|
||||
This is enabled by default.
|
||||
|
||||
.. _mod-command-modset-mentionspam:
|
||||
|
||||
""""""""""""""""""
|
||||
modset mentionspam
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam
|
||||
|
||||
**Description**
|
||||
|
||||
Manage the automoderation settings for mentionspam.
|
||||
|
||||
.. _mod-command-modset-mentionspam-ban:
|
||||
|
||||
""""""""""""""""""""""
|
||||
modset mentionspam ban
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam ban <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the autoban conditions for mention spam.
|
||||
|
||||
Users will be banned if they send any message which contains more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-mentionspam-kick:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
modset mentionspam kick
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam kick <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the autokick conditions for mention spam.
|
||||
|
||||
Users will be kicked if they send any message which contains more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-mentionspam-strict:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
modset mentionspam strict
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam strict [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Setting to account for duplicate mentions.
|
||||
|
||||
If enabled all mentions will count including duplicated mentions.
|
||||
If disabled only unique mentions will count.
|
||||
|
||||
Use this command without any parameter to see the current setting.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all mentions will count, including duplicated mentions. |bool-input|
|
||||
|
||||
.. _mod-command-modset-mentionspam-warn:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
modset mentionspam warn
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam warn <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the autowarn conditions for mention spam.
|
||||
|
||||
Users will be warned if they send any messages which contain more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-reinvite:
|
||||
|
||||
"""""""""""""""
|
||||
modset reinvite
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset reinvite
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether an invite will be sent to a user when unbanned.
|
||||
|
||||
If this is True, the bot will attempt to create and send a single-use invite
|
||||
to the newly-unbanned user.
|
||||
|
||||
.. _mod-command-modset-showsettings:
|
||||
|
||||
"""""""""""""""""""
|
||||
modset showsettings
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Show the current server administration settings.
|
||||
|
||||
.. _mod-command-modset-trackallnames:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset trackallnames
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset trackallnames [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether all name changes should be tracked.
|
||||
|
||||
Toggling this off also overrides the tracknicknames setting.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all name changes should be tracked. |bool-input|
|
||||
|
||||
.. _mod-command-modset-tracknicknames:
|
||||
|
||||
"""""""""""""""""""""
|
||||
modset tracknicknames
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset tracknicknames [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether nickname changes should be tracked.
|
||||
|
||||
This setting will be overridden if trackallnames is disabled.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all nickname changes should be tracked. |bool-input|
|
||||
|
||||
.. _mod-command-movedeletedelay:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
movedeletedelay
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]movedeletedelay
|
||||
|
||||
**Description**
|
||||
|
||||
Move deletedelay settings to core
|
||||
|
||||
.. _mod-command-moveignoredchannels:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
moveignoredchannels
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]moveignoredchannels
|
||||
|
||||
**Description**
|
||||
|
||||
Move ignored channels and servers to core
|
||||
|
||||
.. _mod-command-names:
|
||||
|
||||
^^^^^
|
||||
names
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]names <member>
|
||||
|
||||
**Description**
|
||||
|
||||
Show previous names and nicknames of a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
|
||||
.. _mod-command-rename:
|
||||
|
||||
^^^^^^
|
||||
rename
|
||||
^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]rename <member> [nickname]
|
||||
|
||||
**Description**
|
||||
|
||||
Change a member's nickname.
|
||||
|
||||
Leaving the nickname empty will remove it.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[nickname]``: The new nickname for the member.
|
||||
|
||||
.. _mod-command-slowmode:
|
||||
|
||||
^^^^^^^^
|
||||
slowmode
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slowmode [interval=0:00:00]
|
||||
|
||||
**Description**
|
||||
|
||||
Changes channel's slowmode setting.
|
||||
|
||||
Interval can be anything from 0 seconds to 6 hours.
|
||||
Use without parameters to disable.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[interval=0:00:00]``: The time for the channel's slowmode settings.
|
||||
|
||||
.. note::
|
||||
Interval can be anything from 0 seconds to 6 hours.
|
||||
Use without parameters to disable.
|
||||
|
||||
.. _mod-command-softban:
|
||||
|
||||
^^^^^^^
|
||||
softban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]softban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a member and delete 1 day's worth of their messages.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to softban. |member-input-quotes|
|
||||
* ``[reason]``: Reason for the kick (optional).
|
||||
|
||||
.. _mod-command-tempban:
|
||||
|
||||
^^^^^^^
|
||||
tempban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]tempban <member> [duration] [days] [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Temporarily ban a user from this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to temporarily ban. |member-input-quotes|
|
||||
* ``[duration]``: The amount of time the user should be banned for.
|
||||
* ``[days]``: The amount of days of messages to cleanup on tempban.
|
||||
* ``[reason]``: The reason for the tempban (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]tempban @Twentysix Because I say so``
|
||||
This will ban Twentysix for the default amount of time set by an administrator.
|
||||
* ``[p]tempban @Twentysix 15m You need a timeout``
|
||||
This will ban Twentysix for 15 minutes.
|
||||
* ``[p]tempban 428675506947227648 1d2h15m 5 Evil person``
|
||||
This will ban the user with ID 428675506947227648 for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
|
||||
|
||||
.. _mod-command-unban:
|
||||
|
||||
^^^^^
|
||||
unban
|
||||
^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unban <user_id> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unban a user from this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user_id>``: |user-input|
|
||||
* ``[reason]``: The reason for the unban (optional).
|
||||
|
||||
.. _mod-command-userinfo:
|
||||
|
||||
^^^^^^^^
|
||||
userinfo
|
||||
^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]userinfo [member]
|
||||
|
||||
**Description**
|
||||
|
||||
Show information about a user.
|
||||
|
||||
This includes fields for status, discord join date, server
|
||||
join date, voice state and previous names/nicknames.
|
||||
|
||||
If the user has no roles, previous names or previous nicknames,
|
||||
these fields will be omitted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[member]``: |member-input|
|
||||
|
||||
.. _mod-command-voiceban:
|
||||
|
||||
^^^^^^^^
|
||||
voiceban
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Ban a user from speaking and listening in the server's voice channels.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to ban from voice. |member-input|
|
||||
* ``[reason]``: The reason for the voiceban (optional).
|
||||
|
||||
.. _mod-command-voicekick:
|
||||
|
||||
^^^^^^^^^
|
||||
voicekick
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicekick <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a member from a voice channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[reason]``: The reason for the voicekick (optional).
|
||||
|
||||
.. _mod-command-voiceunban:
|
||||
|
||||
^^^^^^^^^^
|
||||
voiceunban
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceunban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unban a user from speaking and listening in the server's voice channels.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to unban from voice. |member-input-quotes|
|
||||
* ``[reason]``: The reason for the voiceunban (optional).
|
||||
@@ -1,191 +0,0 @@
|
||||
.. _modlog:
|
||||
|
||||
======
|
||||
ModLog
|
||||
======
|
||||
|
||||
This is the cog guide for the modlog cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load modlog
|
||||
|
||||
.. _modlog-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Manage log channels for moderation actions.
|
||||
|
||||
|
||||
.. _modlog-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _modlog-command-case:
|
||||
|
||||
^^^^
|
||||
case
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]case <number>
|
||||
|
||||
**Description**
|
||||
|
||||
Show the specified case.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<case>``: The case number to get information for.
|
||||
|
||||
.. _modlog-command-casesfor:
|
||||
|
||||
^^^^^^^^
|
||||
casesfor
|
||||
^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]casesfor <member>
|
||||
|
||||
**Description**
|
||||
|
||||
Display cases for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get cases for. |member-input|
|
||||
|
||||
.. _modlog-command-listcases:
|
||||
|
||||
^^^^^^^^^
|
||||
listcases
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]listcases <member>
|
||||
|
||||
**Description**
|
||||
|
||||
List cases for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get cases for. |member-input|
|
||||
|
||||
.. _modlog-command-modlogset:
|
||||
|
||||
^^^^^^^^^
|
||||
modlogset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage modlog settings.
|
||||
|
||||
.. _modlog-command-modlogset-cases:
|
||||
|
||||
"""""""""""""""
|
||||
modlogset cases
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset cases [action]
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable case creation for a mod action.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[action]``: The action to enable or disable case creation for.
|
||||
|
||||
.. _modlog-command-modlogset-modlog:
|
||||
|
||||
""""""""""""""""
|
||||
modlogset modlog
|
||||
""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset modlog [channel]
|
||||
|
||||
.. tip:: Alias: ``modlogset channel``
|
||||
|
||||
**Description**
|
||||
|
||||
Set a channel as the modlog.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: The channel to set as the modlog. If omitted, the modlog will be disabled.
|
||||
|
||||
.. _modlog-command-modlogset-resetcases:
|
||||
|
||||
""""""""""""""""""""
|
||||
modlogset resetcases
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset resetcases
|
||||
|
||||
**Description**
|
||||
|
||||
Reset all modlog cases in this server.
|
||||
|
||||
.. _modlog-command-reason:
|
||||
|
||||
^^^^^^
|
||||
reason
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reason [case] <reason>
|
||||
|
||||
**Description**
|
||||
|
||||
Specify a reason for a modlog case.
|
||||
|
||||
Please note that you can only edit cases you are
|
||||
the owner of unless you are a mod, admin or server owner.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[case]``: The case number to update the reason for.
|
||||
* ``<reason>``: The new reason for the specified case.
|
||||
|
||||
.. note:: If no case number is specified, the latest case will be used.
|
||||
@@ -1,410 +0,0 @@
|
||||
.. _mutes:
|
||||
|
||||
=====
|
||||
Mutes
|
||||
=====
|
||||
|
||||
This is the cog guide for the mutes cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load mutes
|
||||
|
||||
.. _mutes-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Mute users temporarily or indefinitely.
|
||||
|
||||
.. _mutes-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _mutes-command-activemutes:
|
||||
|
||||
^^^^^^^^^^^
|
||||
activemutes
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]activemutes
|
||||
|
||||
**Description**
|
||||
|
||||
Displays active mutes on this server.
|
||||
|
||||
.. _mutes-command-mute:
|
||||
|
||||
^^^^
|
||||
mute
|
||||
^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mute <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Mute users.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]mute @member1 @member2 spam 5 hours``
|
||||
* ``[p]mute @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 indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-mutechannel:
|
||||
|
||||
^^^^^^^^^^^
|
||||
mutechannel
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mutechannel <users...> [time_and_reason]
|
||||
|
||||
.. tip:: Alias: ``channelmute``
|
||||
|
||||
**Description**
|
||||
|
||||
Mute a user in the current text channel.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]mutechannel @member1 @member2 spam 5 hours``
|
||||
* ``[p]mutechannel @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 indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-muteset:
|
||||
|
||||
^^^^^^^
|
||||
muteset
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset
|
||||
|
||||
**Description**
|
||||
|
||||
Mute settings.
|
||||
|
||||
.. _mutes-command-muteset-defaulttime:
|
||||
|
||||
"""""""""""""""""""
|
||||
muteset defaulttime
|
||||
"""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset defaulttime [time]
|
||||
|
||||
.. tip:: Alias: ``muteset time``
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default mute time for the mute command.
|
||||
|
||||
If no time interval is provided this will be cleared.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[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:
|
||||
|
||||
""""""""""""""""
|
||||
muteset makerole
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset makerole <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a Muted role.
|
||||
|
||||
This will create a role and apply overwrites to all available channels
|
||||
to more easily setup muting a user.
|
||||
|
||||
If you already have a muted role created on the server use
|
||||
``[p]muteset role ROLE_NAME_HERE``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name of the muted role to create.
|
||||
|
||||
.. _mutes-command-muteset-notification:
|
||||
|
||||
""""""""""""""""""""
|
||||
muteset notification
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset notification [channel]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the notification channel for automatic unmute issues.
|
||||
|
||||
If no channel is provided this will be cleared and notifications
|
||||
about issues when unmuting users will not be sent anywhere.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: The channel to receive unmute issue updates. |channel-input|
|
||||
|
||||
.. _mutes-command-muteset-role:
|
||||
|
||||
""""""""""""
|
||||
muteset role
|
||||
""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset role [role]
|
||||
|
||||
**Description**
|
||||
|
||||
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.
|
||||
|
||||
.. Note::
|
||||
|
||||
If no role is setup a user may be able to leave the server
|
||||
and rejoin no longer being muted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[role]``: The role for muted users to receive. |role-input|
|
||||
|
||||
.. _mutes-command-muteset-senddm:
|
||||
|
||||
""""""""""""""
|
||||
muteset senddm
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset senddm <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set whether mute notifications should be sent to users in DMs.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-muteset-settings:
|
||||
|
||||
""""""""""""""""
|
||||
muteset settings
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset settings
|
||||
|
||||
.. tip:: Alias: ``muteset showsettings``
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current mute settings for this guild.
|
||||
|
||||
.. _mutes-command-muteset-showmoderator:
|
||||
|
||||
"""""""""""""""""""""
|
||||
muteset showmoderator
|
||||
"""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset showmoderator <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Decide whether the name of the moderator muting a user should be included in the DM to that user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-unmute:
|
||||
|
||||
^^^^^^
|
||||
unmute
|
||||
^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unmute <users...> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute users.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
|
||||
.. _mutes-command-unmutechannel:
|
||||
|
||||
^^^^^^^^^^^^^
|
||||
unmutechannel
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unmutechannel <users...> [reason]
|
||||
|
||||
.. tip:: Alias: ``channelunmute``
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute a user in this channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
|
||||
.. _mutes-command-voicemute:
|
||||
|
||||
^^^^^^^^^
|
||||
voicemute
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicemute <users...> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Mute a user in their current voice channel.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]voicemute @member1 @member2 spam 5 hours``
|
||||
* ``[p]voicemute @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 indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-voiceunmute:
|
||||
|
||||
^^^^^^^^^^^
|
||||
voiceunmute
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceunmute <users...> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute a user in their current voice channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
@@ -1,440 +0,0 @@
|
||||
.. _permissions:
|
||||
|
||||
===========
|
||||
Permissions
|
||||
===========
|
||||
|
||||
This is the cog guide for the permissions cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load permissions
|
||||
|
||||
.. _permissions-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Customise permissions for commands and cogs.
|
||||
|
||||
This cog extends the default permission model of the bot. By default, many commands are restricted based on what the command can do.
|
||||
This cog allows you to refine some of those restrictions. You can allow wider or narrower access to most commands using it. You cannot, however, change the restrictions on owner-only commands.
|
||||
|
||||
When additional rules are set using this cog, those rules will be checked prior to checking for the default restrictions of the command.
|
||||
Global rules (set by the owner) are checked first, then rules set for servers. If multiple global or server rules apply to the case, the order they are checked in is:
|
||||
|
||||
1. Rules about a user.
|
||||
2. Rules about the voice channel a user is in.
|
||||
3. Rules about the text channel a command was issued in.
|
||||
4. Rules about a role the user has (The highest role they have with a rule will be used).
|
||||
5. Rules about the server a user is in (Global rules only).
|
||||
|
||||
|
||||
.. _permissions-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _permissions-command-permissions:
|
||||
|
||||
^^^^^^^^^^^
|
||||
permissions
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions
|
||||
|
||||
**Description**
|
||||
|
||||
Command permission management tools.
|
||||
|
||||
.. _permissions-command-permissions-acl:
|
||||
|
||||
"""""""""""""""
|
||||
permissions acl
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl
|
||||
|
||||
**Description**
|
||||
|
||||
Manage permissions with YAML files.
|
||||
|
||||
.. tip:: See :ref:`here <cog_permissions>` for more information with configuring these yaml files.
|
||||
|
||||
.. _permissions-command-permissions-acl-getglobal:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl getglobal
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl getglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Get a YAML file detailing all global rules.
|
||||
|
||||
.. _permissions-command-permissions-acl-getserver:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl getserver
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl getserver
|
||||
|
||||
**Description**
|
||||
|
||||
Get a YAML file detailing all rules in this server.
|
||||
|
||||
.. _permissions-command-permissions-acl-setglobal:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl setglobal
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl setglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Set global rules with a YAML file.
|
||||
|
||||
.. warning::
|
||||
This will override reset *all* global rules
|
||||
to the rules specified in the uploaded file.
|
||||
|
||||
This does not validate the names of commands and cogs before
|
||||
setting the new rules.
|
||||
|
||||
.. _permissions-command-permissions-acl-setserver:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl setserver
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl setserver
|
||||
|
||||
**Description**
|
||||
|
||||
Set rules for this server with a YAML file.
|
||||
|
||||
.. warning::
|
||||
This will override reset *all* rules in this
|
||||
server to the rules specified in the uploaded file.
|
||||
|
||||
.. _permissions-command-permissions-acl-updateglobal:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions acl updateglobal
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl updateglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Update global rules with a YAML file.
|
||||
|
||||
This won't touch any rules not specified in the YAML
|
||||
file.
|
||||
|
||||
.. _permissions-command-permissions-acl-updateserver:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions acl updateserver
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl updateserver
|
||||
|
||||
**Description**
|
||||
|
||||
Update rules for this server with a YAML file.
|
||||
|
||||
This won't touch any rules not specified in the YAML
|
||||
file.
|
||||
|
||||
.. _permissions-command-permissions-acl-yamlexample:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
permissions acl yamlexample
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl yamlexample
|
||||
|
||||
**Description**
|
||||
|
||||
Sends an example of the yaml layout for permissions
|
||||
|
||||
.. _permissions-command-permissions-addglobalrule:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions addglobalrule
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions addglobalrule <allow_or_deny> <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a global rule to a cog or command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-addserverrule:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions addserverrule
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions addserverrule <allow_or_deny> <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a rule to a cog or command in this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-canrun:
|
||||
|
||||
""""""""""""""""""
|
||||
permissions canrun
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions canrun <user> <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a user can run a command.
|
||||
|
||||
This will take the current context into account, such as the
|
||||
server and text channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The user to check permissions for.
|
||||
* ``<command>``: The command to check whether the user can run it or not.
|
||||
|
||||
.. _permissions-command-permissions-clearglobalrules:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions clearglobalrules
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions clearglobalrules
|
||||
|
||||
**Description**
|
||||
|
||||
Reset all global rules.
|
||||
|
||||
.. _permissions-command-permissions-clearserverrules:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions clearserverrules
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions clearserverrules
|
||||
|
||||
**Description**
|
||||
|
||||
Reset all rules in this server.
|
||||
|
||||
.. _permissions-command-permissions-explain:
|
||||
|
||||
"""""""""""""""""""
|
||||
permissions explain
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions explain
|
||||
|
||||
**Description**
|
||||
|
||||
Explain how permissions works.
|
||||
|
||||
.. _permissions-command-permissions-removeglobalrule:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions removeglobalrule
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions removeglobalrule <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a global rule from a command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-removeserverrule:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions removeserverrule
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions removeserverrule <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a server rule from a command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-setdefaultglobalrule:
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
permissions setdefaultglobalrule
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions setdefaultglobalrule <allow_or_deny> <cog_or_command>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default global rule for a command or a cog.
|
||||
|
||||
This is the rule a command will default to when no other rule
|
||||
is found.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-setdefaultserverrule:
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
permissions setdefaultserverrule
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions setdefaultserverrule <allow_or_deny> <cog_or_command>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default rule for a command or a cog in this server.
|
||||
|
||||
This is the rule a command will default to when no other rule
|
||||
is found.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
@@ -1,141 +0,0 @@
|
||||
.. _reports:
|
||||
|
||||
=======
|
||||
Reports
|
||||
=======
|
||||
|
||||
This is the cog guide for the reports cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load reports
|
||||
|
||||
.. _reports-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Create user reports that server staff can respond to.
|
||||
|
||||
Users can open reports using ``[p]report``. These are then sent
|
||||
to a channel in the server for staff, and the report creator
|
||||
gets a DM. Both can be used to communicate.
|
||||
|
||||
|
||||
.. _reports-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _reports-command-report:
|
||||
|
||||
^^^^^^
|
||||
report
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]report [text]
|
||||
|
||||
**Description**
|
||||
|
||||
Send a report.
|
||||
|
||||
Use without arguments for interactive reporting, or do
|
||||
``[p]report [text]`` to use it non-interactively.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[text]``: The content included within the report.
|
||||
|
||||
.. _reports-command-report-interact:
|
||||
|
||||
"""""""""""""""
|
||||
report interact
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]report interact <ticket_number>
|
||||
|
||||
**Description**
|
||||
|
||||
Open a message tunnel.
|
||||
|
||||
This tunnel will forward things you say in this channel
|
||||
to the ticket opener's direct messages.
|
||||
|
||||
Tunnels do not persist across bot restarts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<ticket_number>``: The ticket number to open the tunnel in.
|
||||
|
||||
.. _reports-command-reportset:
|
||||
|
||||
^^^^^^^^^
|
||||
reportset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage Reports.
|
||||
|
||||
.. _reports-command-reportset-output:
|
||||
|
||||
""""""""""""""""
|
||||
reportset output
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset output <channel>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the channel where reports will be sent.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel>``: |channel-input|
|
||||
|
||||
.. _reports-command-reportset-toggle:
|
||||
|
||||
""""""""""""""""
|
||||
reportset toggle
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset toggle
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable reporting for this server.
|
||||
@@ -1,517 +0,0 @@
|
||||
.. _streams:
|
||||
|
||||
=======
|
||||
Streams
|
||||
=======
|
||||
|
||||
This is the cog guide for the Streams cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load streams
|
||||
|
||||
.. _streams-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog provides commands to check if a channel
|
||||
on a supported streaming service is live as well
|
||||
as to create and manage alerts for channels.
|
||||
|
||||
Supported streaming services are:
|
||||
|
||||
- Twitch
|
||||
- Youtube
|
||||
- Picarto
|
||||
|
||||
Youtube and Twitch both require setting authentication
|
||||
details for commands for those services to work. See
|
||||
:ref:`[p]streamset twitchtoken <streams-command-streamset-twitchtoken>` and
|
||||
:ref:`[p]streamset youtubekey <streams-command-streamset-youtubekey>`
|
||||
for more information.
|
||||
|
||||
.. _streams-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _streams-command-streamset:
|
||||
|
||||
^^^^^^^^^
|
||||
streamset
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage stream alert settings.
|
||||
|
||||
.. _streams-command-streamset-autodelete:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset autodelete
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset autodelete <on_off>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggles automatic deletion of stream alerts when the
|
||||
stream goes offline.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<on_off>``: Whether to turn on or off
|
||||
|
||||
.. _streams-command-streamset-ignorereruns:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset ignorereruns
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset ignorereruns
|
||||
|
||||
**Description**
|
||||
|
||||
Toggles excluding reruns from the alerts.
|
||||
|
||||
At this time, this functionality only applies to Twitch stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
streamset mention
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentions for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-all:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention all
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention all
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning ``@everyone`` for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-online:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention online
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention online
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning ``@here`` for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-role:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention role
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention role <role>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning a role for stream alerts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to toggle a mention for. |role-input|
|
||||
|
||||
.. _streams-command-streamset-message:
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
streamset message
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message
|
||||
|
||||
**Description**
|
||||
|
||||
Manage custom messages for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-message-mention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message mention
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message mention <message>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets a stream alert message for when mentions are enabled.
|
||||
|
||||
Use ``{mention}`` in the message to insert the selected mentions.
|
||||
|
||||
Use ``{stream}`` in the message to insert the channel or user name.
|
||||
|
||||
Use ``{stream.display_name}`` in the message to insert the channel's display name
|
||||
(on Twitch, this may be different from ``{stream}``).
|
||||
|
||||
For example: ``[p]streamset message mention {mention}, {stream.display_name} is live!``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<message>``: Your alert message
|
||||
|
||||
.. _streams-command-streamset-message-nomention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message nomention
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message nomention <message>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets a stream alert message for when mentions are disabled.
|
||||
|
||||
Use ``{stream}`` in the message to insert the channel or user name.
|
||||
|
||||
Use ``{stream.display_name}`` in the message to insert the channel's display name
|
||||
(on Twitch, this may be different from ``{stream}``).
|
||||
|
||||
For example: ``[p]streamset message nomention {stream.display_name} is live!``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<message>``: Your alert message
|
||||
|
||||
.. _streams-command-streamset-message-clear:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message clear
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message clear
|
||||
|
||||
**Description**
|
||||
|
||||
Resets the stream alert messages for the server.
|
||||
|
||||
.. _streams-command-streamset-timer:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
streamset timer
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset timer <refresh_timer>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the refresh time for stream alerts (how frequently they will be checked).
|
||||
|
||||
This cannot be set to anything less than 60 seconds.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<refresh_timer>``: The frequency with which streams should be checked, in seconds
|
||||
|
||||
.. _streams-command-streamset-youtubekey:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset youtubekey
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset youtubekey
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set the YouTube token.
|
||||
|
||||
To get one, do the following:
|
||||
|
||||
1. Create a project
|
||||
(see https://support.google.com/googleapi/answer/6251787 for details)
|
||||
|
||||
2. Enable the YouTube Data API v3
|
||||
(see https://support.google.com/googleapi/answer/6158841 for instructions)
|
||||
|
||||
3. Set up your API key
|
||||
(see https://support.google.com/googleapi/answer/6158862 for instructions)
|
||||
|
||||
4. Copy your API key and run the command ``[p]set api youtube api_key <your_api_key_here>``
|
||||
|
||||
.. attention:: These tokens are sensitive and should only be
|
||||
used in a private channel or in DM with the bot.
|
||||
|
||||
.. _streams-command-streamset-twitchtoken:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset twitchtoken
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset twitchtoken
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set the Twitch token.
|
||||
|
||||
To set the Twitch API tokens, follow these steps:
|
||||
|
||||
1. Go to this page: https://dev.twitch.tv/dashboard/apps.
|
||||
|
||||
2. Click Register Your Application.
|
||||
|
||||
3. Enter a name, set the OAuth Redirect URI to http://localhost, and select an Application Category of your choosing.
|
||||
|
||||
4. Click Register.
|
||||
|
||||
5. Copy your client ID and your client secret into:
|
||||
``[p]set api twitch client_id <your_client_id_here> client_secret <your_client_secret_here>``
|
||||
|
||||
.. attention:: These tokens are sensitive and should only be
|
||||
used in a private channel or in DM with the bot.
|
||||
|
||||
.. _streams-command-picarto:
|
||||
|
||||
^^^^^^^
|
||||
picarto
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]picarto <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a Picarto channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Picarto channel to check.
|
||||
|
||||
.. _streams-command-twitchstream:
|
||||
|
||||
^^^^^^^^^^^^
|
||||
twitchstream
|
||||
^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]twitchstream <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a Twitch channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Twitch channel to check.
|
||||
|
||||
.. _streams-command-youtubestream:
|
||||
|
||||
^^^^^^^^^^^^^
|
||||
youtubestream
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]youtubestream <channel_id_or_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a YouTube channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
|
||||
|
||||
.. _streams-command-streamalert:
|
||||
|
||||
^^^^^^^^^^^
|
||||
streamalert
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert
|
||||
|
||||
**Description**
|
||||
|
||||
Manage automated stream alerts.
|
||||
|
||||
.. _streams-command-streamalert-list:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
streamalert list
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert list
|
||||
|
||||
**Description**
|
||||
|
||||
Lists all active alerts in the current server.
|
||||
|
||||
.. _streams-command-streamalert-picarto:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
streamalert picarto
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert picarto <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Picarto channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Picarto channel to toggle the alert for.
|
||||
|
||||
.. _streams-command-streamalert-twitch-channel:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamalert twitch channel
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert twitch channel <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Twitch channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Twitch channel to toggle the alert for.
|
||||
|
||||
.. _streams-command-streamalert-youtube:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
streamalert youtube
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert youtube <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Picarto channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
|
||||
|
||||
.. _streams-command-streamalert-stop:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
streamalert stop
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert stop [disable-all=No]
|
||||
|
||||
**Description**
|
||||
|
||||
Disable all stream alerts for this channel or server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[disable-all]``: Defaults to ``no``. If this is set to ``yes``, all
|
||||
stream alerts in the current server will be disabled.
|
||||
If ``no`` or unspecified, all stream alerts in the
|
||||
current channel will be stopped.
|
||||
@@ -1,439 +0,0 @@
|
||||
.. _trivia:
|
||||
|
||||
======
|
||||
Trivia
|
||||
======
|
||||
|
||||
This is the cog guide for the trivia cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load trivia
|
||||
|
||||
.. _trivia-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog allows for playing trivia with others. You may
|
||||
choose to play just one category at a time or choose
|
||||
multiple to add variety to your game. You can even create
|
||||
your own lists!
|
||||
|
||||
.. _trivia-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here is a list of all of the commands for this cog:
|
||||
|
||||
.. _trivia-command-triviaset:
|
||||
|
||||
^^^^^^^^^
|
||||
triviaset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset
|
||||
|
||||
**Description**
|
||||
|
||||
Commands for managing trivia settings.
|
||||
|
||||
.. _trivia-command-triviaset-botplays:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset botplays
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset botplays <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets whether the bot gains a point if nobody guesses correctly.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<true_or_false>`` If ``true``, the bot will gain a point if nobody
|
||||
guesses correctly, otherwise it will not.
|
||||
|
||||
.. _trivia-command-triviaset-maxscore:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset maxscore
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset maxscore <score>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the total points required to win.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<score>`` The amount of points required to win.
|
||||
|
||||
.. _trivia-command-triviaset-override:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset override
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset override <enabled>
|
||||
|
||||
**Description**
|
||||
|
||||
Allow/disallow trivia lists to override the settings.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<enabled>`` Whether trivia lists should be able to override settings.
|
||||
|
||||
.. _trivia-command-triviaset-payout:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
triviaset payout
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset payout <multiplier>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the payout multiplier.
|
||||
|
||||
If a user wins trivia when at least 3 users are playing, they will receive credits;
|
||||
the amount received is determined by multiplying their total score by this multiplier.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<multiplier>`` The amount to multiply the winner's score by to determine payout.
|
||||
This can be any positive decimal number. Setting this to 0 will disable.
|
||||
|
||||
.. _trivia-command-triviaset-revealanswer:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset revealanswer
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset revealanswer <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets whether or not the answer is revealed if the time limit for answering runs out.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<true_or_false>`` If ``true``, the bot will reveal the answer if there is no
|
||||
correct guess within the time limit.
|
||||
|
||||
.. _trivia-command-triviaset-showsettings:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset showsettings
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current trivia settings.
|
||||
|
||||
.. _trivia-command-triviaset-stopafter:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
triviaset stopafter
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset stopafter <seconds>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets how long the bot should wait before stopping the trivia
|
||||
session due to lack of response.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The number of seconds to wait before stopping the session.
|
||||
|
||||
.. _trivia-command-triviaset-timelimit:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
triviaset timelimit
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset timelimit <seconds>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the maximum time permitted to answer a question.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The number of seconds to wait for an answer.
|
||||
|
||||
.. _trivia-command-triviaset-custom:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
triviaset custom
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom
|
||||
|
||||
**Description**
|
||||
|
||||
Manage custom trivia lists.
|
||||
|
||||
.. tip::
|
||||
|
||||
Looking to learn how to create your own trivia lists?
|
||||
See :ref:`here <guide_trivia_list_creation>` for more information.
|
||||
|
||||
.. _trivia-command-triviaset-custom-upload:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom upload
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom upload
|
||||
|
||||
**Description**
|
||||
|
||||
Upload a custom trivia list. The bot will prompt you to upload
|
||||
your list as an attachment in Discord.
|
||||
|
||||
.. _trivia-command-triviaset-custom-list:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom list
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom list
|
||||
|
||||
**Description**
|
||||
|
||||
List all uploaded custom trivia lists.
|
||||
|
||||
.. _trivia-command-triviaset-custom-delete:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom delete
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom delete <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a custom trivia list.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<name>`` The name of the custom list to be deleted.
|
||||
|
||||
.. _trivia-command-trivia:
|
||||
|
||||
^^^^^^
|
||||
trivia
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia <categories...>
|
||||
|
||||
**Description**
|
||||
|
||||
Start a trivia session on the specified category.
|
||||
|
||||
Multiple categories can be listed, in which case the trivia session
|
||||
will use all of the specified lists to select questions from.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<categories...>`` The category to play. Can be multiple.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the trivia leaderboard. Defaults to the top ten in the
|
||||
current server, sorted by total wins. The subcommands provide
|
||||
more customized leaderboards.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard-global:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard global
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard global [sort_by=wins] [top=10]
|
||||
|
||||
**Description**
|
||||
|
||||
The global trivia leaderboard.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||
|
||||
- ``wins`` Total wins
|
||||
- ``avg`` Average score
|
||||
- ``total`` Total correct answers from all sessions
|
||||
- ``games`` Total games played.
|
||||
|
||||
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||
|
||||
.. _trivia-command-trivia-leaderboard-server:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard server
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard server [sort_by=wins] [top=10]
|
||||
|
||||
**Description**
|
||||
|
||||
The trivia leaderboard for this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||
|
||||
- ``wins`` Total wins
|
||||
- ``avg`` Average score
|
||||
- ``total`` Total correct answers from all sessions
|
||||
- ``games`` Total games played.
|
||||
|
||||
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||
|
||||
.. _trivia-command-trivia-list:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia list
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia list
|
||||
|
||||
**Description**
|
||||
|
||||
Lists the available trivia categories
|
||||
|
||||
.. _trivia-command-trivia-stop:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia stop
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia stop
|
||||
|
||||
**Description**
|
||||
|
||||
Stops an ongoing trivia session.
|
||||
@@ -1,403 +0,0 @@
|
||||
.. _warnings:
|
||||
|
||||
========
|
||||
Warnings
|
||||
========
|
||||
|
||||
This is the cog guide for the warnings cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load warnings
|
||||
|
||||
.. _warnings-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Warn misbehaving users and take automated actions.
|
||||
|
||||
|
||||
.. _warnings-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _warnings-command-actionlist:
|
||||
|
||||
^^^^^^^^^^
|
||||
actionlist
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]actionlist
|
||||
|
||||
**Description**
|
||||
|
||||
List all configured automated actions for Warnings.
|
||||
|
||||
.. _warnings-command-mywarnings:
|
||||
|
||||
^^^^^^^^^^
|
||||
mywarnings
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mywarnings
|
||||
|
||||
**Description**
|
||||
|
||||
List warnings for yourself.
|
||||
|
||||
.. _warnings-command-reasonlist:
|
||||
|
||||
^^^^^^^^^^
|
||||
reasonlist
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reasonlist
|
||||
|
||||
**Description**
|
||||
|
||||
List all configured reasons for Warnings.
|
||||
|
||||
.. _warnings-command-unwarn:
|
||||
|
||||
^^^^^^
|
||||
unwarn
|
||||
^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unwarn <member> <warn_id> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a warning from a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to remove the warning from. |member-input-quotes|
|
||||
* ``<warn_id>``: The warning ID to remove from the member.
|
||||
* ``[reason]``: The reason for unwarning this member.
|
||||
|
||||
.. _warnings-command-warn:
|
||||
|
||||
^^^^
|
||||
warn
|
||||
^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warn <member> [points=1] <reason>
|
||||
|
||||
**Description**
|
||||
|
||||
Warn the user for the specified reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to warn. |member-input-quotes|
|
||||
* ``[points]``: The number of points the warning should be for. If no number is supplied, 1 point will be given. Pre-set warnings disregard this.
|
||||
* ``<reason>``: The reason for the warning. This can be a registered reason, or a custom reason if ``[p]warningset allowcustomreasons`` is set.
|
||||
|
||||
.. _warnings-command-warnaction:
|
||||
|
||||
^^^^^^^^^^
|
||||
warnaction
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction
|
||||
|
||||
**Description**
|
||||
|
||||
Manage automated actions for Warnings.
|
||||
|
||||
Actions are essentially command macros. Any command can be run
|
||||
when the action is initially triggered, and/or when the action
|
||||
is lifted.
|
||||
|
||||
Actions must be given a name and a points threshold. When a
|
||||
user is warned enough so that their points go over this
|
||||
threshold, the action will be executed.
|
||||
|
||||
.. _warnings-command-warnaction-add:
|
||||
|
||||
""""""""""""""
|
||||
warnaction add
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction add <name> <points>
|
||||
|
||||
**Description**
|
||||
|
||||
Create an automated action.
|
||||
|
||||
Duplicate action names are not allowed.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name of the action.
|
||||
* ``<points>``: The number of points for this action.
|
||||
|
||||
.. _warnings-command-warnaction-delete:
|
||||
|
||||
"""""""""""""""""
|
||||
warnaction delete
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction delete <action_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the action with the specified name.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<action_name>``: The name of the action to delete.
|
||||
|
||||
.. _warnings-command-warnings:
|
||||
|
||||
^^^^^^^^
|
||||
warnings
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnings <member>
|
||||
|
||||
**Description**
|
||||
|
||||
List the warnings for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get the warnings for. |member-input|
|
||||
|
||||
.. _warnings-command-warningset:
|
||||
|
||||
^^^^^^^^^^
|
||||
warningset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage settings for Warnings.
|
||||
|
||||
.. _warnings-command-warningset-allowcustomreasons:
|
||||
|
||||
"""""""""""""""""""""""""""""
|
||||
warningset allowcustomreasons
|
||||
"""""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset allowcustomreasons <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable custom reasons for a warning.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-senddm:
|
||||
|
||||
"""""""""""""""""
|
||||
warningset senddm
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset senddm <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set whether warnings should be sent to users in DMs.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-showmoderator:
|
||||
|
||||
""""""""""""""""""""""""
|
||||
warningset showmoderator
|
||||
""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset showmoderator <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Decide whether the name of the moderator warning a user should be included in the DM to that user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-usewarnchannel:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
warningset usewarnchannel
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset usewarnchannel <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set if warnings should be sent to a channel set with ``[p]warningset warnchannel``.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-warnchannel:
|
||||
|
||||
""""""""""""""""""""""
|
||||
warningset warnchannel
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset warnchannel [channel]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the channel where warnings should be sent to.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: |channel-input| Leave empty to use the channel ``[p]warn`` command was called in.
|
||||
|
||||
.. _warnings-command-warnreason:
|
||||
|
||||
^^^^^^^^^^
|
||||
warnreason
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason
|
||||
|
||||
**Description**
|
||||
|
||||
Manage warning reasons.
|
||||
|
||||
Reasons must be given a name, description and points value. The
|
||||
name of the reason must be given when a user is warned.
|
||||
|
||||
.. _warnings-command-warnreason-create:
|
||||
|
||||
"""""""""""""""""
|
||||
warnreason create
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason create <name> <points> <description>
|
||||
|
||||
.. tip:: Alias: ``warnreason add``
|
||||
|
||||
**Description**
|
||||
|
||||
Create a warning reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name for the new reason.
|
||||
* ``<points>``: The number of points with the new reason.
|
||||
* ``<description>``: The description of the new warn reason.
|
||||
|
||||
.. _warnings-command-warnreason-delete:
|
||||
|
||||
"""""""""""""""""
|
||||
warnreason delete
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason delete <reason_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a warning reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<reason_name>``: The name of the reason to delete.
|
||||
@@ -1,5 +1,4 @@
|
||||
.. Permissions Cog Reference
|
||||
.. _cog_permissions:
|
||||
|
||||
=========================
|
||||
Permissions Cog Reference
|
||||
|
||||
46
docs/conf.py
@@ -21,7 +21,6 @@ import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
sys.path.insert(0, os.path.abspath("_ext"))
|
||||
|
||||
os.environ["BUILDING_DOCS"] = "1"
|
||||
|
||||
@@ -37,14 +36,11 @@ os.environ["BUILDING_DOCS"] = "1"
|
||||
# ones.
|
||||
extensions = [
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.extlinks",
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.doctest",
|
||||
"sphinxcontrib_trio",
|
||||
"sphinx-prompt",
|
||||
"deprecated_removed",
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -61,7 +57,7 @@ master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "Red - Discord Bot"
|
||||
copyright = "2018-2021, Cog Creators"
|
||||
copyright = "2018, Cog Creators"
|
||||
author = "Cog Creators"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@@ -69,7 +65,6 @@ author = "Cog Creators"
|
||||
# built documents.
|
||||
#
|
||||
from redbot.core import __version__
|
||||
from discord import __version__ as dpy_version
|
||||
|
||||
# The short X.Y version.
|
||||
version = __version__
|
||||
@@ -86,16 +81,10 @@ language = None
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = [
|
||||
"_build",
|
||||
"Thumbs.db",
|
||||
".DS_Store",
|
||||
# to ensure that include files (partial pages) aren't built, exclude them
|
||||
"**/_includes/**",
|
||||
]
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = "default"
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
@@ -103,12 +92,6 @@ todo_include_todos = False
|
||||
# Role which is assigned when you make a simple reference within backticks
|
||||
default_role = "any"
|
||||
|
||||
# Includes substitutions for all files
|
||||
with open("prolog.txt", "r") as file:
|
||||
rst_prolog = file.read()
|
||||
|
||||
# Adds d.py version to available substitutions in all files
|
||||
rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
@@ -117,11 +100,8 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#
|
||||
html_extra_path = ["_html"]
|
||||
# This will be needed until sphinx_rtd_theme supports the html5 writer
|
||||
html4_writer = True
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -219,7 +199,6 @@ texinfo_documents = [
|
||||
# A list of regular expressions that match URIs that should not be
|
||||
# checked when doing a linkcheck build.
|
||||
linkcheck_ignore = [r"https://java.com*", r"https://chocolatey.org*"]
|
||||
linkcheck_retries = 3
|
||||
|
||||
|
||||
# -- Options for extensions -----------------------------------------------
|
||||
@@ -227,19 +206,8 @@ linkcheck_retries = 3
|
||||
# Intersphinx
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
|
||||
"dpy": ("https://discordpy.readthedocs.io/en/v1.0.1/", None),
|
||||
"motor": ("https://motor.readthedocs.io/en/stable/", None),
|
||||
"babel": ("http://babel.pocoo.org/en/stable/", None),
|
||||
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
|
||||
}
|
||||
|
||||
# Extlinks
|
||||
# This allows to create links to d.py docs with
|
||||
# :dpy_docs:`link text <site_name.html>`
|
||||
extlinks = {
|
||||
"dpy_docs": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#"),
|
||||
"ghuser": ("https://github.com/%s", "@"),
|
||||
}
|
||||
|
||||
# Doctest
|
||||
@@ -248,5 +216,5 @@ extlinks = {
|
||||
doctest_test_doctest_blocks = ""
|
||||
|
||||
# Autodoc options
|
||||
autodoc_default_options = {"show-inheritance": True}
|
||||
autodoc_default_flags = ["show-inheritance"]
|
||||
autodoc_typehints = "none"
|
||||
|
||||
@@ -6,7 +6,7 @@ Shared API Keys
|
||||
|
||||
Red has a central API key storage utilising the core bots config. This allows cog creators to add a single location to store API keys for their cogs which may be shared between other cogs.
|
||||
|
||||
There needs to be some consistency between cog creators when using shared API keys between cogs. To help make this easier service should be all **lowercase** and the key names should match the naming convention of the API being accessed.
|
||||
There needs to be some consistency between cog creators when using shared API keys between cogs. To help make this easier service should be all **lowercase** and the key names should match the naming convetion of the API being accessed.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -18,7 +18,7 @@ and when accessed in the code it should be done by
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
await self.bot.get_shared_api_tokens("twitch")
|
||||
await self.bot.db.api_tokens.get_raw("twitch", default={"client_id": None, "client_secret": None})
|
||||
|
||||
Each service has its own dict of key, value pairs for each required key type. If there's only one key required then a name for the key is still required for storing and accessing.
|
||||
|
||||
@@ -30,7 +30,7 @@ and when accessed in the code it should be done by
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
await self.bot.get_shared_api_tokens("youtube")
|
||||
await self.bot.db.api_tokens.get_raw("youtube", default={"api_key": None})
|
||||
|
||||
|
||||
***********
|
||||
@@ -42,36 +42,7 @@ Basic Usage
|
||||
class MyCog:
|
||||
@commands.command()
|
||||
async def youtube(self, ctx, user: str):
|
||||
youtube_keys = await self.bot.get_shared_api_tokens("youtube")
|
||||
if youtube_keys.get("api_key") is None:
|
||||
apikey = await self.bot.db.api_tokens.get_raw("youtube", default={"api_key": None})
|
||||
if apikey["api_key"] is None:
|
||||
return await ctx.send("The YouTube API key has not been set.")
|
||||
# Use the API key to access content as you normally would
|
||||
|
||||
|
||||
***************
|
||||
Event Reference
|
||||
***************
|
||||
|
||||
.. function:: on_red_api_tokens_update(service_name, api_tokens)
|
||||
|
||||
Dispatched when service's api keys are updated.
|
||||
|
||||
:param service_name: Name of the service.
|
||||
:type service_name: :class:`str`
|
||||
:param api_tokens: New Mapping of token names to tokens. This contains api tokens that weren't changed too.
|
||||
:type api_tokens: Mapping[:class:`str`, :class:`str`]
|
||||
|
||||
|
||||
*********************
|
||||
Additional References
|
||||
*********************
|
||||
|
||||
.. py:currentmodule:: redbot.core.bot
|
||||
|
||||
.. automethod:: Red.get_shared_api_tokens
|
||||
|
||||
.. automethod:: Red.set_shared_api_tokens
|
||||
|
||||
.. automethod:: Red.remove_shared_api_tokens
|
||||
|
||||
.. automethod:: Red.remove_shared_api_services
|
||||
|
||||
@@ -7,5 +7,5 @@ Command Check Decorators
|
||||
The following are all decorators for commands, which add restrictions to where and when they can be
|
||||
run.
|
||||
|
||||
.. automodule:: redbot.core.commands
|
||||
:members: permissions_check, bot_has_permissions, bot_in_a_guild, has_permissions, has_guild_permissions, is_owner, guildowner, guildowner_or_permissions, admin, admin_or_permissions, mod, mod_or_permissions
|
||||
.. automodule:: redbot.core.checks
|
||||
:members:
|
||||
|
||||
@@ -7,23 +7,14 @@ Commands Package
|
||||
This package acts almost identically to :doc:`discord.ext.commands <dpy:ext/commands/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.
|
||||
extend functionlities used throughout the bot, as outlined below.
|
||||
|
||||
.. autofunction:: redbot.core.commands.command
|
||||
|
||||
.. autofunction:: redbot.core.commands.group
|
||||
|
||||
.. autoclass:: redbot.core.commands.Cog
|
||||
|
||||
.. automethod:: format_help_for_context
|
||||
|
||||
.. automethod:: red_get_data_for_user
|
||||
|
||||
.. automethod:: red_delete_data_for_user
|
||||
|
||||
.. autoclass:: redbot.core.commands.Command
|
||||
:members:
|
||||
:inherited-members: format_help_for_context
|
||||
|
||||
.. autoclass:: redbot.core.commands.Group
|
||||
:members:
|
||||
@@ -31,33 +22,5 @@ extend functionalities used throughout the bot, as outlined below.
|
||||
.. autoclass:: redbot.core.commands.Context
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.commands.GuildContext
|
||||
|
||||
.. autoclass:: redbot.core.commands.DMContext
|
||||
|
||||
.. automodule:: redbot.core.commands.requires
|
||||
:members: PrivilegeLevel, PermState, Requires
|
||||
|
||||
.. automodule:: redbot.core.commands.converter
|
||||
:members:
|
||||
:exclude-members: UserInputOptional, convert
|
||||
:no-undoc-members:
|
||||
|
||||
.. autodata:: UserInputOptional
|
||||
:annotation:
|
||||
|
||||
.. _framework-commands-help:
|
||||
|
||||
******************
|
||||
Help Functionality
|
||||
******************
|
||||
|
||||
.. warning::
|
||||
|
||||
The content in this section is provisional 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>`_
|
||||
|
||||
|
||||
.. automodule:: redbot.core.commands.help
|
||||
:members:
|
||||
|
||||
@@ -11,9 +11,6 @@ Config was introduced in V3 as a way to make data storage easier and safer for a
|
||||
It will take some getting used to as the syntax is entirely different from what Red has used before, but we believe
|
||||
Config will be extremely beneficial to both cog developers and end users in the long run.
|
||||
|
||||
.. note:: While config is great for storing data safely, there are some caveats to writing performant code which uses it.
|
||||
Make sure to read the section on best practices for more of these details.
|
||||
|
||||
***********
|
||||
Basic Usage
|
||||
***********
|
||||
@@ -21,9 +18,8 @@ Basic Usage
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import Config
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
class MyCog:
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
|
||||
@@ -53,7 +49,7 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
class MyCog:
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
|
||||
@@ -69,7 +65,7 @@ After we've gotten that, we need to register default values:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
class MyCog:
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
default_global = {
|
||||
@@ -189,130 +185,29 @@ features within Config to enable developers to work with data how they wish.
|
||||
|
||||
This usage guide will cover the following features:
|
||||
|
||||
- :py:meth:`Config.init_custom`
|
||||
- :py:meth:`Config.register_custom`
|
||||
- :py:meth:`Config.custom`
|
||||
- :py:meth:`Group.get_raw`
|
||||
- :py:meth:`Group.set_raw`
|
||||
- :py:meth:`Group.clear_raw`
|
||||
|
||||
|
||||
Custom Groups
|
||||
^^^^^^^^^^^^^
|
||||
While Config has built-in groups for the common discord objects,
|
||||
sometimes you need a combination of these or your own defined grouping.
|
||||
Config handles this by allowing you to define custom groups.
|
||||
|
||||
Let's start by showing how :py:meth:`Config.custom` can be equivalent to :py:meth:`Config.guild` by modifying the above
|
||||
Tutorial example.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import Config, commands
|
||||
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
default_guild = {
|
||||
"blah": [],
|
||||
"baz": 1234567890
|
||||
}
|
||||
|
||||
# self.config.register_guild(**default_guild)
|
||||
|
||||
self.config.init_custom("CustomGuildGroup", 1)
|
||||
self.config.register_custom("CustomGuildGroup", **default_guild)
|
||||
|
||||
In the above, we registered the custom group named "CustomGuildGroup" to contain the same defaults
|
||||
that :code:`self.config.guild` normally would. First, we initialized the group "CustomGuildGroup" to
|
||||
accept one identifier by calling :py:meth:`Config.init_custom` with the argument :code:`1`. Then we used
|
||||
:py:meth:`Config.register_custom` to register the default values.
|
||||
|
||||
.. important::
|
||||
|
||||
:py:meth:`Config.init_custom` **must** be called prior to using a custom group.
|
||||
|
||||
|
||||
Now let's use this custom group:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@commands.command()
|
||||
async def setbaz(self, ctx, new_value):
|
||||
# await self.config.guild(ctx.guild).baz.set(new_value)
|
||||
|
||||
await self.config.custom("CustomGuildGroup", ctx.guild.id).baz.set(new_value)
|
||||
await ctx.send("Value of baz has been changed!")
|
||||
|
||||
@commands.command()
|
||||
async def checkbaz(self, ctx):
|
||||
# baz_val = await self.config.guild(ctx.guild).baz()
|
||||
|
||||
baz_val = await self.config.custom("CustomGuildGroup", ctx.guild.id).baz()
|
||||
await ctx.send("The value of baz is {}".format("True" if baz_val else "False"))
|
||||
|
||||
Here we used :py:meth:`Config.custom` to access our custom group much like we would have used :py:meth:`Config.guild`.
|
||||
Since it's a custom group, we need to use :code:`id` attribute of guild to get a unique identifier.
|
||||
|
||||
Now let's see an example that uses multiple identifiers:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import Config, commands, checks
|
||||
|
||||
|
||||
class ChannelAccesss(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
default_access = {
|
||||
"allowed": False
|
||||
}
|
||||
|
||||
self.config.init_custom("ChannelAccess", 2)
|
||||
self.config.register_custom("ChannelAccess", **default_access)
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
async def grantaccess(self, ctx, channel: discord.TextChannel, member: discord.Member):
|
||||
await self.config.custom("ChannelAccess", channel.id, member.id).allowed.set(True)
|
||||
await ctx.send("Member has been granted access to that channel")
|
||||
|
||||
@commands.command()
|
||||
async def checkaccess(self, ctx, channel: discord.TextChannel):
|
||||
allowed = await self.config.custom("ChannelAccess", channel.id, ctx.author.id).allowed()
|
||||
await ctx.send("Your access to this channel is {}".format("Allowed" if allowed else "Denied"))
|
||||
|
||||
In the above example, we defined the custom group "ChannelAccess" to accept two identifiers
|
||||
using :py:meth:`Config.init_custom`. Then, we were able to set the default value for any member's
|
||||
access to any channel to `False` until the bot owner grants them access.
|
||||
|
||||
.. important::
|
||||
|
||||
The ordering of the identifiers matter. :code:`custom("ChannelAccess", channel.id, member.id)` is NOT the same
|
||||
as :code:`custom("ChannelAccess", member.id, channel.id)`
|
||||
|
||||
Raw Group Access
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
For this example let's suppose that we're creating a cog that allows users to buy and own multiple pets using
|
||||
the built-in Economy credits::
|
||||
|
||||
from redbot.core import bank
|
||||
from redbot.core import Config, commands
|
||||
from redbot.core import Config
|
||||
from discord.ext import commands
|
||||
|
||||
|
||||
class Pets(commands.Cog):
|
||||
class Pets:
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, 1234567890)
|
||||
self.conf = Config.get_conf(self, 1234567890)
|
||||
|
||||
# Here we'll assign some default costs for the pets
|
||||
self.config.register_global(
|
||||
self.conf.register_global(
|
||||
dog=100,
|
||||
cat=100,
|
||||
bird=50
|
||||
)
|
||||
self.config.register_user(
|
||||
self.conf.register_user(
|
||||
pets={}
|
||||
)
|
||||
|
||||
@@ -331,7 +226,7 @@ And now that the cog is set up we'll need to create some commands that allow use
|
||||
|
||||
# We will need to use "get_raw"
|
||||
try:
|
||||
cost = await self.config.get_raw(pet_type)
|
||||
cost = await self.conf.get_raw(pet_type)
|
||||
except KeyError:
|
||||
# KeyError is thrown whenever the data you try to access does not
|
||||
# exist in the registered defaults or in the saved data.
|
||||
@@ -343,15 +238,15 @@ assign a new pet to the user. This is very easily done using the V3 bank API and
|
||||
|
||||
# continued
|
||||
if await bank.can_spend(ctx.author, cost):
|
||||
await self.config.user(ctx.author).pets.set_raw(
|
||||
await self.conf.user(ctx.author).pets.set_raw(
|
||||
pet_name, value={'cost': cost, 'hunger': 0}
|
||||
)
|
||||
|
||||
# this is equivalent to doing the following
|
||||
|
||||
pets = await self.config.user(ctx.author).pets()
|
||||
pets = await self.conf.user(ctx.author).pets()
|
||||
pets[pet_name] = {'cost': cost, 'hunger': 0}
|
||||
await self.config.user(ctx.author).pets.set(pets)
|
||||
await self.conf.user(ctx.author).pets.set(pets)
|
||||
|
||||
Since the pets can get hungry we're gonna need a command that let's pet owners check how hungry their pets are::
|
||||
|
||||
@@ -359,7 +254,7 @@ Since the pets can get hungry we're gonna need a command that let's pet owners c
|
||||
@commands.command()
|
||||
async def hunger(self, ctx, pet_name: str):
|
||||
try:
|
||||
hunger = await self.config.user(ctx.author).pets.get_raw(pet_name, 'hunger')
|
||||
hunger = await self.conf.user(ctx.author).pets.get_raw(pet_name, 'hunger')
|
||||
except KeyError:
|
||||
# Remember, this is thrown if something in the provided identifiers
|
||||
# is not found in the saved data or the defaults.
|
||||
@@ -376,7 +271,7 @@ We're responsible pet owners here, so we've also got to have a way to feed our p
|
||||
# This is a bit more complicated because we need to check if the pet is
|
||||
# owned first.
|
||||
try:
|
||||
pet = await self.config.user(ctx.author).pets.get_raw(pet_name)
|
||||
pet = await self.conf.user(ctx.author).pets.get_raw(pet_name)
|
||||
except KeyError:
|
||||
# If the given pet name doesn't exist in our data
|
||||
await ctx.send("You don't own that pet!")
|
||||
@@ -387,12 +282,12 @@ We're responsible pet owners here, so we've also got to have a way to feed our p
|
||||
# Determine the new hunger and make sure it doesn't go negative
|
||||
new_hunger = max(hunger - food, 0)
|
||||
|
||||
await self.config.user(ctx.author).pets.set_raw(
|
||||
await self.conf.user(ctx.author).pets.set_raw(
|
||||
pet_name, 'hunger', value=new_hunger
|
||||
)
|
||||
|
||||
# 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 self.conf.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)
|
||||
|
||||
@@ -402,7 +297,7 @@ Of course, if we're less than responsible pet owners, there are consequences::
|
||||
@commands.command()
|
||||
async def adopt(self, ctx, pet_name: str, *, member: discord.Member):
|
||||
try:
|
||||
pet = await self.config.user(member).pets.get_raw(pet_name)
|
||||
pet = await self.conf.user(member).pets.get_raw(pet_name)
|
||||
except KeyError:
|
||||
await ctx.send("That person doesn't own that pet!")
|
||||
return
|
||||
@@ -412,15 +307,15 @@ Of course, if we're less than responsible pet owners, there are consequences::
|
||||
await ctx.send("That pet is too well taken care of to be adopted.")
|
||||
return
|
||||
|
||||
await self.config.user(member).pets.clear_raw(pet_name)
|
||||
await self.conf.user(member).pets.clear_raw(pet_name)
|
||||
|
||||
# this is equivalent to doing the following
|
||||
|
||||
pets = await self.config.user(member).pets()
|
||||
pets = await self.conf.user(member).pets()
|
||||
del pets[pet_name]
|
||||
await self.config.user(member).pets.set(pets)
|
||||
await self.conf.user(member).pets.set(pets)
|
||||
|
||||
await self.config.user(ctx.author).pets.set_raw(pet_name, value=pet)
|
||||
await self.conf.user(ctx.author).pets.set_raw(pet_name, value=pet)
|
||||
await ctx.send(
|
||||
"Your request to adopt this pet has been granted due to "
|
||||
"how poorly it was taken care of."
|
||||
@@ -448,20 +343,20 @@ much the same way they would in V2. The following examples will demonstrate how
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import Config, commands
|
||||
from redbot.core import Config
|
||||
|
||||
|
||||
class ExampleCog(commands.Cog):
|
||||
class ExampleCog:
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, 1234567890)
|
||||
self.config.init_custom("V2", 1)
|
||||
self.conf = Config.get_conf(self, 1234567890)
|
||||
|
||||
self.data = {}
|
||||
|
||||
async def load_data(self):
|
||||
self.data = await self.config.custom("V2", "V2").all()
|
||||
self.data = await self.conf.custom("V2", "V2").all()
|
||||
|
||||
async def save_data(self):
|
||||
await self.config.custom("V2", "V2").set(self.data)
|
||||
await self.conf.custom("V2", "V2").set(self.data)
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
@@ -469,30 +364,6 @@ much the same way they would in V2. The following examples will demonstrate how
|
||||
await cog.load_data()
|
||||
bot.add_cog(cog)
|
||||
|
||||
************************************
|
||||
Best practices and performance notes
|
||||
************************************
|
||||
|
||||
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
|
||||
|
||||
* Config use in events should be kept minimal and should only occur
|
||||
after confirming the event needs to interact with config
|
||||
|
||||
* Caching frequently used things, especially things used by events,
|
||||
results in faster and less event loop blocking code.
|
||||
|
||||
* Only use config's context managers when you intend to modify data.
|
||||
|
||||
* While config is a great general use option, it may not always be the right one for you.
|
||||
As a cog developer, even though config doesn't require one,
|
||||
you can choose to require a database or store to something such as an sqlite
|
||||
database stored within your cog's datapath.
|
||||
|
||||
|
||||
*************
|
||||
API Reference
|
||||
*************
|
||||
@@ -509,13 +380,13 @@ 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.register_global(foo={})
|
||||
>>> await config.foo.set_raw(123, value=True)
|
||||
>>> await config.foo()
|
||||
>>> conf = Config.get_conf(self, identifier=999)
|
||||
>>> conf.register_global(foo={})
|
||||
>>> await conf.foo.set_raw(123, value=True)
|
||||
>>> await conf.foo()
|
||||
{'123': True}
|
||||
>>> await config.foo.set({123: True, 456: {789: False}}
|
||||
>>> await config.foo()
|
||||
>>> await conf.foo.set({123: True, 456: {789: False}}
|
||||
>>> await conf.foo()
|
||||
{'123': True, '456': {'789': False}}
|
||||
|
||||
.. automodule:: redbot.core.config
|
||||
@@ -545,25 +416,20 @@ Value
|
||||
Driver Reference
|
||||
****************
|
||||
|
||||
.. autofunction:: redbot.core.drivers.get_driver
|
||||
|
||||
.. autoclass:: redbot.core.drivers.BackendType
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.drivers.ConfigCategory
|
||||
.. automodule:: redbot.core.drivers
|
||||
:members:
|
||||
|
||||
Base Driver
|
||||
^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.BaseDriver
|
||||
.. autoclass:: redbot.core.drivers.red_base.BaseDriver
|
||||
:members:
|
||||
|
||||
JSON Driver
|
||||
^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.JsonDriver
|
||||
.. autoclass:: redbot.core.drivers.red_json.JSON
|
||||
:members:
|
||||
|
||||
Postgres Driver
|
||||
^^^^^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.PostgresDriver
|
||||
Mongo Driver
|
||||
^^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.red_mongo.Mongo
|
||||
:members:
|
||||
|
||||
90
docs/framework_downloader.rst
Normal file
@@ -0,0 +1,90 @@
|
||||
.. downloader framework reference
|
||||
|
||||
Downloader Framework
|
||||
====================
|
||||
|
||||
Info.json
|
||||
*********
|
||||
|
||||
The optional info.json file may exist inside every package folder in the repo,
|
||||
as well as in the root of the repo. The following sections describe the valid
|
||||
keys within an info file (and maybe how the Downloader cog uses them).
|
||||
|
||||
Keys common to both repo and cog info.json (case sensitive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ``author`` (list of strings) - list of names of authors of the cog or repo.
|
||||
|
||||
- ``description`` (string) - A long description of the cog or repo. For cogs, this
|
||||
is displayed when a user executes ``!cog info``.
|
||||
|
||||
- ``install_msg`` (string) - The message that gets displayed when a cog
|
||||
is installed or a repo is added
|
||||
|
||||
.. tip:: You can use the ``[p]`` key in your string to use the prefix
|
||||
used for installing.
|
||||
|
||||
- ``short`` (string) - A short description of the cog or repo. For cogs, this info
|
||||
is displayed when a user executes ``!cog list``
|
||||
|
||||
Keys specific to the cog info.json (case sensitive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ``min_bot_version`` (string) - Min version number of Red in the format ``MAJOR.MINOR.MICRO``
|
||||
|
||||
- ``max_bot_version`` (string) - Max version number of Red in the format ``MAJOR.MINOR.MICRO``,
|
||||
if ``min_bot_version`` is newer than ``max_bot_version``, ``max_bot_version`` will be ignored
|
||||
|
||||
- ``hidden`` (bool) - Determines if a cog is visible in the cog list for a repo.
|
||||
|
||||
- ``disabled`` (bool) - Determines if a cog is available for install.
|
||||
|
||||
- ``required_cogs`` (map of cogname to repo URL) - A map of required cogs that this cog depends on.
|
||||
Downloader will not deal with this functionality but it may be useful for other cogs.
|
||||
|
||||
- ``requirements`` (list of strings) - list of required libraries that are
|
||||
passed to pip on cog install. ``SHARED_LIBRARIES`` do NOT go in this
|
||||
list.
|
||||
|
||||
- ``tags`` (list of strings) - A list of strings that are related to the
|
||||
functionality of the cog. Used to aid in searching.
|
||||
|
||||
- ``type`` (string) - Optional, defaults to ``COG``. Must be either ``COG`` or
|
||||
``SHARED_LIBRARY``. If ``SHARED_LIBRARY`` then ``hidden`` will be ``True``.
|
||||
|
||||
API Reference
|
||||
*************
|
||||
|
||||
.. automodule:: redbot.cogs.downloader.json_mixins
|
||||
|
||||
.. autoclass RepoJSONMixin
|
||||
:members
|
||||
|
||||
.. automodule:: redbot.cogs.downloader.installable
|
||||
|
||||
Installable
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: Installable
|
||||
:members:
|
||||
|
||||
.. automodule:: redbot.cogs.downloader.repo_manager
|
||||
|
||||
Repo
|
||||
^^^^
|
||||
|
||||
.. autoclass:: Repo
|
||||
:members:
|
||||
|
||||
Repo Manager
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: RepoManager
|
||||
:members:
|
||||
|
||||
Exceptions
|
||||
^^^^^^^^^^
|
||||
|
||||
.. automodule:: redbot.cogs.downloader.errors
|
||||
:members:
|
||||
|
||||
@@ -33,17 +33,21 @@ Tutorial
|
||||
|
||||
After making your cog, generate a :code:`messages.pot` file
|
||||
|
||||
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 process of generating this will depend on the operating system
|
||||
you are using
|
||||
|
||||
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
|
||||
In a command prompt in your cog's package (where yourcog.py is),
|
||||
create a directory called "locales".
|
||||
Then do one of the following:
|
||||
|
||||
Windows: :code:`python <your python install path>\Tools\i18n\pygettext.py -D -n -p locales`
|
||||
|
||||
Mac: ?
|
||||
|
||||
Linux: :code:`pygettext3 -D -n -p locales`
|
||||
|
||||
This will generate a messages.pot file with strings to be translated, including
|
||||
docstrings.
|
||||
(For advanced usage check :code:`python -m redgettext -h`)
|
||||
|
||||
You can now use a tool like `poedit
|
||||
<https://poedit.net/>`_ to translate the strings in your messages.pot file.
|
||||
|
||||
-------------
|
||||
API Reference
|
||||
|
||||
@@ -25,7 +25,7 @@ Basic Usage
|
||||
async def ban(self, ctx, user: discord.Member, reason: str = None):
|
||||
await ctx.guild.ban(user)
|
||||
case = await modlog.create_case(
|
||||
ctx.bot, ctx.guild, ctx.message.created_at, action_type="ban",
|
||||
ctx.bot, ctx.guild, ctx.message.created_at, action="ban",
|
||||
user=user, moderator=ctx.author, reason=reason
|
||||
)
|
||||
await ctx.send("Done. It was about time.")
|
||||
@@ -57,6 +57,9 @@ it from your setup function:
|
||||
"default_setting": True,
|
||||
"image": "\N{HAMMER}",
|
||||
"case_str": "Ban",
|
||||
# audit_type should be omitted if the action doesn't show
|
||||
# up in the audit log.
|
||||
"audit_type": "ban",
|
||||
}
|
||||
try:
|
||||
await modlog.register_casetype(**ban_case)
|
||||
@@ -70,12 +73,14 @@ it from your setup function:
|
||||
"default_setting": True,
|
||||
"image": "\N{BUST IN SILHOUETTE}\N{HAMMER}",
|
||||
"case_str": "Hackban",
|
||||
"audit_type": "ban",
|
||||
},
|
||||
{
|
||||
"name": "kick",
|
||||
"default_setting": True,
|
||||
"image": "\N{WOMANS BOOTS}",
|
||||
"case_str": "Kick",
|
||||
"audit_type": "kick"
|
||||
}
|
||||
]
|
||||
await modlog.register_casetypes(new_types)
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
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.
|
||||
|
||||
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.
|
||||
Each of those functions must only take JSON serializable parameters and must return JSON serializable objects.
|
||||
|
||||
@@ -8,19 +8,7 @@ General Utility
|
||||
===============
|
||||
|
||||
.. automodule:: redbot.core.utils
|
||||
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise
|
||||
|
||||
.. autoclass:: AsyncIter
|
||||
:members:
|
||||
:special-members: __await__
|
||||
:exclude-members: enumerate, filter
|
||||
|
||||
.. automethod:: enumerate
|
||||
:async-for:
|
||||
|
||||
.. automethod:: filter
|
||||
:async-for:
|
||||
|
||||
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter
|
||||
|
||||
Chat Formatting
|
||||
===============
|
||||
@@ -33,7 +21,6 @@ Embed Helpers
|
||||
|
||||
.. automodule:: redbot.core.utils.embed
|
||||
:members:
|
||||
:exclude-members: randomize_color
|
||||
|
||||
Reaction Menus
|
||||
==============
|
||||
@@ -44,16 +31,7 @@ Reaction Menus
|
||||
Event Predicates
|
||||
================
|
||||
|
||||
MessagePredicate
|
||||
****************
|
||||
|
||||
.. autoclass:: redbot.core.utils.predicates.MessagePredicate
|
||||
:members:
|
||||
|
||||
ReactionPredicate
|
||||
*****************
|
||||
|
||||
.. autoclass:: redbot.core.utils.predicates.ReactionPredicate
|
||||
.. automodule:: redbot.core.utils.predicates
|
||||
:members:
|
||||
|
||||
Mod Helpers
|
||||
|
||||
@@ -1,361 +0,0 @@
|
||||
.. don't forget to set permissions hyperlink
|
||||
+ commands links + guide links
|
||||
|
||||
.. _getting-started:
|
||||
|
||||
===============
|
||||
Getting started
|
||||
===============
|
||||
|
||||
If you recently installed Red, you should read this.
|
||||
This is a quick start guide for a general usage.
|
||||
|
||||
.. note::
|
||||
|
||||
If you haven't installed Red, please do it by following
|
||||
one of the `installation guides <install_guides/index>`.
|
||||
|
||||
Assuming you correctly installed Red, you should have a
|
||||
window like this:
|
||||
|
||||
.. image:: .resources/red-console.png
|
||||
|
||||
.. _gettings-started-invite:
|
||||
|
||||
-------------------------
|
||||
Invite Red to your server
|
||||
-------------------------
|
||||
|
||||
When started, the console will show you the ``Invite URL``
|
||||
(visible at the bottom of the screenshot above).
|
||||
Paste the link into your browser and select the server you want
|
||||
to invite the bot in, like any other bot.
|
||||
|
||||
.. note:: You need the ``Manage server`` permission to add bots.
|
||||
|
||||
Complete the captcha, it should tell you ``Authorized!`` and you
|
||||
should see your bot in the members list.
|
||||
|
||||
.. attention::
|
||||
If Discord shows ``Bot requires code grant``, please untick this
|
||||
option in your token settings
|
||||
|
||||
.. image:: .resources/code-grant.png
|
||||
|
||||
.. _getting-started-interact:
|
||||
|
||||
-----------------
|
||||
Interact with Red
|
||||
-----------------
|
||||
|
||||
As a chatbot, you interact with Red via the Discord text channels
|
||||
(not from the command prompt). To send commands to the bot, you will have to
|
||||
use the prefix you set before, followed by the command you want to use. For
|
||||
example, if your prefix is ``!``, you will execute your command like this:
|
||||
``!ping``.
|
||||
|
||||
.. note:: Since the prefix can be anything, it'll be referenced as ``[p]``
|
||||
in documentations.
|
||||
|
||||
.. _getting-started-commands:
|
||||
|
||||
~~~~~~~~~~~~
|
||||
The commands
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The command you're going to use the most is **help**. This command will
|
||||
show you **all of the available commands** of the bot with a small description.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]help
|
||||
|
||||
.. tip:: The message is generated dynamically and users will only see the
|
||||
commands they can use. You can change what commands users can use with the
|
||||
permissions cog.
|
||||
|
||||
You can also pick a command to get its detailed description and the
|
||||
parameters.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]help command
|
||||
|
||||
.. note::
|
||||
Arguments enclosed in ``< >`` are **required** for the command to work.
|
||||
|
||||
Arguments enclosed in ``[ ]`` are **optional** for the command;
|
||||
you can decide whether to use them or not.
|
||||
|
||||
If your argument includes spaces like ``Hello world!``, most of the time
|
||||
you will need to place it in double quotes like this: ``"Hello world!"``.
|
||||
Sometimes (especially for the last argument) these double quotes are not
|
||||
required.
|
||||
|
||||
Arguments followed by an ellipsis ``...`` means that you may provide
|
||||
multiple arguments for the command.
|
||||
|
||||
For example, the command ``[p]cog install`` in the downloader cog has
|
||||
the syntax ``cog install <repo> <cogs...>``, meaning that you can provide
|
||||
1 or more ``cogs`` to install from the ``repo``.
|
||||
|
||||
Arguments followed by ``=value`` means that, if not specified,
|
||||
the argument will be equal to ``value``.
|
||||
|
||||
For example, the command ``[p]cleanup messages`` in the cleanup cog has
|
||||
the syntax ``cleanup messages <number> [delete_pinned=False]``, which means
|
||||
``delete_pinned`` default will be false, unless you specify it as true.
|
||||
|
||||
You can use help to show the **categories** too, generally called cogs,
|
||||
by doing the following (notice the capitalization):
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]help YourCategory
|
||||
|
||||
Help also shows **command groups**. They are group of commands.
|
||||
To get the description of a subcommand, type this:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]help commandgroup subcommand
|
||||
|
||||
When using subcommands, you also need to specify the command group.
|
||||
As an example, ``cleanup`` has 6 subcommands. If you want
|
||||
to use one of them, do: ``[p]cleanup messages 10``
|
||||
|
||||
.. _getting-started-cogs:
|
||||
|
||||
----
|
||||
Cogs
|
||||
----
|
||||
|
||||
Red is built with cogs, a fancy term for plugins. They are
|
||||
modules that add functionality to Red. They contain
|
||||
commands to use.
|
||||
|
||||
Red comes with 19 cogs containing the basic features, such
|
||||
as moderation, utility, music, streams...
|
||||
|
||||
You can see your loaded and unloaded cogs with the ``[p]cogs``
|
||||
command. By default, all cogs will be unloaded.
|
||||
|
||||
You can load or unload a cog by using the load or unload command
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]load cogname
|
||||
[p]unload cogname
|
||||
|
||||
.. tip:: You can load and unload multiple cogs at once:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]load cog1 cog2 ...
|
||||
|
||||
You can enable and disable everything you want, which means you can
|
||||
customize Red how you want!
|
||||
|
||||
.. _getting-started-community-cogs:
|
||||
|
||||
~~~~~~~~~~~~~~
|
||||
Community cogs
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
There's an entire `community <https://discord.gg/red>`_ that contributes
|
||||
to Red. Those contributors make additional cogs for you to use. You can
|
||||
download them using the downloader cog.
|
||||
|
||||
You can start using the downloader cog by loading it: ``[p]load downloader``
|
||||
|
||||
You can find cogs by searching on `<https://index.discord.red>`_. Find whatever you want,
|
||||
there are hundreds of cogs available!
|
||||
|
||||
.. note:: An even better way to discover new cogs and repositories is in the works! Stay tuned!
|
||||
|
||||
Cogs come in repositories. A repository is a container of cogs
|
||||
that you can install. Let's suppose you want to install the ``say``
|
||||
cog from the repository ``Laggrons-Dumb-Cogs``. You'll first need
|
||||
to add the repository.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs
|
||||
|
||||
.. note:: You may need to specify a branch. If so, add its name after the link.
|
||||
|
||||
Then you can install the cog
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog install Laggrons-Dumb-Cogs say
|
||||
|
||||
Now the cog is installed, but not loaded. You can load it using the ``[p]load``
|
||||
command we talked about before.
|
||||
|
||||
.. _getting-started-permissions:
|
||||
|
||||
-----------
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
Red works with different levels of permissions. Every cog defines
|
||||
the level of permission needed for a command.
|
||||
|
||||
~~~~~~~~~
|
||||
Bot owner
|
||||
~~~~~~~~~
|
||||
|
||||
The bot owner can access all commands on every guild. They can also use
|
||||
exclusive commands that can interact with the global settings
|
||||
or system files.
|
||||
|
||||
*You* are the owner by default.
|
||||
|
||||
~~~~~~~~~~~~
|
||||
Server owner
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The server owner can access all commands on his guild, except the global
|
||||
ones or those that can interact with system files (available for the
|
||||
bot owner).
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
Administrator
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The administrator is defined by its roles. You can set multiple admin roles
|
||||
with the ``[p]set addadminrole`` and ``[p]set removeadminrole`` commands.
|
||||
|
||||
For example, in the mod cog, an admin can use the ``[p]modset`` command
|
||||
which defines the cog settings.
|
||||
|
||||
~~~~~~~~~
|
||||
Moderator
|
||||
~~~~~~~~~
|
||||
|
||||
A moderator is a step above the average users. You can set multiple moderator
|
||||
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
|
||||
|
||||
For example, in the filter cog, a mod will be able to use the various commands
|
||||
under ``[p]filter`` (such as adding and removing filtered words), but they will
|
||||
not be able to modify the cog settings with the ``[p]filterset`` command.
|
||||
|
||||
.. tip::
|
||||
If you don't like the default permission settings for some commands or
|
||||
want to restrict a cog or a command to a channel/member, you can use
|
||||
the permissions cog.
|
||||
|
||||
.. _getting-started-hosting:
|
||||
|
||||
-------
|
||||
Hosting
|
||||
-------
|
||||
|
||||
If you are hosting Red on your personal computer, you will soon notice that
|
||||
if you close the window or if you shut down you computer, Red will be offline.
|
||||
It needs an environment to work and respond.
|
||||
|
||||
You can try to host Red somewhere it will always be online, like on a virtual
|
||||
private server (VPS) or on a personal server (e.g. Raspberry Pi).
|
||||
|
||||
If you want to do it, follow these steps.
|
||||
|
||||
.. warning::
|
||||
Before trying to host Red on a Linux environment, you need to know the
|
||||
basics of the Unix commands, such as navigating the system files or use
|
||||
a terminal text editor.
|
||||
|
||||
You should read `DigitalOcean's tutorial: An Introduction to Linux Basics
|
||||
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
|
||||
if you have not used Linux before.
|
||||
|
||||
1. **Find a host**
|
||||
|
||||
You need to find a server to host Red. You can rent a VPS (it can be free)
|
||||
on an online service. Please check :ref:`this list of hosts <host-list>` for
|
||||
more information.
|
||||
|
||||
You can also buy a Raspberry Pi (~$20), which is a micro-computer that will
|
||||
be able to host Red. The model 3 or above is recommended.
|
||||
|
||||
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**.
|
||||
|
||||
For Raspberry Pi users, just install `Raspbian
|
||||
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
|
||||
|
||||
2.1. **Log in**
|
||||
|
||||
.. note:: This section is for those who have an online server. If you have
|
||||
a local Linux machine, just open the terminal and skip to the next part.
|
||||
|
||||
As we said before, a VPS is controlled through command line. You will have to
|
||||
connect to your VPS through a protocol called SSH.
|
||||
|
||||
.. image:: .resources/instances-ssh-button.png
|
||||
|
||||
On your host page (here, it is Google Cloud), find the SSH button and click on
|
||||
it. You will be connected to your server with command line. You should see
|
||||
something like this.
|
||||
|
||||
.. image:: .resources/ssh-output.png
|
||||
|
||||
.. note:: Don't forget to type the command ``logout`` to close the SSH properly.
|
||||
|
||||
3. **Install and set up Red**
|
||||
|
||||
Follow one of the Linux installation guides. We provide guides for the
|
||||
most used distributions. Check the `list of install guides <install_guides/index>` and search for
|
||||
your distribution.
|
||||
|
||||
4. **Set up an auto-restart**
|
||||
|
||||
Once you got Red running on your server, it will still shut down if you close
|
||||
the window. You can set up an auto-restarting system that will create a
|
||||
side task and handle fatal errors, so you can just leave your server running
|
||||
and enjoy Red!
|
||||
|
||||
For that, follow :ref:`the systemd service guide <systemd-service-guide>`.
|
||||
|
||||
.. _getting-started-userdocs:
|
||||
|
||||
------------------
|
||||
User documentation
|
||||
------------------
|
||||
|
||||
You will soon start using the Red core cogs. A detailed documentation is
|
||||
available for every core cog, under the :ref:`How to use <main>` section.
|
||||
|
||||
The cog guides are formatted the same. They're divided into 3 sections:
|
||||
|
||||
* **Guide**
|
||||
|
||||
This will introduce you to the cog and explain you how it works.
|
||||
|
||||
* **Commands**
|
||||
|
||||
A list of the available commands, with details and arguments.
|
||||
Each command guide will be formatted like this:
|
||||
|
||||
* **Syntax**
|
||||
|
||||
A line that will show how the command must be invoked, with the arguments.
|
||||
|
||||
* **Aliases**
|
||||
|
||||
Each command may have one or more aliases, which are alternative command names
|
||||
you can use to invoke the same command. For example, ``[p]set colour`` can also
|
||||
be invoked with ``[p]set color``. If there are aliases for a command, they will
|
||||
appear just under the syntax.
|
||||
|
||||
* **Description**
|
||||
|
||||
A detailed description of what the command does, with details about how
|
||||
it must be used.
|
||||
|
||||
* **Arguments**
|
||||
|
||||
A list of all arguments needed (or not) for the command, with more details.
|
||||
@@ -3,9 +3,9 @@
|
||||
.. role:: python(code)
|
||||
:language: python
|
||||
|
||||
========================
|
||||
Creating cogs for Red V3
|
||||
========================
|
||||
====================
|
||||
Creating cogs for V3
|
||||
====================
|
||||
|
||||
This guide serves as a tutorial on creating cogs for Red V3.
|
||||
It will cover the basics of setting up a package for your
|
||||
@@ -17,33 +17,10 @@ you in the process.
|
||||
Getting started
|
||||
---------------
|
||||
|
||||
To start off, be sure that you have installed Python 3.8.
|
||||
Next, you need to decide if you want to develop against the Stable or Develop version of Red.
|
||||
Depending on what your goal is should help determine which version you need.
|
||||
|
||||
.. attention::
|
||||
The Develop version may have changes on it which break compatibility with the Stable version and other cogs.
|
||||
If your goal is to support both versions, make sure you build compatibility layers or use separate branches to keep compatibility until the next Red release
|
||||
|
||||
Open a terminal or command prompt and type one of the following
|
||||
Stable Version: :code:`python3.8 -m pip install -U Red-DiscordBot`
|
||||
|
||||
.. 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
|
||||
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
|
||||
data loss, crashes or worse. Please keep this in mind when using the development version
|
||||
while working on cog creation.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
|
||||
|
||||
|
||||
(Windows users may need to use :code:`py -3.8` or :code:`python` instead of :code:`python3.8`)
|
||||
To start off, be sure that you have installed Python 3.7.
|
||||
Open a terminal or command prompt and type :code:`pip install -U git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=redbot[test]`
|
||||
(note that if you get an error with this, try again but put :code:`python -m` in front of the command
|
||||
This will install the latest version of V3.
|
||||
|
||||
--------------------
|
||||
Setting up a package
|
||||
@@ -58,20 +35,6 @@ a text editor or IDE (examples include `Sublime Text 3 <https://www.sublimetext.
|
||||
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, and
|
||||
`PyCharm <http://www.jetbrains.com/pycharm/>`_).
|
||||
|
||||
.. attention::
|
||||
While you can intentionally override Red's cogs/extensions, this may break things.
|
||||
We would prefer if people wanted custom behavior
|
||||
for any core cog/extension, an issue and/or PR is made
|
||||
Overriding Permissions specifically is dangerous.
|
||||
|
||||
Subclassing to make changes to Red's cogs/extensions
|
||||
may not be a safe way to stay up to date either,
|
||||
as changes to cogs and their interactions with red
|
||||
are not guaranteed to not be breaking.
|
||||
|
||||
Any cogs doing this are doing so at their own risk,
|
||||
and should also inform users of associated risks.
|
||||
|
||||
--------------
|
||||
Creating a cog
|
||||
--------------
|
||||
@@ -83,12 +46,9 @@ In that file, place the following code:
|
||||
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
class Mycog(commands.Cog):
|
||||
"""My custom cog"""
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command()
|
||||
async def mycom(self, ctx):
|
||||
"""This does stuff!"""
|
||||
@@ -99,11 +59,10 @@ Open :code:`__init__.py`. In that file, place the following:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from .mycog import MyCog
|
||||
|
||||
from .mycog import Mycog
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(MyCog(bot))
|
||||
bot.add_cog(Mycog())
|
||||
|
||||
Make sure that both files are saved.
|
||||
|
||||
@@ -115,7 +74,7 @@ To test your cog, you will need a running instance of V3.
|
||||
Assuming you installed V3 as outlined above, run :code:`redbot-setup`
|
||||
and provide the requested information. Once that's done, run Red
|
||||
by doing :code:`redbot <instance name> --dev` to start Red.
|
||||
Complete the initial setup by providing a valid token and setting a
|
||||
Complete the inital setup by providing a valid token and setting a
|
||||
prefix. Once the bot has started up, use the link provided in the
|
||||
console to add it to a server (note that you must have the
|
||||
:code:`Manage Server` (or :code:`Administrator`) permission to add bots
|
||||
@@ -126,45 +85,6 @@ to the directory where your cog package is located. In Discord, do
|
||||
The bot should respond with :code:`I can do stuff!`. If it did, you
|
||||
have successfully created a cog!
|
||||
|
||||
.. note:: **Package/Folder layout**
|
||||
|
||||
You must make sure you structure your local path correctly or
|
||||
you get an error about missing the setup function. As cogs are
|
||||
considered packages, they are each contained within separate folders.
|
||||
The folder you need to add using :code:`[p]addpath` is the parent
|
||||
folder of these package folders. Below is an example
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
- D:\
|
||||
-- red-env
|
||||
-- red-data
|
||||
-- red-cogs
|
||||
---- mycog
|
||||
------ __init__.py
|
||||
------ mycog.py
|
||||
---- coolcog
|
||||
------ __init__.py
|
||||
------ coolcog.py
|
||||
|
||||
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
|
||||
|
||||
You can also take a look at `our cookiecutter <https://github.com/Cog-Creators/cog-cookiecutter>`_, for help creating the right structure.
|
||||
|
||||
-------------------
|
||||
Publishing your cog
|
||||
-------------------
|
||||
|
||||
Go to :doc:`/guide_publish_cogs`
|
||||
|
||||
--------------------------------
|
||||
Becoming an Approved Cog Creator
|
||||
--------------------------------
|
||||
|
||||
:doc:`/guide_cog_creators` explains the Cog Creator Application process and lists requirements and good practices for Cog Creators. This information is worth following for anyone creating cogs for Red, regardless of if you plan to publish your cogs or not.
|
||||
|
||||
--------------------
|
||||
Additional resources
|
||||
--------------------
|
||||
|
||||