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

107
Vistas
Multiple message content includes in one if statement?

im working on a really simple sorting discord bot, that just should sort message content from a Minecraft server console channel into sorted channels. Now im trying to find a way to make stuff more tidy...

client.on('message', msg=>{
     if(msg.content.includes(`${client.botconfig.playername1} issued server command: /`)){
        let channel = client.guilds.cache.get(client.botconfig.ServerID).channels.cache.get(client.botconfig.channelID1)
        let usermsg = msg.content
        channel.send(usermsg.replace("/",""))
     }
})

Im using a config file to make it easier to change Channel ID's etc. Now the Problem is, if the game console says: Player issued server command: / it doesnt recognize the Player Name provided by the config... With the ` Symbol it doesnt even recognize it if the player name is written, but with other symbols like "" the $... doesnt work anymore.

Sorry for the bad description, I just hope somebody knows what i mean XD

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