Advertisement
nonogamer9

YouTubeBOT

Nov 7th, 2023 (edited)
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const prefix = "!";
  2. const botname = "YouTubeBOT (" + prefix + "youtube {YTID})";
  3. const version = "1.1"
  4. var botinfo = "YouTubeBOT Version " + version + ". Find YouTubeBOT at: https://pastebin.com/g6m4BHyG";
  5.  
  6. function sendMsg(msg){
  7.     setTimeout(() => {
  8.         socket.emit("talk",{text: msg});
  9.     },1100);
  10. }
  11.  
  12. setTimeout(() => {socket.emit("command",{list:["name",botname]})},1000);
  13. setTimeout(() => {socket.emit("command",{list:["name",botname]})},2100);
  14. setTimeout(() => {socket.emit("command",{list:["color","https://cdn.discordapp.com/attachments/1128405695709053148/1172930103521595422/778.png"]})},3200);
  15. setTimeout(() => {
  16.     sendMsg("YouTubeBOT is online. Type " + prefix + "youtube {YTID} to watch some YouTube! Make Sure To Grab The Popcorns!");
  17. },4300);
  18.  
  19. socket.on("talk", (message) => {
  20.     if(message.text == prefix + "botinfo"){
  21.         sendMsg(botinfo);
  22.     }
  23.     if(message.text.startsWith(prefix + "youtube")){
  24.         let imgUrl = message.text.substring(prefix.length + 8);
  25.         setTimeout(() => {socket.emit("command",{list:["youtube",imgUrl]});},1100);
  26.     }
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement