Skip to content

Commit

Permalink
Merge branch 'Cog-Creators:V3/develop' into use_exec_module
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuro-Rui authored Jul 2, 2024
2 parents 33b2b11 + ad1e1aa commit d01bcc9
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 191 deletions.
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/[email protected]`
Expand Down
19 changes: 0 additions & 19 deletions docs/install_guides/_includes/_install-pyenv-and-setup-path.rst

This file was deleted.

44 changes: 0 additions & 44 deletions docs/install_guides/_includes/create-env-with-pyenv-virtualenv.rst

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
Installing the pre-requirements
-------------------------------

Red Hat Enterprise Linux (RHEL) 8.6-8.x and its derivatives have all required packages available in official repositories.
Red Hat Enterprise Linux (RHEL) 8.8-8.x and its derivatives have all required packages available in official repositories.
Install them with dnf:

.. TODO: Use Python 3.11 once RHEL 8.6 goes EOL in 2024.
.. prompt:: bash

sudo dnf -y update
sudo dnf -y group install development
sudo dnf -y install python39 python39-devel java-17-openjdk-headless nano git
sudo dnf -y install python3.11 python3.11-devel java-17-openjdk-headless nano git

Set ``java`` executable to point to Java 17:

Expand All @@ -25,6 +23,6 @@ Set ``java`` executable to point to Java 17:

.. Include common instructions:
.. include:: _includes/create-env-with-venv3.9.rst
.. include:: _includes/create-env-with-venv3.11.rst

.. include:: _includes/install-and-setup-red-unix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@
Installing the pre-requirements
-------------------------------

Red Hat Enterprise Linux (RHEL) 9 and its derivatives have all required packages available in official repositories.
Red Hat Enterprise Linux (RHEL) 9.2-9.x and its derivatives have all required packages available in official repositories.
Install them with dnf:

.. TODO: Use Python 3.11 once RHEL 9.0 goes EOL in 2024.
.. prompt:: bash

sudo dnf -y install python39 python3-devel git java-17-openjdk-headless @development nano
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development nano

.. Include common instructions:
.. include:: _includes/create-env-with-venv3.9.rst
.. include:: _includes/create-env-with-venv3.11.rst

.. include:: _includes/install-and-setup-red-unix.rst
27 changes: 0 additions & 27 deletions docs/install_guides/_includes/install-python39-pyenv.rst

This file was deleted.

12 changes: 6 additions & 6 deletions docs/install_guides/arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ Install the pre-requirements with pacman:

sudo pacman -Syu git jre17-openjdk-headless base-devel nano

On Arch Linux, Python 3.10 can be installed from the Arch User Repository (AUR) from the ``python310`` package.
On Arch Linux, Python 3.11 can be installed from the Arch User Repository (AUR) from the ``python311`` package.

The manual build process is the Arch-supported install method for AUR packages. You can install ``python310`` package with the following commands:
The manual build process is the Arch-supported install method for AUR packages. You can install ``python311`` package with the following commands:

.. prompt:: bash

git clone https://aur.archlinux.org/python310.git /tmp/python310
cd /tmp/python310
git clone https://aur.archlinux.org/python311.git /tmp/python311
cd /tmp/python311
makepkg -sicL
cd -
rm -rf /tmp/python310
rm -rf /tmp/python311

.. Include common instructions:
.. include:: _includes/create-env-with-venv3.10.rst
.. include:: _includes/create-env-with-venv3.11.rst

.. include:: _includes/install-and-setup-red-unix.rst
46 changes: 0 additions & 46 deletions docs/install_guides/centos-7.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/install_guides/centos-stream-8.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/install_guides/fedora.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Installing Red on Fedora Linux
Installing the pre-requirements
-------------------------------

Fedora Linux 38 and above has all required packages available in official repositories. Install
Fedora Linux 39 and above has all required packages available in official repositories. Install
them with dnf:

.. prompt:: bash
Expand Down
2 changes: 0 additions & 2 deletions docs/install_guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ we recommend **Ubuntu 24.04 LTS**.
alma-linux-9
amazon-linux-2023
arch
centos-7
centos-stream-8
centos-stream-9
debian-11
debian-12
Expand Down
2 changes: 1 addition & 1 deletion docs/install_guides/rhel-8.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _install-rhel-8:

=========================================================
Installing Red on Red Hat Enterprise Linux (RHEL) 8.6-8.x
Installing Red on Red Hat Enterprise Linux (RHEL) 8.8-8.x
=========================================================

.. include:: _includes/install-guide-rhel8-derivatives.rst
6 changes: 3 additions & 3 deletions docs/install_guides/rhel-9.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _install-rhel-9:

===================================================
Installing Red on Red Hat Enterprise Linux (RHEL) 9
===================================================
=========================================================
Installing Red on Red Hat Enterprise Linux (RHEL) 9.2-9.x
=========================================================

.. include:: _includes/install-guide-rhel9-derivatives.rst
10 changes: 0 additions & 10 deletions docs/update_red.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ If you have Red 3.5.0 or newer, you can upgrade by following these steps:

source ~/redenv/bin/activate

If you used ``pyenv`` for your virtual environment, use:

.. prompt:: bash

pyenv shell <name>
#. Update Red with this command:

.. prompt:: bash
Expand Down Expand Up @@ -138,11 +133,6 @@ If you have a Red version between 3.2.0 and 3.4.19, you can upgrade by following

source ~/redenv/bin/activate

If you used ``pyenv`` for your virtual environment, use:

.. prompt:: bash

pyenv shell <name>
#. Update Red with this command:

.. prompt:: bash
Expand Down
9 changes: 3 additions & 6 deletions docs/version_guarantees.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ their end-of-life date.
================================ ======================= ============================================================
Operating system version Supported architectures Ideally supported until
================================ ======================= ============================================================
Windows 10 x86-64 `End/Retirement Date <https://docs.microsoft.com/en-us/lifecycle/products/windows-10-home-and-pro>`__
Windows 10 x86-64 2025-10-14 (`End/Retirement Date <https://docs.microsoft.com/en-us/lifecycle/products/windows-10-home-and-pro>`__)
Windows 11 x86-64 `Retirement Date <https://docs.microsoft.com/en-us/lifecycle/products/windows-11-home-and-pro-version-21h2>`__
macOS 12 (Monterey) x86-64, aarch64 ~2024-10
macOS 13 (Ventura) x86-64, aarch64 ~2025-10
Expand All @@ -59,12 +59,9 @@ Alma Linux 8 x86-64, aarch64 2029-05-31 (`How lo
Alma Linux 9 x86-64, aarch64 2032-05-31
Amazon Linux 2023 x86-64, aarch64 2028-03-15 (`end-of-life <https://docs.aws.amazon.com/linux/al2023/release-notes/support-info-by-support-statement.html#support-info-by-support-statement-eol>`__)
Arch Linux x86-64 forever (support is only provided for an up-to-date system)
CentOS 7 x86-64, aarch64 2024-06-30 (`end of Maintenance Updates <https://wiki.centos.org/About/Product>`__)
CentOS Stream 8 x86-64, aarch64 2024-05-31 (`end of Maintenance Updates <https://wiki.centos.org/About/Product>`__)
CentOS Stream 9 x86-64, aarch64 2027-05-31 (`expected EOL <https://centos.org/stream9/#timeline>`__)
Debian 11 Bullseye x86-64, aarch64, armv7l ~2024-07 (`End of life <https://wiki.debian.org/DebianReleases#Production_Releases>`__)
Debian 12 Bookworm x86-64, aarch64, armv7l ~2026-09 (`End of life <https://wiki.debian.org/DebianReleases#Production_Releases>`__)
Fedora Linux 38 x86-64, aarch64 2024-05-14 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
Fedora Linux 39 x86-64, aarch64 2024-11-12 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
Fedora Linux 40 x86-64, aarch64 2025-05-13 (`End of Life <https://docs.fedoraproject.org/en-US/releases/lifecycle/#_maintenance_schedule>`__)
openSUSE Leap 15.5 x86-64, aarch64 2024-12-31 (`end of maintenance life cycle <https://en.opensuse.org/Lifetime#openSUSE_Leap>`__)
Expand All @@ -74,11 +71,11 @@ Oracle Linux 9 x86-64, aarch64 2032-06-31 (`End of
Raspberry Pi OS (Legacy) 11 armv7l ~2025-10 (approximate date of release of Raspberry Pi OS 13)
Raspberry Pi OS 12 aarch64, armv7l ~2025-10 (approximate date of release of Raspberry Pi OS 13)
RHEL 8 (latest) x86-64, aarch64 2029-05-31 (`End of Maintenance Support <https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates>`__)
RHEL 8.6 x86-64, aarch64 2024-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
RHEL 8.8 x86-64, aarch64 2025-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
RHEL 8.10 x86-64, aarch64 2029-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
RHEL 9 (latest) x86-64, aarch64 2032-05-31 (`End of Maintenance Support <https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates>`__)
RHEL 9.0 x86-64, aarch64 2024-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
RHEL 9.2 x86-64, aarch64 2025-05-31 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
RHEL 9.4 x86-64, aarch64 2026-04-30 (`End of Extended Update Support <https://access.redhat.com/support/policy/updates/errata#Extended_Update_Support>`__)
Rocky Linux 8 x86-64, aarch64 2029-05-31 (`end-of-life <https://rockylinux.org/download/>`__)
Rocky Linux 9 x86-64, aarch64 2032-05-31 (`end-of-life <https://rockylinux.org/download/>`__)
Ubuntu 20.04 LTS x86-64, aarch64 2025-06-30 (`End of Standard Support <https://wiki.ubuntu.com/Releases#Current>`__)
Expand Down
24 changes: 19 additions & 5 deletions redbot/core/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,22 +334,36 @@ async def on_error(
else:
log.exception(type(error).__name__, exc_info=error)

async def _send_interaction_check_failure(
self, interaction: discord.Interaction, message: str
):
"""Handles responding to interaction check failures.
Mainly used for when an interaction is an autocomplete and
providing the message in the autocomplete response.
"""
if interaction.type is discord.InteractionType.autocomplete:
await interaction.response.autocomplete(
[discord.app_commands.Choice(name=message[:80], value="None")]
)
return
await interaction.response.send_message(message, ephemeral=True)

async def interaction_check(self, interaction: discord.Interaction):
"""Global checks for app commands."""
if interaction.user.bot:
return False

if interaction.guild:
if not (await self.client.ignored_channel_or_guild(interaction)):
await interaction.response.send_message(
"This channel or server is ignored.", ephemeral=True
await self._send_interaction_check_failure(
interaction, _("This channel or server is ignored.")
)
return False

if not (await self.client.allowed_by_whitelist_blacklist(interaction.user)):
await interaction.response.send_message(
"You are not permitted to use commands because of an allowlist or blocklist.",
ephemeral=True,
await self._send_interaction_check_failure(
interaction,
_("You are not permitted to use commands because of an allowlist or blocklist."),
)
return False

Expand Down

0 comments on commit d01bcc9

Please sign in to comment.