Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 17 additions & 1 deletion techsupport_bot/commands/correct.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,25 @@ async def correct_command(
updated_message = self.prepare_message(
message_to_correct.content, to_replace, replacement
)

updated_message += " :white_check_mark:"

if len(updated_message) > 4096:
await auxiliary.send_deny_embed(
message="The corrected message is too long to send", channel=ctx.channel
)
return

if updated_message.count("\n") > 15:
await auxiliary.send_deny_embed(
message="The corrected message has too many lines to send",
channel=ctx.channel,
)
return

embed = auxiliary.generate_basic_embed(
title="Correction!",
description=f"{updated_message} :white_check_mark:",
description=updated_message,
color=discord.Color.green(),
)
await ctx.send(
Expand Down
190 changes: 0 additions & 190 deletions techsupport_bot/tests/commands_tests/test_extensions_correct.py

This file was deleted.

Loading