瀏覽代碼

fix escaping on button

Markus-Rost 4 年之前
父節點
當前提交
f478830c4d
共有 1 個文件被更改,包括 1 次插入1 次删除
  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.
  * @param {import('discord.js').TextChannel} [channel] - The channel for the interaction.
  */
  */
  function button_verify(interaction, lang, wiki, channel) {
  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 ) {
 	if ( !username || !channel?.guild || !interaction.message?.mentions?.[0]?.id ) {
 		interaction.message.allowed_mentions = {
 		interaction.message.allowed_mentions = {
 			users: [interaction.user.id]
 			users: [interaction.user.id]