Advertisement
IAMNEW322432

Untitled

Aug 12th, 2023
82
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 1 0
  1. const prefix = "bp:";
  2. const botname = "BonziPopeBot (" + prefix + "help)";
  3. const version = "0.5.0"
  4. var help = "__BonziPopeBot Commands__\bp:help, bp:say {TEXT}, bp:joke, bp:fact, bp:botinfo, bp:roominfo, bp:image {IMAGE}";
  5. var botinfo = "BonziPopeBot Version " + version + ". Find bot at: https://pastebin.com/jCXcEgeY";
  6.  
  7. function sendMsg(msg){
  8. setTimeout(() => {
  9. socket.emit("talk",{text: msg});
  10. },1100);
  11. }
  12.  
  13. setTimeout(() => {socket.emit("command",{list:["name",botname]})},1000);
  14. setTimeout(() => {socket.emit("command",{list:["name",botname]})},2100);
  15. setTimeout(() => {socket.emit("command",{list:["color","https://cdn.discordapp.com/attachments/1071674858045444126/1139186786682294273/bonzipse.png"]})},3200);
  16. setTimeout(() => {
  17. sendMsg("bonzipopebot is online. Type " + prefix + "help to see commands.");
  18. setInterval( () => {sendMsg("unbojih2020 bot is online. Type " + prefix + "help to see commands.");},60000);
  19. },4300);
  20.  
  21. socket.on("talk", (message) => {
  22. if(message.text == prefix + "roominfo"){
  23. sendMsg("Amount of users in the room: " + window.usersAmt);
  24. }
  25. if(message.text == prefix + "help"){
  26. sendMsg(help);
  27. }
  28. if(message.text == prefix + "botinfo"){
  29. sendMsg(botinfo);
  30. }
  31. if(message.text.startsWith(prefix + "say")){
  32. sendMsg(message.text.substring(prefix.length + 3));
  33. }
  34. if(message.text.startsWith(prefix + "image")){
  35. let imgUrl = message.text.substring(prefix.length + 6);
  36. setTimeout(() => {socket.emit("command",{list:["image",imgUrl]});},1100);
  37. }
  38. if(message.text == prefix + "joke"){
  39. setTimeout(() => {socket.emit("command",{list:["joke"]});},1100);
  40. }
  41. if(message.text == prefix + "fact"){
  42. setTimeout(() => {socket.emit("command",{list:["fact"]});},1100);
  43. }
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement