diff options
| author | 2020-05-22 11:22:27 -0700 | |
|---|---|---|
| committer | 2020-05-22 11:32:02 -0700 | |
| commit | 278ae309be27058920424c4049272bd5171bc158 (patch) | |
| tree | d683cd6def77a22922b9d9b05d08c6a52ea14924 | |
| parent | HelpChannels: move message None check inside `match_bot_embed` (diff) | |
HelpChannels: remove `is_dormant_message`
At this point, it's just a thin wrapper to call another function. It's
redundant.
| -rw-r--r-- | bot/cogs/help_channels.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 07acff34d..f0e6746f0 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -438,10 +438,6 @@ class HelpChannels(Scheduler, commands.Cog): """Return True if `member` has the 'Help Cooldown' role.""" return any(constants.Roles.help_cooldown == role.id for role in member.roles) - def is_dormant_message(self, message: t.Optional[discord.Message]) -> bool: - """Return True if the contents of the `message` match `DORMANT_MSG`.""" - return self.match_bot_embed(message, DORMANT_MSG) - def match_bot_embed(self, message: t.Optional[discord.Message], description: str) -> bool: """Return `True` if the bot's `message`'s embed description matches `description`.""" if not message or not message.embeds: @@ -822,7 +818,7 @@ class HelpChannels(Scheduler, commands.Cog): embed = discord.Embed(description=AVAILABLE_MSG) msg = await self.get_last_message(channel) - if self.is_dormant_message(msg): + if self.match_bot_embed(msg, DORMANT_MSG): log.trace(f"Found dormant message {msg.id} in {channel_info}; editing it.") await msg.edit(embed=embed) else: |