Skip to content

Commit 0a10499

Browse files
authored
Merge pull request #20 from web-tech-tw/docs
docs: correct the contents
2 parents 39afb96 + e82b241 commit 0a10499

17 files changed

+466
-44
lines changed

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ A simple bridge for every messenger.
44

55
![Arona](docs/statics/icon.min.png)
66

7-
## Documentation
8-
9-
The documents and instructions is available on `/docs` of this repository.
10-
11-
[Here](docs/README.md)
12-
137
## Discussion
148

159
Matrix room: [`#line:matrix.org`](https://matrix.to/#/#line:matrix.org)
10+
11+
## Documentation
12+
13+
The documents and instructions are available on [our website](https://web-tech-tw.github.io/arona).

docs/configuration.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
To configure the Arona, you need to create a configuration file named `config.yaml` in the root directory of the project.
44

5+
> **⚠️ Public Access From The Internet Required**
6+
>
7+
> You must fill the `baseUrl` field in the `config.yaml` file with the URL that can be accessed from the internet.
8+
>
9+
> Otherwise, the bridge will not work properly. (Throwing an error like `Error: Cannot check the heart code...`)
10+
>
11+
> If you don't have a public IP address, see the [Localtunnel](get-started#localtunnel-optional) section.
12+
513
## Configuration File
614

715
The configuration file is a YAML file that contains the configuration for the Arona.
@@ -20,24 +28,24 @@ bridge:
2028
bridgeProvider:
2129
# OpenAI
2230
openai:
23-
enable: true
31+
enable: false
2432
# https://github.com/ai-tech-tw/openai
2533
baseUrl: "https://web-tech-tw.eu.org/openai/v1"
2634
apiKey: "YourGeminiApiKey"
2735
chatModel: "gpt-3.5-turbo"
2836

2937
# LINE
3038
line:
31-
enable: true
39+
enable: false
3240
channelAccessToken: "YourChannelAccessToken"
3341
channelSecret: "YourChannelSecret"
34-
useNotify: true
42+
useNotify: false
3543
notifyClientId: "YourClientID"
3644
notifyClientSecret: "YourClientSecret"
3745

3846
# Matrix
3947
matrix:
40-
enable: true
48+
enable: false
4149
homeserverUrl: "https://matrix.org"
4250
accessToken: "YourSecretAccessToken"
4351

@@ -53,6 +61,10 @@ bridgeProvider:
5361
botToken: "YourBotToken"
5462
```
5563
64+
Configuration File is related to what you want to do with Arona.
65+
66+
You can [enable or disable the providers you want to use](#bridgeprovider).
67+
5668
## Configuration Options
5769
5870
The configuration file contains the following options:
@@ -82,9 +94,9 @@ The `http` option is used to configure the HTTP server.
8294

8395
The `bridge` option is used to configure the bridge.
8496

85-
| Option | Description |
86-
| -------- | ------------------------------------ |
87-
| `public` | Whether the bridge is public or not. |
97+
| Option | Description |
98+
| -------- | ------------------------------------------------ |
99+
| `public` | Whether the bridge can be used by public or not. |
88100

89101
### `bridgeProvider`
90102

docs/get-started.md

+47-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ Arona is a simple bridge for every messenger.
44

55
It exchanges messages between LINE, Telegram, Discord, and Matrix.
66

7-
## Configuration
7+
> **⚠️ Public Access From The Internet Required**
8+
>
9+
> To use the bridge, it's required to make the bridge can be got public access from the internet.
10+
>
11+
> If you don't have a public IP address, you can use a service like [ngrok](https://ngrok.com/) or [localtunnel](#localtunnel-optional) to expose your local server to the internet.
12+
13+
## Quick Start
814

915
Create a `config.yaml` file in the root directory.
1016

@@ -22,24 +28,24 @@ bridge:
2228
bridgeProvider:
2329
# OpenAI
2430
openai:
25-
enable: true
31+
enable: false
2632
# https://github.com/ai-tech-tw/openai
2733
baseUrl: "https://web-tech-tw.eu.org/openai/v1"
2834
apiKey: "YourGeminiApiKey"
2935
chatModel: "gpt-3.5-turbo"
3036

3137
# LINE
3238
line:
33-
enable: true
39+
enable: false
3440
channelAccessToken: "YourChannelAccessToken"
3541
channelSecret: "YourChannelSecret"
36-
useNotify: true
42+
useNotify: false
3743
notifyClientId: "YourClientID"
3844
notifyClientSecret: "YourClientSecret"
3945

4046
# Matrix
4147
matrix:
42-
enable: true
48+
enable: false
4349
homeserverUrl: "https://matrix.org"
4450
accessToken: "YourSecretAccessToken"
4551

@@ -57,11 +63,19 @@ bridgeProvider:
5763
5864
To get detailed information about the configuration, please refer to the [Configuration](./configuration.md) page.
5965
60-
## Installation
66+
> **⚠️ Public Access From The Internet Required**
67+
>
68+
> You must fill the `baseUrl` field in the `config.yaml` file with the URL that can be accessed from the internet.
69+
>
70+
> Otherwise, the bridge will not work properly. (Throwing an error like `Error: Cannot check the heart code...`)
71+
>
72+
> If you don't have a public IP address, see the [Localtunnel](#localtunnel-optional) section.
73+
74+
### Installation
6175

6276
To run the project, you can use Docker or run it natively.
6377

64-
### Docker
78+
#### Docker
6579

6680
Create a `docker-compose.yml` file in the root directory.
6781

@@ -85,7 +99,7 @@ Run the following command to start the project.
8599
docker-compose up -d
86100
```
87101

88-
### Native
102+
#### Native
89103

90104
Run the following commands to start the project.
91105

@@ -102,3 +116,28 @@ Install the dependencies and start the project.
102116
npm install
103117
npm start
104118
```
119+
120+
### Localtunnel (Optional)
121+
122+
If you don't have a public IP address, you can use [localtunnel](https://github.com/localtunnel/localtunnel) to expose your local server to the internet.
123+
124+
But when you're using [Arona with docker](#docker), it might be better to use [ngrok](https://ngrok.com/) instead of localtunnel (due to no [node.js](https://nodejs.org) required).
125+
126+
See the [Quickstart of ngronk](https://ngrok.com/docs/getting-started/) for more information.
127+
128+
To use localtunnel, run the following command in another terminal.
129+
130+
```sh
131+
npx localtunnel --port 3000
132+
```
133+
134+
You will get a URL like `https://your-subdomain.loca.lt`.
135+
136+
Fill the `baseUrl` field in the `config.yaml` file with the URL.
137+
138+
```yaml
139+
http:
140+
baseUrl: "https://your-subdomain.loca.lt"
141+
```
142+
143+
Don't forget to restart the project after changing the configuration.

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ hero:
1717
features:
1818
- title: Simplicity First
1919
details: Minimal setup with a simple and intuitive structure that makes it easy to get started.
20-
- title: 4 Instant Messengers Supported
21-
details: Support for LINE, Telegram, Discord and Matrix.
20+
- title: Mutiple Platforms
21+
details: It supports LINE, Telegram, Discord, and Matrix.
2222
- title: Open Source
2323
details: The project is open source and available on GitHub.
2424
- title: Cross-platform

docs/integrations/discord.md

+79-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# Discord
22

3+
[Discord](https://discord.com) is a communication platform that allows you to communicate with your team in real-time.
4+
5+
It's popular among gamers, developers, and other communities.
6+
7+
![Discord](../statics/brands/Discord.png)
8+
39
## Introduction
410

5-
The Discord integration allows you to send notifications to a Discord channel. You can use this integration to send notifications from your workflows to your Discord channel.
11+
The Discord integration allows you to send notifications to a Discord channel.
12+
You can use this integration to send notifications from your workflows to your Discord channel.
613

714
## Prerequisites
815

@@ -14,7 +21,75 @@ Before you can set up the Discord integration, you need to have the following:
1421

1522
## Setting up the integration
1623

17-
To set up the Discord integration, you need to create a webhook in your Discord channel. You can do this by following these steps:
24+
Here will show you how to set up the Discord integration by creating a Discord bot and adding it to a channel.
25+
26+
### Create a Discord bot
27+
28+
To set up the Discord integration, you need to create a webhook in your Discord channel.
29+
You can do this by following these steps:
30+
31+
1. Open [Discord Developer Portal](https://discord.com/developers).
32+
2. Click "New Application".
33+
3. Enter the name of your application.
34+
4. Click "Create" and accept the terms.
35+
5. Click on the "Bot" tab.
36+
6. Make all of "Privileged Gateway Intents" to be "ON".
37+
7. Here is the permissions you need to give to the bot (not minimum, but might be used in the future):
38+
- `Add Reactions`
39+
- `Attach Files`
40+
- `Embed Links`
41+
- `Read Message History`
42+
- `Send Messages`
43+
- `Send TTS Messages`
44+
- `Use External Emojis`
45+
- `Use External Stickers`
46+
8. Click on the "Copy" button to copy the appid and token, fill in the `appId` and `botToken` fields (see the [Configure](#configure) section).
47+
9. Go to OAuth2 tab.
48+
10. Use the "OAuth2 URL Generator" to generate the URL with the permissions you need.
49+
11. Open the generated URL in your browser.
50+
12. Select the server you want to add the bot to.
51+
13. Click "Authorize".
52+
14. Go to the channel you're hoping to bridging it.
53+
15. Start a chat with the bot and send a command to verify that it is working.
54+
55+
Here is the official documentation for creating a Discord bot: [Discord Developer Portal](https://discord.com/developers/docs/intro)
56+
57+
### Configure
58+
59+
Here are the options you can configure for the Discord integration:
60+
61+
| Option | Description |
62+
| ----------------------- | --------------------------------------- |
63+
| [`enable`](#enable) | Whether the provider is enabled or not. |
64+
| [`appId`](#appid) | The application ID of the Discord API. |
65+
| [`botToken`](#bottoken) | The bot token of the Discord API. |
66+
67+
#### `enable`
68+
69+
*type: `boolean`*
70+
71+
Whether the provider is enabled or not.
72+
73+
### `appId`
74+
75+
*type: `string`*
76+
77+
The application ID of the Discord API.
78+
79+
You should obtain this from the Discord Developer Portal.
80+
81+
More information can be found [here](https://discord.com/developers/docs/intro).
82+
83+
### `botToken`
84+
85+
*type: `string`*
86+
87+
The bot token of the Discord API.
88+
89+
You should obtain this from the Discord Developer Portal.
90+
91+
More information can be found [here](https://discord.com/developers/docs/intro).
92+
93+
---
1894

19-
1. Open your Discord channel.
20-
2. Click on the settings icon next to the channel name.
95+
> The copyright of the brand logos belongs to the respective brand owners.

0 commit comments

Comments
 (0)