Skip to content

Commit

Permalink
Merge branch 'V3/develop' into payday-dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Kowlin authored Jul 18, 2024
2 parents 84cf275 + 601816a commit c9c3738
Show file tree
Hide file tree
Showing 322 changed files with 20,445 additions and 17,951 deletions.
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"Category: Core - API - App Commands Package":
# Source
- redbot/core/app_commands/*
# Docs
- docs/framework_app_commands.rst
# Tests
- tests/core/test_app_commands.py
"Category: Core - API - Commands Package":
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lint_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://github.com/pycqa/flake8@3.7.9#egg=flake8"
- run: >
python -m pip install
'pyflakes @ https://github.com/pycqa/pyflakes/tarball/1911c20'
'pycodestyle @ https://github.com/pycqa/pycodestyle/tarball/d219c68'
'flake8 @ https://github.com/pycqa/flake8/tarball/3.7.9'
name: Install Flake8
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
name: Flake8 Linting
134 changes: 134 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,139 @@
.. Red changelogs
Redbot 3.5.10 (2024-07-10)
==========================

| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`Flame442`, :ghuser:`Jackenmen`, :ghuser:`Kowlin`, :ghuser:`SeaswimmerTheFsh`, :ghuser:`TrustyJAID`, :ghuser:`yamikaitou`
Read before updating
--------------------

#. This release fixes a security issue in one of the APIs we provide for 3rd-party cog creators. See `Security changelog below <important-3510-1>` for more information.
#. Following operating systems are no longer supported as they have already reached their end of life:

- CentOS 7
- CentOS Stream 8
- Fedora 38
- versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux 8 older than 8.8
- versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux 9 older than 9.2

#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):

We've updated our default application.yml file and you should update your instance's ``application.yml`` accordingly.
More specifically, we switched from using the built-in YT source to YT source plugin.
`Download Red 3.5.10's default application.yml file <https://github.com/Cog-Creators/Red-DiscordBot/releases/download/3.5.10/Red-DiscordBot-3.5.10-default-lavalink-application.yml>`__

End-user changelog
------------------

.. _important-3510-1:

Security
********

- **Core** - Fixed incorrect authorization in one of the utilities provided to 3rd-party cog creators (`commands.can_manage_channel()`) resulting in anyone being authorized to run a command using it, if the command has no other permission controls. None of the core commands or core cogs are affected. The maintainers of the project are not aware of any public 3rd-party cog utilizing this API at the time of writing this changelog. `Full security advisory can be found on our GitHub <https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-5jq8-q6rj-9gq4>`__.

Additions
*********

- **Core - Bot Commands** - Added ``[p]set bot banner`` command for setting the bot's banner (:issue:`6321`, :issue:`6401`)

Changes
*******

- **Core** - Red's ``--team-members-are-owners`` flag now only considers Team Owner, Admins, and Developers as bot owners (:issue:`6401`)
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6402`)
- **Cogs - Audio** - Updated the cog to configure managed Lavalink node to use YT source plugin instead of the built-in, no longer supported, implementation (:issue:`6373`)
- **Cogs - Filter** - The cog now checks poll contents and attachment alt text for filtered words (:issue:`6401`)

Fixes
*****

- **Core** - Fixed command autocompletion not showing any proper result (error message) when bot's global checks (channel/server ignores, allowlist/blocklist) do not pass (:issue:`6374`, :issue:`6375`)
- **Cogs - Audio** - Fixed one of the recent YT playback issues (:issue:`6373`)

Developer changes
-----------------

Changes
*******

- |cool| **Core - Dependencies** - Bumped ``discord.py`` to version 2.4.0 (:issue:`6401`)

Documentation changes
---------------------

Additions
*********

- Added Ubuntu 24.04 install guide (:issue:`6364`)

Changes
*******

- Bumped Python version used by Arch Linux, RHEL 8, and RHEL 9 install guides to 3.11 (:issue:`6386`)
- Removed a mention of the Atom editor from the list of the recommended editor now that it's discontinued (:issue:`6388`)

Removals
********

- Removed all mentions of pyenv now that the last OS using it (CentOS 7) is no longer supported (:issue:`6386`)

Fixes
*****

- Fixed Java instructions in macOS install guide (:issue:`6368`)
- Fixed list of required ``info.json`` keys from the `guide_cog_creators` document (:issue:`6382`)

----

Redbot 3.5.9 (2024-04-21)
=========================

| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`giplgwm`, :ghuser:`Jackenmen`, :ghuser:`Kuro-Rui`, :ghuser:`Kowlin`, :ghuser:`palmtree5`, :ghuser:`TrustyJAID`, :ghuser:`Zephyrkul`
Read before updating
--------------------

#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):

Red 3.5.9 uses a new Lavalink jar that you will need to manually update from `our GitHub <https://github.com/Cog-Creators/Lavalink-Jars/releases/tag/3.7.11%2Bred.3>`__.

End-user changelog
------------------

Fixes
*****

- **Core** - Fixed inaccuracies in error messages shown when the user passes a time duration outside accepted range (:issue:`6357`)
- **Core** - Commands that ask the user to "Type ``more`` to continue" when they return long output will now typically wait for 60 seconds rather than just 15 (:issue:`6346`, :issue:`6352`)
- |cool| **Cogs - Audio** - Resolved recent issues where the player would be stuck at 0:00 on some tracks (:issue:`6358`)
- **Cogs - Mutes** - The Mutes cog will no longer erroneously accept very large values (i.e. hundreds of years) for mute durations (:issue:`6353`)
- **Cogs - Mutes** - To avoid ambiguity, the Mutes cog will now parse the time only when it's placed at the beginning, the end, or directly after ``t=``/``time=`` prefix in the mute command arguments (:issue:`6274`, :issue:`6349`)
- **Cogs - Streams** - The schedule announcements for YT streams will now use relative Discord timestamps (:issue:`6257`, :issue:`6264`)

Developer changelog
-------------------

Changes
*******

- **Core - Commands Package** - Functions and converters for parsing text into `datetime.timedelta` or `dateutil.relativedelta.relativedelta` in the `redbot.core.commands.converter` package now support negative values when ``minimum`` parameter is set accordingly (:issue:`6349`)
- **Core - Utils Package** - The `redbot.core.utils.chat_formatting.humanize_timedelta()` function now allows specifying the maximum number of different units that will be present in the final string with the ``maximum_units`` parameter (:issue:`6350`)
- **Core - Utils Package** - The `redbot.core.utils.chat_formatting.humanize_timedelta()` function now supports formatting negative `datetime.timedelta` instances. New ``negative_format`` parameter was added to allow specifying a different way of formatting negative `datetime.timedelta` instances (:issue:`6350`)

Documentation changes
---------------------

Fixes
*****

- Updated links to the Lavalink repository (:issue:`6356`)

----

Redbot 3.5.8 (2024-04-01)
=========================

Expand Down
4 changes: 0 additions & 4 deletions docs/autostart_systemd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ Next, your python :code:`path` can be fetched with the following commands:
$ source ~/redenv/bin/activate
(redenv) $ /usr/bin/which python

# If redbot is installed in a pyenv virtualenv
$ pyenv shell <virtualenv_name>
(redenv) $ pyenv which python

Then create the new service file:

:code:`sudo nano /etc/systemd/system/red@.service`
Expand Down
6 changes: 3 additions & 3 deletions docs/cog_guides/audio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find detailed docs about usage and commands.
You can see additional help for any command in this guide by using ``[p]help`` with the
command name, like ``[p]help playlist append``.

In this guide, you will see references to "Lavalink" or the "Lavalink.jar". `Lavalink <https://github.com/freyacodes/Lavalink/>`_ is the
In this guide, you will see references to "Lavalink" or the "Lavalink.jar". `Lavalink <https://github.com/lavalink-devs/Lavalink/>`_ is the
Java-based audio backend we use to be able to play music through the bot. Most users will
not have to worry much about Lavalink or what it is, as Audio manages this process for you
by default. Advanced users can read more about Lavalink and special cases under the
Expand Down Expand Up @@ -551,7 +551,7 @@ uses OpenJDK 17 in the managed Lavalink configuration. It can be installed by ru
sudo apt install openjdk-17-jre-headless -y
Otherwise, Lavalink works well with most versions of Java 11, 13, 15, 16, 17, and 18. Azul
Zulu builds are suggested, see `here <https://github.com/freyacodes/Lavalink/#requirements>`__ for more information.
Zulu builds are suggested, see `here <https://github.com/lavalink-devs/Lavalink/#requirements>`__ for more information.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting Up The Lavalink Folder
Expand Down Expand Up @@ -583,7 +583,7 @@ the ``cd lavalink`` command in the previous section, you can run the following c

.. code-block:: sh
curl https://raw.githubusercontent.com/freyacodes/Lavalink/master/LavalinkServer/application.yml.example > application.yml
curl https://raw.githubusercontent.com/lavalink-devs/Lavalink/master/LavalinkServer/application.yml.example > application.yml
curl -LOz Lavalink.jar https://github.com/Cog-Creators/Lavalink-Jars/releases/latest/download/Lavalink.jar
If you did it properly, the files ``Lavalink.jar`` and ``application.yml`` will show up when we run ``ls``, the Linux command
Expand Down
53 changes: 52 additions & 1 deletion docs/cog_guides/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,7 @@ Supports either an attachment or an image URL.
**Examples:**
- ``[p]set bot avatar`` - With an image attachment, this will set the avatar.
- ``[p]set bot avatar`` - Without an attachment, this will show the command help.
- ``[p]set bot avatar https://links.flaree.xyz/k95`` - Sets the avatar to the provided url.
- ``[p]set bot avatar https://avatars.githubusercontent.com/u/23690422`` - Sets the avatar to the provided url.

**Arguments:**
- ``[url]`` - An image url to be used as an avatar. Leave blank when uploading an attachment.
Expand Down Expand Up @@ -2895,6 +2895,57 @@ Removes Red's avatar.
**Example:**
- ``[p]set bot avatar remove``

.. _core-command-set-bot-banner:

""""""""""""""
set bot banner
""""""""""""""

.. note:: |owner-lock|

**Syntax**

.. code-block:: none
[p]set bot banner [url]
**Description**

Sets Red's banner

Supports either an attachment or an image URL.

**Examples:**
- ``[p]set bot banner`` - With an image attachment, this will set the banner.
- ``[p]set bot banner`` - Without an attachment, this will show the command help.
- ``[p]set bot banner https://opengraph.githubassets.com`` - Sets the banner to the provided url.

**Arguments:**
- ``[url]`` - An image url to be used as an banner. Leave blank when uploading an attachment.

.. _core-command-set-bot-banner-remove:

"""""""""""""""""""""
set bot banner remove
"""""""""""""""""""""

.. note:: |owner-lock|

**Syntax**

.. code-block:: none
[p]set bot banner remove
.. tip:: Alias: ``set bot banner clear``

**Description**

Removes Red's banner.

**Example:**
- ``[p]set bot banner remove``

.. _core-command-set-bot-custominfo:

""""""""""""""""""
Expand Down
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@
extlinks = {
"dpy_docs": (f"{dpy_docs_url}%s", None),
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#%s"),
"ghuser": ("https://github.com/%s", "@%s"),
# below URL redirects to user page, if they don't have GH Sponsors set up,
# while allowing us to direct readers directly at a sponsorship opportunity,
# if they do
"ghuser": ("https://github.com/sponsors/%s", "@%s"),
}

# Doctest
Expand Down
13 changes: 13 additions & 0 deletions docs/framework_app_commands.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. red app_commands module documentation
====================
App Commands Package
====================

This package acts almost identically to :doc:`discord.ext.app_commands <dpy:interactions/api>`; i.e.
all of the attributes from discord.py's are also in ours.
Some of these attributes, however, have been slightly modified, while others have been added to
extend functionalities used throughout the bot, as outlined below.

.. autoclass:: redbot.core.app_commands.UserFeedbackCheckFailure
:members:
3 changes: 3 additions & 0 deletions docs/framework_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ extend functionalities used throughout the bot, as outlined below.

.. autoclass:: redbot.core.commands.DMContext

.. autoclass:: redbot.core.commands.UserFeedbackCheckFailure
:members:

.. automodule:: redbot.core.commands.requires
:members: PrivilegeLevel, PermState, Requires

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ If you want to do it, follow these steps.
2. **Install Linux**

Most of the VPS providers have tools for installing Linux automatically. If
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
you're a beginner, we recommend **Ubuntu 24.04 LTS**.

For Raspberry Pi users, just install `Raspbian
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
Expand Down
6 changes: 3 additions & 3 deletions docs/guide_cog_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Open a terminal or command prompt and type one of the following
.. note::

To install the development version, replace ``Red-DiscordBot`` in the above commands with the
link below. **The development version of the bot contains experimental changes. It is not
value below. **The development version of the bot contains experimental changes. It is not
intended for normal users.** We will not support anyone using the development version in any
support channels. Using the development version may break third party cogs and not all core
commands may work. Downgrading to stable after installing the development version may cause
Expand All @@ -40,7 +40,7 @@ Open a terminal or command prompt and type one of the following

.. code-block:: none
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
Red-DiscordBot @ https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop
(Windows users may need to use :code:`py -3.8` or :code:`python` instead of :code:`python3.8`)
Expand All @@ -55,7 +55,7 @@ the purposes of this example, we'll call this :code:`mycog`).
In this folder, create three files: :code:`__init__.py`,
:code:`mycog.py`, and :code:`info.json`. Open the folder in
a text editor or IDE (examples include `Sublime Text 3 <https://www.sublimetext.com/>`_,
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, and
`Visual Studio Code <https://code.visualstudio.com/>`_, and
`PyCharm <http://www.jetbrains.com/pycharm/>`_).

.. attention::
Expand Down
3 changes: 1 addition & 2 deletions docs/guide_cog_creators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ Any Cog Creator that does not follow these requirements will have their repo rem
- Repo-wide ``info.json`` file with the keys

- ``author``
- ``name``
- ``short``
- ``description``

- Cog ``info.json`` files with the keys

- ``author``
- ``name``
- ``short``
- ``requirements`` (if applicable)
- ``description``
- ``min_python_version`` (if applicable)

See `info-json-format` for more information on how to set up ``info.json`` files.

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Welcome to Red - Discord Bot's documentation!
framework_bot
framework_checks
framework_commands
framework_app_commands
framework_config
framework_datamanager
framework_events
Expand Down
19 changes: 0 additions & 19 deletions docs/install_guides/_includes/_install-pyenv-and-setup-path.rst

This file was deleted.

Loading

1 comment on commit c9c3738

@vertyco
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

Please sign in to comment.