rohan
rohan
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
I'll keep that in mind haha! Have a wonderful rest of your evening!
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
Thank you so much @GodderE2D
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
that was it
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
oh my god
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
Yeah see above
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
let me try somethibng
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
When using this value I get the following error
Sep 12, 8:35 PM | ERROR : DiscordAPIError[50035]
----------------------------------- STACK -----------------------------------
DiscordAPIError[50035]: Invalid Form Body
data.components[0].components[0].options[0].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[1].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[2].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[3].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[4].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[5].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[6].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[7].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[8].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
Sep 12, 8:35 PM | ERROR : DiscordAPIError[50035]
----------------------------------- STACK -----------------------------------
DiscordAPIError[50035]: Invalid Form Body
data.components[0].components[0].options[0].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[1].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[2].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[3].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[4].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[5].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[6].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[7].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
data.components[0].components[0].options[8].emoji.id[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
and the code:
const franchises = require(`../../cache/franchises.json`);

franchises.forEach((franchise) => {
const emoteid = FranchiseEmote[franchise.slug];

console.log(typeof emoteid);
console.log(emoteid);


selectMenu.addOptions({
label: franchise.name,
value: franchise.slug,
description: `${franchise.slug} — ${franchise.name}`,
emoji: `1150447291229028552`
});
});
const franchises = require(`../../cache/franchises.json`);

franchises.forEach((franchise) => {
const emoteid = FranchiseEmote[franchise.slug];

console.log(typeof emoteid);
console.log(emoteid);


selectMenu.addOptions({
label: franchise.name,
value: franchise.slug,
description: `${franchise.slug} — ${franchise.name}`,
emoji: `1150447291229028552`
});
});
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
Yep, one sec
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
if you're wanting to see this in person i'd be happy to hop in a VC and show my screen- this is baffling to me as well lol
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
on a quick aside: how did you get that emote, you're not in the server
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
@GodderE2D had the following thoughts but those didn't help either... :( - Type casting & just using the Id https://discord.com/channels/222078108977594368/824411059443204127/1151280976438239292 - Invisible characters https://discord.com/channels/222078108977594368/824411059443204127/1151283649392680981
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
Things I've tried - Using the emojis in the escaped format:
emoji: `:ie:1151031468756312065`;
emoji: `:ie:1151031468756312065`;
- Adding the < & > characters:
emoji: `<${FranchiseEmote[franchise.slug]}>`;
emoji: `<${FranchiseEmote[franchise.slug]}>`;
- Explicit & implicit type casting
emoji: String(FranchiseEmote[franchise.slug]);
emoji: `${FranchiseEmote[franchise.slug]}`;
emoji: String(FranchiseEmote[franchise.slug]);
emoji: `${FranchiseEmote[franchise.slug]}`;
& probably various other things
28 replies
DIAdiscord.js - Imagine an app
Created by rohan on 9/13/2023 in #djs-questions
Adding emotes to a select menu not working
References Enum file (this is a ts file that has been compiled)
/**
* This file contains the enumerations for the transaction commands.
* To compile this, type one of the following commands into the root of the project directory
*
* @option npm run compile
* @option tsc ./utils/enums/franchiseEmotes.ts
*/

/**
* @enum {FranchiseEmote} Enumerations for the franchise emotes
* @param {String} IE Ignium Esports
* @param {String} VTX Infinite Vortex
* @param {String} KC Kingdom Coffee
* @param {String} LG Light Garden
* @param {String} L7 Lucky Sevens
* @param {String} OS Omnipotent Sandwiches
* @param {String} TT DoubleTaps
* @param {String} ATO The Automata
* @param {String} PA Party Animals
* @param {String} MF The Mafia
* @param {String} SOL Solaris
* @param {String} PPI Post Plant Incorporated
*/

export enum FranchiseEmote {
IE = "1151031468756312065",
VTX = "1151031488427606016",
KC = "1151031470383693834",
LG = "1151031475035176980",
L7 = "1151031472552153090",
OS = "1151031478013153321",
TT = "1151034889404162048",
ATO = "1151031466302648410",
PA = "1151033370315329586",
MF = "1151032511527387146",
SOL = "1150447291229028552",
PPI = "1151033372089536585"
}
/**
* This file contains the enumerations for the transaction commands.
* To compile this, type one of the following commands into the root of the project directory
*
* @option npm run compile
* @option tsc ./utils/enums/franchiseEmotes.ts
*/

/**
* @enum {FranchiseEmote} Enumerations for the franchise emotes
* @param {String} IE Ignium Esports
* @param {String} VTX Infinite Vortex
* @param {String} KC Kingdom Coffee
* @param {String} LG Light Garden
* @param {String} L7 Lucky Sevens
* @param {String} OS Omnipotent Sandwiches
* @param {String} TT DoubleTaps
* @param {String} ATO The Automata
* @param {String} PA Party Animals
* @param {String} MF The Mafia
* @param {String} SOL Solaris
* @param {String} PPI Post Plant Incorporated
*/

export enum FranchiseEmote {
IE = "1151031468756312065",
VTX = "1151031488427606016",
KC = "1151031470383693834",
LG = "1151031475035176980",
L7 = "1151031472552153090",
OS = "1151031478013153321",
TT = "1151034889404162048",
ATO = "1151031466302648410",
PA = "1151033370315329586",
MF = "1151032511527387146",
SOL = "1150447291229028552",
PPI = "1151033372089536585"
}
And a link to the relevant conversation in #djs-help-v14 - https://discord.com/channels/222078108977594368/824411059443204127/1151280976438239292
28 replies