๐
by ๐
13
Raw
const Arsyilla = require("./Arsyilla.js")
xstbot.ev.on('messages.upsert', async chatUpdate => {
try {
const arsyilla = chatUpdate.messages[0];
if (!arsyilla.message) return;
arsyilla.message = (Object.keys(arsyilla.message)[0] === 'ephemeralMessage')
? arsyilla.message.ephemeralMessage.message
: arsyilla.message;
if (arsyilla.key && arsyilla.key.remoteJid === 'status@broadcast') return;
if (!xstbot.public && !arsyilla.key.fromMe && chatUpdate.type === 'notify') return;
if (arsyilla.key.id.startsWith('BAE5') && arsyilla.key.id.length === 16) return;
const m = smsg(xstbot, arsyilla, store);
await handleMLAutoReact(m, xstbot);
if (typeof Arsyilla === 'function') {
await Arsyilla(xstbot, m, chatUpdate, store);
} else {
console.warn("โ ๏ธPastikan module export-nya sesuai.");
}
} catch (err) {
console.error(err);
}
});