From 8657c18107e81e99e9c687a7599625766e65977b Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 23 Oct 2024 09:33:56 +0700 Subject: [PATCH] feat: public the source code :D --- .env.example | 4 ++++ README.md | 51 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..5609d9a --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +BOT_TOKEN= +MONGO_URI= +REDIS_URI= +PROCESS_ENV= diff --git a/README.md b/README.md index 53ab311..792c9ba 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,50 @@ -# zentbot +# Miss Hatsune +Miss Hatsune is a Discord bot, written on top of [Deno](https://github.com/denoland/deno) runtime with TypeScript and using [discord.js](https://github.com/discordjs/discord.js/).\ +\ +The bot is developed specifically for ZentSchool server with love<3. -To install dependencies: +# Requirements +- Deno >= `v2.0` +- MongoDB +- Redis -```bash -bun install +# Installation +## **Step 1** - Clone the repository: ``` +git clone https://github.com/louiszn/miss-hatsune +cd miss-hatsune +``` + +## **Step 2** - Install dependencies +``` +deno install +``` + +## **Step 3** - Config your `.env` file +Copy from example env file +``` +cp .env.example .env +``` + +Add value for each env key +- `BOT_TOKEN`: Token of your Discord bot +- `MONGO_URI`: Your MongoDB connection URI +- `REDIS_URI`: Your Redis connection URI +- `PROCESS_ENV`: Use `development` or `production` + +## **Step 4** - Config `src/config.ts` +This file is used to config default values which the bot will use. Make it easier to config by using objects. The file is located in `src/config.ts` -To run: +## **Step 5** - Run the bot! +Register application commands *(Only run this when you need to register commands. Mostly you will only use it once)* +``` +deno task deloy +``` -```bash -bun run src/index.ts +Run the bot +``` +deno task start ``` -This project was created using `bun init` in bun v1.1.29. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. +# Contribution +All of your contributions are welcome :D. Please make sure you have checked the issues/pull requests for the related content that you want me to do.