Handle UIB interactions for ignoring channels.#6503
Handle UIB interactions for ignoring channels.#6503Jackenmen merged 7 commits intoCog-Creators:V3/developfrom
Conversation
|
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 |
There was a problem hiding this comment.
I'm only really concerned about proper documentation here - there used to be just one flow that everything went through. Now that we continue to have to fix things for various interactions and the implementation is split between different places, it would be good to inform the code reader about the traps - see the review comment for a specific suggestion.
It might also be worth updating help text / messages from the [p]ignore command such that the user knows that the category ignores won't apply to user-installed commands.
Co-authored-by: Jakub Kuczys <[email protected]>

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