Skip to content

Commit

Permalink
Add dm_channel_id field to log entry
Browse files Browse the repository at this point in the history
  • Loading branch information
khakers committed Mar 15, 2023
1 parent d6eba12 commit cf3444a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ async def get_log_link(self, channel_id: Union[str, int]) -> str:
async def create_log_entry(self, recipient: Member, channel: TextChannel, creator: Member) -> str:
key = secrets.token_hex(6)

dm_channel = await recipient.create_dm()

await self.logs.insert_one(
{
"_id": key,
Expand All @@ -578,6 +580,7 @@ async def create_log_entry(self, recipient: Member, channel: TextChannel, creato
"channel_id": str(channel.id),
"guild_id": str(self.bot.guild_id),
"bot_id": str(self.bot.user.id),
"dm_channel_id": str(dm_channel.id),
"recipient": {
"id": str(recipient.id),
"name": recipient.name,
Expand Down

0 comments on commit cf3444a

Please sign in to comment.