2024-07-28 02:37:31 -04:00
|
|
|
module.exports = {
|
2024-08-12 05:13:32 -04:00
|
|
|
load: (b) => {
|
2024-07-28 02:37:31 -04:00
|
|
|
b._client.on('login', () => {
|
|
|
|
b.interval.chatQueue = setInterval(() => {
|
|
|
|
if (b.chatqueue.length !== 0) {
|
|
|
|
b._client.chat(b.chatqueue[0])
|
|
|
|
b.chatqueue.splice(0, 1)
|
|
|
|
}
|
2024-08-12 05:13:32 -04:00
|
|
|
}, 100)
|
2024-07-28 02:37:31 -04:00
|
|
|
})
|
|
|
|
b.chatqueue = []
|
|
|
|
b.chat = function chat (msg) {
|
|
|
|
if (msg.length === 0) return
|
2024-08-12 05:13:32 -04:00
|
|
|
msg.match(/.{1,255}/g).forEach(element => {
|
2024-07-28 02:37:31 -04:00
|
|
|
b.chatqueue.push(element)
|
|
|
|
})
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|
2024-07-28 02:37:31 -04:00
|
|
|
}
|
2024-07-27 02:39:18 -04:00
|
|
|
}
|