Advertisement
nonogamer9

DevanShellBOT Source Code

Jun 15th, 2023 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.75 KB | None | 0 0
  1. const prefix = "d!";
  2. const botname = "DevanShellBOT playing: d!help";
  3. var help = "__DevanShellBOT Commands__\nd!help, d!say {TEXT}, d!joke, d!fact, d!image, d!cannypic, d!uncannypic, d!sadpic, d!angrypic, d!idiotpic";
  4.  
  5. const uncannyPics = [
  6. "https://media.discordapp.net/attachments/1107412342960033832/1114622683460685854/dfa4skp-4ef45bab-b574-4b4d-aac2-12cf5b53b6c6.png?width=634&height=630",
  7. "https://media.discordapp.net/attachments/1114637956079173722/1114638247361003541/mr-incredible-becoming-uncanny-phase-1.png?width=722&height=630",
  8. "https://media.discordapp.net/attachments/1114637956079173722/1114638247642026025/latest.png",
  9. "https://media.discordapp.net/attachments/1114637956079173722/1114638247973355570/latest.png",
  10. "https://media.discordapp.net/attachments/1114637956079173722/1114638248258584627/images.png",
  11. "https://media.discordapp.net/attachments/1114637956079173722/1114638248501858444/images.png",
  12. "https://media.discordapp.net/attachments/1114637956079173722/1114638248824799332/latest.png",
  13. "https://media.discordapp.net/attachments/1114637956079173722/1114638486935449782/latest.png",
  14. "https://media.discordapp.net/attachments/1114637956079173722/1114638487237443584/latest.png",
  15. "https://media.discordapp.net/attachments/1114637956079173722/1114638487526854737/latest.png",
  16. "https://media.discordapp.net/attachments/1114637956079173722/1114638487849807872/350.png"
  17. ];
  18.  
  19. const cannyPics = [
  20. "https://i1.sndcdn.com/artworks-JeZQh6Hbil2Er51B-U9rx3A-t500x500.jpg",
  21. "https://i1.sndcdn.com/avatars-RNXmlKLL2AHsRPaz-8LVOoA-t500x500.jpg",
  22. "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcR8FcyNrd8y5BmEwp9xYLRjvYxDlheS4DjwgmLZIEvBO2yHIvCv",
  23. "https://pbs.twimg.com/media/FTHtsuDVUAIjUnO.jpg",
  24. "https://i.ytimg.com/vi/Zne8JgObXBc/maxresdefault.jpg",
  25. "https://i.ytimg.com/vi/BFFIS5r7Aj0/maxresdefault.jpg?sqp=-oaymwEmCIAKENAF8quKqQMa8AEB-AH-CYAC0AWKAgwIABABGH8gFSgTMA8=&rs=AOn4CLB0OOFdzym2aFPtk2jqd4beTm8baA",
  26. "https://i.ytimg.com/vi/TNpQGA762UU/mqdefault.jpg"
  27. ];
  28.  
  29. const sadPics = [
  30. "https://media.discordapp.net/attachments/1114860678000431254/1114860833021898803/1000.png?width=623&height=630",
  31. "https://media.discordapp.net/attachments/1114860678000431254/1114860833403568198/1000.png?width=630&height=630",
  32. "https://media.discordapp.net/attachments/1114860678000431254/1114860833684594698/1000.png?width=623&height=630",
  33. "https://media.discordapp.net/attachments/1114860678000431254/1114860833999171684/1000.png?width=627&height=630",
  34. "https://media.discordapp.net/attachments/1114860678000431254/1114860834347286559/latest.png?width=630&height=630",
  35. "https://media.discordapp.net/attachments/1114860678000431254/1114860834649284651/1000.png?width=630&height=630",
  36. "https://media.discordapp.net/attachments/1114860678000431254/1114860834993221632/latest.png?width=630&height=630",
  37. "https://media.discordapp.net/attachments/1114860678000431254/1114860835282616320/1000.png?width=630&height=630",
  38. "https://media.discordapp.net/attachments/1114860678000431254/1114860835580420207/1000.png?width=630&height=630",
  39. "https://media.discordapp.net/attachments/1114860678000431254/1114860991004557393/latest.png",
  40. "https://media.discordapp.net/attachments/1114860678000431254/1114860991709200465/latest.png?width=630&height=630",
  41. "https://media.discordapp.net/attachments/1114860678000431254/1114860991340105819/1000.png?width=630&height=630",
  42. "https://media.discordapp.net/attachments/1114860678000431254/1114860992007000094/1000.png?width=630&height=630",
  43. ];
  44.  
  45. const angryPics = [
  46. "https://media.discordapp.net/attachments/1114860678000431254/1114862424693153792/latest.png",
  47. "https://media.discordapp.net/attachments/1114860678000431254/1114862424978378804/latest.png",
  48. "https://media.discordapp.net/attachments/1114860678000431254/1114862425305513984/latest.png",
  49. "https://media.discordapp.net/attachments/1114860678000431254/1114862425720758282/latest.png",
  50. "https://media.discordapp.net/attachments/1114860678000431254/1114862426039537724/latest.png",
  51. "https://media.discordapp.net/attachments/1114860678000431254/1114862426316349512/latest.png",
  52. "https://media.discordapp.net/attachments/1114860678000431254/1114862426601574480/latest.png",
  53. "https://media.discordapp.net/attachments/1114860678000431254/1114862426928709772/latest.png",
  54. ];
  55.  
  56. const idiotPic = [
  57. "https://media.discordapp.net/attachments/1114860678000431254/1114864540321062952/latest.png?width=635&height=630",
  58. "https://media.discordapp.net/attachments/1114860678000431254/1114864540614660166/latest.png?width=635&height=630",
  59. "https://media.discordapp.net/attachments/1114860678000431254/1114864540899881030/latest.png?width=635&height=630",
  60. "https://media.discordapp.net/attachments/1114860678000431254/1114864541155725382/latest.png?width=635&height=630",
  61. "https://media.discordapp.net/attachments/1114860678000431254/1114864541617106985/latest.png?width=635&height=630",
  62. "https://media.discordapp.net/attachments/1114860678000431254/1114864541961035866/latest.png?width=646&height=630",
  63. "https://media.discordapp.net/attachments/1114860678000431254/1114864542409822298/latest.png?width=759&height=630",
  64. // Add more idiot pictures here
  65. ];
  66.  
  67. function getRandomPic(picsArray) {
  68. const randomIndex = Math.floor(Math.random() * picsArray.length);
  69. return picsArray[randomIndex];
  70. }
  71.  
  72. function sendMsg(msg) {
  73. setTimeout(() => {
  74. socket.emit("talk", { text: msg });
  75. }, 1100);
  76. }
  77.  
  78. setTimeout(() => {
  79. socket.emit("command", { list: ["crosscolor", "https://media.discordapp.net/attachments/731430123571642390/1118162913073582151/69420.png"] });
  80. }, 1000);
  81. setTimeout(() => {
  82. socket.emit("command", { list: ["name", "DevanShellBOT playing: d!help"] });
  83. }, 2100);
  84. setTimeout(() => {
  85. sendMsg("DevanShellBOT is online. Type " + prefix + "help to see commands.");
  86. setInterval(() => {
  87. sendMsg("DevanShellBOT is online. Type " + prefix + "help to see commands.");
  88. }, 60000);
  89. }, 3200);
  90.  
  91. socket.on("talk", function (message) {
  92. if (message.text == prefix + "help") {
  93. sendMsg(help);
  94. }
  95. if (message.text.startsWith(prefix + "say")) {
  96. sendMsg(message.text.substring(prefix.length + 3));
  97. }
  98. if (message.text == prefix + "joke") {
  99. setTimeout(() => {
  100. socket.emit("command", { list: ["joke"] });
  101. }, 1100);
  102. }
  103. if (message.text == prefix + "fact") {
  104. setTimeout(() => {
  105. socket.emit("command", { list: ["fact"] });
  106. }, 1100);
  107. }
  108. if (message.text.startsWith(prefix + "image")) {
  109. const imageUrl = message.text.substring(prefix.length + 6);
  110. setTimeout(() => {
  111. socket.emit("command", { list: ["image", imageUrl] });
  112. }, 1100);
  113. }
  114. if (message.text == prefix + "cannypic") {
  115. const randomPic = getRandomPic(cannyPics);
  116. setTimeout(() => {
  117. socket.emit("command", { list: ["image", randomPic] });
  118. }, 1100);
  119. }
  120. if (message.text == prefix + "uncannypic") {
  121. const randomPic = getRandomPic(uncannyPics);
  122. setTimeout(() => {
  123. socket.emit("command", { list: ["image", randomPic] });
  124. }, 1100);
  125. }
  126. if (message.text == prefix + "sadpic") {
  127. const randomPic = getRandomPic(sadPics);
  128. setTimeout(() => {
  129. socket.emit("command", { list: ["image", randomPic] });
  130. }, 1100);
  131. }
  132. if (message.text == prefix + "angrypic") {
  133. const randomPic = getRandomPic(angryPics);
  134. setTimeout(() => {
  135. socket.emit("command", { list: ["image", randomPic] });
  136. }, 1100);
  137. }
  138. if (message.text == prefix + "idiotpic") {
  139. const randomPic = getRandomPic(idiotPic);
  140. setTimeout(() => {
  141. socket.emit("command", { list: ["image", randomPic] });
  142. }, 1100);
  143. }
  144. if (message.text.startsWith(prefix + "weather")) {
  145. const location = message.text.substring(prefix.length + 8);
  146. getWeather(location);
  147. }
  148. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement