owobot/plugins/cq.js
7cc5c4f330d47060 de78065438 Initial commit
2024-07-06 11:02:11 -04:00

25 lines
1.5 KiB
JavaScript
Executable file

module.exports={//profileless_chat player_chat system_chat
load:()=>{
//console.log("Loaded on global")
},
loadBot:(b)=>{
//console.log(`Loaded on bot ${b.id}`)
b._client.on("login",()=>{
b.interval.chatQueue=setInterval(()=>{
if(b.chatqueue.length!=0){
b._client.chat(b.chatqueue[0]);
b.chatqueue.splice(0,1)
}
},150)
//b.chat("Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. Text longer than 256 characters. ")
})
b.chatqueue=[];//"Prefix: \""];
b.chat=function chat(msg){
if(msg.length==0) return;
msg.match(/.{1,250}/g).forEach(element => {
b.chatqueue.push(element)
});
}
}
}