aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-05-13 18:09:06 +0100
committerGravatar GitHub <[email protected]>2024-05-13 18:09:06 +0100
commitf7d1d8c64643af0d56ac8c38dd15d0f87764ea81 (patch)
tree67cc2685a901be2fd166c2db89dd1de48512bdd6
parentMerge pull request #3047 from python-discord/jb3/2938-nominate-context-menu (diff)
parentCheck length of nomination reason before attempting to send to site API (diff)
Merge pull request #3050 from python-discord/jb3/nom-context-char-limit
Check length of nomination reason before attempting to send to site API
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index ad232df8c..5b9958d52 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -432,6 +432,13 @@ class TalentPool(Cog, name="Talentpool"):
reason += f"\n\n{message.jump_url}"
+ if len(reason) > REASON_MAX_CHARS:
+ await interaction.response.send_message(
+ ":x: Cannot add additional context due to nomination reason character limit.",
+ ephemeral=True
+ )
+ return
+
await self.api.edit_nomination_entry(
nomination.id,
actor_id=interaction.user.id,