Skip to content

Daily WaniKani updates in a Discord channel. Keep a streak!

Notifications You must be signed in to change notification settings

GRA0007/wanikani-discord

Repository files navigation

WaniKani Discord Updates

Get daily updates in your Discord server with your WaniKani progress! This bot also tracks your streak (days with at least 1 lesson or review).

Add to your server

Example card

Commands

/register <api_token>

Register a new user to receive daily updates in the current channel. Requires a WaniKani v2 API token. The token can be omitted if you are already registered in another channel.

/unregister <@user>

Unregister yourself (or another user) from updates. If unregistering another user, you must have the manage messages permission.

/streak [enabled/disabled]

Enable or disable showing a streak on your daily card.

/setstreak [number]

Manually set your streak to a number. Useful if you have already been using WaniKani for a while, or if you want to reset it to 0.

/time [hour]

Set the hour of each day when all updates in the current channel will be sent. Use GMT time (0 to 23).

/theme [light/dark]

Set the theme to use in the current channel. Will affect all updates in this channel.

/unregisterall

If run from a server, removes all registrations in that server. Can only be used if you have the manage messages permission.

If run from a DM, removes all registrations in all servers for the current user.

/help <command>

Read help information about this bot or a specific command.


Development

  1. Clone this repo
  2. Run yarn to install dependencies
  3. Create config.json and fill out details (use config.example.json as a template)
  4. Optionally, run yarn deploy-commands [guild_id] to deploy Discord slash commands (omit the guild id to deploy globally)
  5. Run yarn start to start the bot

Specifying an external Chromium executable

On some systems, such as the Raspberry Pi, the Puppeteer library fails to launch it's embedded Chromium executable. If you're getting errors in the console like Error: Failed to launch the browser process!, you can try installing Chromium seperately with sudo apt install chromium-browser, and adding "chromium_path": "/usr/bin/chromium-browser" into your config.json.

About

Daily WaniKani updates in a Discord channel. Keep a streak!

Topics

Resources

Stars

Watchers

Forks