Skip to content

Commit c999004

Browse files
committed
Squashed commit of the following:
commit cf3444a Author: Khakers <[email protected]> Date: Tue Jan 24 14:13:15 2023 -0800 Add dm_channel_id field to log entry
1 parent b2780fc commit c999004

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/clients.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ async def get_log_link(self, channel_id: Union[str, int]) -> str:
571571
async def create_log_entry(self, recipient: Member, channel: TextChannel, creator: Member) -> str:
572572
key = secrets.token_hex(6)
573573

574+
dm_channel = await recipient.create_dm()
575+
574576
await self.logs.insert_one(
575577
{
576578
"_id": key,
@@ -581,6 +583,7 @@ async def create_log_entry(self, recipient: Member, channel: TextChannel, creato
581583
"channel_id": str(channel.id),
582584
"guild_id": str(self.bot.guild_id),
583585
"bot_id": str(self.bot.user.id),
586+
"dm_channel_id": str(dm_channel.id),
584587
"recipient": {
585588
"id": str(recipient.id),
586589
"name": recipient.name,

0 commit comments

Comments
 (0)