File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/api/routes/guilds/#guild_id Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ router.post(
107107
108108 if ( emoji_count >= maxEmojis ) throw DiscordApiErrors . MAXIMUM_NUMBER_OF_EMOJIS_REACHED . withParams ( maxEmojis ) ;
109109 if ( body . require_colons == null ) body . require_colons = true ;
110+ if ( body . name ?. includes ( "-" ) ) body . name = body . name ?. replaceAll ( "-" , "" ) ; // Dashes are invalid apparently
110111
111112 const user = req . user ;
112113 await handleFile ( `/emojis/${ id } ` , body . image ) ;
@@ -155,6 +156,8 @@ router.patch(
155156 const { emoji_id, guild_id } = req . params ;
156157 const body = req . body as EmojiModifySchema ;
157158
159+ if ( body . name ?. includes ( "-" ) ) body . name = body . name ?. replaceAll ( "-" , "" ) ; // Dashes are invalid apparently
160+
158161 const emoji = await Emoji . create ( {
159162 ...body ,
160163 id : emoji_id ,
You can’t perform that action at this time.
0 commit comments