Nano (なの) Core
A Discord bot core in TypeScript
Dependencies
Usage
1. Install
npm i nano-bot
2. Prepare
- Make
.env
file withTOKEN=YOUR_TOKEN
on your root project folder.
3. Import
import "@ghom/nano-bot"
require("@ghom/nano-bot")
4. Code in TypeScript
- Please use
Nano.Embed
class to make embeds. - Add your own modules in
src/modules/
. - Check the existing modules for examples.
- The Discord client is in the
Nano.Globals
object asclient
. - The ApplicationClient is fetched in the
Nano.Globals
object asbot
.
5. Scripts explanation
{
// Prettify the code automatically on build or push action.
prettier: "prettier src --write",
// Create the local "dist" runnable folder for deployment.
build: "git rm -r --ignore-unmatch -f ./dist && npm run prettier && tsc",
// Build and start directly the bot for debugging.
start: "npm run build && node .",
}
6. Future features
- Implement hot reloading with Gulp.