diff options
author | 2021-03-05 11:28:46 +0530 | |
---|---|---|
committer | 2021-10-11 12:05:29 +0530 | |
commit | e113b17f68452573b1b236f7577120dd3783f6da (patch) | |
tree | 0a5f39c3cd3c97b2dfcf41a97681114fcd4491bc | |
parent | Fix tests according to the changes done to incidents.py (diff) |
Rollback to changes which aren't required
-rw-r--r-- | bot/exts/moderation/incidents.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index 813b717a8..201c6d1ca 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -10,7 +10,7 @@ from async_rediscache import RedisCache from discord.ext.commands import Cog, Context, MessageConverter from more_itertools.recipes import grouper -from bot import bot +from bot.bot import Bot from bot.constants import Channels, Colours, Emojis, Guild, Webhooks from bot.utils import scheduling from bot.utils.messages import format_user, sub_clyde @@ -122,9 +122,9 @@ def is_incident(message: discord.Message) -> bool: """True if `message` qualifies as an incident, False otherwise.""" conditions = ( message.channel.id == Channels.incidents, # Message sent in #incidents - not message.author.bot, # Not by a bot - not message.content.startswith("#"), # Doesn't start with a hash - not message.pinned, # And isn't header + not message.author.bot, # Not by a bot + not message.content.startswith("#"), # Doesn't start with a hash + not message.pinned, # And isn't header ) return all(conditions) @@ -231,7 +231,7 @@ class Incidents(Cog): # RedisCache[discord.Message.id, List[discord.Message.id]] message_link_embeds_cache = RedisCache() - def __init__(self, bot: bot.Bot) -> None: + def __init__(self, bot: Bot) -> None: """Prepare `event_lock` and schedule `crawl_task` on start-up.""" self.bot = bot @@ -511,6 +511,6 @@ class Incidents(Cog): await add_signals(message) -def setup(bot: bot.Bot) -> None: +def setup(bot: Bot) -> None: """Load the Incidents cog.""" bot.add_cog(Incidents(bot)) |