Skip to content

Commit

Permalink
Duck logs now respect private channels
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax146 committed Aug 23, 2023
1 parent ea4615f commit 03084d3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions techsupport_bot/extensions/duck.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ async def handle_winner(self, winner, guild, action, raw_duration, channel):
raw_duration -> A datetime object of the time since the duck spawned
channel -> The channel in which the duck game happened in
"""
await self.bot.guild_log(
guild,
"logging_channel",
"info",
f"Duck {action} by {winner} in #{channel.name}",
send=True,
)
config_ = await self.bot.get_context_config(guild=guild)
if not str(channel.id) in config_.get("private_channels", []):
await self.bot.guild_log(
guild,
"logging_channel",
"info",
f"Duck {action} by {winner} in #{channel.name}",
send=True,
)

duration_seconds = raw_duration.seconds
duration_exact = float(
Expand Down

0 comments on commit 03084d3

Please sign in to comment.