aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/clean.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/moderation/clean.py b/bot/exts/moderation/clean.py
index 67f1851c4..1c47f8342 100644
--- a/bot/exts/moderation/clean.py
+++ b/bot/exts/moderation/clean.py
@@ -7,7 +7,7 @@ from datetime import datetime
from itertools import takewhile
from typing import Callable, Iterable, Literal, Optional, TYPE_CHECKING, Union
-from discord import Colour, Message, NotFound, TextChannel, User, errors
+from discord import Colour, Message, NotFound, TextChannel, Thread, User, errors
from discord.ext.commands import Cog, Context, Converter, Greedy, group, has_any_role
from discord.ext.commands.converter import TextChannelConverter
from discord.ext.commands.errors import BadArgument
@@ -130,8 +130,8 @@ class Clean(Cog):
else:
if channels == "*":
channels = {
- channel for channel in ctx.guild.channels
- if isinstance(channel, TextChannel)
+ channel for channel in ctx.guild.channels + ctx.guild.threads
+ if isinstance(channel, (TextChannel, Thread))
# Assume that non-public channels are not needed to optimize for speed.
and channel.permissions_for(ctx.guild.default_role).view_channel
}