/aozora

Primary LanguageTypeScript

Aozora Discord Bot

Table of Contents

About Aozora

Aozora is a primarily Japanese language learning utility bot, with currently planned features including:

  • word and sentence translation using DeepL
  • the ability to un-kanji a Japanese sentence
  • group quizzes / Anki deck study (WIP)
  • dictionary searching using Jisho (WIP)
  • Hangeul to Romaji (WIP)
  • saving searched/translated words to a user dictionary (WIP)
  • links to native speaker sound files from Forvo (WIP)
  • Korean dictionary searching (WIP)

Plans for the client app (all WIP) currently include:

  • Google/Apple OAuth, link Discord account after sign-in1
  • export user dictionary as CSV / Anki .apkg / something
  • study saved words via normal flash cards or SRS flash cards
  • grapheme/kanji writing practice
  • skribbl.io but as the above
1afaik Discord will send unverified emails through their OAuth, so to prevent hijacking of Aozora accounts a secure sign-in will first be required to then link Discord accounts.

Discord bot

Slash Commands

  • /deepl/:word/:?target/?:source: utilizes the DeepL.com API to translate your word into a target language. Target is Japanese by default, source can be determined by DeepL.
  • /furigana/:token: parses a Japanese word or phrase (in message or embed) and injects furigana after kanji.
  • /dpl_supported: returns an embed with the languages that DeepL supports for translation.
  • DEV: /invite: send an invite link to have Aozora bot join your server.

Message Context Menu Commands

Message context menu refers to the menu displayed when right-clicking a message in the Discord app. These commands are nested under the apps sub-menu in Discord's desktop client.

  • Add furigana to message: Attempts to add furigana to the selected message or embed.
  • Translate to/from JP: Translates the selected message to JP or EN based on the content.

Technologies

Created with (major packages):

  • Discord bot1: Discord.js 13.5.1 / Kuroshiro 1.2.0 / TypeScript 4.5.4 / Wanakana 4.0.2
  • API2: Elixir 1.13.3 / Phoenix 1.6.6

To be added:

  • Client3: Next.js? React Native?

Setup

Refer to the individual service folders (named after legendary bird Pokémon) within this repo for steps on how to set them up.

  • 1Articuno: Discord bot
  • 2Moltres: Phoenix API
  • 3Zapdos: user-facing client

License

ISC License

Copyright (c) 2022 jesse goodburne / juiceboxh3ro / Aozora

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.