Giter Club home page Giter Club logo

logo

  • 👋 Hi, I’m @Fernazer..
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...


Github Statistic

REST API GW

fernazer's Projects

-status-200-creator-zekais-result-https-s3.getstickerpack.com icon -status-200-creator-zekais-result-https-s3.getstickerpack.com

{ "status": 200, "creator": "Zekais", "result": [ "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_1.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_2.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_3.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_4.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_5.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_6.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_7.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_8.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_9.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_10.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_11.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_12.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_13.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_14.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_15.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_16.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_17.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_18.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_19.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_20.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_21.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_22.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_23.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200", "https://s3.getstickerpack.com/storage/uploads/sticker-pack/pentol-7/sticker_24.png?72713fdf565385d18fd9ebd85c44eb5f&d=200x200" ] }

baileys icon baileys

Lightweight full-featured typescript/javascript WhatsApp Web API

main.js icon main.js

require('./config.js') let { WAConnection: _WAConnection } = require('@adiwajshing/baileys') let { generate } = require('qrcode-terminal') let syntaxerror = require('syntax-error') let simple = require('./lib/simple') // let logs = require('./lib/logs') let { promisify } = require('util') let yargs = require('yargs/yargs') let Readline = require('readline') let cp = require('child_process') let path = require('path') let fs = require('fs') let rl = Readline.createInterface(process.stdin, process.stdout) let WAConnection = simple.WAConnection(_WAConnection) global.API = (name, path = '/', query = {}, apikeyqueryname) => (name in global.APIs ? global.APIs[name] : name) + path + (query || apikeyqueryname ? '?' + new URLSearchParams(Object.entries({ ...query, ...(apikeyqueryname ? { [apikeyqueryname]: global.APIKeys[name in global.APIs ? global.APIs[name] : name] } : {}) })) : '') global.timestamp = { start: new Date } // global.LOGGER = logs() const PORT = process.env.PORT || 3000 global.opts = new Object(yargs(process.argv.slice(2)).exitProcess(false).parse()) global.prefix = new RegExp('^[' + (opts['prefix'] || '‎xzXZ/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.\\-').replace(/[|\\{}()[\]^$+*?.\-\^]/g, '\\$&') + ']') global.DATABASE = new (require('./lib/database'))(`${opts._[0] ? opts._[0] + '_' : ''}database.json`, null, 2) if (!global.DATABASE.data.users) global.DATABASE.data = { users: {}, chats: {}, stats: {}, msgs: {}, sticker: {}, } if (!global.DATABASE.data.chats) global.DATABASE.data.chats = {} if (!global.DATABASE.data.stats) global.DATABASE.data.stats = {} if (!global.DATABASE.data.msgs) global.DATABASE.data.msgs = {} if (!global.DATABASE.data.sticker) global.DATABASE.data.sticker = {} global.conn = new WAConnection() let authFile = `${opts._[0] || 'session'}.data.json` if (fs.existsSync(authFile)) conn.loadAuthInfo(authFile) if (opts['trace']) conn.logger.level = 'trace' if (opts['debug']) conn.logger.level = 'debug' if (opts['big-qr'] || opts['server']) conn.on('qr', qr => generate(qr, { small: false })) let lastJSON = JSON.stringify(global.DATABASE.data) if (!opts['test']) setInterval(() => { conn.logger.info('Saving database . . .') if (JSON.stringify(global.DATABASE.data) == lastJSON) conn.logger.info('Database is up to date') else { global.DATABASE.save() conn.logger.info('Done saving database!') lastJSON = JSON.stringify(global.DATABASE.data) } }, 60 * 1000) // Save every minute if (opts['server']) require('./server')(global.conn, PORT) if (opts['test']) { conn.user = { jid: '[email protected]', name: 'test', phone: {} } conn.prepareMessageMedia = (buffer, mediaType, options = {}) => { return { [mediaType]: { url: '', mediaKey: '', mimetype: options.mimetype || '', fileEncSha256: '', fileSha256: '', fileLength: buffer.length, seconds: options.duration, fileName: options.filename || 'file', gifPlayback: options.mimetype == 'image/gif' || undefined, caption: options.caption, ptt: options.ptt } } } conn.sendMessage = async (chatId, content, type, opts = {}) => { let message = await conn.prepareMessageContent(content, type, opts) let waMessage = await conn.prepareMessageFromContent(chatId, message, opts) if (type == 'conversation') waMessage.key.id = require('crypto').randomBytes(16).toString('hex').toUpperCase() conn.emit('chat-update', { jid: conn.user.jid, hasNewMessage: true, count: 1, messages: { all() { return [waMessage] } } }) } rl.on('line', line => conn.sendMessage('[email protected]', line.trim(), 'conversation')) } else { rl.on('line', line => { global.DATABASE.save() process.send(line.trim()) }) conn.connect().then(() => { fs.writeFileSync(authFile, JSON.stringify(conn.base64EncodedAuthInfo(), null, '\t')) global.timestamp.connect = new Date }) } process.on('uncaughtException', console.error) // let strQuot = /(["'])(?:(?=(\\?))\2.)*?\1/ let isInit = true global.reloadHandler = function () { let handler = require('./handler') if (!isInit) { conn.off('chat-update', conn.handler) conn.off('message-delete', conn.onDelete) conn.off('group-participants-update', conn.onParticipantsUpdate) conn.off('CB:action,,call', conn.onCall) } conn.welcome = 'Hai @user\n◪ Welcome in group:\n├─ @subject\n\n├─ Intro dulu\n├─ ❏ Nama: \n├─ ❏ Umur: \n├─ ❏ Asal kota: \n├─ ❏ Kelas: \n├─ ❏ Jenis kelamin: \nFOLLOW AKUN OWNER\n➣https://www.instagram.com/ythomeanime/\n➣https://youtube.com/channel/UC7SydwUESoyOQ3qZZuoaNHw' conn.bye = 'Selamat Tinggal @user!\nTerimakasih Telah Bergabung Di Grup\n\nKalo Balik Jangan Lupa Bawa Gorengan Buat Anggota Disini' conn.spromote = '@user Sekarang Admin!' conn.sdemote = '@user Sekarang Bukan Admin!' conn.handler = handler.handler conn.onDelete = handler.delete conn.onParticipantsUpdate = handler.participantsUpdate conn.onCall = handler.onCall conn.on('chat-update', conn.handler) conn.on('message-delete', conn.onDelete) conn.on('group-participants-update', conn.onParticipantsUpdate) conn.on('CB:action,,call', conn.onCall) if (isInit) { conn.on('error', conn.logger.error) conn.on('close', () => { setTimeout(async () => { try { if (conn.state === 'close') { if (fs.existsSync(authFile)) await conn.loadAuthInfo(authFile) await conn.connect() fs.writeFileSync(authFile, JSON.stringify(conn.base64EncodedAuthInfo(), null, '\t')) global.timestamp.connect = new Date } } catch (e) { conn.logger.error(e) } }, 5000) }) } isInit = false return true } // Plugin Loader let pluginFolder = path.join(__dirname, 'plugins') let pluginFilter = filename => /\.js$/.test(filename) global.plugins = {} for (let filename of fs.readdirSync(pluginFolder).filter(pluginFilter)) { try { global.plugins[filename] = require(path.join(pluginFolder, filename)) } catch (e) { conn.logger.error(e) delete global.plugins[filename] } } console.log(Object.keys(global.plugins)) global.reload = (_event, filename) => { if (pluginFilter(filename)) { let dir = path.join(pluginFolder, filename) if (dir in require.cache) { delete require.cache[dir] if (fs.existsSync(dir)) conn.logger.info(`re - require plugin '${filename}'`) else { conn.logger.warn(`deleted plugin '${filename}'`) return delete global.plugins[filename] } } else conn.logger.info(`requiring new plugin '${filename}'`) let err = syntaxerror(fs.readFileSync(dir), filename) if (err) conn.logger.error(`syntax error while loading '${filename}'\n${err}`) else try { global.plugins[filename] = require(dir) } catch (e) { conn.logger.error(e) } finally { global.plugins = Object.fromEntries(Object.entries(global.plugins).sort(([a], [b]) => a.localeCompare(b))) } } } Object.freeze(global.reload) fs.watch(path.join(__dirname, 'plugins'), global.reload) global.reloadHandler() process.on('exit', () => global.DATABASE.save()) // Quick Test async function _quickTest() { let test = await Promise.all([ cp.spawn('ffmpeg'), cp.spawn('ffprobe'), cp.spawn('ffmpeg', ['-hide_banner', '-loglevel', 'error', '-filter_complex', 'color', '-frames:v', '1', '-f', 'webp', '-']), cp.spawn('convert'), cp.spawn('magick'), cp.spawn('gm'), ].map(p => { return Promise.race([ new Promise(resolve => { p.on('close', code => { resolve(code !== 127) }) }), new Promise(resolve => { p.on('error', _ => resolve(false)) }) ]) })) let [ffmpeg, ffprobe, ffmpegWebp, convert, magick, gm] = test console.log(test) let s = global.support = { ffmpeg, ffprobe, ffmpegWebp, convert, magick, gm } require('./lib/sticker').support = s Object.freeze(global.support) if (!s.ffmpeg) conn.logger.warn('Please install ffmpeg for sending videos (pkg install ffmpeg)') if (s.ffmpeg && !s.ffmpegWebp) conn.logger.warn('Stickers may not animated without libwebp on ffmpeg (--enable-ibwebp while compiling ffmpeg)') if (!s.convert && !s.magick && !s.gm) conn.logger.warn('Stickers may not work without imagemagick if libwebp on ffmpeg doesnt isntalled (pkg install imagemagick)') } _quickTest() .then(() => conn.logger.info('Quick Test Done')) .catch(console.error)

stikerinbot icon stikerinbot

stikerinbot adalah pengodean ulang bot whatsapp dari wabot-aq

wa-automate-nodejs icon wa-automate-nodejs

💬 🤖 The most advanced NodeJS WhatsApp library for chatbots with advanced features. Be sure to 🌟 this repository for updates!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.