Skip to content

Instantly share code, notes, and snippets.

/**
* 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'
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()
@Darker935
Darker935 / wa-automate
Created November 26, 2020 12:33
WA-Automate codes
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`)
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