Skip to content

Commit

Permalink
Cleanup indentation and participant dm
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmonck committed Jun 8, 2021
1 parent cc0f9ea commit fd9ec20
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions bot/exts/help_channels/_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ async def unclaim_channel(self, channel: discord.TextChannel, *, closed_on: _cha
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)
Expand Down Expand Up @@ -574,16 +574,14 @@ async def notify_session_participants(self, message: discord.Message) -> None:
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,
Expand Down

0 comments on commit fd9ec20

Please sign in to comment.