diff options
| -rw-r--r-- | bot/cogs/antimalware.py | 2 | ||||
| -rw-r--r-- | bot/cogs/filtering.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py index 38ff1133d..5b56f937f 100644 --- a/bot/cogs/antimalware.py +++ b/bot/cogs/antimalware.py @@ -40,7 +40,7 @@ class AntiMalware(Cog): def _get_whitelisted_file_formats(self) -> list: """Get the file formats currently on the whitelist.""" - return [item.get('content') for item in self.bot.allow_deny_list_cache['file_format.True']] + return [item['content'] for item in self.bot.allow_deny_list_cache['file_format.True']] def _get_disallowed_extensions(self, message: Message) -> t.Iterable[str]: """Get an iterable containing all the disallowed extensions of attachments.""" diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index 98a60f489..8897cbaf9 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -104,9 +104,9 @@ class Filtering(Cog): items = self.bot.allow_deny_list_cache.get(f"{list_type.upper()}.{allowed}", []) if compiled: - return [re.compile(fr'{item.get("content")}', flags=re.IGNORECASE) for item in items] + return [re.compile(fr'{item["content"]}', flags=re.IGNORECASE) for item in items] else: - return [item.get("content") for item in items] + return [item["content"] for item in items] @staticmethod def _expand_spoilers(text: str) -> str: |