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
/** | |
* Originally created by cwke | |
* Reuploaded by Waxaranai | |
* Recoded by SlavyanDesu | |
* | |
* GitHub is an open-source community, so why are you so triggered when someone shared some simple code? | |
*/ | |
const fs = require('fs-extra') | |
const packID = 'com.snowcorp.stickerly.android.stickercontentprovider b5e7275f-f1de-4137-961f-57becfad34f2' |
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
var stickerExif = 0 // to prevent stickers with the same name | |
const webp = require('webp-converter'); | |
const Exif = require('/path/to/exif.js'); //https://gist.github.com/JoseHM8A/14a09d7afa34e63eb2c57492d59c2ddd | |
const exif = new Exif() | |
stickerExif++ | |
const packname = 'Pack Name' | |
const autor = 'Author' | |
exif.create(packname, autor, `stc_${author}${stickerExif}`) | |
const encryptMedia = isQuotedImage ? await quotedMsg.downloadMedia() : await msg.downloadMedia() |
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
const { decryptMedia } = require('@open-wa/wa-decrypt') | |
const mime = require('mime-types') | |
const nrc = require('node-run-cmd') | |
const fs = require('fs-extra') | |
const sizeOf = require('image-size') | |
const buffer = await decryptMedia(message) | |
const fileName = `temp${from}.${mime.extension(mimetype)}` | |
fs.writeFile(fileName, buffer, function (err) {}) | |
await nrc.run(`convert ${fileName} ${from}.png`) |
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
if(msg.body=='!clearChats'){ | |
//clearing ALL CHATS | |
msg.reply("Clearing chats !") | |
const chats = await client.getChats(); | |
for (let index = 0; index < chats.length; index++) { | |
let chat = chats[index] | |
/* | |
UNCOMMENT IF YOU WANT CLEAR ONLY PRIVATE CHATS |