discord-haruka

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i discord-haruka

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

269 kB

Total Files

72

Last publish

Collaborators

  • mindfulminun