Explorar el Código

fix escaping on button

Markus-Rost hace 4 años
padre
commit
f478830c4d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      interactions/verify.js

+ 1 - 1
interactions/verify.js

@@ -165,7 +165,7 @@ function slash_verify(interaction, lang, wiki, channel) {
  * @param {import('discord.js').TextChannel} [channel] - The channel for the interaction.
  */
  function button_verify(interaction, lang, wiki, channel) {
-	var username = interaction?.message?.embeds?.[0]?.title;
+	var username = interaction?.message?.embeds?.[0]?.title?.replace( /\\(\\)?/g, '$1' );
 	if ( !username || !channel?.guild || !interaction.message?.mentions?.[0]?.id ) {
 		interaction.message.allowed_mentions = {
 			users: [interaction.user.id]