Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!