I have a discord bot, basically when the API returns "here it is" it sends a message but now the API changed and it sends "here it is" but it also sends random messages like: {int:randomnumbers} here it is
But the problem with my bot is that it checks if it only sends "here it is" but now with the random numbers it just doesn't work, could you guys please help me on that one and tell me how can I make it so if it contains "here it is" it sends the message?
function ping(){
console.log("Pinged!");
for(let i in config.GAME_SERVERS){
const gameServer = config.GAME_SERVERS[i];
axios.get(config.API_URL+gameServer)
.then(response =>{
if(response.data === "here it is"){
for(let j in config.LOGGING_CHANNEL_IDS){
sendModMessage(gameServer,config.LOGGING_CHANNEL_IDS[j]);
}
}
})
.catch(err =>{
console.log(err);
});
}
}