Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion techsupport_bot/commands/duck.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,16 @@ def message_check(
# Check to see if random failure
choice_ = random.choice(random.choices([True, False], weights=weights, k=1000))
if not choice_:
time = message.created_at - duck_message.created_at
duration_exact = float(str(time.seconds) + "." + str(time.microseconds))
cooldowns[message.author.id] = datetime.datetime.now()
quote = self.pick_quote()
embed = auxiliary.prepare_deny_embed(message=quote)
embed.set_footer(
text=f"You missed. Try again in {config.extensions.duck.cooldown.value} seconds"
text=(
f"You missed. Try again in {config.extensions.duck.cooldown.value} "
f"seconds. Time would have been {duration_exact} seconds"
)
)
# Only attempt timeout if we know we can do it
if (
Expand Down