Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NUMBER_EMOJIS breakages inside Audio #6170

Merged
merged 2 commits into from Jun 19, 2023

Conversation

Kreusada
Copy link
Member

Description of the changes

Closes #6169, fixes where the code attempts to mutate the now immutable NUMBER_EMOJIS.

Have the changes in this PR been tested?

Yes

@github-actions github-actions bot added the Category: Cogs - Audio This is related to the Audio cog. label May 19, 2023
@Kreusada Kreusada added this to the 3.5.3 milestone May 19, 2023
@Kreusada Kreusada added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label May 19, 2023
@aikaterna aikaterna self-assigned this Jun 9, 2023
@aikaterna
Copy link
Member

After testing this change I ran into another issue on the next line:

[08:44:28] ERROR [red] AttributeError
Traceback (most recent call last)
/Users/aikaterna/red38/lib/python3.8/site-packages/discord/ext/commands/core.py:229 in wrapped
❱ 229 ret = await coro(*args, **kwargs)
/Users/aikaterna/red38/lib/python3.8/site-packages/redbot/cogs/audio/core/commands/playlists.py:830 in command_playlist_info
❱ 830 playlist, playlist_arg, scope = await self.get_playlist_match(
/Users/aikaterna/red38/lib/python3.8/site-packages/redbot/cogs/audio/core/utilities/playlists.py:267 in get_playlist_match
❱ 267 emojis.append("\N{CROSS MARK}")

AttributeError: 'tuple' object has no attribute 'append'

You could do something like this to resolve it:

emojis = available_emojis[: len(correct_scope_matches)]
emojis += ("\N{CROSS MARK}",)

I'm not going to add this as a suggestion in case there is a cleaner way to do this or another way you'd like to go about it.

Copy link
Member

@Jackenmen Jackenmen left a comment

Choose a reason for hiding this comment

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

I switched this to a simple list() call which should make it work as it would have before, thanks for the PR.

@Jackenmen Jackenmen merged commit 31700a2 into Cog-Creators:V3/develop Jun 19, 2023
15 of 16 checks passed
@red-githubbot red-githubbot bot added the Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. label Jun 19, 2023
@Jackenmen Jackenmen modified the milestones: 3.5.4, 3.5.3 Jun 19, 2023
@Jackenmen Jackenmen added Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. and removed Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - Audio This is related to the Audio cog. Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audio NUMBER_EMOJIS tuple breakages from 3.5
3 participants