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 🙏

© 2024 – Pkg Stats / Ryan Hefner

r-functions

v1.0.0

Published

Functions for bot whatsapp

Downloads

8

Readme

Function for bot whatsapp

Example:

// declaration variable conn
const conn = client.conn

// send a text message (auto tagged)
conn.reply(m.chat, `Hello World`, m)

// send a react message
conn.sendReact(m.chat, `💀`, m.key)

// send a text message with progress bar
conn.sendProgress(m.chat, `Hello World`, m)

// send a ptv message from path, url, or buffer (video duration 10s)
conn.sendPtv(m.chat, `./src/video/tiktok.mp4`)

// send a text message with custom thumbnail
conn.sendMessageModify(m.chat, `Hello World`, m, {
   title: '© pycos-bot',
   largeThumb: true,
   ads: false,
   /* can buffer or url */
   thumbnail: 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg',
   link: 'httpsr-devs.xyz'
})

// send a text message with custom thumbnail & fake quoted
conn.sendMessageModifyV2(m.chat, `Hello World`, '© pycos-bot', {
   title: '© pycos-bot',
   largeThumb: true,
   ads: false,
   /* can buffer or url */
   thumbnail: 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg',
   link: 'https://r-devs.xyz'
})

// send a text message with fake quoted
conn.sendMessageVerify(m.chat, `Hello World`, '© pycos-bot')

// send a file from path, url, or buffer (auto extension)
conn.sendFile(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', 'image.jpg', 'Hello World', m)

// send a document from path, url, or buffer (auto extension)
conn.sendFile(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', 'image.jpg', 'Hello World', m, {
   document: true
})

// send a voicenote from path, url, or buffer
conn.sendFile(m.chat, './src/mp3/chocos.mp3', '', '', m, {
   ptt: true
})

// send a audio from path, url, or buffer with thumbnail in audio tag
conn.sendFile(m.chat, './src/mp3/chocos.mp3', '', '', m, {
   APIC: < Buffer >
})

// send a sticker message from url or buffer
conn.sendSticker(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', m, {
   packname: 'Powered by',
   author: '© pycos-bot'
})

// send polling message
conn.sendPoll(m.chat, 'Do u like this library?', {
   options: ['Yes bro', 'Not yet'],
   multiselect: false
})

// send contact message
conn.sendContact(m.chat, [{
   name: 'Rasya R.',
   number: '6285791346128',
   about: 'Developers'
}], m, {
   org: 'Developers Internasional',
   website: 'https://r-devs.xyz',
   email: '[email protected]'
})

// forward message
conn.copyNForward(m.chat, m)

// send button message (your own risk)
var buttons = [{
   name: "quick_reply",
   buttonParamsJson: JSON.stringify({
      display_text: "Developer",
      id: '.devs'
   }),
}, {
   name: "cta_url",
   buttonParamsJson: JSON.stringify({
      display_text: "Website",
      url: "https://r-devs.xyz",
      merchant_url: "https://r-devs.xyz"
   })
}, {
   name: "cta_copy",
   buttonParamsJson: JSON.stringify({
      display_text: "Copy",
      copy_code: "987654"
   })
}, {
   name: "cta_call",
   buttonParamsJson: JSON.stringify({
      display_text: "Call",
      phone_number: "6285791346128"
   })
}, {
   name: "single_select",
   buttonParamsJson: JSON.stringify({
      title: "Click This!",
      sections: [{
         rows: [{
            title: "Owner",
            description: `Ny Developers`,
            id: `.owner`
         }, {
            title: "Runtime",
            description: `Runtime`,
            id: `.run`
         }]
      }]
   })
}]

// button & list
client.sendIAMessage(m.chat, buttons, m, {
   header: '',
   content: 'Hello World!',
   footer: '',
   media: global.db.setting.cover // video or image link
})

// carousel message
const cards = [{
   header: {
      imageMessage: global.cover,
      hasMediaAttachment: true,
   },
   body: {
      text: "Hello World"
   },
   nativeFlowMessage: {
      buttons: [{
         name: "cta_url",
         buttonParamsJson: JSON.stringify({
            display_text: 'Contact Owner',
            url: 'https://r-devs.xyz',
            webview_presentation: null
         })
      }]
   }
}, {
   header: {
      imageMessage: global.cover,
      hasMediaAttachment: true,
   },
   body: {
      text: "Hello World"
   },
   nativeFlowMessage: {
      buttons: [{
         name: "cta_url",
         buttonParamsJson: JSON.stringify({
            display_text: 'Contact Owner',
            url: 'https://r-devs.xyz',
            webview_presentation: null
         })
      }]
   }
}]

client.sendCarousel(m.chat, cards, m, {
   content: 'Hello World!'
})

Thank You For

  • Allah SWT.
  • Nabi Muhammad SAW.
  • My Parrents.
  • My Friends.
  • Wildan