QuantumEternity

Nightbot RL Responses

Jul 27th, 2021
953
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const trolledUsers = [
  2.     "Fuzbo",
  3. ];
  4. const goodResponses = [
  5.     "Sample Good Response",
  6. ];
  7. const badResponses = [
  8.     "Sample Bad Response",
  9. ];
  10.  
  11. function getResponse(user) {
  12.     const responses = trolledUsers.includes(user) ? badResponses : goodResponses;
  13.     return responses[Math.floor(Math.random() * responses.length)];
  14. }
  15.  
  16. getResponse(fromUser);
RAW Paste Data