-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export {} | ||
const { MessageType } = require('@adiwajshing/baileys') | ||
|
||
module.exports = { | ||
name: 'siaran', | ||
description: 'Untuk mengelola member premium group _only owner_', | ||
async execute (client: any, chat: any, pesan: any, args: any) { | ||
if (!client.isOwner && !client.isSudo) return client.reply(pesan.hanya.owner) | ||
if (args.length < 1) return client.reply('Ra onok tulisan') | ||
const chatAll = await client.chats.all() | ||
if (client.isMedia && (!chat.message.videoMessage || client.isQuotedImage)) { | ||
const encmedia = client.isQuotedImage ? JSON.parse(JSON.stringify(chat).replace('quotedM', 'm')).message.extendedTextMessage.contextInfo : chat | ||
const buff = await client.downloadMediaMessage(encmedia) | ||
for (const _ of chatAll) { | ||
client.sendMessage(_.jid, buff, MessageType.image, { caption: `❮ *KryPtoN Bot Broadcast* ❯\n\n${client.body.slice(7)}` }) | ||
} | ||
client.reply('Berhasil mengirim siaran') | ||
} else { | ||
for (const _ of chatAll) { | ||
client.sendMess(_.jid, `❮ *KryPtoN Bot Broadcast* ❯\n\n${client.body.slice(7)}`) | ||
} | ||
client.reply('*Berhasil mengirim siaran*') | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* eslint-disable no-mixed-operators */ | ||
export {} | ||
const { MessageType } = require('@adiwajshing/baileys') | ||
const { exec } = require('child_process') | ||
|
@@ -13,7 +12,7 @@ module.exports = { | |
cooldown: 600, | ||
description: 'Untuk menjadikan video atau gambar menjadi sticker\nPenggunaan: quoted gambar/vidio !sticker <rbg/nobg> rbg: remove background, nobg: no background on sticker, default sticker dengan background', | ||
async execute (client: any, chat: any, pesan: any, args: any) { | ||
if ((client.isMedia && !chat.message.videoMessage || client.isQuotedImage) && args[0] == 'nobg') { | ||
if ((client.isMedia && (!chat.message.videoMessage || client.isQuotedImage)) && args[0] == 'nobg') { | ||
if ((!client.isGroup && !client.isPmium) || (client.isGroup && !client.isGmium)) return client.reply(pesan.hanya.premium) | ||
const encmedia = client.isQuotedImage ? JSON.parse(JSON.stringify(chat).replace('quotedM', 'm')).message.extendedTextMessage.contextInfo : chat | ||
const media = await client.downloadAndSaveMediaMessage(encmedia) | ||
|
@@ -39,7 +38,7 @@ module.exports = { | |
.addOutputOptions(['-vcodec', 'libwebp', '-vf', 'scale=\'min(320,iw)\':min\'(320,ih)\':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:[email protected], split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse']) | ||
.toFormat('webp') | ||
.save(ranw) | ||
} else if ((client.isMedia && chat.message.videoMessage.seconds < 11 || client.isQuotedVideo && chat.message.extendedTextMessage.contextInfo.quotedMessage.videoMessage.seconds < 11) && args.length == 0) { | ||
} else if ((client.isMedia && (chat.message.videoMessage.seconds < 11 || client.isQuotedVideo) && chat.message.extendedTextMessage.contextInfo.quotedMessage.videoMessage.seconds < 11) && args.length == 0) { | ||
if ((!client.isGroup && !client.isPmium) || (client.isGroup && !client.isGmium)) return client.reply(pesan.hanya.premium) | ||
const encmedia = client.isQuotedVideo ? JSON.parse(JSON.stringify(chat).replace('quotedM', 'm')).message.extendedTextMessage.contextInfo : chat | ||
const media = await client.downloadAndSaveMediaMessage(encmedia) | ||
|