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

discord-haruka

v2.0.0

Published

A useless Discord bot.

Downloads

15

Readme

API Docs | GitHub | npm | Teardown

Haruka

Haruka, your useless Discord bot. Add Haruka.

Commands

As of v2.0.0, Haruka has 21 functions:

  • -h 8ball: Answers any yes or no question.
  • -h about: General stuff about Haruka.
  • -h aesthetic: Makes your text more aesthetic.
  • -h anime: Looks up information for an anime, you weeb.
  • -h emote: Manages server emotes
  • -h github: Retrieve information about a GitHub repository.
  • -h health: Tips to improve your bodily health.
  • -h help: Returns a list of all the commands, much like this one.
  • -h invite: Replies with a URL to invite Haruka to other servers.
  • -h kanji: Retrieve information about a Kanji character.
  • -h kick: Kicks all of the mentioned users.
  • -h now: Returns the current time in UTC
  • -h pfp: Return a user’s profile image as a URL.
  • -h ping: Replies “Pong!”
  • -h pkmn: Gets information about a Pokémon.
  • -h purge: Deletes messages in bulk.
  • -h restart: Restarts Haruka.
  • -h reverse: Reverses some text.
  • -h say: Replies with whatever you tell it to.
  • -h someone: Mentions a user chosen at random.
  • -h version: Prints out technical information about Haruka.
  • -h xkcd: Fetches xkcd comics.

Installation

Although Haruka can be installed via npm i discord-haruka, it’s not recommended, as Haruka isn’t a module. Instead, go to the GitHub repo and get a copy of Haruka’s latest release. In the root directory, open the file called example-config.json. The most important bits are as follows.:

{
  "version": "<Version number>",
  "dev": false,
  "token": "<https://discordapp.com/developers/applications/me>",
  "kanji-alive-api-key": "<https://market.mashape.com/KanjiAlive/learn-to-read-and-write-japanese-kanji>",
  "ops": [
    "<userID>"
  ]
}

Replace each thing in <angle brackets> with its respective value. token is your bot’s login token, which can be found in your Discord apps. kanji-alive-api-key is your X-Mashape-Key header used for KanjiAlive, the API used to get Kanji data. If you don't wish to use the Kanji function, rename dist/functions/kanji.js to dist/functions/_kanji.js. ops is an array of user IDs; a user ID represents a user on Discord, and these are used to determine who can run the -h restart command, which kills the Haruka process.

Finally, rename example-config.json to config.json, run npm install to install Haruka’s dependencies, and run her locally by using npm start.

Contributing

First of all, get to know how Haruka works. Haruka is made of several component parts, and understanding how they work will ease development. Install Haruka as mentioned above, create a fork with your changes, and issue a Pull Request. Haruka’s written in CoffeeScript, you can build her by running coffee -o dist/ -cw src/ in the root directory with CoffeeScript installed. It’s also recommended you have a CoffeeScript linter installed.

License

MIT License