Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

245
Vistas
Discord.js + Node.js: SyntaxError: Unexpected token '{'
          let user = message.mentions.users.first();
          if (message.mentions.users.size < 1) return message.reply('Вы должны упомянуть кого-нибудь, чтобы выдать АРы.').catch(console.error);

          mcash[${user.id}, ${message.guild.id}].mcash++;

          fs.writeFile("./usercash.json", JSON.stringify(mcash), err => {
          if(err) throw err;
          });

          member.roles.cache.has('899099537979899924');
          member.roles.cache.some(role => role.name === 'Банкир');
          
          let pcash = args.slice(1).join(" ");
            if(!pcash) pcash = "Не указана"
        
         const embed = new Discord.MessageEmbed()
         .setDescription('Пополнение из банка:', alert(mcash))
         .setThumbnail('https://media.discordapp.net/attachments/899085238955806742/899102776263573574/200.png?width=180&height=180')
         message.author.send( {embeds:[embed] });
        }});

The code must retain the amount entered along with the mention. Further, the value that was written earlier was added to the variable, but an error is displayed.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

mcash[${user.id}, ${message.guild.id}].mcash++;

The usage of ${} only function inside of a template literal, the use of it isn't needed here, so it can be changed to:

mcash[user.id, message.guild.id].mcash++;

Note: the whole function is not given, this may be only a portion of the solution.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda