Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. // Provide support for < Chrome 41 mainly due to CLR Browser..
  2. String.prototype.includes || (String.prototype.includes = function() {
  3. return -1 !== String.prototype.indexOf.apply(this, arguments)
  4. }), String.prototype.startsWith || (String.prototype.startsWith = function(a, b) {
  5. return b = b || 0, this.indexOf(a, b) === b
  6. }), Object.setPrototypeOf || (Object.setPrototypeOf = function(obj, proto) {
  7. obj.__proto__ = proto;
  8. return obj;
  9. });
  10.  
  11. module.exports={
  12. client:require("./lib/client"),
  13. Client:require("./lib/client")
  14. };
  15.  
  16. //Initial requires.
  17. var tmi = require('tmi.js');
  18.  
  19.  
  20. //These are the settings for the client to use.
  21. var options = {
  22. options: {
  23. debug: true
  24. },
  25.  
  26. connection: {
  27. cluster: "aws",
  28. reconnect: true
  29. },
  30.  
  31. identity: {
  32. username: "LewdBot__",
  33. password: "code"
  34. },
  35. channels: ["Lacrimosaangel"]
  36. }
  37.  
  38.  
  39.  
  40.  
  41. //This is creating our client connection with settings.
  42. var client = new tmi.client(options);
  43.  
  44. //This connects to the twitch.
  45. client.connect();
  46.  
  47. //This function is executed as soon as the bot has connected to the channel.
  48. client.on("connected", function(address, port){
  49. client.action("Lacrimosaangel", "Warming up... Please be gentle! LacriWah");
  50.  
  51. });
  52.  
  53.  
  54.  
  55. //This function is executed everytime someone sends a message in the chat.
  56. client.on("chat", function(channel, user, message, username){
  57. //Using this if statement you can check the contents of a message and create commands.
  58. //This checks the contents of the message to see if they match the given message, this means that the message HAS to be that it cannot just contain that message.
  59. //This allows you to set commands or even words without worrying if someone was to use the word in a sentence or so on.
  60.  
  61.  
  62. //greetings
  63. if(message.toLowerCase().includes("hello")){
  64. client.say("Lacrimosaangel", " Hi " + user["display-name"] + "!")
  65. }
  66.  
  67. if(message.toLowerCase().includes ("goodbye")){
  68. if(user["display-name"] !== "LewdBot__"){
  69. client.say("Lacrimosaangel", "Goodbye " + user["display-name"] + "!")
  70. }}
  71.  
  72. //timed commands
  73.  
  74.  
  75.  
  76. setTimeout(function(){
  77. client.say("Lacrimosaangel", "Want to hang out after stream? Join our discord over at https://discord.gg/aem6Hzx LacriLove We also have a twitter account at twitter.com/Lacrimosaangel");
  78. }, 10000);
  79.  
  80.  
  81. setTimeout(function(){
  82. client.say("Lacrimosaangel", "Tuturu! ~♪♫ TuturuK");
  83. }, 8520000);
  84.  
  85. setTimeout(function(){
  86. client.say("Lacrimosaangel", "Let's do some 1v1 360 no scopes on rust");
  87. }, 14400000);
  88.  
  89. setTimeout(function(){
  90. client.say("Lacrimosaangel", "420 blaze it, let's get high and have some fun!");
  91. }, 15600000);
  92.  
  93.  
  94. //mod/user specific commands
  95.  
  96. //for potts
  97. if(message === "pottsChamp"){
  98. if (user["display-name"] === "pottsasaurus"){
  99. client.say("Lacrimosaangel", "Watch out! We're bringing out the banhammer")
  100. }
  101. else {
  102. client.say("Lacrimosaangel", "Sorry, you don't get to spank me today ;)")
  103. }
  104. }
  105.  
  106. //for mori
  107. if (message === "meatWave"){
  108. if (user["display-name"] === "moricath"){
  109. client.say("Lacrimosaangel", "Hi Mori! meatWave It's lovely to see you again!")
  110. }
  111. }
  112.  
  113. //for Keanu
  114. if(message.toLowerCase().includes("butts")){
  115. if (user["display-name"] === "Keanu23898"){
  116. client.say("Lacrimosaangel", "So Lewd! Is that you @Keanu23898 ?")
  117. }
  118. }
  119.  
  120. //for Xanra
  121. if(message.toLowerCase().includes("VoHiYo")){
  122. if (user["display-name"]=== "Xanra"){
  123. client.say("Lacrimosaangel", "Hi Kettle! Nice to have you back, did you spell it correctly today?")
  124. }
  125. }
  126.  
  127. //help commands
  128.  
  129. if (message.indexOf("!help") > -1){
  130. client.say("Lacrimosaangel", "We have some custom commands on the way soon. At the moment, bot is still very bare! LacriWah Any ideas, please use the suggestions box in discord!")
  131. }
  132.  
  133.  
  134. //lewd commands go here.
  135.  
  136. if(message.toLowerCase().includes("!lewd")){
  137. client.say("Lacrimosaangel", "So lewd! LacriWah")
  138. }
  139.  
  140.  
  141. if(message.toLowerCase().includes("spank")){
  142. if (user["display-name"] !== "LewdBot__"){
  143. client.say("Lacrimosaangel", "oooh are we spanking people today? Can I join in on the fun " +user["display-name"] + "? LacriPlease ")
  144. }}
  145.  
  146. });
  147.  
  148. client.on("ban", function (channel, username, reason) {
  149. client.say("Lacrimosaangel", "User: " + user[display-name] + " - has been banned.")
  150. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement