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

smagebot

v1.0.0

Published

A simple personal Telegram bot plugins based

Downloads

4

Readme

smagenBot

A simple personal Telegram bot plugins based.

How can I create a personal bot ?

Follow these steps: https://core.telegram.org/bots#3-how-do-i-create-a-bot

Configure smagenBot

Edit config.json

token: "YOUR BOT TOKEN",
interval: "everytime it has to check messages"
quiet: true if you want to know when it send a message, false if not
username: false allows your bot to send messages to everyone otherwise put it your username and it will send messages only to you
botname: Your bot nick

List of Plugins

To see a list of plugins send /help to your bot or list files in plugins/ directory

Currently I have made these plugins:

  • /os - Send to me my OS information
  • /weather <city> - Send to me my <city>'s weather informations
  • /pokemon <name> - Send to me informations about <name> pokémon
  • /expand <url> - Expand a short <url>
  • /btc <currency> - Show quotation of Bitcoin in <currency>
  • /imdb <film> - Show information about a <film>
  • /xkcd <id> or <random> - Send an image from xkcd

Add a Plugin

  • To add a simple plugin you have to add name.js file to a plugins/ directory.
  • Follow the examples to make your own plugin.
  • Add your plugin command and description to a list.json file

That's all.

To use it send to your bot /name.

How plugins works

Plugins have to put into an exec function that have one parameter and returns a callback with 2 parameters:

  • The first parameter is an array of objects
  • The second parameter is an array of strings. These strings coincide to type of the objects returns.

So if for example: if the first object is a text object the first element of the type's array is "text", if the second is a photo object the second element of the type's array is "photo" and so on.

Screenshot

screen1

TODO

  • [ ] Start plugin
  • [x] Move plugins directory on the root of the repo
  • [ ] More plugins
  • [x] if use /command@nickname your bot answer only if nickname is his name
  • [x] The bot can send images from an url
  • [x] The bot can send chatAction
  • [ ] The bot can send audio files
  • [x] The bot can send videos from an url
  • [x] The bot can send documents from an url
  • [x] Plugins can send more messages at once (photo, text, etc.)

Author

  • Domenico Luciani aka DLion
  • http://dlion.it

LICENSE

MIT 2015 Domenico Luciani [email protected]