From 835bfb536e641e1e542e03807955204ab387b36b Mon Sep 17 00:00:00 2001 From: Verslabs Date: Fri, 23 Oct 2026 00:00:33 +0100 Subject: [PATCH] Fix embed builder Set Color option doing nothing The color presets had their emojis stripped to empty strings in 06c81d9, but handleSetColor still called setEmoji('') on every option. discord.js rejects that with a ValidationError, so the color picker was never sent. Drop the unused emoji field and the setEmoji call. Fixes #160 Co-authored-by: Claude --- src/commands/Tools/embedbuilder.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/commands/Tools/embedbuilder.js b/src/commands/Tools/embedbuilder.js index 3da94f3dc1..33f24b4758 100644 --- a/src/commands/Tools/embedbuilder.js +++ b/src/commands/Tools/embedbuilder.js @@ -27,17 +27,17 @@ const MAX_FIELDS = 25; const IDLE_TIMEOUT = 900_000; const COLOR_PRESETS = [ - { label: 'Primary (Blue)', value: '#336699', emoji: '' }, - { label: 'Success (Green)', value: '#57F287', emoji: '' }, - { label: 'Error (Red)', value: '#ED4245', emoji: '' }, - { label: 'Warning (Yellow)', value: '#FEE75C', emoji: '' }, - { label: 'Info (Bright Blue)', value: '#3498DB', emoji: '' }, - { label: 'Blurple (Discord)', value: '#5865F2', emoji: '' }, - { label: 'Fuchsia', value: '#EB459E', emoji: '' }, - { label: 'Gold', value: '#F1C40F', emoji: '' }, - { label: 'White', value: '#FFFFFF', emoji: '' }, - { label: 'Dark', value: '#202225', emoji: '' }, - { label: 'Custom Hex...', value: '__custom__', emoji: '' }, + { label: 'Primary (Blue)', value: '#336699' }, + { label: 'Success (Green)', value: '#57F287' }, + { label: 'Error (Red)', value: '#ED4245' }, + { label: 'Warning (Yellow)', value: '#FEE75C' }, + { label: 'Info (Bright Blue)', value: '#3498DB' }, + { label: 'Blurple (Discord)', value: '#5865F2' }, + { label: 'Fuchsia', value: '#EB459E' }, + { label: 'Gold', value: '#F1C40F' }, + { label: 'White', value: '#FFFFFF' }, + { label: 'Dark', value: '#202225' }, + { label: 'Custom Hex...', value: '__custom__' }, ]; function isValidUrl(str) { @@ -263,7 +263,6 @@ async function handleSetColor(selectInteraction, rootInteraction, state) { new StringSelectMenuOptionBuilder() .setLabel(c.label) .setValue(c.value) - .setEmoji(c.emoji) .setDescription(c.value !== '__custom__' ? c.value : 'Enter your own #RRGGBB value'), ), );