aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/filter_lists.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/cogs/filter_lists.py b/bot/cogs/filter_lists.py
index f133d53d9..8831a2143 100644
--- a/bot/cogs/filter_lists.py
+++ b/bot/cogs/filter_lists.py
@@ -43,6 +43,10 @@ class FilterLists(Cog):
if not comment:
comment = guild_data.get("name")
+ # If it's a file format, let's make sure it has a leading dot.
+ elif list_type == "FILE_FORMAT" and not content.startswith("."):
+ content = f".{content}"
+
# Try to add the item to the database
log.trace(f"Trying to add the {content} item to the {list_type} {allow_type}")
payload = {
@@ -86,6 +90,10 @@ class FilterLists(Cog):
guild_data = await self._validate_guild_invite(ctx, content)
content = guild_data.get("id")
+ # If it's a file format, let's make sure it has a leading dot.
+ elif list_type == "FILE_FORMAT" and not content.startswith("."):
+ content = f".{content}"
+
# Find the content and delete it.
log.trace(f"Trying to delete the {content} item from the {list_type} {allow_type}")
item = self.bot.filter_list_cache[f"{list_type}.{allowed}"].get(content)