Advertisement
Guest User

мой супер мега бот десептикон 2222222 витас вспомните его!

a guest
Apr 25th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let rpoints = 0;
  2. var chelikiSDostupov= ['fbwithher', 'cuprousds', 'zitgard', 'abysshole', 'dimaximuss', 'criteveryhit', 'artokrr_', 'fran_bon', 'chiakiminami', 'minecraft_on_xbox360', 'miss__witch', 'gromofananis', 'rekvizit8bit', 'scherdokborsh'];
  3. var zdorovalsa = [];
  4. var coolGuys= ['fbwithher', 'zitgard', 'rekvibot', 'criteveryhit',];
  5. const tmi = require('tmi.js');
  6. let cdhf4 = ''
  7. let cdhf3 = ''
  8. let cdhf5 = ''
  9. let points = 0;
  10. let vmxj = 0;  
  11.  
  12. const opts = {
  13.   identity: {
  14.     username: "fbwitherbot",
  15.     password: "pblfueqnspu9cagnh7ik77axgrfdut"
  16.   },
  17.   channels: [
  18.     "dimaximuss", "fbwithher",  "rekvizit8bit"
  19.   ]
  20. };
  21.     let num2 = dice(2);
  22.  
  23.     let cdhf2 = '';
  24.     if (num2 == 1) cdhf2 = `FeelsGoodMan`;
  25.       else if (num2 ==2) cdhf2 = `peepoHappy`;  
  26.  
  27. const client = new tmi.client(opts);
  28.  
  29.  
  30. client.on('message', onMessageHandler);
  31. client.on('connected', onConnectedHandler);
  32.  
  33.  
  34. client.connect();
  35.  
  36.  
  37. function onMessageHandler (target, context, msg, self) {
  38.   if (self) { return; }
  39.  
  40.  
  41.   const commandName = msg.trim().split(' ')[0]; let param = msg.trim().split(' ')[1];
  42.     if(commandName == "test" && param == 1){
  43.         client.say(target, "1")
  44.     }
  45.     if(commandName === "test" && param==2){
  46.         client.say("2")
  47.     }
  48.     if(commandName === "test" && param<2){
  49.         client.say("3")
  50.     }
  51.     console.log(context['username']+ ':'+ ` ${msg}`);
  52. }
  53.  
  54.  
  55. function dice (sideNumber) {
  56.   const sides= sideNumber;
  57.   return Math.floor(Math.random() * sides) + 1;
  58. }
  59.  
  60. function generate_random_string_uppercase(string_length){
  61. let random_string = '';
  62.     let random_ascii;
  63.     let ascii_low = 65;
  64.     let ascii_high = 90
  65.     for(let i = 0; i < string_length; i++) {
  66.         random_ascii = Math.floor((Math.random() * (ascii_high - ascii_low)) + ascii_low);
  67.         random_string += String.fromCharCode(random_ascii)
  68.     }
  69.     return random_string
  70. }
  71.  
  72. function generate_random_string_lowercase(string_length){
  73.     let random_string = '';
  74.     let random_ascii;
  75.     for(let i = 0; i < string_length; i++) {
  76.         random_ascii = Math.floor((Math.random() * 25) + 97);
  77.         random_string += String.fromCharCode(random_ascii)
  78.       }
  79.     return random_string
  80. }
  81.  
  82. function generate_random_string(string_length){
  83.     let random_string = '';
  84.     let random_ascii;
  85.     let ascii_low = 65;
  86.     let ascii_high = 90
  87.     for(let i = 0; i < string_length; i++) {
  88.         random_ascii = Math.floor((Math.random() * (ascii_high - ascii_low)) + ascii_low);
  89.         random_string += String.fromCharCode(random_ascii)
  90.     }
  91.     return random_string
  92. }
  93.  
  94. function generate_random_number(){
  95.     let num_low = 1;
  96.     let num_high = 9;
  97.     return Math.floor((Math.random() * (num_high - num_low)) + num_low);
  98. }
  99.  
  100. function generate() {
  101.     return generate_random_string(3) + generate_random_number()
  102. }
  103.  
  104. function onConnectedHandler (addr, port) {
  105.   console.log(`* Connected to ${addr}:${port}`);
  106. }
  107. const sleep = (milliseconds) => {
  108.     return new Promise(resolve => setTimeout(resolve, milliseconds))
  109.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement