diff options
| author | 2018-10-29 20:15:12 +0000 | |
|---|---|---|
| committer | 2018-10-29 20:15:12 +0000 | |
| commit | 2cfd15ae6c8365009f6b1f4cdbff98ed53b7b59f (patch) | |
| tree | 8ed36b28a899ecafcf1eadc6d973b97302efce0d | |
| parent | Merge branch 'juanita/rules-command' into 'master' (diff) | |
| parent | Correcting a logic error in the edited message deletion thingy. (diff) | |
Merge branch 'hemlock/format-block-fixing' into 'master'
The Last of the Format Block Thingy Fixes
See merge request python-discord/projects/bot!81
| -rw-r--r-- | bot/cogs/bot.py | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 168916a64..846783e08 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -236,8 +236,7 @@ class Bot:              "\u3003\u3003\u3003"          ] -        has_bad_ticks = msg.content[:3] in not_backticks -        return has_bad_ticks +        return msg.content[:3] in not_backticks      async def on_message(self, msg: Message):          """ @@ -372,11 +371,11 @@ class Bot:          channel = self.bot.get_channel(payload.data.get("channel_id"))          user_message = await channel.get_message(payload.message_id) -        #  Checks to see if the user has corrected their codeblock +        #  Checks to see if the user has corrected their codeblock.  If it's fixed, has_fixed_codeblock will be None          has_fixed_codeblock = self.codeblock_stripping(payload.data.get("content"), self.has_bad_ticks(user_message))          # If the message is fixed, delete the bot message and the entry from the id dictionary -        if has_fixed_codeblock: +        if has_fixed_codeblock is None:              bot_message = await channel.get_message(self.codeblock_message_ids[payload.message_id])              await bot_message.delete()              del self.codeblock_message_ids[payload.message_id]  |