How set boolean logic in node.js based on Twitch API?

But exibir function is correct and the boolean isnt responding properly, it should respond the same as exibir, but is not

it should respond the same because in the res.send i want to show the answer in the json

so i tried:

  • instead of using exibir(), creating the same function inside the app.listen and call the varibles directly for if…then
  • embrace all the functions using the app.listen and calling exibir() as parameter for if…then
  • call exibir() before if…then iside and outside (not at the same time) app.listen

but it didnt work with neither of what i tried

do you have any idea of another possibility?