Migration to discord.py 2.0 #5600

Merged
Jackenmen merged 65 commits from this_is_the_real_deal into V3/develop 2022-04-03 03:21:20 +02:00
Jackenmen commented 2022-03-06 01:52:48 +01:00 (Migrated from github.com)

Description of the changes

This is the work on migrating Red to discord.py 2.0.

If you want to test our work on migration to discord.py 2.0, you can test these changes by installing this PR's branch in a virtual environment with the command:

python -m pip install -U --force-reinstall git+https://github.com/Cog-Creators/Red-DiscordBot@V3/dpy2_unstable#egg=Red-DiscordBot

Be sure to report any issues you run into, this is a huge changeset so it's possible that I missed something.

Things that still need doing (but might be done in separate PR later):

  • Quite a bit of user-facing docstrings refer to the current channel
    when they also mean thread (should we fix this?).
    • Developer-facing docs do too but I don't think that's an issue.
  • Perhaps something we missed?

Have the changes in this PR been tested?

No (Partially yes, but I have not tested all the changes that have been made here)

Information for reviewers

The code review is best done by going through individual commits (there's a nice next button when you are in a commit view on a PR so it's quite convenient) as they are well-scoped.

As for functional review... You have to test on the whole changeset but you can still leverage the commit separation so that you test a single thing at the time though if you think it's going to be easier to just go through the whole files changed list, that seems fine to me too.

### Description of the changes This is the work on migrating Red to discord.py 2.0. If you want to test our work on migration to discord.py 2.0, you can test these changes by installing this PR's branch in a virtual environment with the command: ``` python -m pip install -U --force-reinstall git+https://github.com/Cog-Creators/Red-DiscordBot@V3/dpy2_unstable#egg=Red-DiscordBot ``` Be sure to report any issues you run into, this is a huge changeset so it's possible that I missed something. Things that still need doing (but might be done in separate PR later): - Quite a bit of user-facing docstrings refer to the current channel when they also mean thread (should we fix this?). - Developer-facing docs do too but I don't think that's an issue. - Perhaps something we missed? ### Have the changes in this PR been tested? No (Partially yes, but I have not tested all the changes that have been made here) ### Information for reviewers The code review is best done by going through individual commits (there's a nice next button when you are in a commit view on a PR so it's quite convenient) as they are well-scoped. As for functional review... You have to test on the whole changeset but you can still leverage the commit separation so that you test a single thing at the time though if you think it's going to be easier to just go through the whole files changed list, that seems fine to me too.
palmtree5 (Migrated from github.com) reviewed 2022-03-06 01:52:48 +01:00
aikaterna (Migrated from github.com) reviewed 2022-03-06 01:52:48 +01:00
PredaaA (Migrated from github.com) reviewed 2022-03-06 01:52:48 +01:00
ltzmax commented 2022-03-07 18:02:45 +01:00 (Migrated from github.com)

From testing branch V3/dpy2_unstable with the command [p]queue from audio:

┌──────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────┐
│ C:\Users\maxbo\redenv\lib\site-packages\discord\ext\commands\core.py:182 in wrapped                                                                        │
│ >  182             ret = await coro(*args, **kwargs)                                                                                                       │
│ C:\Users\maxbo\redenv\lib\site-packages\redbot\cogs\audio\core\commands\queue.py:175 in command_queue                                                      │
│ > 175         return await menu(ctx, queue_page_list, queue_controls, page=(page - 1))                                                                     │
│ C:\Users\maxbo\redenv\lib\site-packages\redbot\core\utils\menus.py:118 in menu                                                                             │
│ > 109             if message.channel.permissions_for(ctx.me).manage_messages:                                                                              │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
AttributeError: 'PartialMessageable' object has no attribute 'permissions_for'

I am unsure how this happened and to why it happened. i only ran queue and waitied a bit then hit the x and the above error showed.

i had 132 songs in queue if that matter.

From testing branch `V3/dpy2_unstable` with the command `[p]queue` from audio: ```py ┌──────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────┐ │ C:\Users\maxbo\redenv\lib\site-packages\discord\ext\commands\core.py:182 in wrapped │ │ > 182 ret = await coro(*args, **kwargs) │ │ C:\Users\maxbo\redenv\lib\site-packages\redbot\cogs\audio\core\commands\queue.py:175 in command_queue │ │ > 175 return await menu(ctx, queue_page_list, queue_controls, page=(page - 1)) │ │ C:\Users\maxbo\redenv\lib\site-packages\redbot\core\utils\menus.py:118 in menu │ │ > 109 if message.channel.permissions_for(ctx.me).manage_messages: │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ AttributeError: 'PartialMessageable' object has no attribute 'permissions_for' ``` I am unsure how this happened and to why it happened. i only ran `queue` and waitied a bit then hit the `x` and the above error showed. i had 132 songs in queue if that matter.
TrustyJAID (Migrated from github.com) approved these changes 2022-04-03 02:23:58 +02:00
TrustyJAID (Migrated from github.com) left a comment

LGTM

LGTM
Jackenmen commented 2022-04-03 03:21:10 +02:00 (Migrated from github.com)

YASSS

YASSS
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!5600
No description provided.