npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hary-bot

v1.0.1

Published

Make Your Heart Comfortable

Readme

hary-bot

Npm Package for using whatsapp bot

How To Use

const qrcode = require('qrcode-terminal');
const axios = require('axios');
const fs = require ('fs');
const cors = require("cors");
  const session = require('express-session');
  const cookieParser = require('cookie-parser');
  const expressLayout = require('express-ejs-layouts');
  const passport = require('passport');
  const flash = require('connect-flash');
  const schedule = require('node-schedule');
  const MemoryStore = require('memorystore')(session);
  const rateLimit = require("express-rate-limit");
  var logger = require('morgan');
  const apikey = ('hary');
const CFonts = require('cfonts');

const yt = require('yt-converter')
const {
    color
} = require('./lib/color')

const ytdl = require('ytdl-core');
const { Client , LocalAuth , MessageMedia } = require('whatsapp-web.js');
const client = new Client({
    authStrategy: new LocalAuth(),
    executablePath:' C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'
});
 

client.on('qr', qr => {
    qrcode.generate(qr, {small: true});
});

client.on('authenticated',() =>{
    console.log('AUTHENTICATED')});

client.on('ready', () => {
    console.log('Client is ready!');
});
client.on('message', message => {
    console.log(message.body);
});
 
 client.on('message',async message => {
    const hary = message.body
    if(message.body === 'P') {
        message.reply('Ouu?');
    }
    else if (hary === 'p'){
        message.reply('Iya?')
    }
    else if (hary === 'cecan'){
        const media =  MessageMedia.fromUrl(`https://hary.cloud/api/cecan?apikey=${apikey}`)
        client.sendMessage(message.from,media,{unsafeMime :true});
    }
else if (hary === 'cecandoc'){
    const media =  MessageMedia.fromUrl(`https://hary.cloud/api/cecan?apikey=${apikey}`)
    client.sendMessage(message.from,media,{sendAsDocument : true})  
}
else if (hary.startsWith ('ytmp3be')){
     const link = message.body.slice(7)
    const id = link.split('=')[1]
message.reply('_Wait!_')
    const media = await axios (`https://hary.cloud/api/download/ytmp3?url=${link}&apikey=${apikey}`)
    .then(res => res.data)
    client.sendMessage(message.from, await MessageMedia.fromUrl(media.result, { sendMediaAsDocument: true }))
}

else if (hary.startsWith ('ytmp3')){
     const link = message.body.slice(6)
    const id = link.split('=')[1]
message.reply('_Wait!_')
    const media = await axios (`https://hary.cloud/api/download/ytmp3?url=${link}&apikey=${apikey}`)
    .then(res => res.data)
    client.sendMessage(message.from, await MessageMedia.fromUrl(media.result, { sendMediaAsDocument: true }))
}

else if (hary.startsWith ('ytmp4be')){
     const link = message.body.slice(7)
    const id = link.split('=')[1]
message.reply('_Wait!_')
    const media = await axios (`https://hary.cloud/api/download/ytmp4?url=${link}&apikey=${apikey}`)
    .then(res => res.data)
    client.sendMessage(message.from, await MessageMedia.fromUrl(media.result, { sendMediaAsDocument: true }))
}
else if (hary.startsWith ('ytmp4')){
     const link = message.body.slice(6)
    const id = link.split('=')[1]
message.reply('_Wait!_')
    const media = await axios (`https://hary.cloud/api/download/ytmp4?url=${link}&apikey=${apikey}`)
    .then(res => res.data)
    client.sendMessage(message.from, await MessageMedia.fromUrl(media.result, { sendMediaAsDocument: true }))
}





});
 
client.initialize();


#lib/color.js
const chalk = require('chalk')

const color = (text, color) => {
    return !color ? chalk.green(text) : chalk.keyword(color)(text)
}

const bgcolor = (text, bgcolor) => {
	return !bgcolor ? chalk.green(text) : chalk.bgKeyword(bgcolor)(text)
}

module.exports = {
	color,
	bgcolor
}