Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const prefix = "bp:";
- const botname = "BonziPopeBot (" + prefix + "help)";
- const version = "0.5.0"
- var help = "__BonziPopeBot Commands__\bp:help, bp:say {TEXT}, bp:joke, bp:fact, bp:botinfo, bp:roominfo, bp:image {IMAGE}";
- var botinfo = "BonziPopeBot Version " + version + ". Find bot at: https://pastebin.com/jCXcEgeY";
- function sendMsg(msg){
- setTimeout(() => {
- socket.emit("talk",{text: msg});
- },1100);
- }
- setTimeout(() => {socket.emit("command",{list:["name",botname]})},1000);
- setTimeout(() => {socket.emit("command",{list:["name",botname]})},2100);
- setTimeout(() => {socket.emit("command",{list:["color","https://cdn.discordapp.com/attachments/1071674858045444126/1139186786682294273/bonzipse.png"]})},3200);
- setTimeout(() => {
- sendMsg("bonzipopebot is online. Type " + prefix + "help to see commands.");
- setInterval( () => {sendMsg("unbojih2020 bot is online. Type " + prefix + "help to see commands.");},60000);
- },4300);
- socket.on("talk", (message) => {
- if(message.text == prefix + "roominfo"){
- sendMsg("Amount of users in the room: " + window.usersAmt);
- }
- if(message.text == prefix + "help"){
- sendMsg(help);
- }
- if(message.text == prefix + "botinfo"){
- sendMsg(botinfo);
- }
- if(message.text.startsWith(prefix + "say")){
- sendMsg(message.text.substring(prefix.length + 3));
- }
- if(message.text.startsWith(prefix + "image")){
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["image",imgUrl]});},1100);
- }
- if(message.text == prefix + "joke"){
- setTimeout(() => {socket.emit("command",{list:["joke"]});},1100);
- }
- if(message.text == prefix + "fact"){
- setTimeout(() => {socket.emit("command",{list:["fact"]});},1100);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement