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

Handle UIB interactions for ignoring channels. #6503

Open
wants to merge 1 commit into
base: V3/develop
Choose a base branch
from

Conversation

Kowlin
Copy link
Member

@Kowlin Kowlin commented Jan 6, 2025

Description of the changes

Fixes #6501, this PR handles User Installed Bot interactions where they will error out on trying to check from Threads, as it cannot get the channels it need. Furthermore, this handling like this will NOT check for categories, as the bot cannot gather those from a context where it can only get information from the interaction. Tough luck...

Have the changes in this PR been tested?

Yes, but only internally, this must be tested by trying to reproduce the original error from #6501

@github-actions github-actions bot added Category: Core - Bot Class This is related to the `redbot.core.bot.Red` class. Category: Core - Other Internals This is related to core internals that don't have a dedicated label. labels Jan 6, 2025
@Kowlin Kowlin added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Jan 6, 2025
@Flame442
Copy link
Member

Flame442 commented Jan 7, 2025

Fixes the issues for pure app commands, but there is still a remaining error for hybrids in particular. Not sure if we want to just fix that here, or if we want to save that for another PR.

File "venv\lib\site-packages\redbot\core\_global_checks.py", line 8, in check_message_is_eligible_as_command
    return await ctx.bot.message_eligible_as_command(ctx.message)
  File "venv\lib\site-packages\redbot\core\bot.py", line 844, in message_eligible_as_command
    if not can_user_send_messages_in(guild.me, channel):
  File "venv\lib\site-packages\redbot\core\utils\__init__.py", line 724, in can_user_send_messages_in
    perms = channel.permissions_for(obj)
  File "venv\lib\site-packages\discord\threads.py", line 425, in permissions_for
    raise ClientException('Parent channel not found')
discord.errors.ClientException: Parent channel not found

@Flame442 Flame442 self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Bot Class This is related to the `redbot.core.bot.Red` class. Category: Core - Other Internals This is related to core internals that don't have a dedicated label. 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.

Commands Used in Threads as User-Installed App
2 participants