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

94
Views
Cómo hacer que este caso sea insensible

No estoy seguro de cómo puedo usar .toLowerCase() para hacer que mi comando de discord sea insensible a mayúsculas y minúsculas. Esto debería ser simple, pero soy realmente nuevo en esto.

 exports.execute = async (client, message, args) => { let userBalance = client.eco.fetchMoney(message.author.id); if (userBalance.amount < 1) return message.channel.send("Looks like you don't have the funds for that <:smallsob:922970676283977748>."); let item = args[0]; if (!item) return message.channel.send("What do you wish to purchase"); let hasItem = client.shop[item]; if (!hasItem || hasItem == undefined) return message.reply("Sorry, that doesn't exist <:smallsob:922970676283977748> Jinn is currently working on this feature so sorry if it's not fully functional"); let isBalanceEnough = (userBalance.amount >= hasItem.cost); if (!isBalanceEnough) return message.reply("Your balance is insufficient. You need <:daisyy:922974700144062474> "+hasItem.cost+" to buy this item."); let buy = client.eco.removeMoney(message.author.id, hasItem.cost); let itemStruct = { name: item.toLowerCase(), prize: hasItem.cost }; client.db.push(`items_${message.author.id}`, itemStruct); return message.channel.send(`You purchased **${item}** for **<:daisyy:922974700144062474> ${hasItem.cost}**.`); }; exports.help = { name: "buy", aliases: [], usage: `buy <item>` };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En su controlador donde verifica el contenido del mensaje en el evento del mensaje

Tener esto hecho Por ejemplo:

if(message.content.toLowerCase() === cmdName) return;

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!