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

rattlesnake

v0.1.0

Published

An Open Source Slither.io Client

Downloads

3

Readme

alt text

Rattle Snake

Join the chat at https://gitter.im/dahquan/rattlesnake [Documentation] [Examples]

An Open Source Slither.io Client

Needs more contributers! Better documentation coming soon!

Running Feeder Bot

This seems to be the most popular question. For instructions on running the feeder bot or other included examples go HERE

Overview

The main reason behind this bot is for educational purposes. With great power comes great responsibility, don't ruin the game for others!

Unlike many other slither.io bots, this one does not require a browser and can be ran on your desktop/server with Node.JS installed

I don't plan on adding adding advanced functionality such as AI. The bot logic relies on what you would like to do with it. This should just be used as a library.

NPM

$ npm install --save rattlesnake

Features

  • [x] Connect to slither.io servers
  • [x] Connect via HTTP proxy
  • [x] Face position (head towards a location)
  • [x] Snake position
  • [x] Retrieve Leaderboard data
  • [x] Events (eat food, dead, spawned, etc...)
  • [ ] Determine snake length
  • [ ] Plugin system
  • [ ] Track food
  • [ ] Track snake angles
  • [ ] Sectors
  • [ ] Proxy auth, HTTPS, SOCKS
  • [ ] ???

Code Example

'use strict'

// ========
// Leaderboard Example
//
// This example will get the top players on the leaderboard then disconnect
//

const Bot = require('rattlesnake')

const bot = new Bot({
  name: process.env.SLITHER_SERVER_NAME || 'RattleSnake',
  // logLevel: 'debug',
  server: process.env.SLITHER_SERVER || '199.21.79.246:444'
})

// Just listen for the leaderboard event then disconnect
bot.once('leaderboard', function(leaderboard) {
  console.log()
  console.log('====== TOP ' + leaderboard.length + ' ======')
  console.log()

  leaderboard.forEach(function(entry, i) {
    console.log('#' + i + '. ' + entry.name)
  })

  bot.close()
})

// Print any errors
bot.on('error', function(error) {
  console.log('Error: ' + error)
})

// Connect the bot
bot.connect()

Contributing

This client still needs a lot more development! Please feel free to submit pull requests, fork, star or open an issue if you happen to come across a bug.

Is there a feature we are missing? Open an issue!

Special Thanks To:

License

MIT © Dahquan Hinds