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

201
Vistas
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 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