Skip to content

Commit

Permalink
fix: versionning
Browse files Browse the repository at this point in the history
  • Loading branch information
barthofu committed Jan 22, 2023
1 parent 1339226 commit 6b9ba2c
Show file tree
Hide file tree
Showing 67 changed files with 226 additions and 178 deletions.
6 changes: 3 additions & 3 deletions docs/bot/features/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ TSCord is not only a Discord Bot, it has also an API in its core!<br />
This API lets you interact with the bot instance and the DB from external services using REST requests.

:::info
It uses the `routing-controllers` package under the hood, check the **[official documentation here](https://github.com/typestack/routing-controllers#table-of-contents)** to learn how to customize it and add new endpoints.
It uses the `tsed` package under the hood, check the **[official documentation here](https://tsed.io/getting-started/)** to learn how to customize it and add new endpoints.
:::

## Initialization

First, you need to put a unique **API_ADMIN_TOKEN** in the `.env` file (you can generate it [here](https://www.uuidgenerator.net/version1 )).
First, you need to put a unique **API_ADMIN_TOKEN** in the `.env` file (you can generate one [here](https://www.uuidgenerator.net/version1)).
You can also customize the port it is running on.

```env title=.env
Expand All @@ -36,7 +36,7 @@ export const generalConfig: GeneralConfigType = {

## Swagger

The API includes an OpenAPI Swagger webpage, accessible at this endpoint:
The API includes a Swagger (OpenAPI) webpage, accessible at this endpoint:
```
/docs
```
Expand Down
20 changes: 14 additions & 6 deletions docs/dashboard/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ Before anything else, head over to your **bot** config and enable the API server
2. Fill in all the variables

:::info
You can find your bot's secret in your [Discord Developer Portal](https://discord.com/developers/applications)
You can find your bot's **secret** in your [Discord Developer Portal](https://discord.com/developers/applications). Click on your application and then go to the OAuth2 tab. You will find it under the `Client Secret` section.
:::
3. Rename the file `.env`
4. Go to the `client/src/core/config/bots.ts`
5. Fill in your bot info (here is a sample)
3. Go on your [Discord Developer Portal](https://discord.com/developers/applications)
4. Click on your application
5. Go to the `OAuth2` tab
6. Add the following redirect URIs:
- http://localhost:3000/api/auth/callback/discord
- <your_domain>/api/auth/callback/discord (if you are running the app on a domain in production)
7. Copy the `Client Id` and the `Client Secret`
8. Paste them in the `.env.example` file, as well as your bot API admin token.
9. Rename the file `.env`
10. Go to the `client/src/core/config/bots.ts`
11. Fill in your bot info (here is a sample)
```ts
{
id: '943804890143133736',
Expand All @@ -30,8 +38,8 @@ You can find your bot's secret in your [Discord Developer Portal](https://discor
:::tip
As you may have noticed, the bots config is an array, so you can setup multiple bots!
:::
6. Run `npm run build` in the `client` folder
7. Then, run `npm run start`
12. Run `npm run build` in the `client` folder
13. Then, run `npm run start`

## Websocket

Expand Down
12 changes: 8 additions & 4 deletions docs/dashboard/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ sidebar_position: 1

## Download the template

As for now, TSCord Dashboard is a **template** kind of github repository.

1. Go to https://github.com/barthofu/tscord-dashboard
2. Click on the green button `Use this template` on the github repository
3. Clone the repo you've just created using command `git clone https://github.com/<you_username>/<your_repo>.git`
2. Download the latest release of the repo

:::caution
Make sure to download a release which version matches the major and minor version of your the TSCord template you're using.

E.g:
If you're using the TSCord template version `2.1.0`, you should download the latest release of the TSCord Dashboard template which version is `2.1.x`.
:::

## Install the dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/dashboard/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sidebar_position: 3

To access the dashboard, you must first sign in using your Discord account on the homepage.

Then, all the bots that have your ID in the `devs` property of the general config (look at [here](/docs/bot/get-started/configuration#general) for more information).
Then, all the bots that have your ID in the `devs` property of the general config (look at [here](/docs/bot/get-started/configuration#general) for more information) will appear.
11 changes: 9 additions & 2 deletions docs/website/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ sidebar_position: 10
As for now, TSCord Website is a **template** kind of github repository.

1. Go to https://github.com/barthofu/tscord-website
2. Click on the green button `Use this template` on the github repository
3. Clone the repo you've just created using command `git clone https://github.com/<you_username>/<your_repo>.git`
2. Download the latest release of the repo

:::caution
Make sure to download a release which version matches the major and minor version of your the TSCord template you're using.

E.g:
If you're using the TSCord template version `2.1.0`, you should download the latest release of the TSCord Website template which version is `2.1.x`.
:::


## Install the dependencies

Expand Down
Loading

0 comments on commit 6b9ba2c

Please sign in to comment.