bot icon indicating copy to clipboard operation
bot copied to clipboard

ClientException: Parent channel not found

Open sentry[bot] opened this issue 2 years ago • 1 comments

Sentry Issue: BOT-3FW

ClientException: Parent channel not found
(1 additional frame(s) were not displayed)
...
  File "bot/exts/moderation/clean.py", line 645, in purge
    await self._clean_messages(ctx, channels="*", users=users, first_limit=age)
  File "bot/exts/moderation/clean.py", line 404, in _clean_messages
    deletion_channels = self._channels_set(channels, ctx, first_limit, second_limit)
  File "bot/exts/moderation/clean.py", line 135, in _channels_set
    channels = {
  File "bot/exts/moderation/clean.py", line 139, in <setcomp>
    and channel.permissions_for(ctx.guild.default_role).view_channel

Error executing command invoked by {{redacted_user}}: !purge {{redacted_user_id}} 1d

sentry[bot] avatar Apr 27 '23 12:04 sentry[bot]

Relevant discussion/testing https://discord.com/channels/267624335836053506/620607373828030464/1101113427855937586

shtlrs avatar Apr 27 '23 12:04 shtlrs

Seems to be because the channel was deleted but this didn't remove the thread from guild.threads.

Reported as an issue in discord.py: https://github.com/Rapptz/discord.py/issues/9795, we should be able to close this when the linked PR there is merged.

wookie184 avatar Apr 20 '24 11:04 wookie184

Upstream issue was fixed so should be sorted in the next discord.py release.

wookie184 avatar May 06 '24 18:05 wookie184