
Koi Not Fish
February 9, 2025 at 02:03 AM
*// SW TAG GRUP*
async function mentionStatus(jids, content) {
let colors = ['#7acaa7', '#6e257e', '#5796ff', '#7e90a4', '#736769', '#57c9ff', '#25c3dc', '#ff7b6c', '#55c265', '#ff898b', '#8c6991', '#c69fcc', '#b8b226', '#efb32f', '#ad8774', '#792139', '#c1a03f', '#8fa842', '#a52c71', '#8394ca', '#243640'];
let fonts = [0, 1, 2, 6, 7, 8, 9, 10];
let users = [];
for (let id of jids) {
let userId = await qyuunee.groupMetadata(id);
users.push(...userId.participants.map(u => qyuunee.decodeJid(u.id)));
}
let message = await qyuunee.sendMessage(
"status@broadcast",
content,
{
backgroundColor: colors[Math.floor(Math.random() * colors.length)],
font: fonts[Math.floor(Math.random() * fonts.length)],
statusJidList: users,
additionalNodes: [
{
tag: "meta",
attrs: {},
content: [
{
tag: "mentioned_users",
attrs: {},
content: jids.map((jid) => ({
tag: "to",
attrs: { jid },
content: undefined,
})),
},
],
},
],
}
);
jids.forEach(id => {
qyuunee.relayMessage(
id,
{
groupStatusMentionMessage: {
message: {
protocolMessage: {
key: message.key,
type: 25,
},
},
},
},
{
userJid: qyuunee.user.jid,
additionalNodes: [
{
tag: "meta",
attrs: { is_status_mention: "true" },
content: undefined,
},
],
}
);
});
}
*// CASE DISINI*
case 'sw': {
if (!isCreator) return reply(mess.owner)
if (args[0] === 'image') {
let q = m.quoted ? m.quoted : m
let mime = (q.msg || q).mimetype || ''
if (!mime) return reply('No media found')
let { UploadFileUgu } = require('./lib/uploader')
let media = await qyuunee.downloadAndSaveMediaMessage(quoted)
let anu = await UploadFileUgu(media)
await qyuunee.sendMessage(m.chat, { react: { text: "⏱️",key: m.key,}})
await mentionStatus([m.chat], {
image: {
url: util.format(anu.url)
},
caption: `${args[1]}`
});
await qyuunee.sendMessage(m.chat, { react: { text: "☑️",key: m.key,}})
} else if (args[0] === 'video') {
let q = m.quoted ? m.quoted : m
let mime = (q.msg || q).mimetype || ''
if (!mime) throw 'No media found'
let { UploadFileUgu } = require('./lib/uploader')
let media = await qyuunee.downloadAndSaveMediaMessage(quoted)
let anu = await UploadFileUgu(media)
await qyuunee.sendMessage(m.chat, { react: { text: "⏱️",key: m.key,}})
await mentionStatus([m.chat], {
video: {
url: util.format(anu.url)
},
caption: `${args[1]}`
});
await qyuunee.sendMessage(m.chat, { react: { text: "☑️",key: m.key,}})
} else if (args[0] === 'audio') {
let q = m.quoted ? m.quoted : m
let mime = (q.msg || q).mimetype || ''
if (!mime) throw 'No media found'
let { UploadFileUgu } = require('./lib/uploader')
let media = await qyuunee.downloadAndSaveMediaMessage(quoted)
let anu = await UploadFileUgu(media)
await qyuunee.sendMessage(m.chat, { react: { text: "⏱️",key: m.key,}})
await mentionStatus([m.chat], { audio: { url: util.format(anu.url) }, mimetype: 'audio/mp4', ptt: true, fileLength: 88738 });
await qyuunee.sendMessage(m.chat, { react: { text: "☑️",key: m.key,}})
} else {
let anu = `.sw image < caption/no caption > ( untuk foto )
.sw video < caption/no caption > ( untuk video )
.sw audio ( untuk audio )`
m.reply(anu);
}
}
break
case 'swtext': {
if (!isCreator) return reply(mess.owner)
await mentionStatus([m.chat], {
text: `${full_args}`
});
}
break
🤔
🩲
2