Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
* wordings and new App Auth link
  • Loading branch information
en3sis authored May 7, 2024
1 parent ac1c2fc commit b0de217
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,46 @@ Built with [Discord.JS](https://discord.js.org/#/), [TypeScript](https://www.typ

## Invite to server

Bring Hans to your Discord server and start using his available features right away by inviting it to your server [here 🔗](https://discord.com/api/oauth2/authorize?client_id=403523619222847488&permissions=0&scope=bot%20applications.commands). It's using the latest `hans:nightly` image with the latest features.
Bring Hans to your Discord server and start using his available features immediately [here 🔗](https://discord.com/oauth2/authorize?client_id=403523619222847488). It uses the latest `hans:nightly` image with the latest features.

The list of commands & plugins can be found [here 🔗](https://github.com/en3sis/hans/wiki/Commands-&-Plugins)

## Developing Hans

> 🪬 **NOTE**: Please consider opening an issue and PR for bugs, suggestions or new features.
> 🪬 **NOTE**: Please consider opening an issue and PR for bugs, suggestions, or new features.
---

### 🔅 Prepare environment

Before running any command, run `npm install && cp .env.template .env`, fill all the env variables needed. To create your application, visit [Discord's Developer Portal](https://discord.com/developers/docs/intro)
Before running any command, run `npm install && cp .env.template .env`, and fill in all the env variables needed. To create your application, visit [Discord's Developer Portal](https://discord.com/developers/docs/intro)

> 🪬 **IMPORTANT**: A Supabase instance is needed for the bot to work. A free cluster should be more than enough (even for small bots & communities) for development.
### Supabase Local Development.

Supabase is used for storing the bot's configs, guilds, and users.

You can work with supabase local, just follow the instructions [here 🔗](https://supabase.io/docs/guides/local-development).
Once you run `supabase start` the local supabase will be populate with the latest schema (have a look at the `supabase/seed.template.sql` file for more configuration)
You can work with `supabase local`, follow the instructions [here 🔗](https://supabase.io/docs/guides/local-development).
Once you run `supabase start` the local Supabase will be populated with the latest schema (have a look at the `supabase/seed.template.sql` file for more configuration)

More information related to working with Supabase local development can be found [📹 here 🔗](https://www.youtube.com/watch?v=N0Wb85m3YMI)

## 👩🏼‍💻 Development

Once the `Prepare environment` section is done, you can start developing your bot.
Once the `Prepare environment` section is done, you can follow along with the development.

### `npm run dev`

Will start a development server with `ts-node` and `nodemon` for livereload. A bot Invite link will be displayed in the console. Use it to invite the bot to your server.
It will start a development server with `ts-node` and `nodemon` for live-reload. A bot Invite link will be displayed in the console.

### Slash commands

All commands (under `src/commands`) are built with the [Slash Command](https://discordjs.guide/interactions/slash-commands.html) interaction.

> 🪬 **IMPORTANT**: before developing commands, make sure you invite the bot to your server and the entry in Supabase `configs -> bot_guild_id` is your guild_id.
All commands under the main folder are available globally (it will take a second to have them available) while the ones under `bots-playground/` are guild specific and are instantly deployed, use this folder for debugging & development purposes.
All commands under the main folder are available globally (it will take a second to have them available) while the ones under `bots-playground/` are guild-specific and are instantly deployed, use this folder for debugging & development purposes.

To deploy the commands: `npm run slashDev` or `npm run slash` in production.

Expand All @@ -68,7 +68,7 @@ To deploy the commands: `npm run slashDev` or `npm run slash` in production.

For testing, we use Mocha with TS.

All the tests are under the `/tests` directory. Right now they're none or a few, ideally, we should add more test coverage for command controllers.
All the tests are under the `/tests` directory. Right now they're none or a few, we should add more test coverage for command controllers.

### `npm run test`

Expand All @@ -93,15 +93,15 @@ You can also run it with `docker-compose` using the command `docker-compose up -

You can also run the bot locally using the following commands:

> 🪬 **IMPORTANT**: Make sure to follow the `Prepare environment` section.
> 🪬 **IMPORTANT**: Follow the `Prepare environment` section.
### `npm run build`

To generate the application's build.

### `npm start`

Will run the bot with the production environment.
It will run the bot with the production environment.

### With Kubernetes (WIP)

Expand Down

0 comments on commit b0de217

Please sign in to comment.