Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

247
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda