Skip to content

Commit

Permalink
Update EmbedBuilder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsbirb committed Feb 20, 2025
1 parent 135b161 commit b40aace
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cogs/Configuration/Components/EmbedBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,13 @@ def __init__(self, colour):

async def on_submit(self, interaction: discord.Interaction):
color_value = self.color.value
if len(color_value) != 6:
await interaction.response.send_message(
f" {no} Please provide a valid hex color. (A hex is 6 characters long without the hashtag.)",
ephemeral=True,
)
return

try:
color = discord.Color(int(color_value, 16))
except ValueError:
Expand Down

0 comments on commit b40aace

Please sign in to comment.