a multi-purpose Discord application to spice up your experiences.
focus mainly on anime, fun and utility.
For users, Aoki is your tsundere helper in Discord, the modern world's favorite messaging app. She "specializes in providing advanced anime information and handy utilities, all within your Discord server." Soon, she'll have native support for osu!, but now with various things not available in other applications.
You want to know more right now? Head to the info file, or invite her now.
For developers, Aoki is a Discord application, available as both a gateway-based app (the current release) and a serverless app (before v4). The serverless app is for Cloudflare Workers. Tagged versions after v3 can be hosted anywhere with Bun and process persistence.
Previously, Aoki was written in JavaScript. To better adapt to modern standards, Aoki is rewritten in TypeScript, which reduces random runtime errors. There are no plans to rewrite it into another language yet, and community adaptation is welcome.
On JavaScript releases, only ESM is supported. CommonJS is not.
Aoki is built with MongoDB and the mongodb library. Other databases are available if you want them instead:
- PostgreSQL - release 4.2 and 4.3 uses
Bun#sqlunder the hood. - MongoDB with
mongoosewas a JavaScript implementation in release 4.1. - Cloudflare's
D1database was also a JavaScript implementation for Aoki serverless in release<=3.0.
Aoki officially supports Bun v1.2.4+. Any Node version should also work as long as it's above the minimum requirement for discord.js.
Aoki heavily relies on APIs and external projects, and most redundant libraries and bite-sized utilities are implemented inside the utils directory. This is why the project is very small in disk space size and codebase size. After building, the entire codebase is less than a hundred kilobytes heavy. The rest of it is for bundling libraries.
Check the roadmap for future planned implementations.
Make sure you have Bun v1.2.4+ on your local machine. Install it here.
Place all the necessary keys required by first renaming the .env.example file to .env, and then fill it. It is recommended that you use only the DEV variant of the keys.
Start the dev client by running this one-liner (which installs all dependencies and start it):
bun i && npm run devThe file tree is fairly simple in construction.
aoki
├── ...
├── README.md
├── LICENSE
├── package.json
├── .env.example # example secret keys file
├── src # project source code
│ ├── ...
│ ├── assets # static JS files
│ ├── struct # code structure files
│ │ └── extenders # altering discord.js core
│ │ └── handlers # handlers
│ │ └── utils # fragmented utilities
│ ├── types # type definition for things
│ ├── events # Discord.js events
│ ├── web # web API (barebones)
│ └── cmd # main commands directories
└── To implement new stuff, read INSTRUCTIONS.md.
This is a learning project pushed to production, use any code that makes sense to you, but don't fully copy the entire thing.
To contribute, simply make a fork of this repository, make your changes, then make a pull request. There is a template ready for a standard PR.
To work with the codebase, specifically this branch, make sure:
- You do not edit
tsconfig.tsonto make whatever you want works. - You document the code wherever relevant; i.e. stuff that will be hard to look at without it, if you're making a PR.
- You keep the overall structure intact and consistent. Sync with other files if there is already one (or some) of the same format.
- You stay sane and happy.
