E
E
Egzotik2021-01-17 16:41:54
Node.js
Egzotik, 2021-01-17 16:41:54

Discord.js How to display certain text depending on the received response from the site?

I have a code that sends a request to a certain site, takes a response from it and displays the text in the name of the discord channel. How, depending on the answer, to display the text specified in the config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-01-17
@Egzotik

in the future, write a description of the issue as detailed and accurate as possible.
if I understand correctly:

const config = require('путь_к_конфигу');
const response = . . .;

switch (response) {
  case . . .: 
     . . .
  break;
  
  case . . .:
     . . .   
  break;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question