Guest User

Untitled

a guest
Dec 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. var Twit = require('twit')
  2.  
  3. var T = new Twit({
  4. consumer_key: 'aaa',
  5. consumer_secret: 'bbb',
  6. access_token: 'ccc',
  7. access_token_secret: 'ddd',
  8. timeout_ms: 60*1000,
  9. strictSSL: true,
  10. })
  11. var frases = [
  12. "Pues ir for free al dreambeach igual renta",
  13. "Participo",
  14. "Technazo",
  15. "Carpazo",
  16. "yeeeeaaa",
  17. "woooo",
  18. "",
  19. "dreambiiiiii!!!",
  20. "dreambeachhhh o ke!!",
  21. "eeeeooooooo",
  22. "holaaaa",
  23. "de vuelta al dreambeach",
  24. "a ganar",
  25. "quiero ganarrrr!",
  26. "quiero ganarrrr!!!1!!!",
  27. "quiero ganaaaaaarr",
  28. "quiero ganaaaar",
  29. "quiero ganarr",
  30. "quiero ganaaarrrr!",
  31. "quiero ganarrrrrrrrr!!!1!!!",
  32. "quiero ganaaaaaarrr!",
  33. "quiero ganaaaar!!!",
  34. "quiero ganarr!",
  35. "quiero ganarrr!!!!!!!",
  36. "partisipo",
  37. "participooooo",
  38. "participooo",
  39. "participio jaja",
  40. "paritizippo",
  41. "participao",
  42. "boris brejcha <3",
  43. "steve aoki <3",
  44. "aaaaa",
  45. "quiero ganarrrr",
  46. "las cosas claras y el techno oscuro",
  47. "teknito duro",
  48. "papapapa",
  49. "sorteazo",
  50. "a ganar",
  51. "🎡🎡",
  52. "🎡🎡🎡",
  53. "🎡",
  54. "πŸ€",
  55. "πŸ€πŸ€πŸ€",
  56. "πŸ€πŸ€πŸ€πŸ€",
  57. "πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€",
  58. "πŸ€πŸ€πŸ€πŸ€",
  59. "πŸ€",
  60. "🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼",
  61. "🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼",
  62. "🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼",
  63. "🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼",
  64. "🀞🏼🀞🏼🀞🏼🀞🏼🀞🏼",
  65. "🀞🏼🀞🏼🀞🏼",
  66. "🀞🏼",
  67. "yeeesss",
  68. "Vamos villaricoss!!!!!!",
  69. "Va a ser la hostia",
  70. "Quiero gozarmela de nuevo en el Dreambeach",
  71. "Ojala volver al dreambeach",
  72. "Participo en el sorteo",
  73. ""
  74. ];
  75. var tiempo = 60000;
  76.  
  77. bucle();
  78.  
  79. function getFrase(){
  80. var hashtag = "#GoVillaricos";
  81. var n = Math.floor((Math.random() * frases.length));
  82. var fr = frases[n];
  83. var p = Math.floor((Math.random() * 3));
  84. var times = Math.floor((Math.random() * 5)+1);
  85. var hashtagf = "";
  86. for(var i = 0; i<times; i++){ hashtagf+=" "+hashtag; }
  87. if(p==1 && fr!="") fr=hashtagf+" "+fr; else if(p==0 && fr!="")fr=fr+" "+hashtagf; else if(p==2 && fr!="")fr="#GoVillaricos "+fr+" #GoVillaricos";
  88. if(fr=="") fr+=hashtagf;
  89. return fr;
  90. }
  91.  
  92. function bucle(){
  93.  
  94. var tiempo = Math.floor((Math.random() * 8)+1);
  95. tiempo*=10000;
  96. console.log("Proximo tweet en: "+(tiempo/1000)+" segundos");
  97.  
  98. setTimeout(function() {
  99. tuitear(getFrase());
  100. bucle();
  101. }, tiempo);
  102. }
  103.  
  104. function tuitear(fr){
  105. T.post('statuses/update', { status: fr }, function(err, data, response) {
  106. console.log("Se ha tuiteado:"+ fr+"\n");
  107. })
  108. }
Add Comment
Please, Sign In to add comment