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

202
Visualizações
discord.js - Characters do not appear or do not work

Everyone, I built a hello bot and the system works but perfectly there is a small problem, I want the system to display only after typing '$' + the name that is in the database, will display the database.

Code:

 var name = (message.content);
            var sql = `SELECT * FROM customers WHERE name = ?`;
            con.query(sql, [name], function(err, result) {
                if (err) throw err;

                if (message.content.startsWith(prefix + result[0].name)) {
}

Now, as soon as I print a particular variable it does nothing, but if I type in the database the full name $Example It invented for me if I used the same code but without prefix + in the startsWith call.

How do I make a bot work even if the special character is not listed in the database?

about 4 years ago · Juan Pablo Isaza
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