From fd9ec20c97c899f352e1d6eaafabb4fe6ccb2b3f Mon Sep 17 00:00:00 2001 From: Slushs Date: Tue, 8 Jun 2021 15:10:59 -0400 Subject: Cleanup indentation and participant dm --- bot/exts/help_channels/_cog.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index f78d4e306..71dfc2c78 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -418,10 +418,10 @@ class HelpChannels(commands.Cog): return await _unclaim_channel(channel, claimant_id, closed_on) async def _unclaim_channel( - self, - channel: discord.TextChannel, - claimant_id: int, - closed_on: _channel.ClosingReason + self, + channel: discord.TextChannel, + claimant_id: int, + closed_on: _channel.ClosingReason ) -> None: """Actual implementation of `unclaim_channel`. See that for full documentation.""" await _caches.claimants.delete(channel.id) @@ -574,16 +574,14 @@ class HelpChannels(commands.Cog): if message.author.id not in session_participants: session_participants.add(message.author.id) - user = self.bot.get_user(message.author.id) - embed = discord.Embed( title="Currently Helping", description=f"You're currently helping in <#{message.channel.id}>", color=discord.Colour.green(), timestamp=message.created_at ) - embed.add_field(name="Conversation", value=f"[Jump to message]({message.message.jump_url})") - await user.send(embed=embed) + embed.add_field(name="Conversation", value=f"[Jump to message]({message.jump_url})") + await message.author.send(embed=embed) await _caches.session_participants.set( message.channel.id, -- cgit v1.2.3