diff options
| author | 2020-07-13 15:27:41 +0200 | |
|---|---|---|
| committer | 2020-07-13 15:27:41 +0200 | |
| commit | aa0b20bdd780bc75cadde781981d063287bfe5ce (patch) | |
| tree | fccc18f7ceca538cbcb8c659beb25503e107b743 | |
| parent | Don't run on_message if self.webhook is None. (diff) | |
Remove redundant clean_content variable.
https://github.com/python-discord/bot/issues/667
| -rw-r--r-- | bot/cogs/dm_relay.py | 3 | ||||
| -rw-r--r-- | bot/cogs/duck_pond.py | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/bot/cogs/dm_relay.py b/bot/cogs/dm_relay.py index 3d16db8a0..494c71066 100644 --- a/bot/cogs/dm_relay.py +++ b/bot/cogs/dm_relay.py @@ -67,8 +67,7 @@ class DMRelay(Cog): if message.author.bot or message.guild or self.webhook is None: return - clean_content = message.clean_content - if clean_content: + if message.clean_content: await send_webhook( webhook=self.webhook, content=message.clean_content, diff --git a/bot/cogs/duck_pond.py b/bot/cogs/duck_pond.py index 89b4ad0e4..7021069fa 100644 --- a/bot/cogs/duck_pond.py +++ b/bot/cogs/duck_pond.py @@ -78,9 +78,7 @@ class DuckPond(Cog): async def relay_message(self, message: Message) -> None: """Relays the message's content and attachments to the duck pond channel.""" - clean_content = message.clean_content - - if clean_content: + if message.clean_content: await send_webhook( webhook=self.webhook, content=message.clean_content, |