Emoji In Context Menu Command
Hey, I'm trying to put an emoji in a context menu command and it's throwing an error - is that expected?
I'd expect emojis to work when registering the command, I'm guessing this might be a bug with the name validation that Sapphire does?
Sample Code
Error:
Solution:Jump to solution
I'd expect emojis to work when registering the command, I'm guessing this might be a bug with the name validation that Sapphire does?Sapphire doesnt validate names. DiscordJS does. so you'll have to go there it's part of @discordjs/builders...
4 Replies
^ The ✅ Mark Solution command has an emoji in it, Discord.py allows for registering commands with emojis so I'm guessing it's a Sapphire bug
Solution
I'd expect emojis to work when registering the command, I'm guessing this might be a bug with the name validation that Sapphire does?Sapphire doesnt validate names. DiscordJS does. so you'll have to go there it's part of @discordjs/builders For now you can bypass Shapeshift validation in builders with: or use a yarn/pnpm patch (or
patch-package
for npm) to set this to .setValidationEnabled(false);
https://github.dev/discordjs/discord.js/blob/main/packages/builders/src/interactions/slashCommands/Assertions.ts#L8-L12Will do thanks
Edited my first message so the whole blurb is in the answer