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

108
Visualizações
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 à 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