Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
175
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: "опа"
  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();
  42.  
  43.  
  44.   if (commandName === '!nam' &&  chelikiSDostupov.includes(context['username'])) {
  45.     client.say(target, 'NaM') }
  46.   if (commandName === '!sleeper' && coolGuys.includes(context['username'])) {
  47.     client.say(target, 'ResidentSleeper') }
  48.   if (commandName === '!roll' && chelikiSDostupov.includes(context['username'])) {
  49.         let num = dice(20);
  50.     let cdhf = '';
  51.     if (num < 10)  cdhf = "Это не очень много. Попробуй снова! FeelsBadMan";
  52.     if (num == 10) cdhf = "Это довольно много! FeelsOkayMan";
  53.     if (num > 10) cdhf = "Это очень много! Поздравляю! EZ";
  54.     if (num == 20) cdhf = "Жесть! PagChomp PagChomp PagChomp PagChomp";
  55.   client.say(target, '@'+context['username'] + ` Подбросил правильный икосаэдр и получил ${num}! ${cdhf}`); }
  56.     if (commandName === '!roll' && context['username'] === 'nekitososs12') {
  57.   client.say (target, '@nekitososs12 пока' ) }
  58.   if (commandName === '!uppercase' && chelikiSDostupov.includes(context['username'])) {
  59.     const text = generate_random_string_uppercase(15);
  60.     let num2 = dice(2);
  61.     let cdhf2 = '';
  62.     if (num2 == 1) cdhf2 = `FeelsGoodMan`;
  63.       else if (num2 == 2) cdhf2 = `peepoHappy`;
  64.     client.say(target,  '@'+context['username'] + ` Ты получил ${text}! ${cdhf2}`) }
  65.   if (commandName === '!lowercase' && chelikiSDostupov.includes(context['username'])) {
  66.     const text = generate_random_string_lowercase(15)
  67.     let cdhf2 = '';
  68.     if (num2 == 1) cdhf2 = `FeelsGoodMan`;
  69.       else if (num2 ==2) cdhf2 = `peepoHappy`;
  70.     client.say(target, '@'+context['username'] + ` Ты получил ${text}! ${cdhf2}`) }
  71.   if (commandName === '!generate' && chelikiSDostupov.includes(context['username'])) {
  72.     const text = generate_random_string(10);
  73.     let num2 = dice(2);
  74.     client.say(target, '@'+context['username'] ` Ты получил ${text}! ${cdhf2}`) }
  75.   if (commandName.includes('👇') ||commandName.includes(':point_down:') && chelikiSDostupov.includes(context['username']))    {
  76.     let point_down = /👇/gi;
  77.     let get_back = commandName.replace(point_down, ' :point_up:');
  78.     get_back = get_back.replace('бот', 'человек');
  79.     get_back = get_back.replace('l', '|');
  80.     get_back = get_back.replace('|', 'l');
  81.     get_back = get_back.replace('да?', 'нет');
  82.     get_back = get_back.replace('он', 'нет, я')
  83.     get_back = get_back.replace('хейтер', 'не хейтер')
  84.     get_back = get_back.replace('внизу', 'вверху')
  85.     get_back = get_back.replace('OwO', 'UwU')  
  86.     get_back = get_back.replace('nigger', 'HYPERBRUH') 
  87.     get_back = get_back.replace('niga', 'HYPERBRUH')
  88.     get_back = get_back.replace('niger', 'HYPERBRUH')
  89.     get_back = get_back.replace('nigga', 'HYPERBRUH')
  90.     get_back = get_back.replace('ниггер', 'HYPERBRUH')
  91.     get_back = get_back.replace('нигер', 'HYPERBRUH')
  92.     get_back = get_back.replace('нига', 'HYPERBRUH')
  93.     get_back = get_back.replace('нигга', 'HYPERBRUH')
  94.     client.say(target, get_back);    
  95.   }
  96.     if (commandName === '   Кажется копы сейчас расслабились ... банки готовы к ограблениям! PogChamp') {
  97.   client.say (target, '!heist 40')}
  98.   if (commandName.includes('ДБД') && coolGuys.includes(context['username'])) {
  99.   client.say(target, '@'+context['username']+ ` СЛАВА ДБД!`) }
  100.   if (commandName.includes('OwO')) {
  101.   client.say (target, '@'+context['username'] + ` UwU 👍`)}
  102.     if (!zdorovalsa.includes(context['username']) && coolGuys.includes(context['username'] || context['mod'])){
  103.     let num3 = dice(4);
  104.     if (num3 == 1) cdhf3 = 'KonCha';
  105.     if (num3 == 2) cdhf3 = 'rekviHello';
  106.     if (num3 == 3) cdhf3 = 'pajaHey';
  107.     if (num3 == 4) cdhf3 = 'pajaMLADA';
  108.     let num4 = dice(8);
  109.     if (num4 == 1) cdhf4 = 'Прив!';
  110.     if (num4 == 2) cdhf4 = 'Привет!';
  111.     if (num4 == 3) cdhf4 = 'Конничива! AYAYA';
  112.     if (num4 == 4) cdhf4 = 'Здарова!';
  113.     if (num4 == 5) cdhf4 = 'Прив!';
  114.     if (num4 == 6) cdhf4 = 'Приветствую.';
  115.     if (num4 == 7) cdhf4 = 'Здравствуйте.';
  116.     if (num4 == 8) cdhf4 = 'Прифки!';
  117.     zdorovalsa.push(context['username'])
  118.     client.say(target,  '@'+context['username']+ ` ${cdhf4} ${cdhf3}`);
  119.      }
  120.   if (commandName === '!points') {
  121.     client.say(target, '!rpoints');
  122.     sleep(2000).then(() => {
  123.       client.say(target, '!give fbwithher '+(parseInt(rpoints, 10)-1));
  124.     })
  125.   }
  126.   if(commandName.includes('!ladder')){
  127.     ladder = commandName.match(/\d+/g).map(Number);
  128.     for(let ladder = 0;ladder<5;ladder++){
  129.         sleep(5000).then(() => {
  130.         client.say(target,'╠═╬╬╬═╣');
  131.       })
  132.     }
  133.   }
  134.   if(commandName === '!rekvi1234')
  135.   if (commandName.includes('rPoints : У fbwitherbot')) {
  136.   rpoints = commandName.match(/\d+/g).map(Number); }
  137.   if (commandName.includes('FeelsWeirdMan') && chelikiSDostupov.includes(context['username'])) {
  138.   client.say(target, '@'+context['username']+` FeelsWeirdMan`) }
  139.   if (commandName === '!sleep') {
  140.   client.say(target, 'ResidentSleeper') }
  141.   if (commandName.includes('ResidentSleeper')) {
  142.       client.say(target, '/timeout '+context['username']+ ' 600')
  143. }
  144.     console.log(context['username']+ ':'+ ` ${commandName}`);
  145. }
  146.  
  147.  
  148. function dice (sideNumber) {
  149.   const sides= sideNumber;
  150.   return Math.floor(Math.random() * sides) + 1;
  151. }
  152.  
  153. function generate_random_string_uppercase(string_length){
  154. let random_string = '';
  155.     let random_ascii;
  156.     let ascii_low = 65;
  157.     let ascii_high = 90
  158.     for(let i = 0; i < string_length; i++) {
  159.         random_ascii = Math.floor((Math.random() * (ascii_high - ascii_low)) + ascii_low);
  160.         random_string += String.fromCharCode(random_ascii)
  161.     }
  162.     return random_string
  163. }
  164.  
  165. function generate_random_string_lowercase(string_length){
  166.     let random_string = '';
  167.     let random_ascii;
  168.     for(let i = 0; i < string_length; i++) {
  169.         random_ascii = Math.floor((Math.random() * 25) + 97);
  170.         random_string += String.fromCharCode(random_ascii)
  171.       }
  172.     return random_string
  173. }
  174.  
  175. function generate_random_string(string_length){
  176.     let random_string = '';
  177.     let random_ascii;
  178.     let ascii_low = 65;
  179.     let ascii_high = 90
  180.     for(let i = 0; i < string_length; i++) {
  181.         random_ascii = Math.floor((Math.random() * (ascii_high - ascii_low)) + ascii_low);
  182.         random_string += String.fromCharCode(random_ascii)
  183.     }
  184.     return random_string
  185. }
  186.  
  187. function generate_random_number(){
  188.     let num_low = 1;
  189.     let num_high = 9;
  190.     return Math.floor((Math.random() * (num_high - num_low)) + num_low);
  191. }
  192.  
  193. function generate() {
  194.     return generate_random_string(3) + generate_random_number()
  195. }
  196.  
  197. function onConnectedHandler (addr, port) {
  198.   console.log(`* Connected to ${addr}:${port}`);
  199. }
  200. const sleep = (milliseconds) => {
  201.     return new Promise(resolve => setTimeout(resolve, milliseconds))
  202.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement