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

106
Views
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
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!