diff --git a/core/__init__.py b/core/__init__.py index cdb0fbf..8000b8a 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -2,5 +2,5 @@ from . import constants as constants from .bot import Substiify as Substiify -__version__ = "0.97" +__version__ = "0.98" __author__ = "jackra1n" diff --git a/extensions/url_cleaner.py b/extensions/url_cleaner.py index ed1d8ca..a72ff8b 100644 --- a/extensions/url_cleaner.py +++ b/extensions/url_cleaner.py @@ -32,8 +32,8 @@ def create_rules(self, rules: list[str]): if len(split_rule) == 1: self.universal_rules.add(param_rule) else: - host_pattern = split_rule[1].replace("*.", "(?:.*\.)?") - host_rule = re.compile(f"^(www\.)?{host_pattern}$") + host_pattern = split_rule[1].replace("*.", r"(?:.*\.)?") + host_rule = re.compile(rf"^(www\.)?{host_pattern}$") host_rule_str = host_rule.pattern if host_rule_str not in self.host_rules: @@ -132,7 +132,7 @@ async def on_message(self, message: discord.Message): embed = discord.Embed(title="Please avoid sending links containing tracking parameters.") tracker_list = ", ".join([f"`{tracker}`" for tracker in removed_trackers]) - response = f"{tracker_list} {"are" if len(removed_trackers) > 1 else "is"} used for tracking." + response = f"{tracker_list} {'are' if len(removed_trackers) > 1 else 'is'} used for tracking." response += f"\n Here's the link without trackers:\n{'\n'.join(cleaned_urls)}" embed.description = response await message.reply(embed=embed) diff --git a/pyproject.toml b/pyproject.toml index 23e0daa..373dd99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "substiify" -version = "0.97" +version = "0.98" readme = "README.md" requires-python = ">=3.12" dependencies = [